Skip to content

tendermint staking RPCs #428

@onur-ozkan

Description

@onur-ozkan

Each of the following RPC endpoints is supported for Tendermint and needs to be documented. Let me know if any specific field needs an explanation (e.g., what x, y, or z fields mean in the request or response).

  • experimental::staking::delegate

Used to delegate user funds to a validator.

Example request:

{
  "userpass":"'$userpass'",
  "method":"experimental::staking::delegate",
  "mmrpc":"2.0",
  "params": {
    "coin": "ATOM",
    "staking_details": {
        "type": "Cosmos",
        "validator_address": "cosmosvaloper1c4k24jzduc365kywrsvf5ujz4ya6mwympnc4en",
        "amount": "0.777"
    }
  }
}
  • experimental::staking::undelegate

Used to undelegate user funds from a validator. The undelegated amount will not be available in the user's account immediately due to an undelegation period, which can be checked using experimental::staking::query::ongoing_undelegations after undelegation.

Example request:

{
  "userpass":"'$userpass'",
  "method":"experimental::staking::undelegate",
  "mmrpc":"2.0",
  "params": {
    "coin": "ATOM",
    "staking_details": {
        "type": "Cosmos",
        "validator_address": "cosmosvaloper1c4k24jzduc365kywrsvf5ujz4ya6mwympnc4en",
        "amount": "0.777"
    }
  }
}
  • experimental::staking::claim_rewards

Used to claim rewards earned from user delegations.

{
  "userpass":"'$userpass'",
  "method":"experimental::staking::claim_rewards",
  "mmrpc":"2.0",
  "params": {
    "coin": "ATOM",
    "claiming_details": {
        "type": "Cosmos",
        "validator_address": "cosmosvaloper1c4k24jzduc365kywrsvf5ujz4ya6mwympnc4en"
    }
  }
}
  • experimental::staking::query::delegations

Used to retrieve information about user delegations.

Example request:

{
  "userpass":"'$userpass'",
  "method":"experimental::staking::query::delegations",
  "mmrpc":"2.0",
  "params": {
    "coin": "ATOM",
    "info_details": {
        "type": "Cosmos",
        "limit": 20,
        "page_number": 1
    }
  }
}
  • experimental::staking::query::ongoing_undelegations

Used to retrieve information about user undelegations that are still pending due to the undelegation completion period.

Example request:

{
  "userpass":"'$userpass'",
  "method":"experimental::staking::query::ongoing_undelegations",
  "mmrpc":"2.0",
  "params": {
    "coin": "ATOM",
    "info_details": {
        "type": "Cosmos",
        "limit": 20,
        "page_number": 1
    }
  }
}
  • experimental::staking::query::validators

Used to retrieve information about validators on the network.

Example request:

{
  "userpass":"'$userpass'",
  "method":"experimental::staking::query::validators",
  "mmrpc":"2.0",
  "params": {
    "coin": "ATOM",
    "info_details": {
        "type": "Cosmos",
        "filter_by_status": "Bonded",
        "limit": 20,
        "page_number": 1
    }
  }
}

To know more about filter_by_status, see this.

Default value for filter_by_status is "Bonded".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions