### Install Orbiter Skills CLI Source: https://docs.orbiter.finance/developer/orbiter-skills-usage-guide Installs the Orbiter Finance bridge-skills toolkit using a one-command script or via the Skills CLI. The `curl` command fetches and executes an installation script from GitHub, while `npx skills add` integrates it if the Skills CLI is already in use. ```bash curl -fsSL https://raw.githubusercontent.com/Orbiter-Finance/bridge-skills/main/install.sh | sh() ``` ```bash npx skills add Orbiter-Finance/bridge-skills ``` -------------------------------- ### Initialize Router and Simulate Transaction Source: https://docs.orbiter.finance/developer/js-sdk Demonstrates how to define a trade pair, initialize the Orbiter router, and simulate the transfer amount to retrieve valid send and receive values. ```typescript const tradePair: TradePair = { srcChainId: 'SN_SEPOLIA', dstChainId: '11155111', srcTokenSymbol: 'ETH', dstTokenSymbol: 'ETH', routerType: RouterType.CONTRACT }; const router = orbiter.createRouter(tradePair); const min = router.getMinSendValue(); const max = router.getMaxSendValue(); const { sendValue, receiveValue } = router.simulationAmount(min); ``` -------------------------------- ### CLI: Same-Chain Swap Example Source: https://docs.orbiter.finance/developer/orbiter-skills-usage-guide Demonstrates how to perform a token swap on the same blockchain using the `orbiter bridge quote` command. This example shows swapping ETH for USDC on the Arbitrum chain (chain ID 42161). ```bash orbiter bridge quote --source-chain 42161 --dest-chain 42161 --source-token 0x0000000000000000000000000000000000000000 --dest-token 0xaf88d065e77c8cc2239327c5edb3a432268e5831 --amount 600000000000000 --user 0xabc... --recipient 0xabc... ``` -------------------------------- ### Example HTTP Request for Task Verification Source: https://docs.orbiter.finance/welcome/quest/task-verification-specification Demonstrates how to make a GET request to the Orbiter Finance verification API. It includes the endpoint, query parameters, and an example of an optional Authorization header. ```http GET /v1/verify?address="0x1234abcd..." Authorization: Bearer sk_test_abcdef123456 ``` -------------------------------- ### Check Available Trade Pairs (TypeScript) Source: https://docs.orbiter.finance/developer/js-sdk Retrieves available chains, tokens on a specific chain, and trade pairs between chains and tokens. It also provides a function to get all available trade pairs directly. Supports EVM, Starknet, and Tron chain types. ```typescript const chains: Chain[] = orbiter.getAllChains(); // choose a chain from list to get availabletokens const chain: Chain = { id: '11155111', name: 'Sepolia' }; const tokens: Token[] = orbiter.getAvailableTokens(chain.id); // choose a chain and a token symbol to get available const token: Token = { name: "ETH", symbol: "ETH", decimals: 18, address: "0x0000000000000000000000000000000000000000", isNative: true }; const tradePairs: TradePair[] = orbiter.getAvailableTradePairs(chain.id, token.symbol); // or directly get all available trade pair const tradePairs: TradePair[] = getAllTradePairs(); ``` -------------------------------- ### Create and Send Transaction from BTC Chains (TypeScript) Source: https://docs.orbiter.finance/developer/js-sdk Illustrates creating a router for a BTC trade pair, checking send limits, simulating amounts, and constructing a PSBT (Partially Signed Bitcoin Transaction). It includes steps for creating payment structures, adding inputs from UTXOs, estimating fees, adding change, signing inputs, and broadcasting the transaction. ```typescript import * as bitcoin from 'bitcoinjs-lib' import * as ecc from 'tiny-secp256k1'; import { ECPairFactory, networks } from 'ecpair'; // choose a tradePair to create router const tradePair: TradePair = { srcChainId: 'FRACTAL_TEST', dstChainId: '11155111', srcTokenSymbol: 'BTC', dstTokenSymbol: 'BTC', routerType: RouterType.EOA } const router = orbiter.createRouter(tradePair); // check min and max value const min = router.getMinSendValue(); const max = router.getMaxSendValue(); // simulationAmount const { sendValue, receiveValue } = router.simulationAmount(min); // creat payment const network = networks.bitcoin; const ECPair = ECPairFactory(ecc); const keyPair = ECPair.fromWIF(btcPrivateKey, network); const payment = bitcoin.payments.p2wpkh({ pubkey: keyPair.publicKey, network, }); // create transaction and add output const psbt = await router.createTransaction(payment.address, 'receiver', sendValue); expect(psbt).toBeDefined(); // get utxos from chain const utxos = ... // add inputs const script = payment.output; utxos.forEach((utxo: any) => { const inputData = { hash: utxo.txid, index: utxo.vout, witnessUtxo: { script, value: utxo.satoshi }, } psbt.addInput(inputData); }); // estimate fee from oracle or explorer const fee = ... // add change !!!important!!! const change = totalAmount - Number(sendValue) - fee; if (change > 0) { psbt.addOutput({ script, value: change }); } // sign inputs for (let i = 0; i < psbt.inputCount; i++) { psbt.signInput(i, keyPair); psbt.validateSignaturesOfInput(i, ( pubkey: Buffer, msghash: Buffer, signature: Buffer, ) => ECPair.fromPublicKey(pubkey).verify(msghash, signature)); } psbt.finalizeAllInputs(); // broadcast const broadcastResult = ... ``` -------------------------------- ### Create and Send Transaction from EVM Chains (TypeScript) Source: https://docs.orbiter.finance/developer/js-sdk Demonstrates creating a router for a specified trade pair, checking minimum and maximum send values, simulating amounts, and constructing, signing, and sending a transaction using an ethers.js wallet. Includes optional ERC20 approval steps. ```typescript import { Wallet, JsonRpcProvider } from "ethers"; // choose a tradePair to create router const tradePair: TradePair = { srcChainId: '11155111', dstChainId: '421614', srcTokenSymbol: 'ETH', dstTokenSymbol: 'ETH', routerType: RouterType.EOA } const router = orbiter.createRouter(tradePair); // check min and max value const min = router.getMinSendValue(); const max = router.getMaxSendValue(); // simulationAmount const { sendValue, receiveValue } = router.simulationAmount(min); // connect wallet const provider = new JsonRpcProvider('https://ethereum-sepolia-rpc.publicnode.com'); const wallet = new Wallet('privateKey', provider); // check if balance sufficient const balance = (await provider.getBalance(wallet)).toString(); // if is erc20 token, need approve // const approve = await router.createApprove(account.address, sendValue); // const approveResponce = await wallet.sendTransaction(approve); // const approveReceipt = await approveReceipt.wait(); // create transaction const transaction = router.createTransaction(wallet.address, 'receiver', sendValue); // send transaction const transactionResponce = await wallet.sendTransaction(transaction); const transactionReceipt = await transactionResponce.wait(); ``` -------------------------------- ### Execute Cross-Chain Transactions Source: https://docs.orbiter.finance/developer/js-sdk Provides implementation patterns for executing bridge transactions on Tron, Starknet, and Solana networks using their respective SDKs and signing mechanisms. ```javascript // Tron implementation const tronWeb = new TronWeb({ fullHost: 'https://nile.trongrid.io', headers: { "TRON-PRO-API-KEY": 'API key' }, privateKey: 'privateKey' }); const approve = await router.createApprove(address, sendValue); const signedApprove = await tronWeb.trx.sign(approve.transaction); const approveRes = await tronWeb.trx.sendRawTransaction(signedApprove); const transaction = await router.createTransaction(address, evmAddress, sendValue); const signedTransaction = await tronWeb.trx.sign(transaction.transaction); const transferRes = await tronWeb.trx.sendRawTransaction(signedTransaction); ``` ```typescript // Starknet implementation const provider = new Provider({ nodeUrl: constants.NetworkName.SN_SEPOLIA }); const account = new Account(provider, starknetAddress, privateKey); const approve = await router.createApprove(account.address, sendValue); const transaction = router.createTransaction(wallet.address, 'receiver', sendValue); const transactionResponce = await account.execute([approve, transaction]); const transactionReceipt = await provider.waitForTransaction(transactionResponce.transaction_hash); ``` ```typescript // Solana implementation const connection = new Connection('solana-endpoint', "confirmed"); const sender = Keypair.fromSecretKey(bs58.decode('privateKey')); const transfers = await router.createTransaction(sender.publicKey.toString(), 'receiver', sendValue); const blockhash = await connection.getLatestBlockhash(); const messageV0 = new TransactionMessage({ payerKey: sender.publicKey, recentBlockhash: blockhash.blockhash, instructions: [...transfers] }).compileToV0Message(); const transaction = new VersionedTransaction(messageV0); transaction.sign([sender]); const signature = await connection.sendRawTransaction(Buffer.from(transaction.serialize())); ``` -------------------------------- ### Initialize Orbiter Finance SDK (JavaScript) Source: https://docs.orbiter.finance/developer/js-sdk Initializes the OrbiterClient with API endpoint, optional API key, and channel ID. This is the first step to interact with the Orbiter Finance bridge. ```javascript import { OrbiterClient, ENDPOINT } from "@orbiter-finance/bridge-sdk"; const orbiter = await OrbiterClient.create({ apiEndpoint: ENDPOINT.TESTNET, apiKey: 'xxxxxx', //optional channelId: 'xxxxxx' //optional }); ``` -------------------------------- ### Query Bridge and User Data Source: https://docs.orbiter.finance/developer/js-sdk Methods for checking the status of a specific bridge transaction and retrieving user-specific data like Opoints and transaction history. ```typescript const transactionStatus = await orbiter.checkTransactionStatus(hash); const opoints = await orbiter.getUserOpoint(wallet.address); const history = await orbiter.getTransactionHistory(wallet.address, 0); ``` -------------------------------- ### Create Router for Tron Chains (TypeScript) Source: https://docs.orbiter.finance/developer/js-sdk Shows how to create a router specifically for Tron chains with a CONTRACT router type. This snippet focuses on the initial router creation and checking send value limits, setting the stage for transaction creation. ```typescript import { TronWeb } from 'tronweb'; // choose a tradePair to create router const tradePair: TradePair = { srcChainId: '3448148188', dstChainId: '11155111', srcTokenSymbol: 'JST', dstTokenSymbol: 'JST', routerType: RouterType.CONTRACT } const router = orbiter.createRouter(tradePair); // check min and max value ``` -------------------------------- ### GET /chains Source: https://docs.orbiter.finance/developer/rest-api/overview Retrieves a list of all blockchain networks currently supported by the platform. ```APIDOC ## GET /chains ### Description Get available blockchain networks. ### Method GET ### Endpoint /chains ### Parameters #### Headers - **x-api-key** (string) - Required - API key for authentication ``` -------------------------------- ### Get Chains API (OpenAPI) Source: https://docs.orbiter.finance/developer/rest-api/api-reference This snippet details the OpenAPI specification for the 'Get Chains' API endpoint. It outlines the request method (GET), the response structure including chain ID, name, native currency details, and virtual machine type. ```json { "openapi": "3.1.0", "info": { "title": "Default module", "version": "1.0.0" }, "tags": [ { "name": "Third-party Integration API" } ], "servers": [ { "url": "https://openapi.orbiter.finance", "description": "Production" } ], "security": [], "paths": { "/chains": { "get": { "summary": "Get Chains", "deprecated": false, "description": "", "tags": [ "Third-party Integration API" ], "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "Request status, 'success' indicates success, 'error' indicates failure" }, "message": { "type": "string", "description": "Request message, empty when successful, contains error information when failed" }, "result": { "type": "array", "items": { "type": "object", "properties": { "chainId": { "type": "string", "description": "Chain ID, unique identifier of the blockchain network" }, "internalId": { "type": "integer", "description": "Internal ID, chain identifier used within the system" }, "name": { "type": "string", "description": "Chain name, display name of the blockchain network" }, "nativeCurrency": { "type": "object", "properties": { "name": { "type": "string" }, "symbol": { "type": "string" }, "decimals": { "type": "integer" }, "coinKey": { "type": "string" }, "address": { "type": "string" }, "isNative": { "type": "boolean" }, "paymaster": { "type": "string" } }, "required": [ "name", "symbol", "decimals", "coinKey", "address" ] }, "vm": { "type": "string" } }, "required": [ "chainId", "internalId", "name", "nativeCurrency", "vm" ] } } }, "required": [ "status", "message", "result" ] } } } } }, "headers": {} } } } } ``` -------------------------------- ### CLI: Fetch Chains and Tokens Source: https://docs.orbiter.finance/developer/orbiter-skills-usage-guide Commands to retrieve information about supported blockchain chains and tokens within the Orbiter Finance ecosystem. The `--raw` flag provides unformatted output, while `--chain`, `--prefix`, `--bridgeable`, and `--limit` allow for specific filtering of token data. ```bash orbiter chains orbiter chains --raw ``` ```bash orbiter tokens --chain 42161 --prefix ETH orbiter tokens --chain 42161 --prefix USDC --bridgeable --limit 5 ``` -------------------------------- ### Example JSON Response for Successful Task Verification Source: https://docs.orbiter.finance/welcome/quest/task-verification-specification Illustrates the expected JSON response when a user's task verification is successful. It includes a boolean indicating validity, a success message, and an optional result object. ```json { "isValid": true, "message": "Verification succeeded", "result": null } ``` -------------------------------- ### Example JSON Response for Failed Task Verification Source: https://docs.orbiter.finance/welcome/quest/task-verification-specification Shows the JSON structure for an error response from the Orbiter Finance verification API. It indicates failure with `isValid: false` and provides a detailed error message. ```json { "isValid": false, "message": "The provided txHash is invalid." } ``` -------------------------------- ### CLI: Execute Bridge Flow (Quote, Sign, Simulate) Source: https://docs.orbiter.finance/developer/orbiter-skills-usage-guide Orchestrates a complete cross-chain bridge process, including fetching a quote, generating a signable transaction, and simulating it. Supports options like `call-on-fail` and human-readable amount inputs. The `privateKey` environment variable enables auto-approval for insufficient allowances. ```bash orbiter bridge flow --source-chain 42161 --dest-chain 8453 --source-token 0x0000000000000000000000000000000000000000 --dest-token 0x0000000000000000000000000000000000000000 --amount 300000000000000 --user 0xabc... --recipient 0xabc... --chain 42161 --call-on-fail ``` ```bash orbiter bridge flow --source-chain 42161 --dest-chain 8453 --source-token 0x0000000000000000000000000000000000000000 --dest-token 0x0000000000000000000000000000000000000000 --amount-human 0.0006 --amount-decimals 18 --user 0xabc... --recipient 0xabc... --format summary ``` ```bash ORBITER_PRIVATE_KEY=... orbiter bridge flow --source-chain 42161 --dest-chain 8453 --source-token 0x... --dest-token 0x... --amount 1000000 --user 0xabc... --recipient 0xabc... --chain 42161 --auto-approve ``` -------------------------------- ### GET /verify/xxxx Source: https://docs.orbiter.finance/welcome/quest/task-verification-specification Verifies whether a user has completed a specific task and returns the validation result. ```APIDOC ## GET /verify/xxxx ### Description Verifies whether a user has completed a task. Third-party projects can use this API to validate user task completion and return the results to the Orbiter platform. ### Method GET ### Endpoint /verify/xxxx ### Parameters #### Query Parameters - **tweetId** (string) - Optional - The ID of the tweet associated with the task. - **address** (string) - Required - The user's wallet or account address. ### Request Example GET /v1/verify?address="0x1234abcd..." Authorization: Bearer sk_test_abcdef123456 ### Response #### Success Response (200) - **isValid** (boolean) - Indicates whether the verification passed (true) or failed (false). - **message** (string) - A human-readable result or error message. - **result** (object) - Optional, strategy-specific return data. #### Response Example { "isValid": true, "message": "Verification succeeded", "result": null } ``` -------------------------------- ### CLI: Construct Bridge Transaction Source: https://docs.orbiter.finance/developer/orbiter-skills-usage-guide Constructs a raw transaction for a cross-chain bridge operation. Similar to `bridge quote`, it requires chain and token details, amount, user, and recipient. It can also specify an action like 'swap' for same-chain token exchanges. ```bash orbiter bridge tx --source-chain 42161 --dest-chain 8453 --source-token 0x0000000000000000000000000000000000000000 --dest-token 0x0000000000000000000000000000000000000000 --amount 300000000000000 --user 0xabc... --recipient 0xabc... ``` ```bash orbiter bridge tx --source-chain 42161 --dest-chain 42161 --source-token 0x0000000000000000000000000000000000000000 --dest-token 0xaf88d065e77c8cc2239327c5edb3a432268e5831 --amount 600000000000000 --user 0xabc... --recipient 0xabc... --action swap ``` -------------------------------- ### CLI: Get Bridge Quote Source: https://docs.orbiter.finance/developer/orbiter-skills-usage-guide Generates a quote for a cross-chain bridge transaction. Requires source and destination chain/token identifiers, amount, user address, and recipient address. Supports both raw amount with decimals and human-readable amount inputs, with an option to format the output as a summary. ```bash orbiter bridge quote --source-chain 42161 --dest-chain 8453 --source-token 0x0000000000000000000000000000000000000000 --dest-token 0x0000000000000000000000000000000000000000 --amount 300000000000000 --user 0xabc... --recipient 0xabc... ``` ```bash orbiter bridge quote --source-chain 42161 --dest-chain 8453 --source-token 0x0000000000000000000000000000000000000000 --dest-token 0x0000000000000000000000000000000000000000 --amount-human 0.0006 --amount-decimals 18 --user 0xabc... --recipient 0xabc... --format summary ``` -------------------------------- ### POST /cross Source: https://docs.orbiter.finance/welcome/inscription-cross-rollup-protocol Initiates the cross-chain action for a specific inscription. ```APIDOC ## POST /cross ### Description Initiates the cross-chain transfer process for an inscription. ### Method POST ### Endpoint /cross ### Request Body - **p** (string) - Required - Supported Protocol (e.g., "xxx-20") - **op** (string) - Required - Operation type (must be "cross") - **tick** (string) - Required - Inscription name - **amt** (string) - Required - Amount to cross ### Request Example { "p": "xxx-20", "op": "cross", "amt": "1000", "tick": "Name" } ``` -------------------------------- ### GET /transaction/address/{address} Source: https://docs.orbiter.finance/developer/rest-api/api-reference Queries the transaction history for a given blockchain address. ```APIDOC ## GET /transaction/address/{address} ### Description Queries the transaction history for a given blockchain address. This endpoint allows users to retrieve a list of transactions associated with a specific address. ### Method GET ### Endpoint https://openapi.orbiter.finance/transaction/address/{address} ### Parameters #### Path Parameters - **address** (string) - Required - The blockchain address to query transactions for. #### Query Parameters *None* #### Request Body *None* ### Request Example *None* ### Response #### Success Response (200) - **status** (string) - Request status, 'success' indicates success, 'error' indicates failure. - **message** (string) - Request message, empty when successful, contains error information when failed. - **result** (object) - Contains the transaction data. - **offset** (integer) - The offset for pagination. - **limit** (integer) - The limit for pagination. - **rows** (array) - An array of transaction objects. - **sourceId** (string) - The unique identifier for the source transaction. - **targetId** (string) - The unique identifier for the target transaction. - **sourceToken** (string) - The token used in the source transaction. - **targetToken** (string) - The token used in the target transaction. - **sourceChain** (string) - The source chain of the transaction. - **targetChain** (string) - The target chain of the transaction. - **sourceAmount** (string) - The amount of tokens in the source transaction. - **targetAmount** (string) - The amount of tokens in the target transaction. - **finalAmount** (string|null) - The final amount after any conversions. - **sourceMaker** (string) - The address that initiated the source transaction. - **sourceAddress** (string) - The source address of the transaction. - **targetAddress** (string) - The target address of the transaction. - **originSymbol** (string|null) - The symbol of the origin token. - **originToken** (string|null) - The origin token address. - **originAmount** (string|null) - The origin amount of the token. - **finalSymbol** (string|null) - The symbol of the final token. - **finalToken** (string|null) - The final token address. - **sourceSymbol** (string) - The symbol of the source token. - **targetSymbol** (string) - The symbol of the target token. - **status** (integer) - The status code of the transaction. - **sourceTime** (string) - The timestamp of the source transaction. - **targetTime** (string) - The timestamp of the target transaction. - **points** (string) - Points associated with the transaction. - **txType** (string) - The type of transaction. - **sourceTokenInfo** (object) - Information about the source token. - **chainId** (integer) - The chain ID of the source token. - **address** (string) - The contract address of the source token. - **decimals** (integer) - The number of decimals for the source token. - **name** (string) - The name of the source token. - **symbol** (string) - The symbol of the source token. - **logoURI** (string) - The URI for the source token logo. - **coinKey** (string) - The coin key for the source token. - **targetTokenInfo** (object) - Information about the target token. - **chainId** (integer|string) - The chain ID of the target token. - **address** (string) - The contract address of the target token. - **decimals** (integer) - The number of decimals for the target token. - **name** (string) - The name of the target token. - **symbol** (string) - The symbol of the target token. - **logoURI** (string) - The URI for the target token logo. - **coinKey** (string) - The coin key for the target token. - **count** (integer) - The total number of transactions found. #### Response Example ```json { "status": "success", "message": "", "result": { "offset": 0, "limit": 10, "rows": [ { "sourceId": "0x123...", "targetId": "0x456...", "sourceToken": "0xabc...", "targetToken": "0xdef...", "sourceChain": "ethereum", "targetChain": "arbitrum", "sourceAmount": "1.0", "targetAmount": "0.99", "finalAmount": "0.99", "sourceMaker": "0x111...", "sourceAddress": "0x222...", "targetAddress": "0x333...", "originSymbol": "ETH", "originToken": "0x0...", "originAmount": "1.0", "finalSymbol": "ETH", "finalToken": "0x0...", "sourceSymbol": "ETH", "targetSymbol": "ETH", "status": 1, "sourceTime": "2023-10-27T10:00:00Z", "targetTime": "2023-10-27T10:05:00Z", "points": "100", "txType": "transfer", "sourceTokenInfo": { "chainId": 1, "address": "0x0...", "decimals": 18, "name": "Ether", "symbol": "ETH", "logoURI": "...", "coinKey": "eth" }, "targetTokenInfo": { "chainId": 42161, "address": "0x0...", "decimals": 18, "name": "Ether", "symbol": "ETH", "logoURI": "...", "coinKey": "eth" } } ], "count": 100 } } ``` ``` -------------------------------- ### GET /transaction/status/{hash} Source: https://docs.orbiter.finance/developer/rest-api/overview Queries the current status of a cross-chain transaction using its hash. ```APIDOC ## GET /transaction/status/{hash} ### Description Query transaction status by hash. ### Method GET ### Endpoint /transaction/status/{hash} ### Parameters #### Path Parameters - **hash** (string) - Required - Transaction hash to query #### Headers - **x-api-key** (string) - Optional - API key for authentication ``` -------------------------------- ### Starknet OrbiterRouterV3 ABI Definition Source: https://docs.orbiter.finance/developer/smart-contract/orbiter-router This snippet defines the Application Binary Interface (ABI) for the Starknet OrbiterRouterV3 contract. It includes structures like Uint256 and events/functions such as Transfer and transferERC20, specifying their inputs and types. ```typescript [{"name":"Uint256","size":2,"type":"struct","members":[{"name":"low","type":"felt","offset":0},{"name":"high","type":"felt","offset":1}]},{"data":[{"name":"to","type":"felt"},{"name":"amount","type":"Uint256"},{"name":"token","type":"felt"},{"name":"ext_len","type":"felt"},{"name":"ext","type":"felt*"}],"keys":[],"name":"Transfer","type":"event"},{"name":"transferERC20","type":"function","inputs":[{"name":"_token","type":"felt"},{"name":"_to","type":"felt"},{"name":"_amount","type":"Uint256"},{"name":"_ext_len","type":"felt"},{"name":"_ext","type":"felt*"}],"outputs":[]}] ``` -------------------------------- ### Initiate Inscription Cross (JSON) Source: https://docs.orbiter.finance/welcome/inscription-cross-rollup-protocol This JSON object represents the parameters for initiating an inscription cross operation. It requires the protocol version ('p'), operation type ('op' set to 'cross'), the inscription tick ('tick'), and the amount ('amt') to be crossed. ```json { "p": "xxx-20", "op": "cross", "amt": "1000", "tick": "Name" } ``` -------------------------------- ### POST executeSwap Source: https://docs.orbiter.finance/developer/smart-contract/aggregator Executes a token swap operation through the aggregator contract. ```APIDOC ## POST executeSwap ### Description Executes a token swap between two assets, supporting fee deduction and external call execution. ### Method POST ### Parameters #### Request Body - **SwapRequest** (struct) - Required - Contains input/output tokens, amounts, fee details, and recipient info. - **Call[]** (array) - Required - Array of external calls to execute during the swap. ### Request Example { "inputToken": "0x0000000000000000000000000000000000000000", "outputToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "inputAmount": "1000000000000000000", "minOutputAmount": "1900000000", "feeAmount": "10000000000000000", "feeRecipient": "0x...", "recipient": "0x...", "unwrapped": false, "extData": "743d307831323326733d302e35" } ### Response #### Success Response (200) - **status** (string) - Transaction success status. ``` -------------------------------- ### POST /crossover Source: https://docs.orbiter.finance/welcome/inscription-cross-rollup-protocol Completes the cross-chain action for a specific inscription. ```APIDOC ## POST /crossover ### Description Finalizes the cross-chain transfer process for an inscription. ### Method POST ### Endpoint /crossover ### Request Body - **p** (string) - Required - Supported Protocol (e.g., "xxx-20") - **op** (string) - Required - Operation type (must be "crossover") - **tick** (string) - Required - Inscription name - **amt** (string) - Required - Amount to cross - **fc** (integer) - Required - Internal ID of the source network ### Request Example { "p": "xxx-20", "fc": 9521, "op": "crossover", "amt": "1000", "tick": "Name" } ``` -------------------------------- ### Execute Token Swap in Solidity Source: https://docs.orbiter.finance/developer/smart-contract/aggregator Executes a token swap using the Aggregator contract. It requires detailed SwapRequest parameters including token addresses, amounts, fees, and recipient information. The function also accepts an array of Call structs for additional actions, such as interacting with a DEX adapter. For ETH swaps, msg.value must match the inputAmount. ```solidity struct SwapRequest { address inputToken; // Input token address address outputToken; // Output token address uint256 inputAmount; // Input amount uint256 minOutputAmount; // Minimum output amount uint256 feeAmount; // Fee amount address feeRecipient; // Fee recipient address address recipient; // Recipient address bool unwrapped; // Whether to unwrap WETH bytes extData; // Extended data } struct Call { address target; bytes callData; uint256 value; } // Swap ETH to USDC Aggregator.executeSwap( SwapRequest({ inputToken: address(0), outputToken: USDC_ADDRESS, inputAmount: 1 ether, minOutputAmount: 1900 * 1e6, // 1900 USDC feeAmount: 0.01 ether, feeRecipient: FEE_RECIPIENT, recipient: USER_ADDRESS, unwrapped: false, extData: "" }), [Call({ target: DEX_ADAPTER, callData: abi.encodeWithSelector(...), value: 0 })] ){value: 1 ether}; ``` -------------------------------- ### POST executeBridge Source: https://docs.orbiter.finance/developer/smart-contract/aggregator Executes a cross-chain bridge operation for tokens. ```APIDOC ## POST executeBridge ### Description Initiates a cross-chain bridge transfer for the specified token and amount. ### Method POST ### Parameters #### Request Body - **BridgeRequest** (struct) - Required - Contains token address, amount, fee details, and recipient info. ### Request Example { "inputToken": "0x0000000000000000000000000000000000000000", "inputAmount": "1000000000000000000", "feeAmount": "10000000000000000", "feeRecipient": "0x...", "recipient": "0x...", "unwrapped": false, "extData": "" } ### Response #### Success Response (200) - **status** (string) - Transaction success status. ```