CLI
A user can query and interact with the staking
module using the CLI.
Query
The query
commands allows users to query staking
state.
Copy simd query staking --help
Example:
Copy simd query staking delegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
Example Output:
Copy balance:
amount: "10000000000"
denom: stake
delegation:
delegator_address: cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
shares: "10000000000.000000000000000000"
validator_address: cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
delegations
The delegations
command allows users to query delegations for an individual delegator on all validators.
Usage:
Copy simd query staking delegations [delegator-addr] [flags]
Example:
Copy simd query staking delegations cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
Example Output:
Copy delegation_responses:
- balance:
amount: "10000000000"
denom: stake
delegation:
delegator_address: cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
shares: "10000000000.000000000000000000"
validator_address: cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
- balance:
amount: "10000000000"
denom: stake
delegation:
delegator_address: cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
shares: "10000000000.000000000000000000"
validator_address: cosmosvaloper1x20lytyf6zkcrv5edpkfkn8sz578qg5sqfyqnp
pagination:
next_key: null
total: "0"
delegations-to
The delegations-to
command allows users to query delegations on an individual validator.
Usage:
Copy simd query staking delegations-to [validator-addr] [flags]
Example:
Copy simd query staking delegations-to cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
Example Output:
Copy - balance:
amount: "504000000"
denom: stake
delegation:
delegator_address: cosmos1q2qwwynhv8kh3lu5fkeex4awau9x8fwt45f5cp
shares: "504000000.000000000000000000"
validator_address: cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
- balance:
amount: "78125000000"
denom: uixo
delegation:
delegator_address: cosmos1qvppl3479hw4clahe0kwdlfvf8uvjtcd99m2ca
shares: "78125000000.000000000000000000"
validator_address: cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
pagination:
next_key: null
total: "0"
historical-info
The historical-info
command allows users to query historical information at given height.
Usage:
Copy simd query staking historical-info [height] [flags]
Example:
Copy simd query staking historical-info 10
Example Output:
Copy header:
app_hash: Lbx8cXpI868wz8sgp4qPYVrlaKjevR5WP/IjUxwp3oo=
chain_id: testnet
consensus_hash: BICRvH3cKD93v7+R1zxE2ljD34qcvIZ0Bdi389qtoi8=
data_hash: 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
evidence_hash: 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
height: "10"
last_block_id:
hash : RFbkpu6pWfSThXxKKl6EZVDnBSm16+U0l0xVjTX08Fk=
part_set_header:
hash : vpIvXD4rxD5GM4MXGz0Sad9I7//iVYLzZsEU4BVgWIU=
total: 1
last_commit_hash: Ne4uXyx4QtNp4Zx89kf9UK7oG9QVbdB6e7ZwZkhy8K0=
last_results_hash: 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
next_validators_hash: nGBgKeWBjoxeKFti00CxHsnULORgKY4LiuQwBuUrhCs=
proposer_address: mMEP2c2IRPLr99LedSRtBg9eONM=
time: "2021-10-01T06:00:49.785790894Z"
validators_hash: nGBgKeWBjoxeKFti00CxHsnULORgKY4LiuQwBuUrhCs=
version:
app: "0"
block: "11"
valset:
- commission:
commission_rates:
max_change_rate: "0.010000000000000000"
max_rate: "0.200000000000000000"
rate: "0.100000000000000000"
update_time: "2021-10-01T05:52:50.380144238Z"
consensus_pubkey:
'@type' : /cosmos.crypto.ed25519.PubKey
key: Auxs3865HpB/EfssYOzfqNhEJjzys2Fo6jD5B8tPgC8=
delegator_shares: "10000000.000000000000000000"
description:
details: ""
identity: ""
moniker: myvalidator
security_contact: ""
website: ""
jailed: false
min_self_delegation: "1"
operator_address: cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc
status: BOND_STATUS_BONDED
tokens: "10000000"
unbonding_height: "0"
unbonding_time: "1970-01-01T00:00:00Z"
params
The params
command allows users to query values set as staking parameters.
Usage:
Copy simd query staking params [flags]
Example:
Copy simd query staking params
Example Output:
Copy bond_denom: stake historical_entries: 10000 max_entries: 7 max_validators: 50 unbonding_time: 1814400s
pool
The pool
command allows users to query values for amounts stored in the staking pool.
Usage:
Copy simd q staking pool [flags]
Example:
Example Output:
Copy bonded_tokens: "10000000"
not_bonded_tokens: "0"
redelegation
The redelegation
command allows users to query a redelegation record based on delegator and a source and destination validator address.
Usage:
Copy simd query staking redelegation [delegator-addr] [src-validator-addr] [dst-validator-addr] [flags]
Example:
Copy simd query staking redelegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p cosmosvaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
Example Output:
Copy pagination: null
redelegation_responses:
- entries:
- balance: "50000000"
redelegation_entry:
completion_time: "2021-10-24T20:33:21.960084845Z"
creation_height: 2.382847e+06
initial_balance: "50000000"
shares_dst: "50000000.000000000000000000"
- balance: "5000000000"
redelegation_entry:
completion_time: "2021-10-25T21:33:54.446846862Z"
creation_height: 2.397271e+06
initial_balance: "5000000000"
shares_dst: "5000000000.000000000000000000"
redelegation:
delegator_address: cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
entries: null
validator_dst_address: cosmosvaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm
validator_src_address: cosmosvaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm
redelegations
The redelegations
command allows users to query all redelegation records for an individual delegator.
Usage:
Copy simd query staking redelegations [delegator-addr] [flags]
Example:
Copy simd query staking redelegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
Example Output:
Copy pagination:
next_key: null
total: "0"
redelegation_responses:
- entries:
- balance: "50000000"
redelegation_entry:
completion_time: "2021-10-24T20:33:21.960084845Z"
creation_height: 2.382847e+06
initial_balance: "50000000"
shares_dst: "50000000.000000000000000000"
- balance: "5000000000"
redelegation_entry:
completion_time: "2021-10-25T21:33:54.446846862Z"
creation_height: 2.397271e+06
initial_balance: "5000000000"
shares_dst: "5000000000.000000000000000000"
redelegation:
delegator_address: cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
entries: null
validator_dst_address: cosmosvaloper1uccl5ugxrm7vqlzwqr04pjd320d2fz0z3hc6vm
validator_src_address: cosmosvaloper1zppjyal5emta5cquje8ndkpz0rs046m7zqxrpp
- entries:
- balance: "562770000000"
redelegation_entry:
completion_time: "2021-10-25T21:42:07.336911677Z"
creation_height: 2.39735e+06
initial_balance: "562770000000"
shares_dst: "562770000000.000000000000000000"
redelegation:
delegator_address: cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
entries: null
validator_dst_address: cosmosvaloper1uccl5ugxrm7vqlzwqr04pjd320d2fz0z3hc6vm
validator_src_address: cosmosvaloper1zppjyal5emta5cquje8ndkpz0rs046m7zqxrpp
redelegations-from
The redelegations-from
command allows users to query delegations that are redelegating from a validator.
Usage:
Copy simd query staking redelegations-from [validator-addr] [flags]
Example:
Copy simd query staking redelegations-from cosmosvaloper1y4rzzrgl66eyhzt6gse2k7ej3zgwmngeleucjy
Example Output:
Copy pagination:
next_key: null
total: "0"
redelegation_responses:
- entries:
- balance: "50000000"
redelegation_entry:
completion_time: "2021-10-24T20:33:21.960084845Z"
creation_height: 2.382847e+06
initial_balance: "50000000"
shares_dst: "50000000.000000000000000000"
- balance: "5000000000"
redelegation_entry:
completion_time: "2021-10-25T21:33:54.446846862Z"
creation_height: 2.397271e+06
initial_balance: "5000000000"
shares_dst: "5000000000.000000000000000000"
redelegation:
delegator_address: cosmos1pm6e78p4pgn0da365plzl4t56pxy8hwtqp2mph
entries: null
validator_dst_address: cosmosvaloper1uccl5ugxrm7vqlzwqr04pjd320d2fz0z3hc6vm
validator_src_address: cosmosvaloper1y4rzzrgl66eyhzt6gse2k7ej3zgwmngeleucjy
- entries:
- balance: "221000000"
redelegation_entry:
completion_time: "2021-10-05T21:05:45.669420544Z"
creation_height: 2.120693e+06
initial_balance: "221000000"
shares_dst: "221000000.000000000000000000"
redelegation:
delegator_address: cosmos1zqv8qxy2zgn4c58fz8jt8jmhs3d0attcussrf6
entries: null
validator_dst_address: cosmosvaloper10mseqwnwtjaqfrwwp2nyrruwmjp6u5jhah4c3y
validator_src_address: cosmosvaloper1y4rzzrgl66eyhzt6gse2k7ej3zgwmngeleucjy
unbonding-delegation
The unbonding-delegation
command allows users to query unbonding delegations for an individual delegator on an individual validator.
Usage:
Copy simd query staking unbonding-delegation [delegator-addr] [validator-addr] [flags]
Example:
Copy simd query staking unbonding-delegation cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
Example Output:
Copy delegator_address: cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
entries:
- balance: "52000000"
completion_time: "2021-11-02T11:35:55.391594709Z"
creation_height: "55078"
initial_balance: "52000000"
validator_address: cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
unbonding-delegations
The unbonding-delegations
command allows users to query all unbonding-delegations records for one delegator.
Usage:
Copy simd query staking unbonding-delegations [delegator-addr] [flags]
Example:
Copy simd query staking unbonding-delegations cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
Example Output:
Copy pagination:
next_key: null
total: "0"
unbonding_responses:
- delegator_address: cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p
entries:
- balance: "52000000"
completion_time: "2021-11-02T11:35:55.391594709Z"
creation_height: "55078"
initial_balance: "52000000"
validator_address: cosmosvaloper1t8ehvswxjfn3ejzkjtntcyrqwvmvuknzmvtaaa
unbonding-delegations-from
The unbonding-delegations-from
command allows users to query delegations that are unbonding from a validator.
Usage:
Copy simd query staking unbonding-delegations-from [validator-addr] [flags]
Example:
Copy simd query staking unbonding-delegations-from cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
Example Output:
Copy pagination:
next_key: null
total: "0"
unbonding_responses:
- delegator_address: cosmos1qqq9txnw4c77sdvzx0tkedsafl5s3vk7hn53fn
entries:
- balance: "150000000"
completion_time: "2021-11-01T21:41:13.098141574Z"
creation_height: "46823"
initial_balance: "150000000"
validator_address: cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
- delegator_address: cosmos1peteje73eklqau66mr7h7rmewmt2vt99y24f5z
entries:
- balance: "24000000"
completion_time: "2021-10-31T02:57:18.192280361Z"
creation_height: "21516"
initial_balance: "24000000"
validator_address: cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
validator
The validator
command allows users to query details about an individual validator.
Usage:
Copy simd query staking validator [validator-addr] [flags]
Example:
Copy simd query staking validator cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
Example Output:
Copy commission:
commission_rates:
max_change_rate: "0.020000000000000000"
max_rate: "0.200000000000000000"
rate: "0.050000000000000000"
update_time: "2021-10-01T19:24:52.663191049Z"
consensus_pubkey:
'@type' : /cosmos.crypto.ed25519.PubKey
key: sIiexdJdYWn27+7iUHQJDnkp63gq/rzUq1Y+fxoGjXc=
delegator_shares: "32948270000.000000000000000000"
description:
details: Witval is the validator arm from Vitwit. Vitwit is into software consulting
and services business since 2015. We are working closely with Cosmos ecosystem
since 2018. We are also building tools for the ecosystem, Aneka is our explorer
for the cosmos ecosystem.
identity: 51468B615127273A
moniker: Witval
security_contact: ""
website: ""
jailed: false
min_self_delegation: "1"
operator_address: cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
status: BOND_STATUS_BONDED
tokens: "32948270000"
unbonding_height: "0"
unbonding_time: "1970-01-01T00:00:00Z"
validators
The validators
command allows users to query details about all validators on a network.
Usage:
Copy simd query staking validators [flags]
Example:
Copy simd query staking validators
Example Output:
Copy pagination:
next_key: FPTi7TKAjN63QqZh+BaXn6gBmD5/
total: "0"
validators:
commission:
commission_rates:
max_change_rate: "0.020000000000000000"
max_rate: "0.200000000000000000"
rate: "0.050000000000000000"
update_time: "2021-10-01T19:24:52.663191049Z"
consensus_pubkey:
'@type' : /cosmos.crypto.ed25519.PubKey
key: sIiexdJdYWn27+7iUHQJDnkp63gq/rzUq1Y+fxoGjXc=
delegator_shares: "32948270000.000000000000000000"
description:
details: Witval is the validator arm from Vitwit. Vitwit is into software consulting
and services business since 2015. We are working closely with Cosmos ecosystem
since 2018. We are also building tools for the ecosystem, Aneka is our explorer
for the cosmos ecosystem.
identity: 51468B615127273A
moniker: Witval
security_contact: ""
website: ""
jailed: false
min_self_delegation: "1"
operator_address: cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj
status: BOND_STATUS_BONDED
tokens: "32948270000"
unbonding_height: "0"
unbonding_time: "1970-01-01T00:00:00Z"
- commission:
commission_rates:
max_change_rate: "0.100000000000000000"
max_rate: "0.200000000000000000"
rate: "0.050000000000000000"
update_time: "2021-10-04T18:02:21.446645619Z"
consensus_pubkey:
'@type' : /cosmos.crypto.ed25519.PubKey
key: GDNpuKDmCg9GnhnsiU4fCWktuGUemjNfvpCZiqoRIYA=
delegator_shares: "559343421.000000000000000000"
description:
details: Noderunners is a professional validator in POS networks. We have a huge
node running experience, reliable soft and hardware. Our commissions are always
low, our support to delegators is always full. Stake with us and start receiving
your Cosmos rewards now!
identity: 812E82D12FEA3493
moniker: Noderunners
security_contact: info@noderunners.biz
website: http://noderunners.biz
jailed: false
min_self_delegation: "1"
operator_address: cosmosvaloper1q5ku90atkhktze83j9xjaks2p7uruag5zp6wt7
status: BOND_STATUS_BONDED
tokens: "559343421"
unbonding_height: "0"
unbonding_time: "1970-01-01T00:00:00Z"
Transactions
The tx
commands allows users to interact with the staking
module.
Copy simd tx staking --help
create-validator
The command create-validator
allows users to create new validator initialized with a self-delegation to it.
Usage:
Copy simd tx staking create-validator [flags]
Example:
Copy simd tx staking create-validator \
--amount=1000000stake \
--pubkey=$( simd tendermint show-validator) \
--moniker= "my-moniker" \
--website= "https://myweb.site" \
--details= "description of your validator" \
--chain-id= "name_of_chain_id" \
--commission-rate= "0.10" \
--commission-max-rate= "0.20" \
--commission-max-change-rate= "0.01" \
--min-self-delegation= "1" \
--gas= "auto" \
--gas-adjustment= "1.2" \
--gas-prices= "0.025stake" \
--from=mykey
delegate
The command delegate
allows users to delegate liquid tokens to a validator.
Usage:
Copy simd tx staking delegate [validator-addr] [amount] [flags]
Example:
Copy simd tx staking delegate cosmosvaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 1000stake --from mykey
edit-validator
The command edit-validator
allows users to edit an existing validator account.
Usage:
Copy simd tx staking edit-validator [flags]
Example:
Copy simd tx staking edit-validator --moniker "new_moniker_name" --website "new_webiste_url" --from mykey
redelegate
The command redelegate
allows users to redelegate illiquid tokens from one validator to another.
Usage:
Copy simd tx staking redelegate [src-validator-addr] [dst-validator-addr] [amount] [flags]
Example:
Copy simd tx staking redelegate cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj cosmosvaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 100stake --from mykey
unbond
The command unbond
allows users to unbond shares from a validator.
Usage:
Copy simd tx staking unbond [validator-addr] [amount] [flags]
Example:
Copy simd tx staking unbond cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake --from mykey
cancel unbond
The command cancel-unbond
allow users to cancel the unbonding delegation entry and delegate back to the original validator.
Usage:
Copy simd tx staking cancel-unbond [validator-addr] [amount] [creation-height]
Example:
Copy simd tx staking cancel-unbond cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100stake 123123 --from mykey
gRPC
A user can query the staking
module using gRPC endpoints.
Validators
The Validators
endpoint queries all validators that match the given status.
Copy cosmos.staking.v1beta1.Query/Validators
Example:
Copy grpcurl -plaintext localhost:9090 cosmos.staking.v1beta1.Query/Validators
Example Output:
Copy {
"validators": [
{
"operatorAddress": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"consensusPubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"Auxs3865HpB/EfssYOzfqNhEJjzys2Fo6jD5B8tPgC8="},
"status": "BOND_STATUS_BONDED",
"tokens": "10000000",
"delegatorShares": "10000000000000000000000000",
"description": {
"moniker": "myvalidator"
},
"unbondingTime": "1970-01-01T00:00:00Z",
"commission": {
"commissionRates": {
"rate": "100000000000000000",
"maxRate": "200000000000000000",
"maxChangeRate": "10000000000000000"
},
"updateTime": "2021-10-01T05:52:50.380144238Z"
},
"minSelfDelegation": "1"
}
],
"pagination": {
"total": "1"
}
}
Validator
The Validator
endpoint queries validator information for given validator address.
Copy cosmos.staking.v1beta1.Query/Validator
Example:
Copy grpcurl -plaintext -d '{"validator_addr":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc"}' \
localhost:9090 cosmos.staking.v1beta1.Query/Validator
Example Output:
Copy {
"validator": {
"operatorAddress": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"consensusPubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"Auxs3865HpB/EfssYOzfqNhEJjzys2Fo6jD5B8tPgC8="},
"status": "BOND_STATUS_BONDED",
"tokens": "10000000",
"delegatorShares": "10000000000000000000000000",
"description": {
"moniker": "myvalidator"
},
"unbondingTime": "1970-01-01T00:00:00Z",
"commission": {
"commissionRates": {
"rate": "100000000000000000",
"maxRate": "200000000000000000",
"maxChangeRate": "10000000000000000"
},
"updateTime": "2021-10-01T05:52:50.380144238Z"
},
"minSelfDelegation": "1"
}
}
ValidatorDelegations
The ValidatorDelegations
endpoint queries delegate information for given validator.
Copy cosmos.staking.v1beta1.Query/ValidatorDelegations
Example:
Copy grpcurl -plaintext -d '{"validator_addr":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc"}' \
localhost:9090 cosmos.staking.v1beta1.Query/ValidatorDelegations
Example Output:
Copy {
"delegationResponses": [
{
"delegation": {
"delegatorAddress": "cosmos1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgy3ua5t",
"validatorAddress": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"shares": "10000000000000000000000000"
},
"balance": {
"denom": "stake",
"amount": "10000000"
}
}
],
"pagination": {
"total": "1"
}
}
ValidatorUnbondingDelegations
The ValidatorUnbondingDelegations
endpoint queries delegate information for given validator.
Example:
Copy grpcurl -plaintext -d '{"validator_addr":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc"}' \
localhost:9090 cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations
Example Output:
Copy {
"unbonding_responses": [
{
"delegator_address": "cosmos1z3pzzw84d6xn00pw9dy3yapqypfde7vg6965fy",
"validator_address": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"entries": [
{
"creation_height": "25325",
"completion_time": "2021-10-31T09:24:36.797320636Z",
"initial_balance": "20000000",
"balance": "20000000"
}
]
},
{
"delegator_address": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77",
"validator_address": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"entries": [
{
"creation_height": "13100",
"completion_time": "2021-10-30T12:53:02.272266791Z",
"initial_balance": "1000000",
"balance": "1000000"
}
]
},
],
"pagination": {
"next_key": null,
"total": "8"
}
}
Delegation
The Delegation
endpoint queries delegate information for given validator delegator pair.
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77", validator_addr":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc"}' \
localhost:9090 cosmos.staking.v1beta1.Query/Delegation
Example Output:
Copy {
"delegation_response":
{
"delegation":
{
"delegator_address":"cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77",
"validator_address":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"shares":"25083119936.000000000000000000"
},
"balance":
{
"denom":"stake",
"amount":"25083119936"
}
}
}
UnbondingDelegation
The UnbondingDelegation
endpoint queries unbonding information for given validator delegator.
Copy cosmos.staking.v1beta1.Query/UnbondingDelegation
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77", validator_addr":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc"}' \
localhost:9090 cosmos.staking.v1beta1.Query/UnbondingDelegation
Example Output:
Copy {
"unbond": {
"delegator_address": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77",
"validator_address": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"entries": [
{
"creation_height": "136984",
"completion_time": "2021-11-08T05:38:47.505593891Z",
"initial_balance": "400000000",
"balance": "400000000"
},
{
"creation_height": "137005",
"completion_time": "2021-11-08T05:40:53.526196312Z",
"initial_balance": "385000000",
"balance": "385000000"
}
]
}
}
DelegatorDelegations
The DelegatorDelegations
endpoint queries all delegations of a given delegator address.
Copy cosmos.staking.v1beta1.Query/DelegatorDelegations
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77"}' \
localhost:9090 cosmos.staking.v1beta1.Query/DelegatorDelegations
Example Output:
Copy {
"delegation_responses": [
{"delegation":{"delegator_address":"cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77","validator_address":"cosmosvaloper1eh5mwu044gd5ntkkc2xgfg8247mgc56fww3vc8","shares":"25083339023.000000000000000000"},"balance":{"denom":"stake","amount":"25083339023"}}
],
"pagination": {
"next_key": null,
"total": "1"
}
}
DelegatorUnbondingDelegations
The DelegatorUnbondingDelegations
endpoint queries all unbonding delegations of a given delegator address.
Copy cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77"}' \
localhost:9090 cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations
Example Output:
Copy {
"unbonding_responses": [
{
"delegator_address": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77",
"validator_address": "cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9uxyejze",
"entries": [
{
"creation_height": "136984",
"completion_time": "2021-11-08T05:38:47.505593891Z",
"initial_balance": "400000000",
"balance": "400000000"
},
{
"creation_height": "137005",
"completion_time": "2021-11-08T05:40:53.526196312Z",
"initial_balance": "385000000",
"balance": "385000000"
}
]
}
],
"pagination": {
"next_key": null,
"total": "1"
}
}
Redelegations
The Redelegations
endpoint queries redelegations of given address.
Copy cosmos.staking.v1beta1.Query/Redelegations
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1ld5p7hn43yuh8ht28gm9pfjgj2fctujp2tgwvf", "src_validator_addr" : "cosmosvaloper1j7euyj85fv2jugejrktj540emh9353ltgppc3g", "dst_validator_addr" : "cosmosvaloper1yy3tnegzmkdcm7czzcy3flw5z0zyr9vkkxrfse"}' \
localhost:9090 cosmos.staking.v1beta1.Query/Redelegations
Example Output:
Copy {
"redelegation_responses": [
{
"redelegation": {
"delegator_address": "cosmos1ld5p7hn43yuh8ht28gm9pfjgj2fctujp2tgwvf",
"validator_src_address": "cosmosvaloper1j7euyj85fv2jugejrktj540emh9353ltgppc3g",
"validator_dst_address": "cosmosvaloper1yy3tnegzmkdcm7czzcy3flw5z0zyr9vkkxrfse",
"entries": null
},
"entries": [
{
"redelegation_entry": {
"creation_height": 135932,
"completion_time": "2021-11-08T03:52:55.299147901Z",
"initial_balance": "2900000",
"shares_dst": "2900000.000000000000000000"
},
"balance": "2900000"
}
]
}
],
"pagination": null
}
DelegatorValidators
The DelegatorValidators
endpoint queries all validators information for given delegator.
Copy cosmos.staking.v1beta1.Query/DelegatorValidators
Example:
Copy grpcurl -plaintext localhost:9090 cosmos.staking.v1beta1.Query/Validators
Example Output:
Copy {
"validators": [
{
"operatorAddress": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"consensusPubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"Auxs3865HpB/EfssYOzfqNhEJjzys2Fo6jD5B8tPgC8="},
"status": "BOND_STATUS_BONDED",
"tokens": "10000000",
"delegatorShares": "10000000000000000000000000",
"description": {
"moniker": "myvalidator"
},
"unbondingTime": "1970-01-01T00:00:00Z",
"commission": {
"commissionRates": {
"rate": "100000000000000000",
"maxRate": "200000000000000000",
"maxChangeRate": "10000000000000000"
},
"updateTime": "2021-10-01T05:52:50.380144238Z"
},
"minSelfDelegation": "1"
}
],
"pagination": {
"total": "1"
}
}
Validator
The Validator
endpoint queries validator information for given validator address.
Copy cosmos.staking.v1beta1.Query/Validator
Example:
Copy grpcurl -plaintext -d '{"validator_addr":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc"}' \
localhost:9090 cosmos.staking.v1beta1.Query/Validator
Example Output:
Copy {
"validator": {
"operatorAddress": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"consensusPubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"Auxs3865HpB/EfssYOzfqNhEJjzys2Fo6jD5B8tPgC8="},
"status": "BOND_STATUS_BONDED",
"tokens": "10000000",
"delegatorShares": "10000000000000000000000000",
"description": {
"moniker": "myvalidator"
},
"unbondingTime": "1970-01-01T00:00:00Z",
"commission": {
"commissionRates": {
"rate": "100000000000000000",
"maxRate": "200000000000000000",
"maxChangeRate": "10000000000000000"
},
"updateTime": "2021-10-01T05:52:50.380144238Z"
},
"minSelfDelegation": "1"
}
}
ValidatorDelegations
The ValidatorDelegations
endpoint queries delegate information for given validator.
Copy cosmos.staking.v1beta1.Query/ValidatorDelegations
Example:
Copy grpcurl -plaintext -d '{"validator_addr":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc"}' \
localhost:9090 cosmos.staking.v1beta1.Query/ValidatorDelegations
Example Output:
Copy {
"delegationResponses": [
{
"delegation": {
"delegatorAddress": "cosmos1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgy3ua5t",
"validatorAddress": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"shares": "10000000000000000000000000"
},
"balance": {
"denom": "stake",
"amount": "10000000"
}
}
],
"pagination": {
"total": "1"
}
}
ValidatorUnbondingDelegations
The ValidatorUnbondingDelegations
endpoint queries delegate information for given validator.
Copy cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations
Example:
Copy grpcurl -plaintext -d '{"validator_addr":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc"}' \
localhost:9090 cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations
Example Output:
Copy {
"unbonding_responses": [
{
"delegator_address": "cosmos1z3pzzw84d6xn00pw9dy3yapqypfde7vg6965fy",
"validator_address": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"entries": [
{
"creation_height": "25325",
"completion_time": "2021-10-31T09:24:36.797320636Z",
"initial_balance": "20000000",
"balance": "20000000"
}
]
},
{
"delegator_address": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77",
"validator_address": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"entries": [
{
"creation_height": "13100",
"completion_time": "2021-10-30T12:53:02.272266791Z",
"initial_balance": "1000000",
"balance": "1000000"
}
]
},
],
"pagination": {
"next_key": null,
"total": "8"
}
}
Delegation
The Delegation
endpoint queries delegate information for given validator delegator pair.
Copy cosmos.staking.v1beta1.Query/Delegation
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77", validator_addr":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc"}' \
localhost:9090 cosmos.staking.v1beta1.Query/Delegation
Example Output:
Copy {
"delegation_response":
{
"delegation":
{
"delegator_address":"cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77",
"validator_address":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"shares":"25083119936.000000000000000000"
},
"balance":
{
"denom":"stake",
"amount":"25083119936"
}
}
}
UnbondingDelegation
The UnbondingDelegation
endpoint queries unbonding information for given validator delegator.
Copy cosmos.staking.v1beta1.Query/UnbondingDelegation
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77", validator_addr":"cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc"}' \
localhost:9090 cosmos.staking.v1beta1.Query/UnbondingDelegation
Example Output:
Copy {
"unbond": {
"delegator_address": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77",
"validator_address": "cosmosvaloper1rne8lgs98p0jqe82sgt0qr4rdn4hgvmgp9ggcc",
"entries": [
{
"creation_height": "136984",
"completion_time": "2021-11-08T05:38:47.505593891Z",
"initial_balance": "400000000",
"balance": "400000000"
},
{
"creation_height": "137005",
"completion_time": "2021-11-08T05:40:53.526196312Z",
"initial_balance": "385000000",
"balance": "385000000"
}
]
}
}
DelegatorDelegations
The DelegatorDelegations
endpoint queries all delegations of a given delegator address.
Copy cosmos.staking.v1beta1.Query/DelegatorDelegations
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77"}' \
localhost:9090 cosmos.staking.v1beta1.Query/DelegatorDelegations
Example Output:
Copy {
"delegation_responses": [
{"delegation":{"delegator_address":"cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77","validator_address":"cosmosvaloper1eh5mwu044gd5ntkkc2xgfg8247mgc56fww3vc8","shares":"25083339023.000000000000000000"},"balance":{"denom":"stake","amount":"25083339023"}}
],
"pagination": {
"next_key": null,
"total": "1"
}
}
DelegatorUnbondingDelegations
The DelegatorUnbondingDelegations
endpoint queries all unbonding delegations of a given delegator address.
Copy cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77"}' \
localhost:9090 cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations
Example Output:
Copy {
"unbonding_responses": [
{
"delegator_address": "cosmos1y8nyfvmqh50p6ldpzljk3yrglppdv3t8phju77",
"validator_address": "cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9uxyejze",
"entries": [
{
"creation_height": "136984",
"completion_time": "2021-11-08T05:38:47.505593891Z",
"initial_balance": "400000000",
"balance": "400000000"
},
{
"creation_height": "137005",
"completion_time": "2021-11-08T05:40:53.526196312Z",
"initial_balance": "385000000",
"balance": "385000000"
}
]
}
],
"pagination": {
"next_key": null,
"total": "1"
}
}
Redelegations
The Redelegations
endpoint queries redelegations of given address.
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1ld5p7hn43yuh8ht28gm9pfjgj2fctujp2tgwvf", "src_validator_addr" : "cosmosvaloper1j7euyj85fv2jugejrktj540emh9353ltgppc3g", "dst_validator_addr" : "cosmosvaloper1yy3tnegzmkdcm7czzcy3flw5z0zyr9vkkxrfse"}' \
localhost:9090 cosmos.staking.v1beta1.Query/Redelegations
Example Output:
Copy {
"redelegation_responses": [
{
"redelegation": {
"delegator_address": "cosmos1ld5p7hn43yuh8ht28gm9pfjgj2fctujp2tgwvf",
"validator_src_address": "cosmosvaloper1j7euyj85fv2jugejrktj540emh9353ltgppc3g",
"validator_dst_address": "cosmosvaloper1yy3tnegzmkdcm7czzcy3flw5z0zyr9vkkxrfse",
"entries": null
},
"entries": [
{
"redelegation_entry": {
"creation_height": 135932,
"completion_time": "2021-11-08T03:52:55.299147901Z",
"initial_balance": "2900000",
"shares_dst": "2900000.000000000000000000"
},
"balance": "2900000"
}
]
}
],
"pagination": null
}
DelegatorValidators
The DelegatorValidators
endpoint queries all validators information for given delegator.
Copy cosmos.staking.v1beta1.Query/DelegatorValidators
Example:
Copy grpcurl -plaintext \
-d '{"delegator_addr": "cosmos1ld5p7hn43yuh8ht28gm9pfjgj2fctujp2tgwvf"}' \
localhost:9090 cosmos.staking.v1beta1.Query/DelegatorValidators
Example Output:
Copy {
"validators": [
{
"operator_address": "cosmosvaloper1eh5mwu044gd5ntkkc2xgfg8247mgc56fww3vc8",
"consensus_pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "UPwHWxH1zHJWGOa/m6JB3f5YjHMvPQPkVbDqqi+U7Uw="
},
"jailed": false,
"status": "BOND_STATUS_BONDED",
"tokens": "347260647559",
"delegator_shares": "347260647559.000000000000000000",
"description": {
"moniker": "BouBouNode",
"identity": "",