Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StakingAPI

Hierarchy

  • BaseAPI
    • StakingAPI

Index

Constructors

constructor

Methods

bondedValidators

  • bondedValidators(delegator: string, params?: Partial<PaginationOptions & APIParams>): Promise<[Validator[], Pagination]>
  • Gets all bonded validators for a delegator given its address.

    Parameters

    • delegator: string

      delegator's account address

    • params: Partial<PaginationOptions & APIParams> = {}

    Returns Promise<[Validator[], Pagination]>

delegation

  • delegation(delegator: string, validator: string): Promise<Delegation>
  • Gets the delegation between a delegator and validator, if it exists.

    Parameters

    • delegator: string

      delegator's account address

    • validator: string

      validator's operator address

    Returns Promise<Delegation>

delegations

  • delegations(delegator?: string, validator?: string, params?: Partial<PaginationOptions & APIParams>): Promise<[Delegation[], Pagination]>
  • Queries all delegations, filtering by delegator, validator, or both.

    At least one of the parameters must be defined.

    Parameters

    • Optional delegator: string

      delegator's account address

    • Optional validator: string

      validator's operator address

    • params: Partial<PaginationOptions & APIParams> = {}

    Returns Promise<[Delegation[], Pagination]>

parameters

pool

redelegations

  • redelegations(delegator: string, validatorSrc?: string, validatorDst?: string, _params?: Partial<PaginationOptions & APIParams>): Promise<[Redelegation[], Pagination]>
  • Queries all redelegations, filterable by delegator, source validator, and target validator.

    Parameters

    • delegator: string

      delegator's account address

    • Optional validatorSrc: string

      source validator's operator address (from).

    • Optional validatorDst: string

      destination validator's operator address (to).

    • _params: Partial<PaginationOptions & APIParams> = {}

    Returns Promise<[Redelegation[], Pagination]>

unbondingDelegation

  • Gets the unbonding delegation between a delegator and validator, if it exists.

    Parameters

    • Optional delegator: string

      delegator's account address

    • Optional validator: string

      validator's operator address

    Returns Promise<UnbondingDelegation>

unbondingDelegations

  • unbondingDelegations(delegator?: string, validator?: string, params?: Partial<PaginationOptions & APIParams>): Promise<[UnbondingDelegation[], Pagination]>
  • Queries all unbonding delegations, filtering by delegator, validator, or both.

    At least one of the parameters must be defined.

    Parameters

    • Optional delegator: string

      delegator's account address

    • Optional validator: string

      validator's operator address

    • params: Partial<PaginationOptions & APIParams> = {}

    Returns Promise<[UnbondingDelegation[], Pagination]>

validator

  • validator(validator: string, params?: APIParams): Promise<Validator>
  • Gets the validator information for a specific validator.

    Parameters

    • validator: string

      validator's operator address

    • params: APIParams = {}

    Returns Promise<Validator>

validators

  • validators(params?: Partial<PaginationOptions & APIParams>): Promise<[Validator[], Pagination]>
  • Get all current registered validators, including validators that are not currently in the validating set.

    Parameters

    • params: Partial<PaginationOptions & APIParams> = {}

    Returns Promise<[Validator[], Pagination]>