Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

transferRemote

Send funds to a remote chain via the gateway contract.

Signature

function transferRemote(
  client: Client<Signer>,
  parameters: {
    remote: Remote
    recipient: Addr32
    sender: Address
    funds: Coins
  },
): Promise<{ hash: Uint8Array } & TxData>

Example

import { createSignerClient, createTransport, testnet, PrivateKeySigner } from "@left-curve/sdk"
import type { Address } from "@left-curve/sdk"
 
const client = createSignerClient({
  chain: testnet,
  transport: createTransport(),
  signer: PrivateKeySigner.fromMnemonic(process.env.DANGO_MNEMONIC!),
})
const sender: Address = "0x1234567890abcdef1234567890abcdef12345678"
 
await client.gateway.transferRemote({
  sender,
  remote: { warp: { domain: 1, contract: "0xabc..." } },
  recipient: "0x000000000000000000000000abcdef1234567890abcdef1234567890abcdef12",
  funds: { "bridge/usdc": "100000000" },
})

Parameters

remoteRemote. { warp: { domain, contract: Addr32 } } or the string "bitcoin".

recipientAddr32. 32-byte hex recipient on the remote chain.

senderAddress. The local sender.

fundsCoins. Coins to send.

Returns

{ hash: Uint8Array } & TxData — see broadcastTxSync.

Notes

  • Namespaced under client.gateway.*.

See also