coreum-js 2.16.3 → 2.17.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 (236) hide show
  1. package/dist/main/client/index.js +15 -16
  2. package/dist/main/coreum/asset/ft/v1/authz.d.ts +38 -0
  3. package/dist/main/coreum/asset/ft/v1/authz.js +122 -0
  4. package/dist/main/coreum/asset/ft/v1/event.d.ts +52 -28
  5. package/dist/main/coreum/asset/ft/v1/event.js +744 -138
  6. package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -21
  7. package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
  8. package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -11
  9. package/dist/main/coreum/asset/ft/v1/params.js +37 -33
  10. package/dist/main/coreum/asset/ft/v1/query.d.ts +87 -127
  11. package/dist/main/coreum/asset/ft/v1/query.js +697 -217
  12. package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -51
  13. package/dist/main/coreum/asset/ft/v1/token.js +276 -200
  14. package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -147
  15. package/dist/main/coreum/asset/ft/v1/tx.js +502 -386
  16. package/dist/main/coreum/asset/index.d.ts +2 -3
  17. package/dist/main/coreum/asset/nft/v1/authz.d.ts +33 -0
  18. package/dist/main/coreum/asset/nft/v1/authz.js +137 -0
  19. package/dist/main/coreum/asset/nft/v1/event.d.ts +35 -43
  20. package/dist/main/coreum/asset/nft/v1/event.js +475 -147
  21. package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -36
  22. package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
  23. package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -26
  24. package/dist/main/coreum/asset/nft/v1/nft.js +139 -104
  25. package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -12
  26. package/dist/main/coreum/asset/nft/v1/params.js +17 -20
  27. package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -88
  28. package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
  29. package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -70
  30. package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
  31. package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -11
  32. package/dist/main/coreum/asset/nft/v1/types.js +273 -45
  33. package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -12
  34. package/dist/main/coreum/customparams/v1/genesis.js +26 -22
  35. package/dist/main/coreum/customparams/v1/params.d.ts +11 -11
  36. package/dist/main/coreum/customparams/v1/params.js +23 -20
  37. package/dist/main/coreum/customparams/v1/query.d.ts +14 -20
  38. package/dist/main/coreum/customparams/v1/query.js +35 -29
  39. package/dist/main/coreum/dex/index.d.ts +2 -0
  40. package/dist/main/coreum/dex/index.js +11 -0
  41. package/dist/main/coreum/dex/v1/event.d.ts +73 -0
  42. package/dist/main/coreum/dex/v1/event.js +470 -0
  43. package/dist/main/coreum/dex/v1/genesis.d.ts +49 -0
  44. package/dist/main/coreum/dex/v1/genesis.js +318 -0
  45. package/dist/main/coreum/dex/v1/order.d.ts +172 -0
  46. package/dist/main/coreum/dex/v1/order.js +1137 -0
  47. package/dist/main/coreum/dex/v1/params.d.ts +34 -0
  48. package/dist/main/coreum/dex/v1/params.js +139 -0
  49. package/dist/main/coreum/dex/v1/query.d.ts +133 -0
  50. package/dist/main/coreum/dex/v1/query.js +873 -0
  51. package/dist/main/coreum/dex/v1/tx.d.ts +102 -0
  52. package/dist/main/coreum/dex/v1/tx.js +521 -0
  53. package/dist/main/coreum/extensions/dex.d.ts +12 -0
  54. package/dist/main/coreum/extensions/dex.js +32 -0
  55. package/dist/main/coreum/extensions/ft.js +2 -1
  56. package/dist/main/coreum/extensions/nft.js +2 -1
  57. package/dist/main/coreum/extensions/nftbeta.js +2 -1
  58. package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -13
  59. package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
  60. package/dist/main/coreum/feemodel/v1/params.d.ts +14 -21
  61. package/dist/main/coreum/feemodel/v1/params.js +113 -66
  62. package/dist/main/coreum/feemodel/v1/query.d.ts +30 -37
  63. package/dist/main/coreum/feemodel/v1/query.js +196 -43
  64. package/dist/main/coreum/index.d.ts +46 -0
  65. package/dist/main/coreum/index.js +58 -1
  66. package/dist/main/coreum/nft/index.d.ts +1 -2
  67. package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -27
  68. package/dist/main/coreum/nft/v1beta1/event.js +103 -77
  69. package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -19
  70. package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
  71. package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -22
  72. package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
  73. package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -124
  74. package/dist/main/coreum/nft/v1beta1/query.js +259 -223
  75. package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -19
  76. package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
  77. package/dist/main/cosmos/extensions/bank.js +2 -1
  78. package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
  79. package/dist/main/cosmos/extensions/distribution.js +11 -10
  80. package/dist/main/cosmos/extensions/gov.d.ts +13 -13
  81. package/dist/main/cosmos/extensions/gov.js +16 -9
  82. package/dist/main/cosmos/index.d.ts +8 -8
  83. package/dist/main/google/api/http.d.ts +2636 -6
  84. package/dist/main/google/api/http.js +18 -21
  85. package/dist/main/google/protobuf/any.d.ts +14 -2
  86. package/dist/main/google/protobuf/any.js +6 -7
  87. package/dist/main/google/protobuf/duration.d.ts +14 -2
  88. package/dist/main/google/protobuf/duration.js +3 -4
  89. package/dist/main/google/protobuf/timestamp.d.ts +14 -2
  90. package/dist/main/google/protobuf/timestamp.js +3 -4
  91. package/dist/main/index.js +7 -17
  92. package/dist/main/services/cosmostation.js +1 -1
  93. package/dist/main/tendermint/abci/types.d.ts +6360 -92
  94. package/dist/main/tendermint/abci/types.js +195 -235
  95. package/dist/main/tendermint/crypto/keys.d.ts +14 -2
  96. package/dist/main/tendermint/crypto/keys.js +3 -4
  97. package/dist/main/tendermint/crypto/proof.d.ts +152 -10
  98. package/dist/main/tendermint/crypto/proof.js +19 -24
  99. package/dist/main/tendermint/types/params.d.ts +196 -12
  100. package/dist/main/tendermint/types/params.js +15 -20
  101. package/dist/main/tendermint/types/types.d.ts +1744 -26
  102. package/dist/main/tendermint/types/types.js +62 -73
  103. package/dist/main/tendermint/types/validator.d.ts +230 -6
  104. package/dist/main/tendermint/types/validator.js +10 -13
  105. package/dist/main/tendermint/version/types.d.ts +28 -4
  106. package/dist/main/tendermint/version/types.js +6 -8
  107. package/dist/main/types/core.d.ts +2 -1
  108. package/dist/main/types/core.js +2 -0
  109. package/dist/main/utils/convertStringToAny.d.ts +0 -1
  110. package/dist/main/utils/nft.js +2 -1
  111. package/dist/main/wasm/v1/authz.d.ts +20 -75
  112. package/dist/main/wasm/v1/authz.js +129 -148
  113. package/dist/main/wasm/v1/extensions/wasm.js +2 -1
  114. package/dist/main/wasm/v1/genesis.d.ts +14 -34
  115. package/dist/main/wasm/v1/genesis.js +169 -140
  116. package/dist/main/wasm/v1/ibc.d.ts +13 -26
  117. package/dist/main/wasm/v1/ibc.js +91 -76
  118. package/dist/main/wasm/v1/index.d.ts +1 -2
  119. package/dist/main/wasm/v1/pagination.d.ts +40 -4
  120. package/dist/main/wasm/v1/pagination.js +9 -11
  121. package/dist/main/wasm/v1/proposal.d.ts +23 -106
  122. package/dist/main/wasm/v1/proposal.js +634 -465
  123. package/dist/main/wasm/v1/query.d.ts +35 -187
  124. package/dist/main/wasm/v1/query.js +370 -363
  125. package/dist/main/wasm/v1/tx.d.ts +37 -210
  126. package/dist/main/wasm/v1/tx.js +621 -497
  127. package/dist/main/wasm/v1/types.d.ts +19 -67
  128. package/dist/main/wasm/v1/types.js +224 -195
  129. package/dist/module/client/index.js +2 -1
  130. package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
  131. package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
  132. package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -28
  133. package/dist/module/coreum/asset/ft/v1/event.js +721 -109
  134. package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -21
  135. package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
  136. package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -11
  137. package/dist/module/coreum/asset/ft/v1/params.js +35 -27
  138. package/dist/module/coreum/asset/ft/v1/query.d.ts +87 -127
  139. package/dist/module/coreum/asset/ft/v1/query.js +672 -180
  140. package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -51
  141. package/dist/module/coreum/asset/ft/v1/token.js +236 -152
  142. package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -147
  143. package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
  144. package/dist/module/coreum/asset/index.d.ts +2 -3
  145. package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
  146. package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
  147. package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -43
  148. package/dist/module/coreum/asset/nft/v1/event.js +448 -112
  149. package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -36
  150. package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
  151. package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -26
  152. package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
  153. package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -12
  154. package/dist/module/coreum/asset/nft/v1/params.js +16 -16
  155. package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -88
  156. package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
  157. package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -70
  158. package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
  159. package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -11
  160. package/dist/module/coreum/asset/nft/v1/types.js +269 -39
  161. package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -12
  162. package/dist/module/coreum/customparams/v1/genesis.js +25 -18
  163. package/dist/module/coreum/customparams/v1/params.d.ts +11 -11
  164. package/dist/module/coreum/customparams/v1/params.js +21 -14
  165. package/dist/module/coreum/customparams/v1/query.d.ts +14 -20
  166. package/dist/module/coreum/customparams/v1/query.js +32 -23
  167. package/dist/module/coreum/dex/index.d.ts +2 -0
  168. package/dist/module/coreum/dex/index.js +8 -0
  169. package/dist/module/coreum/dex/v1/event.d.ts +73 -0
  170. package/dist/module/coreum/dex/v1/event.js +467 -0
  171. package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
  172. package/dist/module/coreum/dex/v1/genesis.js +315 -0
  173. package/dist/module/coreum/dex/v1/order.d.ts +172 -0
  174. package/dist/module/coreum/dex/v1/order.js +1128 -0
  175. package/dist/module/coreum/dex/v1/params.d.ts +34 -0
  176. package/dist/module/coreum/dex/v1/params.js +136 -0
  177. package/dist/module/coreum/dex/v1/query.d.ts +133 -0
  178. package/dist/module/coreum/dex/v1/query.js +871 -0
  179. package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
  180. package/dist/module/coreum/dex/v1/tx.js +519 -0
  181. package/dist/module/coreum/extensions/dex.d.ts +12 -0
  182. package/dist/module/coreum/extensions/dex.js +28 -0
  183. package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -13
  184. package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
  185. package/dist/module/coreum/feemodel/v1/params.d.ts +14 -21
  186. package/dist/module/coreum/feemodel/v1/params.js +105 -54
  187. package/dist/module/coreum/feemodel/v1/query.d.ts +30 -37
  188. package/dist/module/coreum/feemodel/v1/query.js +191 -35
  189. package/dist/module/coreum/index.d.ts +46 -0
  190. package/dist/module/coreum/index.js +57 -0
  191. package/dist/module/coreum/nft/index.d.ts +1 -2
  192. package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -27
  193. package/dist/module/coreum/nft/v1beta1/event.js +90 -58
  194. package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -19
  195. package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
  196. package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -22
  197. package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
  198. package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -124
  199. package/dist/module/coreum/nft/v1beta1/query.js +231 -183
  200. package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -19
  201. package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
  202. package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
  203. package/dist/module/cosmos/extensions/gov.d.ts +13 -13
  204. package/dist/module/cosmos/index.d.ts +8 -8
  205. package/dist/module/google/api/http.d.ts +2636 -6
  206. package/dist/module/google/protobuf/any.d.ts +14 -2
  207. package/dist/module/google/protobuf/duration.d.ts +14 -2
  208. package/dist/module/google/protobuf/timestamp.d.ts +14 -2
  209. package/dist/module/services/cosmostation.js +1 -1
  210. package/dist/module/tendermint/abci/types.d.ts +6360 -92
  211. package/dist/module/tendermint/crypto/keys.d.ts +14 -2
  212. package/dist/module/tendermint/crypto/proof.d.ts +152 -10
  213. package/dist/module/tendermint/types/params.d.ts +196 -12
  214. package/dist/module/tendermint/types/types.d.ts +1744 -26
  215. package/dist/module/tendermint/types/validator.d.ts +230 -6
  216. package/dist/module/tendermint/version/types.d.ts +28 -4
  217. package/dist/module/types/core.d.ts +2 -1
  218. package/dist/module/types/core.js +2 -0
  219. package/dist/module/utils/convertStringToAny.d.ts +0 -1
  220. package/dist/module/wasm/v1/authz.d.ts +20 -75
  221. package/dist/module/wasm/v1/authz.js +111 -119
  222. package/dist/module/wasm/v1/genesis.d.ts +14 -34
  223. package/dist/module/wasm/v1/genesis.js +161 -125
  224. package/dist/module/wasm/v1/ibc.d.ts +13 -26
  225. package/dist/module/wasm/v1/ibc.js +83 -62
  226. package/dist/module/wasm/v1/index.d.ts +1 -2
  227. package/dist/module/wasm/v1/pagination.d.ts +40 -4
  228. package/dist/module/wasm/v1/proposal.d.ts +23 -106
  229. package/dist/module/wasm/v1/proposal.js +562 -377
  230. package/dist/module/wasm/v1/query.d.ts +35 -187
  231. package/dist/module/wasm/v1/query.js +330 -301
  232. package/dist/module/wasm/v1/tx.d.ts +37 -210
  233. package/dist/module/wasm/v1/tx.js +551 -404
  234. package/dist/module/wasm/v1/types.d.ts +19 -67
  235. package/dist/module/wasm/v1/types.js +196 -156
  236. package/package.json +11 -10
@@ -1,71 +1,69 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.0
5
+ // protoc v3.21.12
6
+ // source: wasmd/proto/cosmwasm/wasm/v1/authz.proto
5
7
  Object.defineProperty(exports, "__esModule", { value: true });
6
8
  exports.AcceptedMessagesFilter = exports.AcceptedMessageKeysFilter = exports.AllowAllMessagesFilter = exports.CombinedLimit = exports.MaxFundsLimit = exports.MaxCallsLimit = exports.ContractGrant = exports.ContractMigrationAuthorization = exports.ContractExecutionAuthorization = exports.protobufPackage = void 0;
7
9
  /* eslint-disable */
8
- const long_1 = __importDefault(require("long"));
9
- const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ const binary_1 = require("cosmjs-types/binary");
10
11
  const coin_1 = require("cosmjs-types/cosmos/base/v1beta1/coin");
11
- const any_1 = require("../../google/protobuf/any");
12
+ const any_1 = require("cosmjs-types/google/protobuf/any");
12
13
  exports.protobufPackage = "cosmwasm.wasm.v1";
13
14
  function createBaseContractExecutionAuthorization() {
14
15
  return { grants: [] };
15
16
  }
16
17
  exports.ContractExecutionAuthorization = {
17
- encode(message, writer = minimal_1.default.Writer.create()) {
18
+ encode(message, writer = new binary_1.BinaryWriter()) {
18
19
  for (const v of message.grants) {
19
20
  exports.ContractGrant.encode(v, writer.uint32(10).fork()).ldelim();
20
21
  }
21
22
  return writer;
22
23
  },
23
24
  decode(input, length) {
24
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
25
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
25
26
  let end = length === undefined ? reader.len : reader.pos + length;
26
27
  const message = createBaseContractExecutionAuthorization();
27
28
  while (reader.pos < end) {
28
29
  const tag = reader.uint32();
29
30
  switch (tag >>> 3) {
30
- case 1:
31
+ case 1: {
31
32
  if (tag !== 10) {
32
33
  break;
33
34
  }
34
35
  message.grants.push(exports.ContractGrant.decode(reader, reader.uint32()));
35
36
  continue;
37
+ }
36
38
  }
37
39
  if ((tag & 7) === 4 || tag === 0) {
38
40
  break;
39
41
  }
40
- reader.skipType(tag & 7);
42
+ reader.skip(tag & 7);
41
43
  }
42
44
  return message;
43
45
  },
44
46
  fromJSON(object) {
45
47
  return {
46
- grants: Array.isArray(object === null || object === void 0 ? void 0 : object.grants)
48
+ grants: globalThis.Array.isArray(object?.grants)
47
49
  ? object.grants.map((e) => exports.ContractGrant.fromJSON(e))
48
50
  : [],
49
51
  };
50
52
  },
51
53
  toJSON(message) {
52
54
  const obj = {};
53
- if (message.grants) {
54
- obj.grants = message.grants.map((e) => e ? exports.ContractGrant.toJSON(e) : undefined);
55
- }
56
- else {
57
- obj.grants = [];
55
+ if (message.grants?.length) {
56
+ obj.grants = message.grants.map((e) => exports.ContractGrant.toJSON(e));
58
57
  }
59
58
  return obj;
60
59
  },
61
60
  create(base) {
62
- return exports.ContractExecutionAuthorization.fromPartial(base !== null && base !== void 0 ? base : {});
61
+ return exports.ContractExecutionAuthorization.fromPartial(base ?? {});
63
62
  },
64
63
  fromPartial(object) {
65
- var _a;
66
64
  const message = createBaseContractExecutionAuthorization();
67
65
  message.grants =
68
- ((_a = object.grants) === null || _a === void 0 ? void 0 : _a.map((e) => exports.ContractGrant.fromPartial(e))) || [];
66
+ object.grants?.map((e) => exports.ContractGrant.fromPartial(e)) || [];
69
67
  return message;
70
68
  },
71
69
  };
@@ -73,58 +71,55 @@ function createBaseContractMigrationAuthorization() {
73
71
  return { grants: [] };
74
72
  }
75
73
  exports.ContractMigrationAuthorization = {
76
- encode(message, writer = minimal_1.default.Writer.create()) {
74
+ encode(message, writer = new binary_1.BinaryWriter()) {
77
75
  for (const v of message.grants) {
78
76
  exports.ContractGrant.encode(v, writer.uint32(10).fork()).ldelim();
79
77
  }
80
78
  return writer;
81
79
  },
82
80
  decode(input, length) {
83
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
81
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
84
82
  let end = length === undefined ? reader.len : reader.pos + length;
85
83
  const message = createBaseContractMigrationAuthorization();
86
84
  while (reader.pos < end) {
87
85
  const tag = reader.uint32();
88
86
  switch (tag >>> 3) {
89
- case 1:
87
+ case 1: {
90
88
  if (tag !== 10) {
91
89
  break;
92
90
  }
93
91
  message.grants.push(exports.ContractGrant.decode(reader, reader.uint32()));
94
92
  continue;
93
+ }
95
94
  }
96
95
  if ((tag & 7) === 4 || tag === 0) {
97
96
  break;
98
97
  }
99
- reader.skipType(tag & 7);
98
+ reader.skip(tag & 7);
100
99
  }
101
100
  return message;
102
101
  },
103
102
  fromJSON(object) {
104
103
  return {
105
- grants: Array.isArray(object === null || object === void 0 ? void 0 : object.grants)
104
+ grants: globalThis.Array.isArray(object?.grants)
106
105
  ? object.grants.map((e) => exports.ContractGrant.fromJSON(e))
107
106
  : [],
108
107
  };
109
108
  },
110
109
  toJSON(message) {
111
110
  const obj = {};
112
- if (message.grants) {
113
- obj.grants = message.grants.map((e) => e ? exports.ContractGrant.toJSON(e) : undefined);
114
- }
115
- else {
116
- obj.grants = [];
111
+ if (message.grants?.length) {
112
+ obj.grants = message.grants.map((e) => exports.ContractGrant.toJSON(e));
117
113
  }
118
114
  return obj;
119
115
  },
120
116
  create(base) {
121
- return exports.ContractMigrationAuthorization.fromPartial(base !== null && base !== void 0 ? base : {});
117
+ return exports.ContractMigrationAuthorization.fromPartial(base ?? {});
122
118
  },
123
119
  fromPartial(object) {
124
- var _a;
125
120
  const message = createBaseContractMigrationAuthorization();
126
121
  message.grants =
127
- ((_a = object.grants) === null || _a === void 0 ? void 0 : _a.map((e) => exports.ContractGrant.fromPartial(e))) || [];
122
+ object.grants?.map((e) => exports.ContractGrant.fromPartial(e)) || [];
128
123
  return message;
129
124
  },
130
125
  };
@@ -132,7 +127,7 @@ function createBaseContractGrant() {
132
127
  return { contract: "", limit: undefined, filter: undefined };
133
128
  }
134
129
  exports.ContractGrant = {
135
- encode(message, writer = minimal_1.default.Writer.create()) {
130
+ encode(message, writer = new binary_1.BinaryWriter()) {
136
131
  if (message.contract !== "") {
137
132
  writer.uint32(10).string(message.contract);
138
133
  }
@@ -145,61 +140,69 @@ exports.ContractGrant = {
145
140
  return writer;
146
141
  },
147
142
  decode(input, length) {
148
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
143
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
149
144
  let end = length === undefined ? reader.len : reader.pos + length;
150
145
  const message = createBaseContractGrant();
151
146
  while (reader.pos < end) {
152
147
  const tag = reader.uint32();
153
148
  switch (tag >>> 3) {
154
- case 1:
149
+ case 1: {
155
150
  if (tag !== 10) {
156
151
  break;
157
152
  }
158
153
  message.contract = reader.string();
159
154
  continue;
160
- case 2:
155
+ }
156
+ case 2: {
161
157
  if (tag !== 18) {
162
158
  break;
163
159
  }
164
160
  message.limit = any_1.Any.decode(reader, reader.uint32());
165
161
  continue;
166
- case 3:
162
+ }
163
+ case 3: {
167
164
  if (tag !== 26) {
168
165
  break;
169
166
  }
170
167
  message.filter = any_1.Any.decode(reader, reader.uint32());
171
168
  continue;
169
+ }
172
170
  }
173
171
  if ((tag & 7) === 4 || tag === 0) {
174
172
  break;
175
173
  }
176
- reader.skipType(tag & 7);
174
+ reader.skip(tag & 7);
177
175
  }
178
176
  return message;
179
177
  },
180
178
  fromJSON(object) {
181
179
  return {
182
- contract: isSet(object.contract) ? String(object.contract) : "",
180
+ contract: isSet(object.contract)
181
+ ? globalThis.String(object.contract)
182
+ : "",
183
183
  limit: isSet(object.limit) ? any_1.Any.fromJSON(object.limit) : undefined,
184
184
  filter: isSet(object.filter) ? any_1.Any.fromJSON(object.filter) : undefined,
185
185
  };
186
186
  },
187
187
  toJSON(message) {
188
188
  const obj = {};
189
- message.contract !== undefined && (obj.contract = message.contract);
190
- message.limit !== undefined &&
191
- (obj.limit = message.limit ? any_1.Any.toJSON(message.limit) : undefined);
192
- message.filter !== undefined &&
193
- (obj.filter = message.filter ? any_1.Any.toJSON(message.filter) : undefined);
189
+ if (message.contract !== "") {
190
+ obj.contract = message.contract;
191
+ }
192
+ if (message.limit !== undefined) {
193
+ obj.limit = any_1.Any.toJSON(message.limit);
194
+ }
195
+ if (message.filter !== undefined) {
196
+ obj.filter = any_1.Any.toJSON(message.filter);
197
+ }
194
198
  return obj;
195
199
  },
196
200
  create(base) {
197
- return exports.ContractGrant.fromPartial(base !== null && base !== void 0 ? base : {});
201
+ return exports.ContractGrant.fromPartial(base ?? {});
198
202
  },
199
203
  fromPartial(object) {
200
- var _a;
201
204
  const message = createBaseContractGrant();
202
- message.contract = (_a = object.contract) !== null && _a !== void 0 ? _a : "";
205
+ message.contract = object.contract ?? "";
203
206
  message.limit =
204
207
  object.limit !== undefined && object.limit !== null
205
208
  ? any_1.Any.fromPartial(object.limit)
@@ -215,51 +218,54 @@ function createBaseMaxCallsLimit() {
215
218
  return { remaining: 0 };
216
219
  }
217
220
  exports.MaxCallsLimit = {
218
- encode(message, writer = minimal_1.default.Writer.create()) {
221
+ encode(message, writer = new binary_1.BinaryWriter()) {
219
222
  if (message.remaining !== 0) {
220
223
  writer.uint32(8).uint64(message.remaining);
221
224
  }
222
225
  return writer;
223
226
  },
224
227
  decode(input, length) {
225
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
228
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
226
229
  let end = length === undefined ? reader.len : reader.pos + length;
227
230
  const message = createBaseMaxCallsLimit();
228
231
  while (reader.pos < end) {
229
232
  const tag = reader.uint32();
230
233
  switch (tag >>> 3) {
231
- case 1:
234
+ case 1: {
232
235
  if (tag !== 8) {
233
236
  break;
234
237
  }
235
238
  message.remaining = longToNumber(reader.uint64());
236
239
  continue;
240
+ }
237
241
  }
238
242
  if ((tag & 7) === 4 || tag === 0) {
239
243
  break;
240
244
  }
241
- reader.skipType(tag & 7);
245
+ reader.skip(tag & 7);
242
246
  }
243
247
  return message;
244
248
  },
245
249
  fromJSON(object) {
246
250
  return {
247
- remaining: isSet(object.remaining) ? Number(object.remaining) : 0,
251
+ remaining: isSet(object.remaining)
252
+ ? globalThis.Number(object.remaining)
253
+ : 0,
248
254
  };
249
255
  },
250
256
  toJSON(message) {
251
257
  const obj = {};
252
- message.remaining !== undefined &&
253
- (obj.remaining = Math.round(message.remaining));
258
+ if (message.remaining !== 0) {
259
+ obj.remaining = Math.round(message.remaining);
260
+ }
254
261
  return obj;
255
262
  },
256
263
  create(base) {
257
- return exports.MaxCallsLimit.fromPartial(base !== null && base !== void 0 ? base : {});
264
+ return exports.MaxCallsLimit.fromPartial(base ?? {});
258
265
  },
259
266
  fromPartial(object) {
260
- var _a;
261
267
  const message = createBaseMaxCallsLimit();
262
- message.remaining = (_a = object.remaining) !== null && _a !== void 0 ? _a : 0;
268
+ message.remaining = object.remaining ?? 0;
263
269
  return message;
264
270
  },
265
271
  };
@@ -267,57 +273,54 @@ function createBaseMaxFundsLimit() {
267
273
  return { amounts: [] };
268
274
  }
269
275
  exports.MaxFundsLimit = {
270
- encode(message, writer = minimal_1.default.Writer.create()) {
276
+ encode(message, writer = new binary_1.BinaryWriter()) {
271
277
  for (const v of message.amounts) {
272
278
  coin_1.Coin.encode(v, writer.uint32(10).fork()).ldelim();
273
279
  }
274
280
  return writer;
275
281
  },
276
282
  decode(input, length) {
277
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
283
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
278
284
  let end = length === undefined ? reader.len : reader.pos + length;
279
285
  const message = createBaseMaxFundsLimit();
280
286
  while (reader.pos < end) {
281
287
  const tag = reader.uint32();
282
288
  switch (tag >>> 3) {
283
- case 1:
289
+ case 1: {
284
290
  if (tag !== 10) {
285
291
  break;
286
292
  }
287
293
  message.amounts.push(coin_1.Coin.decode(reader, reader.uint32()));
288
294
  continue;
295
+ }
289
296
  }
290
297
  if ((tag & 7) === 4 || tag === 0) {
291
298
  break;
292
299
  }
293
- reader.skipType(tag & 7);
300
+ reader.skip(tag & 7);
294
301
  }
295
302
  return message;
296
303
  },
297
304
  fromJSON(object) {
298
305
  return {
299
- amounts: Array.isArray(object === null || object === void 0 ? void 0 : object.amounts)
306
+ amounts: globalThis.Array.isArray(object?.amounts)
300
307
  ? object.amounts.map((e) => coin_1.Coin.fromJSON(e))
301
308
  : [],
302
309
  };
303
310
  },
304
311
  toJSON(message) {
305
312
  const obj = {};
306
- if (message.amounts) {
307
- obj.amounts = message.amounts.map((e) => e ? coin_1.Coin.toJSON(e) : undefined);
308
- }
309
- else {
310
- obj.amounts = [];
313
+ if (message.amounts?.length) {
314
+ obj.amounts = message.amounts.map((e) => coin_1.Coin.toJSON(e));
311
315
  }
312
316
  return obj;
313
317
  },
314
318
  create(base) {
315
- return exports.MaxFundsLimit.fromPartial(base !== null && base !== void 0 ? base : {});
319
+ return exports.MaxFundsLimit.fromPartial(base ?? {});
316
320
  },
317
321
  fromPartial(object) {
318
- var _a;
319
322
  const message = createBaseMaxFundsLimit();
320
- message.amounts = ((_a = object.amounts) === null || _a === void 0 ? void 0 : _a.map((e) => coin_1.Coin.fromPartial(e))) || [];
323
+ message.amounts = object.amounts?.map((e) => coin_1.Coin.fromPartial(e)) || [];
321
324
  return message;
322
325
  },
323
326
  };
@@ -325,7 +328,7 @@ function createBaseCombinedLimit() {
325
328
  return { callsRemaining: 0, amounts: [] };
326
329
  }
327
330
  exports.CombinedLimit = {
328
- encode(message, writer = minimal_1.default.Writer.create()) {
331
+ encode(message, writer = new binary_1.BinaryWriter()) {
329
332
  if (message.callsRemaining !== 0) {
330
333
  writer.uint32(8).uint64(message.callsRemaining);
331
334
  }
@@ -335,62 +338,61 @@ exports.CombinedLimit = {
335
338
  return writer;
336
339
  },
337
340
  decode(input, length) {
338
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
341
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
339
342
  let end = length === undefined ? reader.len : reader.pos + length;
340
343
  const message = createBaseCombinedLimit();
341
344
  while (reader.pos < end) {
342
345
  const tag = reader.uint32();
343
346
  switch (tag >>> 3) {
344
- case 1:
347
+ case 1: {
345
348
  if (tag !== 8) {
346
349
  break;
347
350
  }
348
351
  message.callsRemaining = longToNumber(reader.uint64());
349
352
  continue;
350
- case 2:
353
+ }
354
+ case 2: {
351
355
  if (tag !== 18) {
352
356
  break;
353
357
  }
354
358
  message.amounts.push(coin_1.Coin.decode(reader, reader.uint32()));
355
359
  continue;
360
+ }
356
361
  }
357
362
  if ((tag & 7) === 4 || tag === 0) {
358
363
  break;
359
364
  }
360
- reader.skipType(tag & 7);
365
+ reader.skip(tag & 7);
361
366
  }
362
367
  return message;
363
368
  },
364
369
  fromJSON(object) {
365
370
  return {
366
371
  callsRemaining: isSet(object.callsRemaining)
367
- ? Number(object.callsRemaining)
372
+ ? globalThis.Number(object.callsRemaining)
368
373
  : 0,
369
- amounts: Array.isArray(object === null || object === void 0 ? void 0 : object.amounts)
374
+ amounts: globalThis.Array.isArray(object?.amounts)
370
375
  ? object.amounts.map((e) => coin_1.Coin.fromJSON(e))
371
376
  : [],
372
377
  };
373
378
  },
374
379
  toJSON(message) {
375
380
  const obj = {};
376
- message.callsRemaining !== undefined &&
377
- (obj.callsRemaining = Math.round(message.callsRemaining));
378
- if (message.amounts) {
379
- obj.amounts = message.amounts.map((e) => e ? coin_1.Coin.toJSON(e) : undefined);
381
+ if (message.callsRemaining !== 0) {
382
+ obj.callsRemaining = Math.round(message.callsRemaining);
380
383
  }
381
- else {
382
- obj.amounts = [];
384
+ if (message.amounts?.length) {
385
+ obj.amounts = message.amounts.map((e) => coin_1.Coin.toJSON(e));
383
386
  }
384
387
  return obj;
385
388
  },
386
389
  create(base) {
387
- return exports.CombinedLimit.fromPartial(base !== null && base !== void 0 ? base : {});
390
+ return exports.CombinedLimit.fromPartial(base ?? {});
388
391
  },
389
392
  fromPartial(object) {
390
- var _a, _b;
391
393
  const message = createBaseCombinedLimit();
392
- message.callsRemaining = (_a = object.callsRemaining) !== null && _a !== void 0 ? _a : 0;
393
- message.amounts = ((_b = object.amounts) === null || _b === void 0 ? void 0 : _b.map((e) => coin_1.Coin.fromPartial(e))) || [];
394
+ message.callsRemaining = object.callsRemaining ?? 0;
395
+ message.amounts = object.amounts?.map((e) => coin_1.Coin.fromPartial(e)) || [];
394
396
  return message;
395
397
  },
396
398
  };
@@ -398,11 +400,11 @@ function createBaseAllowAllMessagesFilter() {
398
400
  return {};
399
401
  }
400
402
  exports.AllowAllMessagesFilter = {
401
- encode(_, writer = minimal_1.default.Writer.create()) {
403
+ encode(_, writer = new binary_1.BinaryWriter()) {
402
404
  return writer;
403
405
  },
404
406
  decode(input, length) {
405
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
407
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
406
408
  let end = length === undefined ? reader.len : reader.pos + length;
407
409
  const message = createBaseAllowAllMessagesFilter();
408
410
  while (reader.pos < end) {
@@ -412,7 +414,7 @@ exports.AllowAllMessagesFilter = {
412
414
  if ((tag & 7) === 4 || tag === 0) {
413
415
  break;
414
416
  }
415
- reader.skipType(tag & 7);
417
+ reader.skip(tag & 7);
416
418
  }
417
419
  return message;
418
420
  },
@@ -424,7 +426,7 @@ exports.AllowAllMessagesFilter = {
424
426
  return obj;
425
427
  },
426
428
  create(base) {
427
- return exports.AllowAllMessagesFilter.fromPartial(base !== null && base !== void 0 ? base : {});
429
+ return exports.AllowAllMessagesFilter.fromPartial(base ?? {});
428
430
  },
429
431
  fromPartial(_) {
430
432
  const message = createBaseAllowAllMessagesFilter();
@@ -435,57 +437,54 @@ function createBaseAcceptedMessageKeysFilter() {
435
437
  return { keys: [] };
436
438
  }
437
439
  exports.AcceptedMessageKeysFilter = {
438
- encode(message, writer = minimal_1.default.Writer.create()) {
440
+ encode(message, writer = new binary_1.BinaryWriter()) {
439
441
  for (const v of message.keys) {
440
442
  writer.uint32(10).string(v);
441
443
  }
442
444
  return writer;
443
445
  },
444
446
  decode(input, length) {
445
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
447
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
446
448
  let end = length === undefined ? reader.len : reader.pos + length;
447
449
  const message = createBaseAcceptedMessageKeysFilter();
448
450
  while (reader.pos < end) {
449
451
  const tag = reader.uint32();
450
452
  switch (tag >>> 3) {
451
- case 1:
453
+ case 1: {
452
454
  if (tag !== 10) {
453
455
  break;
454
456
  }
455
457
  message.keys.push(reader.string());
456
458
  continue;
459
+ }
457
460
  }
458
461
  if ((tag & 7) === 4 || tag === 0) {
459
462
  break;
460
463
  }
461
- reader.skipType(tag & 7);
464
+ reader.skip(tag & 7);
462
465
  }
463
466
  return message;
464
467
  },
465
468
  fromJSON(object) {
466
469
  return {
467
- keys: Array.isArray(object === null || object === void 0 ? void 0 : object.keys)
468
- ? object.keys.map((e) => String(e))
470
+ keys: globalThis.Array.isArray(object?.keys)
471
+ ? object.keys.map((e) => globalThis.String(e))
469
472
  : [],
470
473
  };
471
474
  },
472
475
  toJSON(message) {
473
476
  const obj = {};
474
- if (message.keys) {
475
- obj.keys = message.keys.map((e) => e);
476
- }
477
- else {
478
- obj.keys = [];
477
+ if (message.keys?.length) {
478
+ obj.keys = message.keys;
479
479
  }
480
480
  return obj;
481
481
  },
482
482
  create(base) {
483
- return exports.AcceptedMessageKeysFilter.fromPartial(base !== null && base !== void 0 ? base : {});
483
+ return exports.AcceptedMessageKeysFilter.fromPartial(base ?? {});
484
484
  },
485
485
  fromPartial(object) {
486
- var _a;
487
486
  const message = createBaseAcceptedMessageKeysFilter();
488
- message.keys = ((_a = object.keys) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
487
+ message.keys = object.keys?.map((e) => e) || [];
489
488
  return message;
490
489
  },
491
490
  };
@@ -493,81 +492,63 @@ function createBaseAcceptedMessagesFilter() {
493
492
  return { messages: [] };
494
493
  }
495
494
  exports.AcceptedMessagesFilter = {
496
- encode(message, writer = minimal_1.default.Writer.create()) {
495
+ encode(message, writer = new binary_1.BinaryWriter()) {
497
496
  for (const v of message.messages) {
498
497
  writer.uint32(10).bytes(v);
499
498
  }
500
499
  return writer;
501
500
  },
502
501
  decode(input, length) {
503
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
502
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
504
503
  let end = length === undefined ? reader.len : reader.pos + length;
505
504
  const message = createBaseAcceptedMessagesFilter();
506
505
  while (reader.pos < end) {
507
506
  const tag = reader.uint32();
508
507
  switch (tag >>> 3) {
509
- case 1:
508
+ case 1: {
510
509
  if (tag !== 10) {
511
510
  break;
512
511
  }
513
512
  message.messages.push(reader.bytes());
514
513
  continue;
514
+ }
515
515
  }
516
516
  if ((tag & 7) === 4 || tag === 0) {
517
517
  break;
518
518
  }
519
- reader.skipType(tag & 7);
519
+ reader.skip(tag & 7);
520
520
  }
521
521
  return message;
522
522
  },
523
523
  fromJSON(object) {
524
524
  return {
525
- messages: Array.isArray(object === null || object === void 0 ? void 0 : object.messages)
525
+ messages: globalThis.Array.isArray(object?.messages)
526
526
  ? object.messages.map((e) => bytesFromBase64(e))
527
527
  : [],
528
528
  };
529
529
  },
530
530
  toJSON(message) {
531
531
  const obj = {};
532
- if (message.messages) {
533
- obj.messages = message.messages.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
534
- }
535
- else {
536
- obj.messages = [];
532
+ if (message.messages?.length) {
533
+ obj.messages = message.messages.map((e) => base64FromBytes(e));
537
534
  }
538
535
  return obj;
539
536
  },
540
537
  create(base) {
541
- return exports.AcceptedMessagesFilter.fromPartial(base !== null && base !== void 0 ? base : {});
538
+ return exports.AcceptedMessagesFilter.fromPartial(base ?? {});
542
539
  },
543
540
  fromPartial(object) {
544
- var _a;
545
541
  const message = createBaseAcceptedMessagesFilter();
546
- message.messages = ((_a = object.messages) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
542
+ message.messages = object.messages?.map((e) => e) || [];
547
543
  return message;
548
544
  },
549
545
  };
550
- var tsProtoGlobalThis = (() => {
551
- if (typeof globalThis !== "undefined") {
552
- return globalThis;
553
- }
554
- if (typeof self !== "undefined") {
555
- return self;
556
- }
557
- if (typeof window !== "undefined") {
558
- return window;
559
- }
560
- if (typeof global !== "undefined") {
561
- return global;
562
- }
563
- throw "Unable to locate global object";
564
- })();
565
546
  function bytesFromBase64(b64) {
566
- if (tsProtoGlobalThis.Buffer) {
567
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
547
+ if (globalThis.Buffer) {
548
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
568
549
  }
569
550
  else {
570
- const bin = tsProtoGlobalThis.atob(b64);
551
+ const bin = globalThis.atob(b64);
571
552
  const arr = new Uint8Array(bin.length);
572
553
  for (let i = 0; i < bin.length; ++i) {
573
554
  arr[i] = bin.charCodeAt(i);
@@ -576,26 +557,26 @@ function bytesFromBase64(b64) {
576
557
  }
577
558
  }
578
559
  function base64FromBytes(arr) {
579
- if (tsProtoGlobalThis.Buffer) {
580
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
560
+ if (globalThis.Buffer) {
561
+ return globalThis.Buffer.from(arr).toString("base64");
581
562
  }
582
563
  else {
583
564
  const bin = [];
584
565
  arr.forEach((byte) => {
585
- bin.push(String.fromCharCode(byte));
566
+ bin.push(globalThis.String.fromCharCode(byte));
586
567
  });
587
- return tsProtoGlobalThis.btoa(bin.join(""));
568
+ return globalThis.btoa(bin.join(""));
588
569
  }
589
570
  }
590
- function longToNumber(long) {
591
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
592
- throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
571
+ function longToNumber(int64) {
572
+ const num = globalThis.Number(int64.toString());
573
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
574
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
593
575
  }
594
- return long.toNumber();
595
- }
596
- if (minimal_1.default.util.Long !== long_1.default) {
597
- minimal_1.default.util.Long = long_1.default;
598
- minimal_1.default.configure();
576
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
577
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
578
+ }
579
+ return num;
599
580
  }
600
581
  function isSet(value) {
601
582
  return value !== null && value !== undefined;