Skip to content

Commit d2a3007

Browse files
author
Fabrice Bascoulergue
committed
Add missing types to read validators
1 parent 86e0998 commit d2a3007

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

src/client/LumClient.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,6 @@ export class LumClient {
191191
return supplies.map(coinFromProto);
192192
};
193193

194-
/**
195-
* Get validators (paginated)
196-
* Validators are sorted first by voting power (descending), then by address (ascending)
197-
*
198-
* @param blockHeight block height to return. If no height is provided, it will fetch validator set which corresponds to the latest block
199-
* @param page page to query (defaul to 1)
200-
* @param perPage results per page (default to 30)
201-
*/
202-
getValidators = async (blockHeight?: number | undefined, page = 1, perPage = 30): Promise<ValidatorsResponse> => {
203-
const results = await this.tmClient.validators({ height: blockHeight, page: page, per_page: perPage });
204-
return results;
205-
};
206-
207194
/**
208195
* Get a transaction by Hash
209196
*

src/registry/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { Registry, GeneratedType } from '@cosmjs/proto-signing';
22

33
import { Tx } from '../codec/cosmos/tx/v1beta1/tx';
4+
import { PubKey } from '../codec/cosmos/crypto/secp256k1/keys';
45
import { MsgSend, MsgMultiSend } from '../codec/cosmos/bank/v1beta1/tx';
56
import { MsgFundCommunityPool, MsgSetWithdrawAddress, MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission } from '../codec/cosmos/distribution/v1beta1/tx';
67
import { MsgBeginRedelegate, MsgCreateValidator, MsgDelegate, MsgEditValidator, MsgUndelegate } from '../codec/cosmos/staking/v1beta1/tx';
78

89
const registryTypes: Iterable<[string, GeneratedType]> = [
10+
['/cosmos.crypto.ed25519.PubKey', PubKey as GeneratedType],
911
['/cosmos.bank.v1beta1.MsgSend', MsgSend as GeneratedType],
1012
['/cosmos.bank.v1beta1.MsgMultiSend', MsgMultiSend as GeneratedType],
1113
['/cosmos.distribution.v1beta1.MsgFundCommunityPool', MsgFundCommunityPool as GeneratedType],

src/types/cosmos.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { Tx } from '../codec/cosmos/tx/v1beta1/tx';
2+
import { PubKey } from '../codec/cosmos/crypto/secp256k1/keys';
3+
4+
export { Tx, PubKey };

src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export * from './tendermint';
2+
export * from './cosmos';
23
export * from './Account';
34
export * from './Coin';
45
export * from './Fee';

0 commit comments

Comments
 (0)