@firmachain/firma-js 0.2.64 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/README.md +1 -1
  2. package/dist/sdk/FirmaAuthzService.d.ts +8 -8
  3. package/dist/sdk/FirmaAuthzService.js +12 -6
  4. package/dist/sdk/FirmaBankService.d.ts +4 -4
  5. package/dist/sdk/FirmaContractService.d.ts +4 -4
  6. package/dist/sdk/FirmaCosmWasmCw20.d.ts +14 -14
  7. package/dist/sdk/FirmaCosmWasmCw721.d.ts +14 -14
  8. package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +9 -9
  9. package/dist/sdk/FirmaCosmWasmCwMarketplace.d.ts +8 -8
  10. package/dist/sdk/FirmaCosmWasmService.d.ts +8 -8
  11. package/dist/sdk/FirmaCosmWasmService.js +2 -3
  12. package/dist/sdk/FirmaDistributionService.d.ts +6 -6
  13. package/dist/sdk/FirmaFeeGrantService.d.ts +4 -4
  14. package/dist/sdk/FirmaGovService.d.ts +27 -16
  15. package/dist/sdk/FirmaGovService.js +305 -195
  16. package/dist/sdk/FirmaIbcService.d.ts +3 -4
  17. package/dist/sdk/FirmaIbcService.js +5 -2
  18. package/dist/sdk/FirmaNftService.d.ts +5 -5
  19. package/dist/sdk/FirmaStakingService.d.ts +6 -6
  20. package/dist/sdk/FirmaTokenService.d.ts +5 -5
  21. package/dist/sdk/FirmaUtil.d.ts +1 -1
  22. package/dist/sdk/FirmaUtil.js +12 -14
  23. package/dist/sdk/firmachain/amino/addresses.js +1 -1
  24. package/dist/sdk/firmachain/amino/aminomsgs.d.ts +10 -0
  25. package/dist/sdk/firmachain/amino/aminomsgs.js +5 -1
  26. package/dist/sdk/firmachain/amino/aminotypes.js +27 -10
  27. package/dist/sdk/firmachain/amino/coins.d.ts +14 -2
  28. package/dist/sdk/firmachain/amino/coins.js +26 -5
  29. package/dist/sdk/firmachain/amino/encoding.d.ts +10 -1
  30. package/dist/sdk/firmachain/amino/encoding.js +21 -3
  31. package/dist/sdk/firmachain/amino/signdoc.d.ts +21 -3
  32. package/dist/sdk/firmachain/amino/signdoc.js +37 -11
  33. package/dist/sdk/firmachain/amino/signer.d.ts +2 -1
  34. package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +7 -6
  35. package/dist/sdk/firmachain/authz/AuthzTxTypes.js +7 -6
  36. package/dist/sdk/firmachain/bank/BankQueryClient.js +1 -1
  37. package/dist/sdk/firmachain/common/CommonTxClient.js +11 -9
  38. package/dist/sdk/firmachain/common/ITxClient.d.ts +6 -6
  39. package/dist/sdk/firmachain/common/ITxClient.js +82 -24
  40. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +4 -9
  41. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +37 -32
  42. package/dist/sdk/firmachain/common/LedgerWallet.js +4 -8
  43. package/dist/sdk/firmachain/common/TxCommon.d.ts +1 -2
  44. package/dist/sdk/firmachain/common/accounts.d.ts +7 -3
  45. package/dist/sdk/firmachain/common/accounts.js +28 -33
  46. package/dist/sdk/firmachain/common/aminotypes.d.ts +19 -0
  47. package/dist/sdk/firmachain/common/aminotypes.js +74 -0
  48. package/dist/sdk/firmachain/common/events.d.ts +32 -0
  49. package/dist/sdk/firmachain/common/events.js +18 -0
  50. package/dist/sdk/firmachain/common/fee.d.ts +26 -0
  51. package/dist/sdk/firmachain/common/fee.js +83 -0
  52. package/dist/sdk/firmachain/common/index.d.ts +1 -0
  53. package/dist/sdk/firmachain/common/index.js +3 -0
  54. package/dist/sdk/firmachain/common/modules/auth/queries.d.ts +15 -0
  55. package/dist/sdk/firmachain/common/modules/auth/queries.js +64 -0
  56. package/dist/sdk/firmachain/common/modules/authz/aminomessages.d.ts +2 -0
  57. package/dist/sdk/firmachain/common/modules/authz/aminomessages.js +15 -0
  58. package/dist/sdk/firmachain/common/modules/authz/messages.d.ts +2 -0
  59. package/dist/sdk/firmachain/common/modules/authz/messages.js +9 -0
  60. package/dist/sdk/firmachain/common/modules/authz/queries.d.ts +10 -0
  61. package/dist/sdk/firmachain/common/modules/authz/queries.js +88 -0
  62. package/dist/sdk/firmachain/common/modules/bank/aminomessages.d.ts +35 -0
  63. package/dist/sdk/firmachain/common/modules/bank/aminomessages.js +85 -0
  64. package/dist/sdk/firmachain/common/modules/bank/messages.d.ts +8 -0
  65. package/dist/sdk/firmachain/common/modules/bank/messages.js +12 -0
  66. package/dist/sdk/firmachain/common/modules/bank/queries.d.ts +15 -0
  67. package/dist/sdk/firmachain/common/modules/bank/queries.js +128 -0
  68. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.d.ts +14 -0
  69. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.js +11 -0
  70. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.d.ts +44 -0
  71. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.js +113 -0
  72. package/dist/sdk/firmachain/common/modules/distribution/messages.d.ts +8 -0
  73. package/dist/sdk/firmachain/common/modules/distribution/messages.js +15 -0
  74. package/dist/sdk/firmachain/common/modules/distribution/queries.d.ts +16 -0
  75. package/dist/sdk/firmachain/common/modules/distribution/queries.js +171 -0
  76. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.d.ts +18 -0
  77. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.js +11 -0
  78. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.d.ts +2 -0
  79. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.js +14 -0
  80. package/dist/sdk/firmachain/common/modules/feegrant/messages.d.ts +2 -0
  81. package/dist/sdk/firmachain/common/modules/feegrant/messages.js +8 -0
  82. package/dist/sdk/firmachain/common/modules/feegrant/queries.d.ts +9 -0
  83. package/dist/sdk/firmachain/common/modules/feegrant/queries.js +81 -0
  84. package/dist/sdk/firmachain/common/modules/gov/aminomessages.d.ts +79 -0
  85. package/dist/sdk/firmachain/common/modules/gov/aminomessages.js +152 -0
  86. package/dist/sdk/firmachain/common/modules/gov/messages.d.ts +29 -0
  87. package/dist/sdk/firmachain/common/modules/gov/messages.js +38 -0
  88. package/dist/sdk/firmachain/common/modules/gov/queries.d.ts +19 -0
  89. package/dist/sdk/firmachain/common/modules/gov/queries.js +160 -0
  90. package/dist/sdk/firmachain/common/modules/group/aminomessages.d.ts +2 -0
  91. package/dist/sdk/firmachain/common/modules/group/aminomessages.js +8 -0
  92. package/dist/sdk/firmachain/common/modules/group/messages.d.ts +2 -0
  93. package/dist/sdk/firmachain/common/modules/group/messages.js +28 -0
  94. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.d.ts +38 -0
  95. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.js +55 -0
  96. package/dist/sdk/firmachain/common/modules/ibc/messages.d.ts +8 -0
  97. package/dist/sdk/firmachain/common/modules/ibc/messages.js +32 -0
  98. package/dist/sdk/firmachain/common/modules/ibc/queries.d.ts +58 -0
  99. package/dist/sdk/firmachain/common/modules/ibc/queries.js +576 -0
  100. package/dist/sdk/firmachain/common/modules/index.d.ts +32 -0
  101. package/dist/sdk/firmachain/common/modules/index.js +101 -0
  102. package/dist/sdk/firmachain/common/modules/mint/queries.d.ts +21 -0
  103. package/dist/sdk/firmachain/common/modules/mint/queries.js +95 -0
  104. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.d.ts +12 -0
  105. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.js +11 -0
  106. package/dist/sdk/firmachain/common/modules/slashing/queries.d.ts +10 -0
  107. package/dist/sdk/firmachain/common/modules/slashing/queries.js +88 -0
  108. package/dist/sdk/firmachain/common/modules/staking/aminomessages.d.ts +112 -0
  109. package/dist/sdk/firmachain/common/modules/staking/aminomessages.js +234 -0
  110. package/dist/sdk/firmachain/common/modules/staking/messages.d.ts +33 -0
  111. package/dist/sdk/firmachain/common/modules/staking/messages.js +37 -0
  112. package/dist/sdk/firmachain/common/modules/staking/queries.d.ts +23 -0
  113. package/dist/sdk/firmachain/common/modules/staking/queries.js +242 -0
  114. package/dist/sdk/firmachain/common/modules/tx/queries.d.ts +11 -0
  115. package/dist/sdk/firmachain/common/modules/tx/queries.js +103 -0
  116. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.d.ts +16 -0
  117. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.js +56 -0
  118. package/dist/sdk/firmachain/common/modules/vesting/messages.d.ts +2 -0
  119. package/dist/sdk/firmachain/common/modules/vesting/messages.js +7 -0
  120. package/dist/sdk/firmachain/common/queryclient/index.d.ts +2 -0
  121. package/dist/sdk/firmachain/common/queryclient/index.js +10 -0
  122. package/dist/sdk/firmachain/common/queryclient/queryclient.d.ts +75 -0
  123. package/dist/sdk/firmachain/common/queryclient/queryclient.js +157 -0
  124. package/dist/sdk/firmachain/common/queryclient/utils.d.ts +33 -0
  125. package/dist/sdk/firmachain/common/queryclient/utils.js +101 -0
  126. package/dist/sdk/firmachain/common/search.d.ts +10 -0
  127. package/dist/sdk/firmachain/common/search.js +7 -0
  128. package/dist/sdk/firmachain/common/signing.d.ts +8 -3
  129. package/dist/sdk/firmachain/common/signing.js +24 -12
  130. package/dist/sdk/firmachain/common/signingstargateclient.d.ts +107 -30
  131. package/dist/sdk/firmachain/common/signingstargateclient.js +445 -128
  132. package/dist/sdk/firmachain/common/stargateclient.d.ts +184 -20
  133. package/dist/sdk/firmachain/common/stargateclient.js +351 -35
  134. package/dist/sdk/firmachain/contract/ContractTxClient.d.ts +2 -2
  135. package/dist/sdk/firmachain/contract/ContractTxClient.js +4 -4
  136. package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +1 -1
  137. package/dist/sdk/firmachain/contract/ContractTxTypes.js +3 -3
  138. package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +1 -1
  139. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +5 -5
  140. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +10 -8
  141. package/dist/sdk/firmachain/google/protobuf/any.d.ts +3 -2
  142. package/dist/sdk/firmachain/google/protobuf/any.js +2 -1
  143. package/dist/sdk/firmachain/google/protobuf/duration.d.ts +3 -2
  144. package/dist/sdk/firmachain/google/protobuf/duration.js +2 -1
  145. package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +3 -2
  146. package/dist/sdk/firmachain/google/protobuf/timestamp.js +2 -1
  147. package/dist/sdk/firmachain/gov/GovQueryClient.d.ts +13 -1
  148. package/dist/sdk/firmachain/gov/GovQueryClient.js +9 -2
  149. package/dist/sdk/firmachain/gov/GovTxClient.d.ts +12 -0
  150. package/dist/sdk/firmachain/gov/GovTxClient.js +11 -1
  151. package/dist/sdk/firmachain/nft/NftTxClient.d.ts +3 -3
  152. package/dist/sdk/firmachain/nft/NftTxClient.js +6 -6
  153. package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +1 -1
  154. package/dist/sdk/firmachain/nft/NftTxTypes.js +4 -4
  155. package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +1 -0
  156. package/dist/sdk/firmachain/staking/StakingQueryClient.js +0 -1
  157. package/dist/sdk/firmachain/token/TokenTxClient.d.ts +4 -4
  158. package/dist/sdk/firmachain/token/TokenTxClient.js +8 -8
  159. package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +1 -1
  160. package/dist/sdk/firmachain/token/TokenTxTypes.js +5 -5
  161. package/dist/test/00.wallet.test.js +15 -9
  162. package/dist/test/01.contract_tx.test.js +53 -45
  163. package/dist/test/02.contract_query.test.js +54 -31
  164. package/dist/test/03.contract_scenario.test.js +170 -326
  165. package/dist/test/04.bank_tx.test.js +58 -59
  166. package/dist/test/05.bank_query.test.js +51 -56
  167. package/dist/test/06.feegrant_tx.test.js +74 -89
  168. package/dist/test/07.feegrant_query.test.js +69 -27
  169. package/dist/test/08.gas_estimate.test.js +422 -392
  170. package/dist/test/09.ipfs.test.js +3 -3
  171. package/dist/test/10.nft_tx.test.js +108 -76
  172. package/dist/test/11.nft_query.test.js +41 -46
  173. package/dist/test/12.staking_tx.test.js +81 -98
  174. package/dist/test/13.staking_query.test.js +66 -12
  175. package/dist/test/14.distribution_tx.test.js +69 -78
  176. package/dist/test/15.distribution_query.test.js +81 -57
  177. package/dist/test/16.gov_tx.test.js +247 -107
  178. package/dist/test/17.gov_query.test.js +48 -9
  179. package/dist/test/18.util.test.js +6 -1
  180. package/dist/test/19.chain.test.js +50 -4
  181. package/dist/test/20.slashing_query.test.js +31 -1
  182. package/dist/test/21.token_tx.test.js +48 -56
  183. package/dist/test/22.token_query.test.js +24 -20
  184. package/dist/test/23.authz_tx.test.js +119 -240
  185. package/dist/test/24.authz_query.test.js +116 -56
  186. package/dist/test/25.cosmwasm_tx.test.js +95 -57
  187. package/dist/test/26.cosmwasm_query.test.js +66 -26
  188. package/dist/test/27.arbitary_sign.test.js +59 -67
  189. package/dist/test/28.ibc_tx.test.js +29 -17
  190. package/dist/test/29.mint_query.test.js +2 -0
  191. package/dist/test/30.cw20_tx.test.js +161 -226
  192. package/dist/test/31.cw20_query.test.js +183 -37
  193. package/dist/test/32.cw721_tx.test.js +147 -149
  194. package/dist/test/33.cw721_query.test.js +188 -36
  195. package/dist/test/34.cw_bridge_tx.test.js +266 -155
  196. package/dist/test/35.cw_bridge_tx_low.test.js +221 -81
  197. package/dist/test/36.cw_bridge_query.test.js +157 -21
  198. package/dist/test/37.cw_marketplace_tx.test.js +22 -22
  199. package/dist/test/38.cw_marketplace_query.test.js +9 -9
  200. package/dist/test/config_test.d.ts +10 -4
  201. package/dist/test/config_test.js +16 -9
  202. package/dist/test/config_test.sample.d.ts +11 -0
  203. package/dist/test/config_test.sample.js +14 -0
  204. package/package.json +9 -7
  205. package/dist/sdk/firmachain/common/signingaminostargateclient.d.ts +0 -50
  206. package/dist/sdk/firmachain/common/signingaminostargateclient.js +0 -267
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ var __read = (this && this.__read) || function (o, n) {
3
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
4
+ if (!m) return o;
5
+ var i = m.call(o), r, ar = [], e;
6
+ try {
7
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
+ }
9
+ catch (error) { e = { error: error }; }
10
+ finally {
11
+ try {
12
+ if (r && !r.done && (m = i["return"])) m.call(i);
13
+ }
14
+ finally { if (e) throw e.error; }
15
+ }
16
+ return ar;
17
+ };
18
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
19
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
20
+ to[j] = from[i];
21
+ return to;
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.createBankAminoConverters = exports.isAminoMsgMultiSend = exports.isAminoMsgSend = void 0;
25
+ function isAminoMsgSend(msg) {
26
+ return msg.type === "cosmos-sdk/MsgSend";
27
+ }
28
+ exports.isAminoMsgSend = isAminoMsgSend;
29
+ function isAminoMsgMultiSend(msg) {
30
+ return msg.type === "cosmos-sdk/MsgMultiSend";
31
+ }
32
+ exports.isAminoMsgMultiSend = isAminoMsgMultiSend;
33
+ function createBankAminoConverters() {
34
+ return {
35
+ "/cosmos.bank.v1beta1.MsgSend": {
36
+ aminoType: "cosmos-sdk/MsgSend",
37
+ toAmino: function (_a) {
38
+ var fromAddress = _a.fromAddress, toAddress = _a.toAddress, amount = _a.amount;
39
+ return ({
40
+ from_address: fromAddress,
41
+ to_address: toAddress,
42
+ amount: __spreadArray([], __read(amount)),
43
+ });
44
+ },
45
+ fromAmino: function (_a) {
46
+ var from_address = _a.from_address, to_address = _a.to_address, amount = _a.amount;
47
+ return ({
48
+ fromAddress: from_address,
49
+ toAddress: to_address,
50
+ amount: __spreadArray([], __read(amount)),
51
+ });
52
+ },
53
+ },
54
+ "/cosmos.bank.v1beta1.MsgMultiSend": {
55
+ aminoType: "cosmos-sdk/MsgMultiSend",
56
+ toAmino: function (_a) {
57
+ var inputs = _a.inputs, outputs = _a.outputs;
58
+ return ({
59
+ inputs: inputs.map(function (input) { return ({
60
+ address: input.address,
61
+ coins: __spreadArray([], __read(input.coins)),
62
+ }); }),
63
+ outputs: outputs.map(function (output) { return ({
64
+ address: output.address,
65
+ coins: __spreadArray([], __read(output.coins)),
66
+ }); }),
67
+ });
68
+ },
69
+ fromAmino: function (_a) {
70
+ var inputs = _a.inputs, outputs = _a.outputs;
71
+ return ({
72
+ inputs: inputs.map(function (input) { return ({
73
+ address: input.address,
74
+ coins: __spreadArray([], __read(input.coins)),
75
+ }); }),
76
+ outputs: outputs.map(function (output) { return ({
77
+ address: output.address,
78
+ coins: __spreadArray([], __read(output.coins)),
79
+ }); }),
80
+ });
81
+ },
82
+ },
83
+ };
84
+ }
85
+ exports.createBankAminoConverters = createBankAminoConverters;
@@ -0,0 +1,8 @@
1
+ import { EncodeObject, GeneratedType } from "@cosmjs/proto-signing";
2
+ import { MsgSend } from "cosmjs-types/cosmos/bank/v1beta1/tx";
3
+ export declare const bankTypes: ReadonlyArray<[string, GeneratedType]>;
4
+ export interface MsgSendEncodeObject extends EncodeObject {
5
+ readonly typeUrl: "/cosmos.bank.v1beta1.MsgSend";
6
+ readonly value: Partial<MsgSend>;
7
+ }
8
+ export declare function isMsgSendEncodeObject(encodeObject: EncodeObject): encodeObject is MsgSendEncodeObject;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isMsgSendEncodeObject = exports.bankTypes = void 0;
4
+ var tx_1 = require("cosmjs-types/cosmos/bank/v1beta1/tx");
5
+ exports.bankTypes = [
6
+ ["/cosmos.bank.v1beta1.MsgMultiSend", tx_1.MsgMultiSend],
7
+ ["/cosmos.bank.v1beta1.MsgSend", tx_1.MsgSend],
8
+ ];
9
+ function isMsgSendEncodeObject(encodeObject) {
10
+ return encodeObject.typeUrl === "/cosmos.bank.v1beta1.MsgSend";
11
+ }
12
+ exports.isMsgSendEncodeObject = isMsgSendEncodeObject;
@@ -0,0 +1,15 @@
1
+ import { Metadata } from "cosmjs-types/cosmos/bank/v1beta1/bank";
2
+ import { QueryTotalSupplyResponse } from "cosmjs-types/cosmos/bank/v1beta1/query";
3
+ import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
4
+ import { QueryClient } from "../../queryclient";
5
+ export interface BankExtension {
6
+ readonly bank: {
7
+ readonly balance: (address: string, denom: string) => Promise<Coin>;
8
+ readonly allBalances: (address: string) => Promise<Coin[]>;
9
+ readonly totalSupply: (paginationKey?: Uint8Array) => Promise<QueryTotalSupplyResponse>;
10
+ readonly supplyOf: (denom: string) => Promise<Coin>;
11
+ readonly denomMetadata: (denom: string) => Promise<Metadata>;
12
+ readonly denomsMetadata: () => Promise<Metadata[]>;
13
+ };
14
+ }
15
+ export declare function setupBankExtension(base: QueryClient): BankExtension;
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.setupBankExtension = void 0;
40
+ /* eslint-disable @typescript-eslint/naming-convention */
41
+ var utils_1 = require("@cosmjs/utils");
42
+ var query_1 = require("cosmjs-types/cosmos/bank/v1beta1/query");
43
+ var queryclient_1 = require("../../queryclient");
44
+ function setupBankExtension(base) {
45
+ var _this = this;
46
+ var rpc = queryclient_1.createProtobufRpcClient(base);
47
+ // Use this service to get easy typed access to query methods
48
+ // This cannot be used for proof verification
49
+ var queryService = new query_1.QueryClientImpl(rpc);
50
+ return {
51
+ bank: {
52
+ balance: function (address, denom) { return __awaiter(_this, void 0, void 0, function () {
53
+ var balance;
54
+ return __generator(this, function (_a) {
55
+ switch (_a.label) {
56
+ case 0: return [4 /*yield*/, queryService.Balance({ address: address, denom: denom })];
57
+ case 1:
58
+ balance = (_a.sent()).balance;
59
+ utils_1.assert(balance);
60
+ return [2 /*return*/, balance];
61
+ }
62
+ });
63
+ }); },
64
+ allBalances: function (address) { return __awaiter(_this, void 0, void 0, function () {
65
+ var balances;
66
+ return __generator(this, function (_a) {
67
+ switch (_a.label) {
68
+ case 0: return [4 /*yield*/, queryService.AllBalances(query_1.QueryAllBalancesRequest.fromPartial({ address: address }))];
69
+ case 1:
70
+ balances = (_a.sent()).balances;
71
+ return [2 /*return*/, balances];
72
+ }
73
+ });
74
+ }); },
75
+ totalSupply: function (paginationKey) { return __awaiter(_this, void 0, void 0, function () {
76
+ var response;
77
+ return __generator(this, function (_a) {
78
+ switch (_a.label) {
79
+ case 0: return [4 /*yield*/, queryService.TotalSupply({
80
+ pagination: queryclient_1.createPagination(paginationKey),
81
+ })];
82
+ case 1:
83
+ response = _a.sent();
84
+ return [2 /*return*/, response];
85
+ }
86
+ });
87
+ }); },
88
+ supplyOf: function (denom) { return __awaiter(_this, void 0, void 0, function () {
89
+ var amount;
90
+ return __generator(this, function (_a) {
91
+ switch (_a.label) {
92
+ case 0: return [4 /*yield*/, queryService.SupplyOf({ denom: denom })];
93
+ case 1:
94
+ amount = (_a.sent()).amount;
95
+ utils_1.assert(amount);
96
+ return [2 /*return*/, amount];
97
+ }
98
+ });
99
+ }); },
100
+ denomMetadata: function (denom) { return __awaiter(_this, void 0, void 0, function () {
101
+ var metadata;
102
+ return __generator(this, function (_a) {
103
+ switch (_a.label) {
104
+ case 0: return [4 /*yield*/, queryService.DenomMetadata({ denom: denom })];
105
+ case 1:
106
+ metadata = (_a.sent()).metadata;
107
+ utils_1.assert(metadata);
108
+ return [2 /*return*/, metadata];
109
+ }
110
+ });
111
+ }); },
112
+ denomsMetadata: function () { return __awaiter(_this, void 0, void 0, function () {
113
+ var metadatas;
114
+ return __generator(this, function (_a) {
115
+ switch (_a.label) {
116
+ case 0: return [4 /*yield*/, queryService.DenomsMetadata(query_1.QueryDenomsMetadataRequest.fromPartial({
117
+ pagination: undefined, // Not implemented
118
+ }))];
119
+ case 1:
120
+ metadatas = (_a.sent()).metadatas;
121
+ return [2 /*return*/, metadatas];
122
+ }
123
+ });
124
+ }); },
125
+ },
126
+ };
127
+ }
128
+ exports.setupBankExtension = setupBankExtension;
@@ -0,0 +1,14 @@
1
+ import { AminoMsg } from "@cosmjs/amino";
2
+ import { AminoConverters } from "../../aminotypes";
3
+ /** Verifies a particular invariance */
4
+ export interface AminoMsgVerifyInvariant extends AminoMsg {
5
+ readonly type: "cosmos-sdk/MsgVerifyInvariant";
6
+ readonly value: {
7
+ /** Bech32 account address */
8
+ readonly sender: string;
9
+ readonly invariant_module_name: string;
10
+ readonly invariant_route: string;
11
+ };
12
+ }
13
+ export declare function isAminoMsgVerifyInvariant(msg: AminoMsg): msg is AminoMsgVerifyInvariant;
14
+ export declare function createCrysisAminoConverters(): AminoConverters;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCrysisAminoConverters = exports.isAminoMsgVerifyInvariant = void 0;
4
+ function isAminoMsgVerifyInvariant(msg) {
5
+ return msg.type === "cosmos-sdk/MsgVerifyInvariant";
6
+ }
7
+ exports.isAminoMsgVerifyInvariant = isAminoMsgVerifyInvariant;
8
+ function createCrysisAminoConverters() {
9
+ throw new Error("Not implemented");
10
+ }
11
+ exports.createCrysisAminoConverters = createCrysisAminoConverters;
@@ -0,0 +1,44 @@
1
+ import { AminoMsg, Coin } from "@cosmjs/amino";
2
+ import { AminoConverter } from "../..";
3
+ /** Changes the withdraw address for a delegator (or validator self-delegation) */
4
+ export interface AminoMsgSetWithdrawAddress extends AminoMsg {
5
+ readonly type: "cosmos-sdk/MsgModifyWithdrawAddress";
6
+ readonly value: {
7
+ /** Bech32 account address */
8
+ readonly delegator_address: string;
9
+ /** Bech32 account address */
10
+ readonly withdraw_address: string;
11
+ };
12
+ }
13
+ export declare function isAminoMsgSetWithdrawAddress(msg: AminoMsg): msg is AminoMsgSetWithdrawAddress;
14
+ /** Message for delegation withdraw from a single validator */
15
+ export interface AminoMsgWithdrawDelegatorReward extends AminoMsg {
16
+ readonly type: "cosmos-sdk/MsgWithdrawDelegationReward";
17
+ readonly value: {
18
+ /** Bech32 account address */
19
+ readonly delegator_address: string;
20
+ /** Bech32 account address */
21
+ readonly validator_address: string;
22
+ };
23
+ }
24
+ export declare function isAminoMsgWithdrawDelegatorReward(msg: AminoMsg): msg is AminoMsgWithdrawDelegatorReward;
25
+ /** Message for validator withdraw */
26
+ export interface AminoMsgWithdrawValidatorCommission extends AminoMsg {
27
+ readonly type: "cosmos-sdk/MsgWithdrawValidatorCommission";
28
+ readonly value: {
29
+ /** Bech32 account address */
30
+ readonly validator_address: string;
31
+ };
32
+ }
33
+ export declare function isAminoMsgWithdrawValidatorCommission(msg: AminoMsg): msg is AminoMsgWithdrawValidatorCommission;
34
+ /** Allows an account to directly fund the community pool. */
35
+ export interface AminoMsgFundCommunityPool extends AminoMsg {
36
+ readonly type: "cosmos-sdk/MsgFundCommunityPool";
37
+ readonly value: {
38
+ readonly amount: readonly Coin[];
39
+ /** Bech32 account address */
40
+ readonly depositor: string;
41
+ };
42
+ }
43
+ export declare function isAminoMsgFundCommunityPool(msg: AminoMsg): msg is AminoMsgFundCommunityPool;
44
+ export declare function createDistributionAminoConverters(): Record<string, AminoConverter>;
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ var __read = (this && this.__read) || function (o, n) {
3
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
4
+ if (!m) return o;
5
+ var i = m.call(o), r, ar = [], e;
6
+ try {
7
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
+ }
9
+ catch (error) { e = { error: error }; }
10
+ finally {
11
+ try {
12
+ if (r && !r.done && (m = i["return"])) m.call(i);
13
+ }
14
+ finally { if (e) throw e.error; }
15
+ }
16
+ return ar;
17
+ };
18
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
19
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
20
+ to[j] = from[i];
21
+ return to;
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.createDistributionAminoConverters = exports.isAminoMsgFundCommunityPool = exports.isAminoMsgWithdrawValidatorCommission = exports.isAminoMsgWithdrawDelegatorReward = exports.isAminoMsgSetWithdrawAddress = void 0;
25
+ function isAminoMsgSetWithdrawAddress(msg) {
26
+ // NOTE: Type string and names diverge here!
27
+ return msg.type === "cosmos-sdk/MsgModifyWithdrawAddress";
28
+ }
29
+ exports.isAminoMsgSetWithdrawAddress = isAminoMsgSetWithdrawAddress;
30
+ function isAminoMsgWithdrawDelegatorReward(msg) {
31
+ // NOTE: Type string and names diverge here!
32
+ return msg.type === "cosmos-sdk/MsgWithdrawDelegationReward";
33
+ }
34
+ exports.isAminoMsgWithdrawDelegatorReward = isAminoMsgWithdrawDelegatorReward;
35
+ function isAminoMsgWithdrawValidatorCommission(msg) {
36
+ return msg.type === "cosmos-sdk/MsgWithdrawValidatorCommission";
37
+ }
38
+ exports.isAminoMsgWithdrawValidatorCommission = isAminoMsgWithdrawValidatorCommission;
39
+ function isAminoMsgFundCommunityPool(msg) {
40
+ return msg.type === "cosmos-sdk/MsgFundCommunityPool";
41
+ }
42
+ exports.isAminoMsgFundCommunityPool = isAminoMsgFundCommunityPool;
43
+ function createDistributionAminoConverters() {
44
+ return {
45
+ "/cosmos.distribution.v1beta1.MsgFundCommunityPool": {
46
+ aminoType: "cosmos-sdk/MsgFundCommunityPool",
47
+ toAmino: function (_a) {
48
+ var amount = _a.amount, depositor = _a.depositor;
49
+ return ({
50
+ amount: __spreadArray([], __read(amount)),
51
+ depositor: depositor,
52
+ });
53
+ },
54
+ fromAmino: function (_a) {
55
+ var amount = _a.amount, depositor = _a.depositor;
56
+ return ({
57
+ amount: __spreadArray([], __read(amount)),
58
+ depositor: depositor,
59
+ });
60
+ },
61
+ },
62
+ "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress": {
63
+ aminoType: "cosmos-sdk/MsgModifyWithdrawAddress",
64
+ toAmino: function (_a) {
65
+ var delegatorAddress = _a.delegatorAddress, withdrawAddress = _a.withdrawAddress;
66
+ return ({
67
+ delegator_address: delegatorAddress,
68
+ withdraw_address: withdrawAddress,
69
+ });
70
+ },
71
+ fromAmino: function (_a) {
72
+ var delegator_address = _a.delegator_address, withdraw_address = _a.withdraw_address;
73
+ return ({
74
+ delegatorAddress: delegator_address,
75
+ withdrawAddress: withdraw_address,
76
+ });
77
+ },
78
+ },
79
+ "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward": {
80
+ aminoType: "cosmos-sdk/MsgWithdrawDelegationReward",
81
+ toAmino: function (_a) {
82
+ var delegatorAddress = _a.delegatorAddress, validatorAddress = _a.validatorAddress;
83
+ return ({
84
+ delegator_address: delegatorAddress,
85
+ validator_address: validatorAddress,
86
+ });
87
+ },
88
+ fromAmino: function (_a) {
89
+ var delegator_address = _a.delegator_address, validator_address = _a.validator_address;
90
+ return ({
91
+ delegatorAddress: delegator_address,
92
+ validatorAddress: validator_address,
93
+ });
94
+ },
95
+ },
96
+ "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission": {
97
+ aminoType: "cosmos-sdk/MsgWithdrawValidatorCommission",
98
+ toAmino: function (_a) {
99
+ var validatorAddress = _a.validatorAddress;
100
+ return ({
101
+ validator_address: validatorAddress,
102
+ });
103
+ },
104
+ fromAmino: function (_a) {
105
+ var validator_address = _a.validator_address;
106
+ return ({
107
+ validatorAddress: validator_address,
108
+ });
109
+ },
110
+ },
111
+ };
112
+ }
113
+ exports.createDistributionAminoConverters = createDistributionAminoConverters;
@@ -0,0 +1,8 @@
1
+ import { EncodeObject, GeneratedType } from "@cosmjs/proto-signing";
2
+ import { MsgWithdrawDelegatorReward } from "cosmjs-types/cosmos/distribution/v1beta1/tx";
3
+ export declare const distributionTypes: ReadonlyArray<[string, GeneratedType]>;
4
+ export interface MsgWithdrawDelegatorRewardEncodeObject extends EncodeObject {
5
+ readonly typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward";
6
+ readonly value: Partial<MsgWithdrawDelegatorReward>;
7
+ }
8
+ export declare function isMsgWithdrawDelegatorRewardEncodeObject(object: EncodeObject): object is MsgWithdrawDelegatorRewardEncodeObject;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isMsgWithdrawDelegatorRewardEncodeObject = exports.distributionTypes = void 0;
4
+ var tx_1 = require("cosmjs-types/cosmos/distribution/v1beta1/tx");
5
+ exports.distributionTypes = [
6
+ ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", tx_1.MsgFundCommunityPool],
7
+ ["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", tx_1.MsgSetWithdrawAddress],
8
+ ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", tx_1.MsgWithdrawDelegatorReward],
9
+ ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", tx_1.MsgWithdrawValidatorCommission],
10
+ ];
11
+ function isMsgWithdrawDelegatorRewardEncodeObject(object) {
12
+ return (object.typeUrl ===
13
+ "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward");
14
+ }
15
+ exports.isMsgWithdrawDelegatorRewardEncodeObject = isMsgWithdrawDelegatorRewardEncodeObject;
@@ -0,0 +1,16 @@
1
+ import { QueryCommunityPoolResponse, QueryDelegationRewardsResponse, QueryDelegationTotalRewardsResponse, QueryDelegatorValidatorsResponse, QueryDelegatorWithdrawAddressResponse, QueryParamsResponse, QueryValidatorCommissionResponse, QueryValidatorOutstandingRewardsResponse, QueryValidatorSlashesResponse } from "cosmjs-types/cosmos/distribution/v1beta1/query";
2
+ import { QueryClient } from "../../queryclient";
3
+ export interface DistributionExtension {
4
+ readonly distribution: {
5
+ communityPool: () => Promise<QueryCommunityPoolResponse>;
6
+ delegationRewards: (delegatorAddress: string, validatorAddress: string) => Promise<QueryDelegationRewardsResponse>;
7
+ delegationTotalRewards: (delegatorAddress: string) => Promise<QueryDelegationTotalRewardsResponse>;
8
+ delegatorValidators: (delegatorAddress: string) => Promise<QueryDelegatorValidatorsResponse>;
9
+ delegatorWithdrawAddress: (delegatorAddress: string) => Promise<QueryDelegatorWithdrawAddressResponse>;
10
+ params: () => Promise<QueryParamsResponse>;
11
+ validatorCommission: (validatorAddress: string) => Promise<QueryValidatorCommissionResponse>;
12
+ validatorOutstandingRewards: (validatorAddress: string) => Promise<QueryValidatorOutstandingRewardsResponse>;
13
+ validatorSlashes: (validatorAddress: string, startingHeight: number, endingHeight: number, paginationKey?: Uint8Array) => Promise<QueryValidatorSlashesResponse>;
14
+ };
15
+ }
16
+ export declare function setupDistributionExtension(base: QueryClient): DistributionExtension;
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.setupDistributionExtension = void 0;
40
+ /* eslint-disable @typescript-eslint/naming-convention */
41
+ var query_1 = require("cosmjs-types/cosmos/distribution/v1beta1/query");
42
+ var queryclient_1 = require("../../queryclient");
43
+ function setupDistributionExtension(base) {
44
+ var _this = this;
45
+ var rpc = queryclient_1.createProtobufRpcClient(base);
46
+ // Use this service to get easy typed access to query methods
47
+ // This cannot be used for proof verification
48
+ var queryService = new query_1.QueryClientImpl(rpc);
49
+ return {
50
+ distribution: {
51
+ communityPool: function () { return __awaiter(_this, void 0, void 0, function () {
52
+ var response;
53
+ return __generator(this, function (_a) {
54
+ switch (_a.label) {
55
+ case 0: return [4 /*yield*/, queryService.CommunityPool({})];
56
+ case 1:
57
+ response = _a.sent();
58
+ return [2 /*return*/, response];
59
+ }
60
+ });
61
+ }); },
62
+ delegationRewards: function (delegatorAddress, validatorAddress) { return __awaiter(_this, void 0, void 0, function () {
63
+ var response;
64
+ return __generator(this, function (_a) {
65
+ switch (_a.label) {
66
+ case 0: return [4 /*yield*/, queryService.DelegationRewards({
67
+ delegatorAddress: delegatorAddress,
68
+ validatorAddress: validatorAddress,
69
+ })];
70
+ case 1:
71
+ response = _a.sent();
72
+ return [2 /*return*/, response];
73
+ }
74
+ });
75
+ }); },
76
+ delegationTotalRewards: function (delegatorAddress) { return __awaiter(_this, void 0, void 0, function () {
77
+ var response;
78
+ return __generator(this, function (_a) {
79
+ switch (_a.label) {
80
+ case 0: return [4 /*yield*/, queryService.DelegationTotalRewards({
81
+ delegatorAddress: delegatorAddress,
82
+ })];
83
+ case 1:
84
+ response = _a.sent();
85
+ return [2 /*return*/, response];
86
+ }
87
+ });
88
+ }); },
89
+ delegatorValidators: function (delegatorAddress) { return __awaiter(_this, void 0, void 0, function () {
90
+ var response;
91
+ return __generator(this, function (_a) {
92
+ switch (_a.label) {
93
+ case 0: return [4 /*yield*/, queryService.DelegatorValidators({
94
+ delegatorAddress: delegatorAddress,
95
+ })];
96
+ case 1:
97
+ response = _a.sent();
98
+ return [2 /*return*/, response];
99
+ }
100
+ });
101
+ }); },
102
+ delegatorWithdrawAddress: function (delegatorAddress) { return __awaiter(_this, void 0, void 0, function () {
103
+ var response;
104
+ return __generator(this, function (_a) {
105
+ switch (_a.label) {
106
+ case 0: return [4 /*yield*/, queryService.DelegatorWithdrawAddress({
107
+ delegatorAddress: delegatorAddress,
108
+ })];
109
+ case 1:
110
+ response = _a.sent();
111
+ return [2 /*return*/, response];
112
+ }
113
+ });
114
+ }); },
115
+ params: function () { return __awaiter(_this, void 0, void 0, function () {
116
+ var response;
117
+ return __generator(this, function (_a) {
118
+ switch (_a.label) {
119
+ case 0: return [4 /*yield*/, queryService.Params({})];
120
+ case 1:
121
+ response = _a.sent();
122
+ return [2 /*return*/, response];
123
+ }
124
+ });
125
+ }); },
126
+ validatorCommission: function (validatorAddress) { return __awaiter(_this, void 0, void 0, function () {
127
+ var response;
128
+ return __generator(this, function (_a) {
129
+ switch (_a.label) {
130
+ case 0: return [4 /*yield*/, queryService.ValidatorCommission({
131
+ validatorAddress: validatorAddress,
132
+ })];
133
+ case 1:
134
+ response = _a.sent();
135
+ return [2 /*return*/, response];
136
+ }
137
+ });
138
+ }); },
139
+ validatorOutstandingRewards: function (validatorAddress) { return __awaiter(_this, void 0, void 0, function () {
140
+ var response;
141
+ return __generator(this, function (_a) {
142
+ switch (_a.label) {
143
+ case 0: return [4 /*yield*/, queryService.ValidatorOutstandingRewards({
144
+ validatorAddress: validatorAddress,
145
+ })];
146
+ case 1:
147
+ response = _a.sent();
148
+ return [2 /*return*/, response];
149
+ }
150
+ });
151
+ }); },
152
+ validatorSlashes: function (validatorAddress, startingHeight, endingHeight, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
153
+ var response;
154
+ return __generator(this, function (_a) {
155
+ switch (_a.label) {
156
+ case 0: return [4 /*yield*/, queryService.ValidatorSlashes({
157
+ validatorAddress: validatorAddress,
158
+ startingHeight: BigInt(startingHeight),
159
+ endingHeight: BigInt(endingHeight),
160
+ pagination: queryclient_1.createPagination(paginationKey),
161
+ })];
162
+ case 1:
163
+ response = _a.sent();
164
+ return [2 /*return*/, response];
165
+ }
166
+ });
167
+ }); },
168
+ },
169
+ };
170
+ }
171
+ exports.setupDistributionExtension = setupDistributionExtension;