cosmjs icon indicating copy to clipboard operation
cosmjs copied to clipboard

can I getDelegation without providing validatorAddress?

Open btfdip opened this issue 3 years ago • 3 comments

the current sdk only supports:

getDelegation(delegatorAddress: string, validatorAddress: string): Promise<Coin | null>;

what I want is:

getDelegation(delegatorAddress: string): Promise<Coin | null>;

btfdip avatar Jan 27 '22 20:01 btfdip

@btfdip there should be a DelgatorDelegations query for this.

puneet2019 avatar Feb 02 '22 04:02 puneet2019

Can the official guys organize a little for the document? really tough to find the functions I need, which loses the meaning of SDK of cosmjs.

dongzhuoyao avatar Feb 10 '22 14:02 dongzhuoyao

The rpc/ api endpoints are the same as of cosmos-sdk, so the documentation on that end would just be duplication I think, you can find some https://v1.cosmos.network/rpc/v0.41.4, you can refer the proto files for more grpc queries. https://github.com/cosmos/cosmos-sdk/blob/master/proto/cosmos/staking/v1beta1/query.proto.

puneet2019 avatar Feb 11 '22 04:02 puneet2019