Methods supported only on Agoric chain accounts

interface LocalAccountMethods {
    delegate: ((validator: CosmosValidatorAddress, amount: AmountArg) => Promise<void>);
    deposit: ((payment: Payment<"nat">) => Promise<NatAmount>);
    monitorTransfers: ((tap: TargetApp) => Promise<TargetRegistration>);
    redelegate: ((srcValidator: CosmosValidatorAddress, dstValidator: CosmosValidatorAddress, amount: AmountArg) => Promise<void>);
    undelegate: ((delegations: {
        amount: AmountArg;
        delegator?: ChainAddress;
        validator: CosmosValidatorAddress;
    }[]) => Promise<void>);
    withdraw: ((amount: NatAmount) => Promise<Payment<"nat">>);
    withdrawReward: ((validator: CosmosValidatorAddress) => Promise<DenomAmount[]>);
    withdrawRewards: (() => Promise<DenomAmount[]>);
}

Hierarchy (view full)

Properties

delegate: ((validator: CosmosValidatorAddress, amount: AmountArg) => Promise<void>)

Delegate an amount to a validator. The promise settles when the delegation is complete.

Type declaration

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

      Returns Promise<void>

      void

deposit: ((payment: Payment<"nat">) => Promise<NatAmount>)

deposit payment (from zoe, for example) to the account

monitorTransfers: ((tap: TargetApp) => Promise<TargetRegistration>)

Register a handler that receives an event each time ICS-20 transfers are sent or received by the underlying account.

Handler includes VTransferIBCEvent and FungibleTokenPacketData that can be used for application logic.

Each account may be associated with at most one handler at a given time.

Does not grant the handler the ability to intercept a transfer. For a blocking handler, aka 'IBC Hooks', leverage registerActiveTap from transferMiddleware directly.

redelegate: ((srcValidator: CosmosValidatorAddress, dstValidator: CosmosValidatorAddress, amount: AmountArg) => Promise<void>)

Redelegate from one delegator to another. Settles when the redelegation is established, not 21 days later.

Type declaration

    • (srcValidator, dstValidator, amount): Promise<void>
    • Parameters

      Returns Promise<void>

undelegate: ((delegations: {
    amount: AmountArg;
    delegator?: ChainAddress;
    validator: CosmosValidatorAddress;
}[]) => Promise<void>)

Undelegate multiple delegations (concurrently). To delegate independently, pass an array with one item. Resolves when the undelegation is complete and the tokens are no longer bonded. Note it may take weeks. The unbonding time is padded by 10 minutes to account for clock skew.

Type declaration

withdraw: ((amount: NatAmount) => Promise<Payment<"nat">>)

withdraw a Payment from the account

withdrawReward: ((validator: CosmosValidatorAddress) => Promise<DenomAmount[]>)

Withdraw rewards from a specific validator. The promise settles when the rewards are withdrawn.

Type declaration

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

Withdraw rewards from all validators. The promise settles when the rewards are withdrawn.

Type declaration