@firmachain/firma-js 0.3.3 → 0.3.5

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 (245) hide show
  1. package/dist/index.js +5 -1
  2. package/dist/sdk/FirmaAuthzService.d.ts +8 -7
  3. package/dist/sdk/FirmaAuthzService.js +12 -22
  4. package/dist/sdk/FirmaBankService.js +2 -2
  5. package/dist/sdk/FirmaChainService.js +1 -1
  6. package/dist/sdk/FirmaContractService.d.ts +1 -1
  7. package/dist/sdk/FirmaContractService.js +6 -6
  8. package/dist/sdk/FirmaCosmWasmCw20.d.ts +2 -2
  9. package/dist/sdk/FirmaCosmWasmCw20.js +8 -8
  10. package/dist/sdk/FirmaCosmWasmCw721.d.ts +2 -2
  11. package/dist/sdk/FirmaCosmWasmCw721.js +12 -12
  12. package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +1 -1
  13. package/dist/sdk/FirmaCosmWasmCwBridge.js +8 -8
  14. package/dist/sdk/FirmaCosmWasmCwMarketplace.d.ts +1 -1
  15. package/dist/sdk/FirmaCosmWasmCwMarketplace.js +5 -5
  16. package/dist/sdk/FirmaCosmWasmService.d.ts +1 -1
  17. package/dist/sdk/FirmaCosmWasmService.js +13 -13
  18. package/dist/sdk/FirmaDistributionService.d.ts +1 -1
  19. package/dist/sdk/FirmaDistributionService.js +6 -6
  20. package/dist/sdk/FirmaFeeGrantService.d.ts +7 -6
  21. package/dist/sdk/FirmaFeeGrantService.js +9 -26
  22. package/dist/sdk/FirmaGovService.d.ts +1 -1
  23. package/dist/sdk/FirmaGovService.js +14 -14
  24. package/dist/sdk/FirmaIbcService.d.ts +3 -3
  25. package/dist/sdk/FirmaIbcService.js +11 -8
  26. package/dist/sdk/FirmaIpfsService.js +1 -1
  27. package/dist/sdk/FirmaMintService.js +1 -1
  28. package/dist/sdk/FirmaNftService.d.ts +1 -1
  29. package/dist/sdk/FirmaNftService.js +6 -6
  30. package/dist/sdk/FirmaSlashingService.js +1 -1
  31. package/dist/sdk/FirmaStakingService.d.ts +3 -3
  32. package/dist/sdk/FirmaStakingService.js +6 -6
  33. package/dist/sdk/FirmaTokenService.d.ts +1 -1
  34. package/dist/sdk/FirmaTokenService.js +5 -5
  35. package/dist/sdk/FirmaUtil.d.ts +25 -24
  36. package/dist/sdk/FirmaUtil.js +200 -145
  37. package/dist/sdk/FirmaWalletService.d.ts +6 -7
  38. package/dist/sdk/FirmaWalletService.js +78 -36
  39. package/dist/sdk/firmachain/authz/AuthzQueryClient.js +4 -4
  40. package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +8 -11
  41. package/dist/sdk/firmachain/authz/AuthzTxTypes.js +6 -10
  42. package/dist/sdk/firmachain/authz/index.js +5 -1
  43. package/dist/sdk/firmachain/bank/BankQueryClient.js +5 -5
  44. package/dist/sdk/firmachain/bank/index.js +5 -1
  45. package/dist/sdk/firmachain/common/ITxClient.d.ts +2 -4
  46. package/dist/sdk/firmachain/common/ITxClient.js +20 -92
  47. package/dist/sdk/firmachain/common/LedgerWallet.d.ts +19 -3
  48. package/dist/sdk/firmachain/common/LedgerWallet.js +138 -68
  49. package/dist/sdk/firmachain/common/TendermintQueryClient.js +1 -1
  50. package/dist/sdk/firmachain/common/TxCommon.d.ts +13 -29
  51. package/dist/sdk/firmachain/common/accounts.d.ts +1 -1
  52. package/dist/sdk/firmachain/common/accounts.js +7 -7
  53. package/dist/sdk/firmachain/{amino → common}/coins.d.ts +2 -14
  54. package/dist/sdk/firmachain/{amino → common}/coins.js +4 -25
  55. package/dist/sdk/firmachain/common/index.d.ts +0 -1
  56. package/dist/sdk/firmachain/common/index.js +5 -4
  57. package/dist/sdk/firmachain/{amino → common}/wallet.js +15 -11
  58. package/dist/sdk/firmachain/contract/ContractQueryClient.js +3 -3
  59. package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +6 -6
  60. package/dist/sdk/firmachain/contract/index.js +5 -1
  61. package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +9 -9
  62. package/dist/sdk/firmachain/cosmwasm/index.js +5 -1
  63. package/dist/sdk/firmachain/distribution/DistributionQueryClient.js +6 -6
  64. package/dist/sdk/firmachain/distribution/index.js +5 -1
  65. package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.js +3 -3
  66. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +4 -45
  67. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +3 -82
  68. package/dist/sdk/firmachain/feegrant/index.js +5 -1
  69. package/dist/sdk/firmachain/google/protobuf/any.d.ts +3 -3
  70. package/dist/sdk/firmachain/google/protobuf/descriptor.d.ts +29 -29
  71. package/dist/sdk/firmachain/google/protobuf/duration.d.ts +3 -3
  72. package/dist/sdk/firmachain/gov/GovQueryClient.js +3 -3
  73. package/dist/sdk/firmachain/gov/index.js +5 -1
  74. package/dist/sdk/firmachain/ibc/IbcQueryClient.js +2 -2
  75. package/dist/sdk/firmachain/ibc/index.js +5 -1
  76. package/dist/sdk/firmachain/mint/MintQueryClient.js +1 -1
  77. package/dist/sdk/firmachain/mint/index.js +5 -1
  78. package/dist/sdk/firmachain/nft/NftQueryClient.js +1 -1
  79. package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +8 -8
  80. package/dist/sdk/firmachain/nft/index.js +5 -1
  81. package/dist/sdk/firmachain/slashing/SlashingQueryClient.js +1 -1
  82. package/dist/sdk/firmachain/slashing/index.js +5 -1
  83. package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +2 -2
  84. package/dist/sdk/firmachain/staking/StakingQueryClient.js +10 -9
  85. package/dist/sdk/firmachain/staking/index.js +5 -1
  86. package/dist/sdk/firmachain/token/TokenQueryClient.js +1 -1
  87. package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +11 -11
  88. package/dist/sdk/firmachain/token/TokenTxTypes.js +1 -1
  89. package/dist/sdk/firmachain/token/index.js +5 -1
  90. package/dist/test/00.wallet.test.js +4 -4
  91. package/dist/test/01.contract_tx.test.js +5 -5
  92. package/dist/test/02.contract_query.test.js +15 -15
  93. package/dist/test/03.contract_scenario.test.js +28 -28
  94. package/dist/test/04.bank_tx.test.js +4 -4
  95. package/dist/test/05.bank_query.test.js +9 -9
  96. package/dist/test/06.feegrant_tx.test.js +59 -35
  97. package/dist/test/07.feegrant_query.test.js +18 -15
  98. package/dist/test/08.gas_estimate.test.js +110 -70
  99. package/dist/test/09.ipfs.test.js +4 -4
  100. package/dist/test/10.nft_tx.test.js +7 -7
  101. package/dist/test/11.nft_query.test.js +9 -9
  102. package/dist/test/12.staking_tx.test.js +27 -15
  103. package/dist/test/13.staking_query.test.js +20 -20
  104. package/dist/test/14.distribution_tx.test.js +8 -8
  105. package/dist/test/15.distribution_query.test.js +15 -15
  106. package/dist/test/16.gov_tx.test.js +17 -17
  107. package/dist/test/17.gov_query.test.js +19 -19
  108. package/dist/test/18.util.test.js +105 -63
  109. package/dist/test/19.chain.test.js +38 -38
  110. package/dist/test/20.slashing_query.test.js +25 -25
  111. package/dist/test/21.token_tx.test.js +6 -6
  112. package/dist/test/22.token_query.test.js +4 -4
  113. package/dist/test/23.authz_tx.test.js +77 -47
  114. package/dist/test/24.authz_query.test.js +66 -67
  115. package/dist/test/25.cosmwasm_tx.test.js +7 -7
  116. package/dist/test/26.cosmwasm_query.test.js +127 -59
  117. package/dist/test/{27.arbitary_sign.test.js → 27.arbitrary_sign.test.js} +34 -62
  118. package/dist/test/28.ibc_tx.test.js +8 -8
  119. package/dist/test/29.mint_query.test.js +2 -2
  120. package/dist/test/30.cw20_tx.test.js +20 -20
  121. package/dist/test/31.cw20_query.test.js +24 -24
  122. package/dist/test/32.cw721_tx.test.js +19 -19
  123. package/dist/test/33.cw721_query.test.js +32 -32
  124. package/dist/test/34.cw_bridge_tx.test.js +19 -19
  125. package/dist/test/35.cw_bridge_tx_low.test.js +13 -13
  126. package/dist/test/36.cw_bridge_query.test.js +20 -20
  127. package/dist/test/37.cw_marketplace_tx.test.js +32 -32
  128. package/dist/test/38.cw_marketplace_query.test.js +2 -2
  129. package/dist/test/config_test.d.ts +1 -1
  130. package/dist/test/config_test.js +2 -2
  131. package/package.json +9 -10
  132. package/dist/sdk/firmachain/amino/addresses.d.ts +0 -5
  133. package/dist/sdk/firmachain/amino/addresses.js +0 -46
  134. package/dist/sdk/firmachain/amino/aminomsgs.d.ts +0 -291
  135. package/dist/sdk/firmachain/amino/aminomsgs.js +0 -81
  136. package/dist/sdk/firmachain/amino/aminotypes.d.ts +0 -22
  137. package/dist/sdk/firmachain/amino/aminotypes.js +0 -538
  138. package/dist/sdk/firmachain/amino/encoding.d.ts +0 -33
  139. package/dist/sdk/firmachain/amino/encoding.js +0 -252
  140. package/dist/sdk/firmachain/amino/multisig.d.ts +0 -10
  141. package/dist/sdk/firmachain/amino/multisig.js +0 -42
  142. package/dist/sdk/firmachain/amino/pubkeys.d.ts +0 -47
  143. package/dist/sdk/firmachain/amino/pubkeys.js +0 -29
  144. package/dist/sdk/firmachain/amino/signature.d.ts +0 -16
  145. package/dist/sdk/firmachain/amino/signature.js +0 -36
  146. package/dist/sdk/firmachain/amino/signdoc.d.ts +0 -44
  147. package/dist/sdk/firmachain/amino/signdoc.js +0 -68
  148. package/dist/sdk/firmachain/amino/signer.d.ts +0 -33
  149. package/dist/sdk/firmachain/amino/signer.js +0 -2
  150. package/dist/sdk/firmachain/amino/stdtx.d.ts +0 -15
  151. package/dist/sdk/firmachain/amino/stdtx.js +0 -17
  152. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +0 -22
  153. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +0 -170
  154. package/dist/sdk/firmachain/common/aminotypes.d.ts +0 -19
  155. package/dist/sdk/firmachain/common/aminotypes.js +0 -74
  156. package/dist/sdk/firmachain/common/events.d.ts +0 -32
  157. package/dist/sdk/firmachain/common/events.js +0 -18
  158. package/dist/sdk/firmachain/common/fee.d.ts +0 -26
  159. package/dist/sdk/firmachain/common/fee.js +0 -83
  160. package/dist/sdk/firmachain/common/modules/auth/queries.d.ts +0 -15
  161. package/dist/sdk/firmachain/common/modules/auth/queries.js +0 -64
  162. package/dist/sdk/firmachain/common/modules/authz/aminomessages.d.ts +0 -2
  163. package/dist/sdk/firmachain/common/modules/authz/aminomessages.js +0 -15
  164. package/dist/sdk/firmachain/common/modules/authz/messages.d.ts +0 -2
  165. package/dist/sdk/firmachain/common/modules/authz/messages.js +0 -9
  166. package/dist/sdk/firmachain/common/modules/authz/queries.d.ts +0 -10
  167. package/dist/sdk/firmachain/common/modules/authz/queries.js +0 -88
  168. package/dist/sdk/firmachain/common/modules/bank/aminomessages.d.ts +0 -35
  169. package/dist/sdk/firmachain/common/modules/bank/aminomessages.js +0 -85
  170. package/dist/sdk/firmachain/common/modules/bank/messages.d.ts +0 -8
  171. package/dist/sdk/firmachain/common/modules/bank/messages.js +0 -12
  172. package/dist/sdk/firmachain/common/modules/bank/queries.d.ts +0 -15
  173. package/dist/sdk/firmachain/common/modules/bank/queries.js +0 -128
  174. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.d.ts +0 -14
  175. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.js +0 -11
  176. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.d.ts +0 -44
  177. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.js +0 -113
  178. package/dist/sdk/firmachain/common/modules/distribution/messages.d.ts +0 -8
  179. package/dist/sdk/firmachain/common/modules/distribution/messages.js +0 -15
  180. package/dist/sdk/firmachain/common/modules/distribution/queries.d.ts +0 -16
  181. package/dist/sdk/firmachain/common/modules/distribution/queries.js +0 -171
  182. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.d.ts +0 -18
  183. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.js +0 -11
  184. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.d.ts +0 -2
  185. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.js +0 -14
  186. package/dist/sdk/firmachain/common/modules/feegrant/messages.d.ts +0 -2
  187. package/dist/sdk/firmachain/common/modules/feegrant/messages.js +0 -8
  188. package/dist/sdk/firmachain/common/modules/feegrant/queries.d.ts +0 -9
  189. package/dist/sdk/firmachain/common/modules/feegrant/queries.js +0 -81
  190. package/dist/sdk/firmachain/common/modules/gov/aminomessages.d.ts +0 -79
  191. package/dist/sdk/firmachain/common/modules/gov/aminomessages.js +0 -152
  192. package/dist/sdk/firmachain/common/modules/gov/messages.d.ts +0 -29
  193. package/dist/sdk/firmachain/common/modules/gov/messages.js +0 -39
  194. package/dist/sdk/firmachain/common/modules/gov/queries.d.ts +0 -19
  195. package/dist/sdk/firmachain/common/modules/gov/queries.js +0 -160
  196. package/dist/sdk/firmachain/common/modules/group/aminomessages.d.ts +0 -2
  197. package/dist/sdk/firmachain/common/modules/group/aminomessages.js +0 -8
  198. package/dist/sdk/firmachain/common/modules/group/messages.d.ts +0 -2
  199. package/dist/sdk/firmachain/common/modules/group/messages.js +0 -28
  200. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.d.ts +0 -38
  201. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.js +0 -55
  202. package/dist/sdk/firmachain/common/modules/ibc/messages.d.ts +0 -8
  203. package/dist/sdk/firmachain/common/modules/ibc/messages.js +0 -32
  204. package/dist/sdk/firmachain/common/modules/ibc/queries.d.ts +0 -58
  205. package/dist/sdk/firmachain/common/modules/ibc/queries.js +0 -576
  206. package/dist/sdk/firmachain/common/modules/index.d.ts +0 -32
  207. package/dist/sdk/firmachain/common/modules/index.js +0 -101
  208. package/dist/sdk/firmachain/common/modules/mint/queries.d.ts +0 -21
  209. package/dist/sdk/firmachain/common/modules/mint/queries.js +0 -95
  210. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.d.ts +0 -12
  211. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.js +0 -11
  212. package/dist/sdk/firmachain/common/modules/slashing/queries.d.ts +0 -10
  213. package/dist/sdk/firmachain/common/modules/slashing/queries.js +0 -88
  214. package/dist/sdk/firmachain/common/modules/staking/aminomessages.d.ts +0 -112
  215. package/dist/sdk/firmachain/common/modules/staking/aminomessages.js +0 -234
  216. package/dist/sdk/firmachain/common/modules/staking/messages.d.ts +0 -33
  217. package/dist/sdk/firmachain/common/modules/staking/messages.js +0 -37
  218. package/dist/sdk/firmachain/common/modules/staking/queries.d.ts +0 -23
  219. package/dist/sdk/firmachain/common/modules/staking/queries.js +0 -242
  220. package/dist/sdk/firmachain/common/modules/tx/queries.d.ts +0 -11
  221. package/dist/sdk/firmachain/common/modules/tx/queries.js +0 -103
  222. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.d.ts +0 -16
  223. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.js +0 -56
  224. package/dist/sdk/firmachain/common/modules/vesting/messages.d.ts +0 -2
  225. package/dist/sdk/firmachain/common/modules/vesting/messages.js +0 -7
  226. package/dist/sdk/firmachain/common/queryclient/index.d.ts +0 -2
  227. package/dist/sdk/firmachain/common/queryclient/index.js +0 -10
  228. package/dist/sdk/firmachain/common/queryclient/queryclient.d.ts +0 -75
  229. package/dist/sdk/firmachain/common/queryclient/queryclient.js +0 -157
  230. package/dist/sdk/firmachain/common/queryclient/utils.d.ts +0 -33
  231. package/dist/sdk/firmachain/common/queryclient/utils.js +0 -101
  232. package/dist/sdk/firmachain/common/search.d.ts +0 -10
  233. package/dist/sdk/firmachain/common/search.js +0 -7
  234. package/dist/sdk/firmachain/common/signing.d.ts +0 -15
  235. package/dist/sdk/firmachain/common/signing.js +0 -87
  236. package/dist/sdk/firmachain/common/signingstargateclient.d.ts +0 -121
  237. package/dist/sdk/firmachain/common/signingstargateclient.js +0 -674
  238. package/dist/sdk/firmachain/common/stargateclient.d.ts +0 -210
  239. package/dist/sdk/firmachain/common/stargateclient.js +0 -527
  240. package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +0 -110
  241. package/dist/sdk/firmachain/google/protobuf/timestamp.js +0 -108
  242. /package/dist/sdk/firmachain/{amino → common}/paths.d.ts +0 -0
  243. /package/dist/sdk/firmachain/{amino → common}/paths.js +0 -0
  244. /package/dist/sdk/firmachain/{amino → common}/wallet.d.ts +0 -0
  245. /package/dist/test/{27.arbitary_sign.test.d.ts → 27.arbitrary_sign.test.d.ts} +0 -0
@@ -1,171 +0,0 @@
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;
@@ -1,18 +0,0 @@
1
- import { AminoMsg } from "@cosmjs/amino";
2
- import { AminoConverters } from "../../aminotypes";
3
- interface Any {
4
- readonly type_url: string;
5
- readonly value: Uint8Array;
6
- }
7
- /** Supports submitting arbitrary evidence */
8
- export interface AminoMsgSubmitEvidence extends AminoMsg {
9
- readonly type: "cosmos-sdk/MsgSubmitEvidence";
10
- readonly value: {
11
- /** Bech32 account address */
12
- readonly submitter: string;
13
- readonly evidence: Any;
14
- };
15
- }
16
- export declare function isAminoMsgSubmitEvidence(msg: AminoMsg): msg is AminoMsgSubmitEvidence;
17
- export declare function createEvidenceAminoConverters(): AminoConverters;
18
- export {};
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createEvidenceAminoConverters = exports.isAminoMsgSubmitEvidence = void 0;
4
- function isAminoMsgSubmitEvidence(msg) {
5
- return msg.type === "cosmos-sdk/MsgSubmitEvidence";
6
- }
7
- exports.isAminoMsgSubmitEvidence = isAminoMsgSubmitEvidence;
8
- function createEvidenceAminoConverters() {
9
- throw new Error("Not implemented");
10
- }
11
- exports.createEvidenceAminoConverters = createEvidenceAminoConverters;
@@ -1,2 +0,0 @@
1
- import { AminoConverters } from "../../aminotypes";
2
- export declare function createFeegrantAminoConverters(): AminoConverters;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createFeegrantAminoConverters = void 0;
4
- function createFeegrantAminoConverters() {
5
- return {
6
- // For Cosmos SDK < 0.46 the Amino JSON codec was broken on chain and thus inaccessible.
7
- // Now this can be implemented for 0.46+ chains, see
8
- // https://github.com/cosmos/cosmjs/issues/1092
9
- //
10
- // "/cosmos.feegrant.v1beta1.MsgGrantAllowance": IMPLEMENT_ME,
11
- // "/cosmos.feegrant.v1beta1.MsgRevokeAllowance": IMPLEMENT_ME,
12
- };
13
- }
14
- exports.createFeegrantAminoConverters = createFeegrantAminoConverters;
@@ -1,2 +0,0 @@
1
- import { GeneratedType } from "@cosmjs/proto-signing";
2
- export declare const feegrantTypes: ReadonlyArray<[string, GeneratedType]>;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.feegrantTypes = void 0;
4
- var tx_1 = require("cosmjs-types/cosmos/feegrant/v1beta1/tx");
5
- exports.feegrantTypes = [
6
- ["/cosmos.feegrant.v1beta1.MsgGrantAllowance", tx_1.MsgGrantAllowance],
7
- ["/cosmos.feegrant.v1beta1.MsgRevokeAllowance", tx_1.MsgRevokeAllowance],
8
- ];
@@ -1,9 +0,0 @@
1
- import { QueryAllowanceResponse, QueryAllowancesResponse } from "cosmjs-types/cosmos/feegrant/v1beta1/query";
2
- import { QueryClient } from "../../queryclient";
3
- export interface FeegrantExtension {
4
- readonly feegrant: {
5
- readonly allowance: (granter: string, grantee: string) => Promise<QueryAllowanceResponse>;
6
- readonly allowances: (grantee: string, paginationKey?: Uint8Array) => Promise<QueryAllowancesResponse>;
7
- };
8
- }
9
- export declare function setupFeegrantExtension(base: QueryClient): FeegrantExtension;
@@ -1,81 +0,0 @@
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.setupFeegrantExtension = void 0;
40
- var query_1 = require("cosmjs-types/cosmos/feegrant/v1beta1/query");
41
- var queryclient_1 = require("../../queryclient");
42
- function setupFeegrantExtension(base) {
43
- var _this = this;
44
- // Use this service to get easy typed access to query methods
45
- // This cannot be used for proof verification
46
- var rpc = queryclient_1.createProtobufRpcClient(base);
47
- var queryService = new query_1.QueryClientImpl(rpc);
48
- return {
49
- feegrant: {
50
- allowance: function (granter, grantee) { return __awaiter(_this, void 0, void 0, function () {
51
- var response;
52
- return __generator(this, function (_a) {
53
- switch (_a.label) {
54
- case 0: return [4 /*yield*/, queryService.Allowance({
55
- granter: granter,
56
- grantee: grantee,
57
- })];
58
- case 1:
59
- response = _a.sent();
60
- return [2 /*return*/, response];
61
- }
62
- });
63
- }); },
64
- allowances: function (grantee, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
65
- var response;
66
- return __generator(this, function (_a) {
67
- switch (_a.label) {
68
- case 0: return [4 /*yield*/, queryService.Allowances({
69
- grantee: grantee,
70
- pagination: queryclient_1.createPagination(paginationKey),
71
- })];
72
- case 1:
73
- response = _a.sent();
74
- return [2 /*return*/, response];
75
- }
76
- });
77
- }); },
78
- },
79
- };
80
- }
81
- exports.setupFeegrantExtension = setupFeegrantExtension;
@@ -1,79 +0,0 @@
1
- import { AminoMsg, Coin } from "@cosmjs/amino";
2
- import { AminoConverters } from "../../aminotypes";
3
- /** Supports submitting arbitrary proposal content. */
4
- export interface AminoMsgSubmitProposal extends AminoMsg {
5
- readonly type: "cosmos-sdk/MsgSubmitProposal";
6
- readonly value: {
7
- /**
8
- * A proposal structure, e.g.
9
- *
10
- * ```
11
- * {
12
- * type: 'cosmos-sdk/TextProposal',
13
- * value: {
14
- * description: 'This proposal proposes to test whether this proposal passes',
15
- * title: 'Test Proposal'
16
- * }
17
- * }
18
- * ```
19
- */
20
- readonly content: {
21
- readonly type: string;
22
- readonly value: any;
23
- };
24
- readonly initial_deposit: readonly Coin[];
25
- /** Bech32 account address */
26
- readonly proposer: string;
27
- };
28
- }
29
- export declare function isAminoMsgSubmitProposal(msg: AminoMsg): msg is AminoMsgSubmitProposal;
30
- /** Casts a vote */
31
- export interface AminoMsgVote extends AminoMsg {
32
- readonly type: "cosmos-sdk/MsgVote";
33
- readonly value: {
34
- readonly proposal_id: string;
35
- /** Bech32 account address */
36
- readonly voter: string;
37
- /**
38
- * VoteOption as integer from 0 to 4 🤷‍
39
- *
40
- * @see https://github.com/cosmos/cosmos-sdk/blob/v0.42.9/x/gov/types/gov.pb.go#L38-L49
41
- */
42
- readonly option: number;
43
- };
44
- }
45
- export declare function isAminoMsgVote(msg: AminoMsg): msg is AminoMsgVote;
46
- /**
47
- * @see https://github.com/cosmos/cosmos-sdk/blob/v0.44.5/x/gov/types/tx.pb.go#L196-L203
48
- * @see https://github.com/cosmos/cosmos-sdk/blob/v0.44.5/x/gov/types/gov.pb.go#L124-L130
49
- */
50
- export interface AminoMsgVoteWeighted extends AminoMsg {
51
- readonly type: "cosmos-sdk/MsgVoteWeighted";
52
- readonly value: {
53
- readonly proposal_id: string;
54
- /** Bech32 account address */
55
- readonly voter: string;
56
- readonly options: Array<{
57
- /**
58
- * VoteOption as integer from 0 to 4 🤷‍
59
- *
60
- * @see https://github.com/cosmos/cosmos-sdk/blob/v0.44.5/x/gov/types/gov.pb.go#L35-L49
61
- */
62
- readonly option: number;
63
- readonly weight: string;
64
- }>;
65
- };
66
- }
67
- export declare function isAminoMsgVoteWeighted(msg: AminoMsg): msg is AminoMsgVoteWeighted;
68
- /** Submits a deposit to an existing proposal */
69
- export interface AminoMsgDeposit extends AminoMsg {
70
- readonly type: "cosmos-sdk/MsgDeposit";
71
- readonly value: {
72
- readonly proposal_id: string;
73
- /** Bech32 account address */
74
- readonly depositor: string;
75
- readonly amount: readonly Coin[];
76
- };
77
- }
78
- export declare function isAminoMsgDeposit(msg: AminoMsg): msg is AminoMsgDeposit;
79
- export declare function createGovAminoConverters(): AminoConverters;
@@ -1,152 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createGovAminoConverters = exports.isAminoMsgDeposit = exports.isAminoMsgVoteWeighted = exports.isAminoMsgVote = exports.isAminoMsgSubmitProposal = void 0;
4
- var math_1 = require("@cosmjs/math");
5
- var utils_1 = require("@cosmjs/utils");
6
- var gov_1 = require("cosmjs-types/cosmos/gov/v1beta1/gov");
7
- var any_1 = require("cosmjs-types/google/protobuf/any");
8
- var queryclient_1 = require("../../queryclient");
9
- function isAminoMsgSubmitProposal(msg) {
10
- return msg.type === "cosmos-sdk/MsgSubmitProposal";
11
- }
12
- exports.isAminoMsgSubmitProposal = isAminoMsgSubmitProposal;
13
- function isAminoMsgVote(msg) {
14
- return msg.type === "cosmos-sdk/MsgVote";
15
- }
16
- exports.isAminoMsgVote = isAminoMsgVote;
17
- function isAminoMsgVoteWeighted(msg) {
18
- return msg.type === "cosmos-sdk/MsgVoteWeighted";
19
- }
20
- exports.isAminoMsgVoteWeighted = isAminoMsgVoteWeighted;
21
- function isAminoMsgDeposit(msg) {
22
- return msg.type === "cosmos-sdk/MsgDeposit";
23
- }
24
- exports.isAminoMsgDeposit = isAminoMsgDeposit;
25
- function createGovAminoConverters() {
26
- // Gov v1 types missing, see
27
- // https://github.com/cosmos/cosmjs/issues/1442
28
- return {
29
- "/cosmos.gov.v1beta1.MsgDeposit": {
30
- aminoType: "cosmos-sdk/MsgDeposit",
31
- toAmino: function (_a) {
32
- var amount = _a.amount, depositor = _a.depositor, proposalId = _a.proposalId;
33
- return {
34
- amount: amount,
35
- depositor: depositor,
36
- proposal_id: proposalId.toString(),
37
- };
38
- },
39
- fromAmino: function (_a) {
40
- var amount = _a.amount, depositor = _a.depositor, proposal_id = _a.proposal_id;
41
- return {
42
- amount: Array.from(amount),
43
- depositor: depositor,
44
- proposalId: BigInt(proposal_id),
45
- };
46
- },
47
- },
48
- "/cosmos.gov.v1beta1.MsgVote": {
49
- aminoType: "cosmos-sdk/MsgVote",
50
- toAmino: function (_a) {
51
- var option = _a.option, proposalId = _a.proposalId, voter = _a.voter;
52
- return {
53
- option: option,
54
- proposal_id: proposalId.toString(),
55
- voter: voter,
56
- };
57
- },
58
- fromAmino: function (_a) {
59
- var option = _a.option, proposal_id = _a.proposal_id, voter = _a.voter;
60
- return {
61
- option: gov_1.voteOptionFromJSON(option),
62
- proposalId: BigInt(proposal_id),
63
- voter: voter,
64
- };
65
- },
66
- },
67
- "/cosmos.gov.v1beta1.MsgVoteWeighted": {
68
- aminoType: "cosmos-sdk/MsgVoteWeighted",
69
- toAmino: function (_a) {
70
- var options = _a.options, proposalId = _a.proposalId, voter = _a.voter;
71
- return {
72
- options: options.map(function (o) { return ({
73
- option: o.option,
74
- // Weight is between 0 and 1, so we always have 20 characters when printing all trailing
75
- // zeros (e.g. "0.700000000000000000" or "1.000000000000000000")
76
- weight: queryclient_1.decodeCosmosSdkDecFromProto(o.weight).toString().padEnd(20, "0"),
77
- }); }),
78
- proposal_id: proposalId.toString(),
79
- voter: voter,
80
- };
81
- },
82
- fromAmino: function (_a) {
83
- var options = _a.options, proposal_id = _a.proposal_id, voter = _a.voter;
84
- return {
85
- proposalId: BigInt(proposal_id),
86
- voter: voter,
87
- options: options.map(function (o) { return ({
88
- option: gov_1.voteOptionFromJSON(o.option),
89
- weight: math_1.Decimal.fromUserInput(o.weight, 18).atomics,
90
- }); }),
91
- };
92
- },
93
- },
94
- "/cosmos.gov.v1beta1.MsgSubmitProposal": {
95
- aminoType: "cosmos-sdk/MsgSubmitProposal",
96
- toAmino: function (_a) {
97
- var initialDeposit = _a.initialDeposit, proposer = _a.proposer, content = _a.content;
98
- utils_1.assertDefinedAndNotNull(content);
99
- var proposal;
100
- switch (content.typeUrl) {
101
- case "/cosmos.gov.v1beta1.TextProposal": {
102
- var textProposal = gov_1.TextProposal.decode(content.value);
103
- proposal = {
104
- type: "cosmos-sdk/TextProposal",
105
- value: {
106
- description: textProposal.description,
107
- title: textProposal.title,
108
- },
109
- };
110
- break;
111
- }
112
- default:
113
- throw new Error("Unsupported proposal type: '" + content.typeUrl + "'");
114
- }
115
- return {
116
- initial_deposit: initialDeposit,
117
- proposer: proposer,
118
- content: proposal,
119
- };
120
- },
121
- fromAmino: function (_a) {
122
- var initial_deposit = _a.initial_deposit, proposer = _a.proposer, content = _a.content;
123
- var any_content;
124
- switch (content.type) {
125
- case "cosmos-sdk/TextProposal": {
126
- var value = content.value;
127
- utils_1.assert(utils_1.isNonNullObject(value));
128
- var _b = value, title = _b.title, description = _b.description;
129
- utils_1.assert(typeof title === "string");
130
- utils_1.assert(typeof description === "string");
131
- any_content = any_1.Any.fromPartial({
132
- typeUrl: "/cosmos.gov.v1beta1.TextProposal",
133
- value: gov_1.TextProposal.encode(gov_1.TextProposal.fromPartial({
134
- title: title,
135
- description: description,
136
- })).finish(),
137
- });
138
- break;
139
- }
140
- default:
141
- throw new Error("Unsupported proposal type: '" + content.type + "'");
142
- }
143
- return {
144
- initialDeposit: Array.from(initial_deposit),
145
- proposer: proposer,
146
- content: any_content,
147
- };
148
- },
149
- },
150
- };
151
- }
152
- exports.createGovAminoConverters = createGovAminoConverters;
@@ -1,29 +0,0 @@
1
- import { EncodeObject, GeneratedType } from "@cosmjs/proto-signing";
2
- import { MsgDeposit, MsgSubmitProposal, MsgVote, MsgVoteWeighted } from "cosmjs-types/cosmos/gov/v1beta1/tx";
3
- import { MsgCancelProposal } from "@kintsugi-tech/cosmjs-types/cosmos/gov/v1/tx";
4
- export declare const govTypes: ReadonlyArray<[string, GeneratedType]>;
5
- export interface MsgDepositEncodeObject extends EncodeObject {
6
- readonly typeUrl: "/cosmos.gov.v1beta1.MsgDeposit";
7
- readonly value: Partial<MsgDeposit>;
8
- }
9
- export declare function isMsgDepositEncodeObject(object: EncodeObject): object is MsgSubmitProposalEncodeObject;
10
- export interface MsgSubmitProposalEncodeObject extends EncodeObject {
11
- readonly typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal";
12
- readonly value: Partial<MsgSubmitProposal>;
13
- }
14
- export declare function isMsgSubmitProposalEncodeObject(object: EncodeObject): object is MsgSubmitProposalEncodeObject;
15
- export interface MsgVoteEncodeObject extends EncodeObject {
16
- readonly typeUrl: "/cosmos.gov.v1beta1.MsgVote";
17
- readonly value: Partial<MsgVote>;
18
- }
19
- export declare function isMsgVoteEncodeObject(object: EncodeObject): object is MsgVoteEncodeObject;
20
- export interface MsgVoteWeightedEncodeObject extends EncodeObject {
21
- readonly typeUrl: "/cosmos.gov.v1beta1.MsgVoteWeighted";
22
- readonly value: Partial<MsgVoteWeighted>;
23
- }
24
- export declare function isMsgVoteWeightedEncodeObject(object: EncodeObject): object is MsgVoteWeightedEncodeObject;
25
- export interface MsgCancelProposalEncodeObject extends EncodeObject {
26
- readonly typeUrl: "/cosmos.gov.v1.MsgCancelProposal";
27
- readonly value: Partial<MsgCancelProposal>;
28
- }
29
- export declare function isMsgCancelProposalEncodeObject(object: EncodeObject): object is MsgCancelProposalEncodeObject;
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isMsgCancelProposalEncodeObject = exports.isMsgVoteWeightedEncodeObject = exports.isMsgVoteEncodeObject = exports.isMsgSubmitProposalEncodeObject = exports.isMsgDepositEncodeObject = exports.govTypes = void 0;
4
- var tx_1 = require("cosmjs-types/cosmos/gov/v1/tx");
5
- var tx_2 = require("cosmjs-types/cosmos/gov/v1beta1/tx");
6
- // temporarly using kintsugi-tech/cosmjs-types - this will be returned to original cosmjs-types after the PR is merged
7
- var tx_3 = require("@kintsugi-tech/cosmjs-types/cosmos/gov/v1/tx");
8
- exports.govTypes = [
9
- ["/cosmos.gov.v1.MsgDeposit", tx_1.MsgDeposit],
10
- ["/cosmos.gov.v1.MsgSubmitProposal", tx_1.MsgSubmitProposal],
11
- ["/cosmos.gov.v1.MsgUpdateParams", tx_1.MsgUpdateParams],
12
- ["/cosmos.gov.v1.MsgVote", tx_1.MsgVote],
13
- ["/cosmos.gov.v1.MsgVoteWeighted", tx_1.MsgVoteWeighted],
14
- ["/cosmos.gov.v1beta1.MsgDeposit", tx_2.MsgDeposit],
15
- ["/cosmos.gov.v1beta1.MsgSubmitProposal", tx_2.MsgSubmitProposal],
16
- ["/cosmos.gov.v1beta1.MsgVote", tx_2.MsgVote],
17
- ["/cosmos.gov.v1beta1.MsgVoteWeighted", tx_2.MsgVoteWeighted],
18
- ["/cosmos.gov.v1.MsgCancelProposal", tx_3.MsgCancelProposal], // Temporary type casting
19
- ];
20
- function isMsgDepositEncodeObject(object) {
21
- return object.typeUrl === "/cosmos.gov.v1beta1.MsgDeposit";
22
- }
23
- exports.isMsgDepositEncodeObject = isMsgDepositEncodeObject;
24
- function isMsgSubmitProposalEncodeObject(object) {
25
- return object.typeUrl === "/cosmos.gov.v1beta1.MsgSubmitProposal";
26
- }
27
- exports.isMsgSubmitProposalEncodeObject = isMsgSubmitProposalEncodeObject;
28
- function isMsgVoteEncodeObject(object) {
29
- return object.typeUrl === "/cosmos.gov.v1beta1.MsgVote";
30
- }
31
- exports.isMsgVoteEncodeObject = isMsgVoteEncodeObject;
32
- function isMsgVoteWeightedEncodeObject(object) {
33
- return object.typeUrl === "/cosmos.gov.v1beta1.MsgVoteWeighted";
34
- }
35
- exports.isMsgVoteWeightedEncodeObject = isMsgVoteWeightedEncodeObject;
36
- function isMsgCancelProposalEncodeObject(object) {
37
- return object.typeUrl === "/cosmos.gov.v1.MsgCancelProposal";
38
- }
39
- exports.isMsgCancelProposalEncodeObject = isMsgCancelProposalEncodeObject;
@@ -1,19 +0,0 @@
1
- import { Uint64 } from "@cosmjs/math";
2
- import { ProposalStatus } from "cosmjs-types/cosmos/gov/v1beta1/gov";
3
- import { QueryDepositResponse, QueryDepositsResponse, QueryParamsResponse, QueryProposalResponse, QueryProposalsResponse, QueryTallyResultResponse, QueryVoteResponse, QueryVotesResponse } from "cosmjs-types/cosmos/gov/v1beta1/query";
4
- import { QueryClient } from "../../queryclient";
5
- export declare type GovParamsType = "deposit" | "tallying" | "voting";
6
- export declare type GovProposalId = string | number | Uint64;
7
- export interface GovExtension {
8
- readonly gov: {
9
- readonly params: (parametersType: GovParamsType) => Promise<QueryParamsResponse>;
10
- readonly proposals: (proposalStatus: ProposalStatus, depositor: string, voter: string, paginationKey?: Uint8Array) => Promise<QueryProposalsResponse>;
11
- readonly proposal: (proposalId: GovProposalId) => Promise<QueryProposalResponse>;
12
- readonly deposits: (proposalId: GovProposalId, paginationKey?: Uint8Array) => Promise<QueryDepositsResponse>;
13
- readonly deposit: (proposalId: GovProposalId, depositorAddress: string) => Promise<QueryDepositResponse>;
14
- readonly tally: (proposalId: GovProposalId) => Promise<QueryTallyResultResponse>;
15
- readonly votes: (proposalId: GovProposalId, paginationKey?: Uint8Array) => Promise<QueryVotesResponse>;
16
- readonly vote: (proposalId: GovProposalId, voterAddress: string) => Promise<QueryVoteResponse>;
17
- };
18
- }
19
- export declare function setupGovExtension(base: QueryClient): GovExtension;