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

interface OrchestrationAccountCommon {
    asContinuingOffer: (() => Promise<ResolvedContinuingOfferResult>);
    getAddress: (() => ChainAddress);
    getBalance: ((denom: DenomArg) => Promise<DenomAmount>);
    getBalances: (() => Promise<DenomAmount[]>);
    getPublicTopics: (() => Promise<Record<string, ResolvedPublicTopic<unknown>>>);
    send: ((toAccount: ChainAddress, amounts: AmountArg) => Promise<void>);
    sendAll: ((toAccount: ChainAddress, amounts: AmountArg[]) => Promise<void>);
    transfer: ((destination: ChainAddress, amount: AmountArg, opts?: IBCMsgTransferOptions) => Promise<void>);
    transferSteps: ((amount: AmountArg, msg: TransferMsg) => Promise<void>);
}

Properties

asContinuingOffer: (() => Promise<ResolvedContinuingOfferResult>)

Returns invitationMakers and publicSubscribers to the account holder's smart wallet so they can continue interacting with the account and read account state in vstorage if published.

getAddress: (() => ChainAddress)

Type declaration

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

Type declaration

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

Type declaration

    • (): Promise<DenomAmount[]>
    • Returns Promise<DenomAmount[]>

      an array of amounts for every balance in the account.

getPublicTopics: (() => Promise<Record<string, ResolvedPublicTopic<unknown>>>)

Public topics are a map to different vstorage paths and subscribers that can be shared with on or offchain clients. When returned as part of a continuing invitation, it will appear in the CurrentWalletRecord in vstorage.

send: ((toAccount: ChainAddress, amounts: AmountArg) => Promise<void>)

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

Type declaration

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

      Returns Promise<void>

      void

sendAll: ((toAccount: ChainAddress, amounts: AmountArg[]) => Promise<void>)

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

Type declaration

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

      • toAccount: ChainAddress

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

      • amounts: AmountArg[]

        the amounts to send

      Returns Promise<void>

      void

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

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

Type declaration

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

      • destination: ChainAddress

        the account to transfer the amount to.

      • amount: AmountArg

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

      • Optionalopts: IBCMsgTransferOptions

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

      Returns Promise<void>

      void

if route is not determinable, asset is not recognized, or the transfer is rejected (insufficient funds, timeout)

transferSteps: ((amount: AmountArg, msg: TransferMsg) => 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>

      void