Sending transactions

Sending a transaction to the inbound address.

Important things you need to check before sending transactions: 1. Never cache this response and do not send funds after the expiry.

Send the transaction: using our response data from /swap endpoint

  • From UTXO : For example, if you are using the XDeFi wallet on the UTXO assets: For more information related to sending transaction with UTXO and Cosmos, you can read from your wallet documentation. For example, if you are using xDeFi wallet, you can check: https://developers.xdefi.io/developers/extension-wallet

(window as any).xfi.bitcoin?.request({
        "method": "transfer",
        "params": [
            {
                "from": "bc1qdp2c5hsk9lwldum5vm2xx65dxacwzxxyy2y4wt",
                "recipient": "bc1qkttu0a6gljrrswzyw3rwp59sunjep7zfqgyvr9",
                "asset": "BTC.BTC",
                "feeRate": 5,
                "amount": {
                    "amount": "100000000",
                    "decimals": 8
                },
                "memo": "=:ETH.ETH:0x207ca4370639120f9A049aF9CAB4fCaa608F2445::zcx-com:25"
            }
        ]
    }
)
  • From EVM to BTC

provider?.getSigner(account)?.sendTransaction({
        to: swapData.to,
        data: swapData.data,
        value: swapData.nativeValue
      });

Last updated