> For the complete documentation index, see [llms.txt](https://docs.getrekt.trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getrekt.trade/integration.md).

# integration

The GetRekt SDK builds unsigned Sui programmable transaction blocks. Users sign in their wallets; operational transactions use a restricted operator signer. The wallet interface is at `/live.html`, and the local simulator is at `/`. They do not share balances.

The SDK and contracts still implement the earlier 2100× limit and reward curve, with no referral payout path. GetRekt's new 2000×, $REKT, and referral specification is documented in [implementation status](broken://pages/c7eabe8af8c3f2ae7c1c1dce69dad717e5d1ac7a). Do not infer a feature from a renamed documentation page.

## On-chain reads

`packages/client/state.mjs` reads Vault, Position, Claim, and Rewards using fixed Move BCS layouts. It checks network genesis, complete types, shared ownership, and trailing bytes. Wallet balances display native USDC only; unpaid claims and reward balances are separate.

Positions and claims are read from paginated Tables. The interface identifies unscanned pages. A larger deployment needs an indexer with consistency checks against the underlying chain.

## Position transactions

Cash-position builders can merge the user's native USDC Coins. Debt-position builders can consume specified portions of up to 32 claims. The contract verifies ownership, remaining amounts, and duplicates; unused claim portions retain their FIFO position.

`openCashBounded`, `openDebtPartsBounded`, and `closeBounded` bind an expected price, permitted deviation, and expiry. Execution uses a current quote that passes price checks. The transaction aborts if its bounds are exceeded. Older sequence-bound APIs remain available, but a frequently updated oracle can invalidate them before execution.

The wallet controller resolves the complete transaction, checks the sender and gas budget, simulates with real gas checks, then rechecks the wallet account and network. It asks the wallet to sign those same transaction bytes and saves the digest for confirmation and recovery.

{% hint style="warning" %}
Simulation does not guarantee execution: price, gas, and object versions can change. An unknown financial transaction result must be reconciled before a replacement is submitted.
{% endhint %}

## CCTP adapter

`packages/sdk/cctp.mjs` constructs exact-amount EVM approval and `depositForBurn` calls. It validates native USDC, source chain, balance, allowance, Sui recipient, and remote messenger. Bridge quotes expire; the adapter refreshes the quote after approval and before the burn.

The official `MessageSent` source log must match the saved intent. The adapter checks Circle attestation fields and rechecks destination state, pause status, versions, nonce, and attesters. It verifies signatures before building the official Sui `receive → prepare_mint → handler::mint → complete_mint` flow. Circle's contracts enforce final authentication and replay protection.

Imported progress files are not evidence of receipt. Recovery rereads the source transaction and destination state. Receipt of Sui USDC and opening a GetRekt position remain separate signatures.

## Configuration and release gates

`deployment/public.json` provides real deployment IDs and evidence. Execution remains disabled when package, Vault, capabilities, governance, or required evidence are absent. Mainnet additionally requires an independently supplied manifest SHA-256 pin; a manifest cannot authenticate itself by declaring its own hash.

A restricted operator mode supports the first testnet bridge trial without claiming that the trial has already passed. It requires the exact approved testnet configuration and on-chain governance checks. It does not bypass mainnet requirements.

Source paths, namespaces, environment variables, and exported JSON names may still use `21x`, `x21`, `sui21`, or `only21m`. Keep those literal identifiers when running current tools. Hashes identify artifacts; reviewers still need to assess the content and evidence they identify.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.getrekt.trade/integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
