Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StakingAPI

Hierarchy

  • BaseAPI
    • StakingAPI

Index

Constructors

Properties

Methods

  • 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(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(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]>

  • getReqFromAddress(address: string): APIRequester
  • getReqFromChainID(chainID: string): APIRequester
  • parameters(chainID: string, params?: APIParams): Promise<StakingParams>
  • pool(chainID: string, params?: APIParams): Promise<StakingPool>
  • 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]>

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

    Parameters

    • chainID: string

      chain ID

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

    Returns Promise<[Validator[], Pagination]>