Build a quote, optional approve SafeTx, and SafeMessage EIP-712 to sign.
Returns everything the SDK needs to take an owner from “I want to buy”
to a relayed Fusion order whose maker is the Tokenized Assets Account.
The flow is signing-based, not transaction-based:
approval_safe_tx_eip712 is populated (Safe→LOP allowance is
insufficient), sign it with wallet.signTypedData(...) and relay via
POST /v2/gas_sponsorship/prepare so the sponsor broadcasts the resulting
Safe.execTransaction(USDC.approve(LOP_v4, ...)). Wait for that tx
to confirm before signing the order.order.safe_message_eip712 with the same owner wallet — this is
a Safe ERC-1271 wrapper around the Fusion order hash. POST the
resulting 65-byte ECDSA together with the rest of the order fields
to /order/submit.The owner never broadcasts an on-chain transaction in this flow; all on-chain action goes through the product account via the sponsor relay.
Documentation Index
Fetch the complete documentation index at: https://docs.compasslabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
Build a buy/sell order against the 1inch Fusion intent flow.
Token the sender is paying. Either an on-chain Ondo symbol (e.g. TSLAon), the literal USDC, or a 0x-prefixed Ethereum address.
Token the sender is receiving. Same accepted forms as from_token.
Human-readable amount of from_token to swap (decimal string). Decimals are applied server-side.
EOA that owns the Tokenized Assets Account. Determines the product account address and signs the EIP-712 envelopes returned by this endpoint (the approve SafeTx and the SafeMessage wrapping the order hash).
Max acceptable slippage in basis points (1 bp = 0.01%).
1 <= x <= 1000Successful Response
Composed response: quote + optional approval SafeTx + EIP-712 order to sign.
Quote preview.
Order metadata plus the SafeMessage EIP-712 to sign. The owner signs order.safe_message_eip712 and POSTs the resulting 65-byte ECDSA to /order/submit along with the rest of the order fields.
EIP-712 Safe.execTransaction wrapping USDC.approve(LOP_v4, max_uint256). Populated when the Tokenized Assets Account's allowance to LOP v4 is below amount; sign with wallet.signTypedData(...) and relay via POST /v2/gas_sponsorship/prepare. null when allowance is already sufficient.
{
"domain": {
"chainId": 8453,
"verifyingContract": "0x6B90E8B4E3E971E74C1A47a3a20976377E2dB4b1"
},
"message": {
"baseGas": "0",
"data": "0x8d80ff0a0000000000000000000000000000000000000000000000000000000000000020",
"gasPrice": "0",
"gasToken": "0x0000000000000000000000000000000000000000",
"nonce": "7",
"operation": 1,
"refundReceiver": "0x0000000000000000000000000000000000000000",
"safeTxGas": "0",
"to": "0x93C23AAE4793C14D6DF35D2A2A2234204e1559dA",
"value": "0"
},
"primaryType": "SafeTx",
"types": {
"EIP712Domain": [
{ "name": "chainId", "type": "uint256" },
{
"name": "verifyingContract",
"type": "address"
}
],
"SafeTx": [
{ "name": "to", "type": "address" },
{ "name": "value", "type": "uint256" },
{ "name": "data", "type": "bytes" },
{ "name": "operation", "type": "uint8" },
{ "name": "safeTxGas", "type": "uint256" },
{ "name": "baseGas", "type": "uint256" },
{ "name": "gasPrice", "type": "uint256" },
{ "name": "gasToken", "type": "address" },
{
"name": "refundReceiver",
"type": "address"
},
{ "name": "nonce", "type": "uint256" }
]
}
}