Function crosschainTransfer

  • Performs a cross chain transfer

    Parameters

    • connection: Connection

      connection to the source chain, i.e., where the assets should be transferred from

    • authenticator: Authenticator

      the authenticator used to authenticate the transfer

    • targetChainRid: BufferId

      the rid of the target blockchain, i.e., where the assets will end up

    • recipientId: BufferId

      the id of the account that will receive the assets

    • assetId: BufferId

      the id of the asset to transfer

    • amount: Amount

      how much of the asset to transfer

    • ttl: number = ...

      timeout of this transfer in milliseconds. If the transfer has not been completed within this timeout, it can be reverted. This argument is designed to be combined with one of the time functions, e.g., days.

    Returns Web3PromiEvent<TransferRef, {
        built: SignedTransaction;
        hop: Buffer;
        init: TransactionReceipt;
    }>

    a promi-event that will emit once when transaction is signed, once when init_transfer has been sent on the source chain and once for each hop during the transfer. It will resolve once the transfer is completed.