@firmachain/firma-js 0.3.4 → 0.3.6-beta1

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 (246) 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 +26 -23
  36. package/dist/sdk/FirmaUtil.js +157 -137
  37. package/dist/sdk/FirmaWalletService.d.ts +5 -9
  38. package/dist/sdk/FirmaWalletService.js +86 -52
  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 +3 -3
  46. package/dist/sdk/firmachain/common/ITxClient.js +25 -83
  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 +14 -30
  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/common/events.js +2 -2
  54. package/dist/sdk/firmachain/common/fee.d.ts +2 -2
  55. package/dist/sdk/firmachain/common/fee.js +4 -2
  56. package/dist/sdk/firmachain/common/index.d.ts +0 -1
  57. package/dist/sdk/firmachain/common/index.js +5 -4
  58. package/dist/sdk/firmachain/common/signing.d.ts +13 -9
  59. package/dist/sdk/firmachain/common/signing.js +81 -36
  60. package/dist/sdk/firmachain/common/signingprotobufstargateclient.d.ts +34 -0
  61. package/dist/sdk/firmachain/common/signingprotobufstargateclient.js +319 -0
  62. package/dist/sdk/firmachain/common/signingstargateclient.d.ts +21 -105
  63. package/dist/sdk/firmachain/common/signingstargateclient.js +120 -472
  64. package/dist/sdk/firmachain/common/{stargateclient.d.ts → stargateClient.d.ts} +11 -60
  65. package/dist/sdk/firmachain/common/{stargateclient.js → stargateClient.js} +109 -203
  66. package/dist/sdk/firmachain/{amino → common}/wallet.js +15 -11
  67. package/dist/sdk/firmachain/contract/ContractQueryClient.js +3 -3
  68. package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +6 -6
  69. package/dist/sdk/firmachain/contract/index.js +5 -1
  70. package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +9 -9
  71. package/dist/sdk/firmachain/cosmwasm/index.js +5 -1
  72. package/dist/sdk/firmachain/distribution/DistributionQueryClient.js +6 -6
  73. package/dist/sdk/firmachain/distribution/index.js +5 -1
  74. package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.js +3 -3
  75. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +4 -45
  76. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +3 -82
  77. package/dist/sdk/firmachain/feegrant/index.js +5 -1
  78. package/dist/sdk/firmachain/google/protobuf/any.d.ts +3 -3
  79. package/dist/sdk/firmachain/google/protobuf/descriptor.d.ts +29 -29
  80. package/dist/sdk/firmachain/google/protobuf/duration.d.ts +3 -3
  81. package/dist/sdk/firmachain/gov/GovQueryClient.js +3 -3
  82. package/dist/sdk/firmachain/gov/index.js +5 -1
  83. package/dist/sdk/firmachain/ibc/IbcQueryClient.js +2 -2
  84. package/dist/sdk/firmachain/ibc/index.js +5 -1
  85. package/dist/sdk/firmachain/mint/MintQueryClient.js +1 -1
  86. package/dist/sdk/firmachain/mint/index.js +5 -1
  87. package/dist/sdk/firmachain/nft/NftQueryClient.js +1 -1
  88. package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +8 -8
  89. package/dist/sdk/firmachain/nft/index.js +5 -1
  90. package/dist/sdk/firmachain/slashing/SlashingQueryClient.js +1 -1
  91. package/dist/sdk/firmachain/slashing/index.js +5 -1
  92. package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +2 -2
  93. package/dist/sdk/firmachain/staking/StakingQueryClient.js +10 -9
  94. package/dist/sdk/firmachain/staking/index.js +5 -1
  95. package/dist/sdk/firmachain/token/TokenQueryClient.js +1 -1
  96. package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +11 -11
  97. package/dist/sdk/firmachain/token/TokenTxTypes.js +1 -1
  98. package/dist/sdk/firmachain/token/index.js +5 -1
  99. package/dist/test/00.wallet.test.js +4 -4
  100. package/dist/test/01.contract_tx.test.js +5 -5
  101. package/dist/test/02.contract_query.test.js +15 -15
  102. package/dist/test/03.contract_scenario.test.js +28 -28
  103. package/dist/test/04.bank_tx.test.js +4 -4
  104. package/dist/test/05.bank_query.test.js +9 -9
  105. package/dist/test/06.feegrant_tx.test.js +59 -35
  106. package/dist/test/07.feegrant_query.test.js +18 -15
  107. package/dist/test/08.gas_estimate.test.js +110 -70
  108. package/dist/test/09.ipfs.test.js +4 -4
  109. package/dist/test/10.nft_tx.test.js +7 -7
  110. package/dist/test/11.nft_query.test.js +9 -9
  111. package/dist/test/12.staking_tx.test.js +27 -15
  112. package/dist/test/13.staking_query.test.js +20 -20
  113. package/dist/test/14.distribution_tx.test.js +8 -8
  114. package/dist/test/15.distribution_query.test.js +15 -15
  115. package/dist/test/16.gov_tx.test.js +17 -17
  116. package/dist/test/17.gov_query.test.js +19 -19
  117. package/dist/test/18.util.test.js +105 -63
  118. package/dist/test/19.chain.test.js +38 -38
  119. package/dist/test/20.slashing_query.test.js +25 -25
  120. package/dist/test/21.token_tx.test.js +6 -6
  121. package/dist/test/22.token_query.test.js +4 -4
  122. package/dist/test/23.authz_tx.test.js +77 -47
  123. package/dist/test/24.authz_query.test.js +66 -67
  124. package/dist/test/25.cosmwasm_tx.test.js +7 -7
  125. package/dist/test/26.cosmwasm_query.test.js +127 -59
  126. package/dist/test/{27.arbitary_sign.test.js → 27.arbitrary_sign.test.js} +41 -40
  127. package/dist/test/28.ibc_tx.test.js +8 -8
  128. package/dist/test/29.mint_query.test.js +2 -2
  129. package/dist/test/30.cw20_tx.test.js +20 -20
  130. package/dist/test/31.cw20_query.test.js +24 -24
  131. package/dist/test/32.cw721_tx.test.js +19 -19
  132. package/dist/test/33.cw721_query.test.js +32 -32
  133. package/dist/test/34.cw_bridge_tx.test.js +19 -19
  134. package/dist/test/35.cw_bridge_tx_low.test.js +13 -13
  135. package/dist/test/36.cw_bridge_query.test.js +20 -20
  136. package/dist/test/37.cw_marketplace_tx.test.js +32 -32
  137. package/dist/test/38.cw_marketplace_query.test.js +2 -2
  138. package/dist/test/config_test.d.ts +2 -2
  139. package/dist/test/config_test.js +22 -5
  140. package/package.json +9 -10
  141. package/dist/sdk/firmachain/amino/addresses.d.ts +0 -5
  142. package/dist/sdk/firmachain/amino/addresses.js +0 -46
  143. package/dist/sdk/firmachain/amino/aminomsgs.d.ts +0 -291
  144. package/dist/sdk/firmachain/amino/aminomsgs.js +0 -81
  145. package/dist/sdk/firmachain/amino/aminotypes.d.ts +0 -22
  146. package/dist/sdk/firmachain/amino/aminotypes.js +0 -538
  147. package/dist/sdk/firmachain/amino/coins.d.ts +0 -42
  148. package/dist/sdk/firmachain/amino/coins.js +0 -90
  149. package/dist/sdk/firmachain/amino/encoding.d.ts +0 -33
  150. package/dist/sdk/firmachain/amino/encoding.js +0 -252
  151. package/dist/sdk/firmachain/amino/multisig.d.ts +0 -10
  152. package/dist/sdk/firmachain/amino/multisig.js +0 -42
  153. package/dist/sdk/firmachain/amino/pubkeys.d.ts +0 -47
  154. package/dist/sdk/firmachain/amino/pubkeys.js +0 -29
  155. package/dist/sdk/firmachain/amino/signature.d.ts +0 -16
  156. package/dist/sdk/firmachain/amino/signature.js +0 -36
  157. package/dist/sdk/firmachain/amino/signdoc.d.ts +0 -44
  158. package/dist/sdk/firmachain/amino/signdoc.js +0 -68
  159. package/dist/sdk/firmachain/amino/signer.d.ts +0 -33
  160. package/dist/sdk/firmachain/amino/signer.js +0 -2
  161. package/dist/sdk/firmachain/amino/stdtx.d.ts +0 -15
  162. package/dist/sdk/firmachain/amino/stdtx.js +0 -17
  163. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +0 -22
  164. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +0 -170
  165. package/dist/sdk/firmachain/common/aminotypes.d.ts +0 -19
  166. package/dist/sdk/firmachain/common/aminotypes.js +0 -74
  167. package/dist/sdk/firmachain/common/modules/auth/queries.d.ts +0 -15
  168. package/dist/sdk/firmachain/common/modules/auth/queries.js +0 -64
  169. package/dist/sdk/firmachain/common/modules/authz/aminomessages.d.ts +0 -2
  170. package/dist/sdk/firmachain/common/modules/authz/aminomessages.js +0 -15
  171. package/dist/sdk/firmachain/common/modules/authz/messages.d.ts +0 -2
  172. package/dist/sdk/firmachain/common/modules/authz/messages.js +0 -9
  173. package/dist/sdk/firmachain/common/modules/authz/queries.d.ts +0 -10
  174. package/dist/sdk/firmachain/common/modules/authz/queries.js +0 -88
  175. package/dist/sdk/firmachain/common/modules/bank/aminomessages.d.ts +0 -35
  176. package/dist/sdk/firmachain/common/modules/bank/aminomessages.js +0 -85
  177. package/dist/sdk/firmachain/common/modules/bank/messages.d.ts +0 -8
  178. package/dist/sdk/firmachain/common/modules/bank/messages.js +0 -12
  179. package/dist/sdk/firmachain/common/modules/bank/queries.d.ts +0 -15
  180. package/dist/sdk/firmachain/common/modules/bank/queries.js +0 -128
  181. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.d.ts +0 -14
  182. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.js +0 -11
  183. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.d.ts +0 -44
  184. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.js +0 -113
  185. package/dist/sdk/firmachain/common/modules/distribution/messages.d.ts +0 -8
  186. package/dist/sdk/firmachain/common/modules/distribution/messages.js +0 -15
  187. package/dist/sdk/firmachain/common/modules/distribution/queries.d.ts +0 -16
  188. package/dist/sdk/firmachain/common/modules/distribution/queries.js +0 -171
  189. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.d.ts +0 -18
  190. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.js +0 -11
  191. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.d.ts +0 -2
  192. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.js +0 -14
  193. package/dist/sdk/firmachain/common/modules/feegrant/messages.d.ts +0 -2
  194. package/dist/sdk/firmachain/common/modules/feegrant/messages.js +0 -8
  195. package/dist/sdk/firmachain/common/modules/feegrant/queries.d.ts +0 -9
  196. package/dist/sdk/firmachain/common/modules/feegrant/queries.js +0 -81
  197. package/dist/sdk/firmachain/common/modules/gov/aminomessages.d.ts +0 -79
  198. package/dist/sdk/firmachain/common/modules/gov/aminomessages.js +0 -152
  199. package/dist/sdk/firmachain/common/modules/gov/messages.d.ts +0 -29
  200. package/dist/sdk/firmachain/common/modules/gov/messages.js +0 -39
  201. package/dist/sdk/firmachain/common/modules/gov/queries.d.ts +0 -19
  202. package/dist/sdk/firmachain/common/modules/gov/queries.js +0 -160
  203. package/dist/sdk/firmachain/common/modules/group/aminomessages.d.ts +0 -2
  204. package/dist/sdk/firmachain/common/modules/group/aminomessages.js +0 -8
  205. package/dist/sdk/firmachain/common/modules/group/messages.d.ts +0 -2
  206. package/dist/sdk/firmachain/common/modules/group/messages.js +0 -28
  207. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.d.ts +0 -38
  208. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.js +0 -55
  209. package/dist/sdk/firmachain/common/modules/ibc/messages.d.ts +0 -8
  210. package/dist/sdk/firmachain/common/modules/ibc/messages.js +0 -32
  211. package/dist/sdk/firmachain/common/modules/ibc/queries.d.ts +0 -58
  212. package/dist/sdk/firmachain/common/modules/ibc/queries.js +0 -576
  213. package/dist/sdk/firmachain/common/modules/index.d.ts +0 -32
  214. package/dist/sdk/firmachain/common/modules/index.js +0 -101
  215. package/dist/sdk/firmachain/common/modules/mint/queries.d.ts +0 -21
  216. package/dist/sdk/firmachain/common/modules/mint/queries.js +0 -95
  217. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.d.ts +0 -12
  218. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.js +0 -11
  219. package/dist/sdk/firmachain/common/modules/slashing/queries.d.ts +0 -10
  220. package/dist/sdk/firmachain/common/modules/slashing/queries.js +0 -88
  221. package/dist/sdk/firmachain/common/modules/staking/aminomessages.d.ts +0 -112
  222. package/dist/sdk/firmachain/common/modules/staking/aminomessages.js +0 -234
  223. package/dist/sdk/firmachain/common/modules/staking/messages.d.ts +0 -33
  224. package/dist/sdk/firmachain/common/modules/staking/messages.js +0 -37
  225. package/dist/sdk/firmachain/common/modules/staking/queries.d.ts +0 -23
  226. package/dist/sdk/firmachain/common/modules/staking/queries.js +0 -242
  227. package/dist/sdk/firmachain/common/modules/tx/queries.d.ts +0 -11
  228. package/dist/sdk/firmachain/common/modules/tx/queries.js +0 -103
  229. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.d.ts +0 -16
  230. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.js +0 -56
  231. package/dist/sdk/firmachain/common/modules/vesting/messages.d.ts +0 -2
  232. package/dist/sdk/firmachain/common/modules/vesting/messages.js +0 -7
  233. package/dist/sdk/firmachain/common/queryclient/index.d.ts +0 -2
  234. package/dist/sdk/firmachain/common/queryclient/index.js +0 -10
  235. package/dist/sdk/firmachain/common/queryclient/queryclient.d.ts +0 -75
  236. package/dist/sdk/firmachain/common/queryclient/queryclient.js +0 -157
  237. package/dist/sdk/firmachain/common/queryclient/utils.d.ts +0 -33
  238. package/dist/sdk/firmachain/common/queryclient/utils.js +0 -101
  239. package/dist/sdk/firmachain/common/search.d.ts +0 -10
  240. package/dist/sdk/firmachain/common/search.js +0 -7
  241. package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +0 -110
  242. package/dist/sdk/firmachain/google/protobuf/timestamp.js +0 -108
  243. /package/dist/sdk/firmachain/{amino → common}/paths.d.ts +0 -0
  244. /package/dist/sdk/firmachain/{amino → common}/paths.js +0 -0
  245. /package/dist/sdk/firmachain/{amino → common}/wallet.d.ts +0 -0
  246. /package/dist/test/{27.arbitary_sign.test.d.ts → 27.arbitrary_sign.test.d.ts} +0 -0
@@ -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;
@@ -1,160 +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.setupGovExtension = void 0;
40
- var query_1 = require("cosmjs-types/cosmos/gov/v1beta1/query");
41
- var queryclient_1 = require("../../queryclient");
42
- function setupGovExtension(base) {
43
- var _this = this;
44
- var rpc = queryclient_1.createProtobufRpcClient(base);
45
- // Use this service to get easy typed access to query methods
46
- // This cannot be used for proof verification
47
- var queryService = new query_1.QueryClientImpl(rpc);
48
- return {
49
- gov: {
50
- params: function (parametersType) { 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.Params({ paramsType: parametersType })];
55
- case 1:
56
- response = _a.sent();
57
- return [2 /*return*/, response];
58
- }
59
- });
60
- }); },
61
- proposals: function (proposalStatus, depositorAddress, voterAddress, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
62
- var response;
63
- return __generator(this, function (_a) {
64
- switch (_a.label) {
65
- case 0: return [4 /*yield*/, queryService.Proposals({
66
- proposalStatus: proposalStatus,
67
- depositor: depositorAddress,
68
- voter: voterAddress,
69
- pagination: queryclient_1.createPagination(paginationKey),
70
- })];
71
- case 1:
72
- response = _a.sent();
73
- return [2 /*return*/, response];
74
- }
75
- });
76
- }); },
77
- proposal: function (proposalId) { return __awaiter(_this, void 0, void 0, function () {
78
- var response;
79
- return __generator(this, function (_a) {
80
- switch (_a.label) {
81
- case 0: return [4 /*yield*/, queryService.Proposal({ proposalId: queryclient_1.longify(proposalId) })];
82
- case 1:
83
- response = _a.sent();
84
- return [2 /*return*/, response];
85
- }
86
- });
87
- }); },
88
- deposits: function (proposalId, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
89
- var response;
90
- return __generator(this, function (_a) {
91
- switch (_a.label) {
92
- case 0: return [4 /*yield*/, queryService.Deposits({
93
- proposalId: queryclient_1.longify(proposalId),
94
- pagination: queryclient_1.createPagination(paginationKey),
95
- })];
96
- case 1:
97
- response = _a.sent();
98
- return [2 /*return*/, response];
99
- }
100
- });
101
- }); },
102
- deposit: function (proposalId, depositorAddress) { 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.Deposit({
107
- proposalId: queryclient_1.longify(proposalId),
108
- depositor: depositorAddress,
109
- })];
110
- case 1:
111
- response = _a.sent();
112
- return [2 /*return*/, response];
113
- }
114
- });
115
- }); },
116
- tally: function (proposalId) { return __awaiter(_this, void 0, void 0, function () {
117
- var response;
118
- return __generator(this, function (_a) {
119
- switch (_a.label) {
120
- case 0: return [4 /*yield*/, queryService.TallyResult({
121
- proposalId: queryclient_1.longify(proposalId),
122
- })];
123
- case 1:
124
- response = _a.sent();
125
- return [2 /*return*/, response];
126
- }
127
- });
128
- }); },
129
- votes: function (proposalId, paginationKey) { return __awaiter(_this, void 0, void 0, function () {
130
- var response;
131
- return __generator(this, function (_a) {
132
- switch (_a.label) {
133
- case 0: return [4 /*yield*/, queryService.Votes({
134
- proposalId: queryclient_1.longify(proposalId),
135
- pagination: queryclient_1.createPagination(paginationKey),
136
- })];
137
- case 1:
138
- response = _a.sent();
139
- return [2 /*return*/, response];
140
- }
141
- });
142
- }); },
143
- vote: function (proposalId, voterAddress) { return __awaiter(_this, void 0, void 0, function () {
144
- var response;
145
- return __generator(this, function (_a) {
146
- switch (_a.label) {
147
- case 0: return [4 /*yield*/, queryService.Vote({
148
- proposalId: queryclient_1.longify(proposalId),
149
- voter: voterAddress,
150
- })];
151
- case 1:
152
- response = _a.sent();
153
- return [2 /*return*/, response];
154
- }
155
- });
156
- }); },
157
- },
158
- };
159
- }
160
- exports.setupGovExtension = setupGovExtension;
@@ -1,2 +0,0 @@
1
- import { AminoConverters } from "../../aminotypes";
2
- export declare function createGroupAminoConverters(): AminoConverters;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createGroupAminoConverters = void 0;
4
- function createGroupAminoConverters() {
5
- // Missing, see https://github.com/cosmos/cosmjs/issues/1441
6
- return {};
7
- }
8
- exports.createGroupAminoConverters = createGroupAminoConverters;
@@ -1,2 +0,0 @@
1
- import { GeneratedType } from "@cosmjs/proto-signing";
2
- export declare const groupTypes: ReadonlyArray<[string, GeneratedType]>;
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.groupTypes = void 0;
4
- var tx_1 = require("cosmjs-types/cosmos/group/v1/tx");
5
- exports.groupTypes = [
6
- ["/cosmos.group.v1.MsgCreateGroup", tx_1.MsgCreateGroup],
7
- ["/cosmos.group.v1.MsgCreateGroupPolicy", tx_1.MsgCreateGroupPolicy],
8
- ["/cosmos.group.v1.MsgCreateGroupWithPolicy", tx_1.MsgCreateGroupWithPolicy],
9
- ["/cosmos.group.v1.MsgExec", tx_1.MsgExec],
10
- ["/cosmos.group.v1.MsgLeaveGroup", tx_1.MsgLeaveGroup],
11
- ["/cosmos.group.v1.MsgSubmitProposal", tx_1.MsgSubmitProposal],
12
- ["/cosmos.group.v1.MsgUpdateGroupAdmin", tx_1.MsgUpdateGroupAdmin],
13
- ["/cosmos.group.v1.MsgUpdateGroupMembers", tx_1.MsgUpdateGroupMembers],
14
- ["/cosmos.group.v1.MsgUpdateGroupMetadata", tx_1.MsgUpdateGroupMetadata],
15
- ["/cosmos.group.v1.MsgUpdateGroupPolicyAdmin", tx_1.MsgUpdateGroupPolicyAdmin],
16
- ["/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy", tx_1.MsgUpdateGroupPolicyDecisionPolicy],
17
- ["/cosmos.group.v1.MsgUpdateGroupPolicyMetadata", tx_1.MsgUpdateGroupPolicyMetadata],
18
- ["/cosmos.group.v1.MsgVote", tx_1.MsgVote],
19
- ["/cosmos.group.v1.MsgWithdrawProposal", tx_1.MsgWithdrawProposal],
20
- ];
21
- // There are no EncodeObject implementations for the new v1 message types because
22
- // those things don't scale (https://github.com/cosmos/cosmjs/issues/1440). We need to
23
- // address this more fundamentally. Users can use
24
- // const msg = {
25
- // typeUrl: "/cosmos.group.v1.MsgCreateGroup",
26
- // value: MsgCreateGroup.fromPartial({ ... })
27
- // }
28
- // in their app.
@@ -1,38 +0,0 @@
1
- import { AminoMsg, Coin } from "@cosmjs/amino";
2
- import { AminoConverters } from "../../aminotypes";
3
- interface AminoHeight {
4
- /** 0 values must be omitted (https://github.com/cosmos/cosmos-sdk/blob/v0.42.7/x/ibc/core/02-client/types/client.pb.go#L252). */
5
- readonly revision_number?: string;
6
- /** 0 values must be omitted (https://github.com/cosmos/cosmos-sdk/blob/v0.42.7/x/ibc/core/02-client/types/client.pb.go#L254). */
7
- readonly revision_height?: string;
8
- }
9
- /** Transfers fungible tokens (i.e Coins) between ICS20 enabled chains */
10
- export interface AminoMsgTransfer extends AminoMsg {
11
- readonly type: "cosmos-sdk/MsgTransfer";
12
- readonly value: {
13
- readonly source_port: string;
14
- readonly source_channel: string;
15
- readonly token?: Coin;
16
- /** Bech32 account address */
17
- readonly sender: string;
18
- /** Bech32 account address */
19
- readonly receiver: string;
20
- /**
21
- * The timeout as a (revision_number, revision_height) pair.
22
- *
23
- * This fied is is non-optional (https://github.com/cosmos/cosmos-sdk/blob/v0.42.7/x/ibc/applications/transfer/types/tx.pb.go#L49).
24
- * In order to not set the timeout height, set it to {}.
25
- */
26
- readonly timeout_height: AminoHeight;
27
- /**
28
- * Timeout timestamp in nanoseconds since Unix epoch. The timeout is disabled when set to 0.
29
- *
30
- * 0 values must be omitted (https://github.com/cosmos/cosmos-sdk/blob/v0.42.7/x/ibc/applications/transfer/types/tx.pb.go#L52).
31
- */
32
- readonly timeout_timestamp?: string;
33
- readonly memo?: string;
34
- };
35
- }
36
- export declare function isAminoMsgTransfer(msg: AminoMsg): msg is AminoMsgTransfer;
37
- export declare function createIbcAminoConverters(): AminoConverters;
38
- export {};