Queries for the staking properties of an account.

interface StakingAccountQueries {
    getDelegation: ((validator: CosmosValidatorAddress) => Promise<Delegation>);
    getDelegations: (() => Promise<Delegation[]>);
    getRedelegation: ((srcValidator: CosmosValidatorAddress, dstValidator?: CosmosValidatorAddress) => Promise<Redelegation>);
    getRedelegations: (() => Promise<Redelegation[]>);
    getReward: ((validator: CosmosValidatorAddress) => Promise<DenomAmount[]>);
    getRewards: (() => Promise<DenomAmount[]>);
    getUnbondingDelegation: ((validator: CosmosValidatorAddress) => Promise<UnbondingDelegation>);
    getUnbondingDelegations: (() => Promise<UnbondingDelegation[]>);
}

Properties

getDelegation: ((validator: CosmosValidatorAddress) => Promise<Delegation>)

Type declaration

    • (validator): Promise<Delegation>
    • Parameters

      Returns Promise<Delegation>

      the active delegation from the account to a specific validator. Return an empty Delegation if there is no delegation.

getDelegations: (() => Promise<Delegation[]>)

Type declaration

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

      all active delegations from the account to any validator (or [] if none)

getRedelegation: ((srcValidator: CosmosValidatorAddress, dstValidator?: CosmosValidatorAddress) => Promise<Redelegation>)
getRedelegations: (() => Promise<Redelegation[]>)
getReward: ((validator: CosmosValidatorAddress) => Promise<DenomAmount[]>)

Get the rewards pending with a specific validator.

Type declaration

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

Get the pending rewards for the account.

Type declaration

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

      the amounts of the account's rewards pending from all validators

getUnbondingDelegation: ((validator: CosmosValidatorAddress) => Promise<UnbondingDelegation>)

Type declaration

    • (validator): Promise<UnbondingDelegation>
    • Parameters

      Returns Promise<UnbondingDelegation>

      the unbonding delegations from the account to a specific validator (or [] if none)

getUnbondingDelegations: (() => Promise<UnbondingDelegation[]>)

Type declaration

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

      the unbonding delegations from the account to any validator (or [] if none)