Low level object that supports queries and operations for an account on a remote chain.

interface IcaAccount {
    close: (() => Promise<void>);
    deposit: ((payment) => Promise<void>);
    executeEncodedTx: ((msgs, opts?) => Promise<string>);
    executeTx: ((msgs) => Promise<string>);
    getAddress: (() => ChainAddress);
    getLocalAddress: (() => `/ibc-port/${string}`);
    getPort: (() => Port);
    getPurse: ((brand) => Promise<Purse>);
    getRemoteAddress: (() => `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`);
}

Properties

close: (() => Promise<void>)

Close the remote account

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

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

deposit payment from zoe to the account

Type declaration

    • (payment): Promise<void>
    • Parameters

      • payment: Payment

      Returns Promise<void>

executeEncodedTx: ((msgs, opts?) => Promise<string>)

Submit a transaction on behalf of the remote account for execution on the remote chain.

Type declaration

    • (msgs, opts?): Promise<string>
    • Parameters

      • msgs: JsonSafe<Any>[]

        records for the transaction

      • Optional opts: Partial<Omit<TxBody, "messages">>

        optional parameters for the Tx, like timeoutHeight and memo

      Returns Promise<string>

Returns

acknowledgement string

executeTx: ((msgs) => Promise<string>)

Submit a transaction on behalf of the remote account for execution on the remote chain.

Type declaration

    • (msgs): Promise<string>
    • Parameters

      Returns Promise<string>

Returns

acknowledgement string

getAddress: (() => ChainAddress)

Type declaration

Returns

the address of the account on the remote chain

getLocalAddress: (() => `/ibc-port/${string}`)

Type declaration

    • (): `/ibc-port/${string}`
    • Returns `/ibc-port/${string}`

Returns

the address of the local channel

getPort: (() => Port)

Type declaration

Returns

the port the ICA channel is bound to

getPurse: ((brand) => Promise<Purse>)

get Purse for a brand to .withdraw() a Payment from the account

Type declaration

    • (brand): Promise<Purse>
    • Parameters

      • brand: Brand

      Returns Promise<Purse>

getRemoteAddress: (() => `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`)

Type declaration

    • (): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`
    • Returns `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`

Returns

the address of the remote channel