Skip to main content

Overview

An intent is a signed, machine-verifiable request to execute a swap under the constraints of an accepted quote.

POST /intents

Creates an intent from a valid quote and user addresses. Utexo creates the intent off-chain and returns chain-specific approval data. Authentication: X-API-Key
The response identifies the required approvalMechanism. Exactly one of permit2, htlc, or cosign contains approval data in a successful response.

POST /intents/{id}/approvals

Attaches signed approval data to an existing intent and authorizes execution. Exactly one approval payload must be provided. Authentication: X-API-Key Permit2 example:
See Chain-specific intent approval for signing requirements.

GET /intents/{id}/status

Returns the combined progress of an intent and its related swap. Authentication: X-API-Key

Status lifecycle

Chain-specific intent approval

Always use the approval mechanism returned by POST /intents. Do not convert approval data between network types.

EVM networks

EVM networks use Permit2. Before submitting the off-chain Permit2 signature, ensure that the ERC-20 token allowance for the Permit2 contract is sufficient.
  1. Confirm that approvalMechanism is permit2.
  2. Read the payload from the permit2 response object.
  3. Create and sign the EIP-712 Permit2 payload locally.
  4. Submit the signature as the permit2 value to POST /intents/{id}/approvals.
The TypeScript integration uses preparePermit2Approval from @hot-pot/hotpot-sdk-ts.

Tron

Tron also uses Permit2, but the user signs a TIP-712 payload with TronWeb.
  1. Confirm that approvalMechanism is permit2.
  2. Read the payload from the permit2 response object.
  3. Derive the user source address from the signing key.
  4. Create and sign the TIP-712 Permit2 payload.
  5. Submit the signature as permit2.
Submit the resulting signature to POST /intents/{id}/approvals in the same { "permit2": "..." } shape used for EVM approvals.

Solana

Solana uses a cosigned versioned transaction. Utexo returns a hex-encoded transaction in cosign.transaction. The signing process must preserve signature ordering:
  • Resolver signature: position 0
  • User signature: position 1
  • Optional backend signature: position 2
Submit approval to POST /intents/{id}/approvals.

Bitcoin

Bitcoin uses a PSBT to authorize a Taproot HTLC deposit.
  1. Confirm that approvalMechanism is htlc.
  2. Read the Base64-encoded PSBT from htlc.psbt.
  3. Read the required input indexes from htlc.inputs.
  4. Sign only those inputs.
  5. Preserve unrelated transaction data and existing partial signatures.
  6. Serialize the updated PSBT in Base64 format.
  7. Submit it as the psbt value to POST /intents/{id}/approvals.
The following example signs the input indexes returned by POST /intents.
For Taproot inputs, the signer must use the referenced UTXO data to calculate the required signature hash and produce the applicable Schnorr witness signature.