An object that supports high-level operations for an account on a remote chain.

interface OrchestrationAccountI {
    deposit: ((payment) => Promise<void>);
    getAddress: (() => ChainAddress);
    getBalance: ((denom) => Promise<DenomAmount>);
    getBalances: (() => Promise<DenomAmount[]>);
    send: ((toAccount, amount) => Promise<void>);
    transfer: ((amount, destination, opts?) => Promise<void>);
    transferSteps: ((amount, msg) => Promise<void>);
}

Properties

deposit: ((payment) => Promise<void>)

deposit payment from zoe to the account. For remote accounts, an IBC Transfer will be executed to transfer funds there.

Type declaration

    • (payment): Promise<void>
    • Parameters

      • payment: Payment

      Returns Promise<void>

getAddress: (() => ChainAddress)

Type declaration

Returns

the address of the account on the remote chain

getBalance: ((denom) => Promise<DenomAmount>)

Type declaration

Returns

the balance of a specific denom for the account.

getBalances: (() => Promise<DenomAmount[]>)

Type declaration

Returns

an array of amounts for every balance in the account.

send: ((toAccount, amount) => Promise<void>)

Transfer amount to another account on the same chain. The promise settles when the transfer is complete.

Type declaration

    • (toAccount, amount): Promise<void>
    • Parameters

      • toAccount: ChainAddress

        the account to send the amount to. MUST be on the same chain

      • amount: AmountArg

        the amount to send

      Returns Promise<void>

Returns

void

transfer: ((amount, destination, opts?) => Promise<void>)

Transfer an amount to another account, typically on another chain. The promise settles when the transfer is complete.

Type declaration

    • (amount, destination, opts?): Promise<void>
    • Parameters

      • amount: AmountArg

        the amount to transfer. Can be provided as pure data using denoms or as ERTP Amounts.

      • destination: ChainAddress

        the account to transfer the amount to.

      • Optional opts: IBCMsgTransferOptions

        an optional memo to include with the transfer, which could drive custom PFM behavior, and timeout parameters

      Returns Promise<void>

Returns

void

TODO document the mapping from the address to the destination chain.

transferSteps: ((amount, msg) => Promise<void>)

Transfer an amount to another account in multiple steps. The promise settles when the entire path of the transfer is complete.

Type declaration

    • (amount, msg): Promise<void>
    • Parameters

      • amount: AmountArg

        the amount to transfer

      • msg: TransferMsg

        the transfer message, including follow-up steps

      Returns Promise<void>

Returns

void