Loading...
Loading...
Cross-chain bridging, swapping, and "bridge+call" via Relay through the OpenFinance backend. Use whenever the user wants to move tokens between chains or execute a destination-chain transaction funded from another chain. Triggers: "bridge X from Y to Z", "move my USDC to Base / Arbitrum / Optimism / Polygon / Solana", "swap ETH for USDC on Base", "cross-chain swap", "bridge and call", "how do I get to Solana / back from Solana", "my USDC is stuck on Solana", EVM-to-EVM, EVM-to-Solana, Solana-to-EVM, Bitcoin bridge, gas topup on destination, native-token sentinel 0x0, relay quote/preview/execute flow, poll intent status. Covers POST /agent/relay/quote, POST /agent/relay/execute, GET /agent/relay/status. Includes the chainId cheatsheet (1/137/8453/10/42161/... and Solana 792703809 specifically), tradeType semantics (EXACT_INPUT / EXACT_OUTPUT / EXPECTED_OUTPUT), why topupGas is auto-disabled on Solana routes, the Solana wallet delegation requirement for Solana-origin execute, and bridge+call payloads (txs array). Use together with openfin-setup (API key check) and openfin-troubleshooting (Blockhash not found, Custom:101, 412 delegation).
npx skill4agent add openfinance-tech/skills openfin-relay| Operation | What it is |
|---|---|
| Swap | Same-chain token swap (origin = destination chain) |
| Bridge | Move tokens across chains (USDC on Polygon → USDC on Base) |
| Bridge+call | Bridge + execute a destination-chain tx after the bridge lands — pass the tx(s) in |
x-api-key: open_…POST /agent/relay/quote{
"originChainId": 137,
"destinationChainId": 8453,
"originCurrency": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"destinationCurrency": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "10000000",
"tradeType": "EXACT_INPUT",
"recipient": "...", // optional; defaults to user's dest-chain addr
"slippageTolerance": "50", // basis points, optional
"topupGas": true, // optional; forced false for Solana routes
"topupGasAmount": "100000", // USD micro-units, optional
"usePermit": false, // EIP-3009 permit for supported tokens
"txs": [{"to", "data", "value"}], // optional; for bridge+call
"appFees": [{"recipient", "fee"}] // optional
}useroriginChainId{steps, fees, feeSponsorship}stepscheckPOST /agent/relay/execute/quotestepwalletClient.sendTransactioninstructionssignTransactionskipPreflight: truecheck.endpointGET /intents/status/v3{requestId, quote, txHashes, finalStatus}openfin-setupGET /agent/relay/status?requestId=<id>requestId/executewaitingdepositingpendingsubmitteddelayedsuccessrefundedfailuredetailsinTxHashestxHashesupdatedAtoriginChainIddestinationChainId| Field | Type | Notes |
|---|---|---|
| number | Source chain |
| number | Destination chain |
| string | Token contract on origin (or |
| string | Token contract on destination |
| string | Smallest unit as a STRING (wei for 18-dec, |
| string | |
useroriginChainIdrecipient| Chain | ID |
|---|---|
| Ethereum | |
| Polygon | |
| Base | |
| Optimism | |
| Arbitrum | |
| BSC | |
| Linea | |
| Blast | |
| Scroll | |
| zkSync Era | |
| Hyperliquid | |
| Solana | |
| Bitcoin | |
| Tron | |
GET https://api.relay.link/chains0x0000000000000000000000000000000000000000So11111111111111111111111111111111111111112EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v| Type | Meaning | Example |
|---|---|---|
| Send exactly | "Bridge 10 USDC" |
| Send variable, receive exactly | "Get me exactly 1 ETH on Base" |
| Alternate routing | Rarely needed |
EXACT_INPUTEXACT_OUTPUTtopupGas: truetopupGasAmount: "100000"792703809topupGasfalsetopupGasAmount"500000"topupGastopupGasAmount{
"originChainId": 792703809,
"destinationChainId": 137,
"originCurrency": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"destinationCurrency": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"amount": "1000000",
"tradeType": "EXACT_INPUT"
}userrecipientopenfin-setup{
"originChainId": 137,
"destinationChainId": 8453,
"originCurrency": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"destinationCurrency": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "10000000",
"tradeType": "EXACT_INPUT",
"txs": [
{ "to": "0x…target…", "data": "0x…calldata…", "value": "0" }
]
}successrefundedfailurewaitingdepositingpendingsubmitteddelayed/executefinalStatus/statusrequestId"1000000""1"useruserIdfailuredetailsstatus: refundedrelay_get_quoterelay_executerelay_get_status