coreum-js 2.16.2 → 2.17.0

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 (203) hide show
  1. package/dist/main/client/index.js +16 -17
  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 -120
  5. package/dist/main/coreum/asset/ft/v1/event.js +744 -138
  6. package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -517
  7. package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
  8. package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -63
  9. package/dist/main/coreum/asset/ft/v1/params.js +37 -33
  10. package/dist/main/coreum/asset/ft/v1/query.d.ts +86 -1950
  11. package/dist/main/coreum/asset/ft/v1/query.js +697 -217
  12. package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -249
  13. package/dist/main/coreum/asset/ft/v1/token.js +273 -197
  14. package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -755
  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 -147
  20. package/dist/main/coreum/asset/nft/v1/event.js +475 -147
  21. package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -286
  22. package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
  23. package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -108
  24. package/dist/main/coreum/asset/nft/v1/nft.js +136 -101
  25. package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -38
  26. package/dist/main/coreum/asset/nft/v1/params.js +17 -20
  27. package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -706
  28. package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
  29. package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -266
  30. package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
  31. package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -19
  32. package/dist/main/coreum/asset/nft/v1/types.js +273 -45
  33. package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -32
  34. package/dist/main/coreum/customparams/v1/genesis.js +26 -22
  35. package/dist/main/coreum/customparams/v1/params.d.ts +11 -19
  36. package/dist/main/coreum/customparams/v1/params.js +23 -20
  37. package/dist/main/coreum/customparams/v1/query.d.ts +14 -40
  38. package/dist/main/coreum/customparams/v1/query.js +35 -29
  39. package/dist/main/coreum/dex/index.d.ts +1 -0
  40. package/dist/main/coreum/dex/index.js +12 -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/feemodel/v1/genesis.d.ts +13 -233
  56. package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
  57. package/dist/main/coreum/feemodel/v1/params.d.ts +14 -337
  58. package/dist/main/coreum/feemodel/v1/params.js +113 -66
  59. package/dist/main/coreum/feemodel/v1/query.d.ts +30 -261
  60. package/dist/main/coreum/feemodel/v1/query.js +196 -43
  61. package/dist/main/coreum/index.d.ts +46 -0
  62. package/dist/main/coreum/index.js +58 -1
  63. package/dist/main/coreum/nft/index.d.ts +1 -2
  64. package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -79
  65. package/dist/main/coreum/nft/v1beta1/event.js +103 -77
  66. package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -435
  67. package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
  68. package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -114
  69. package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
  70. package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -1628
  71. package/dist/main/coreum/nft/v1beta1/query.js +259 -223
  72. package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -39
  73. package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
  74. package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
  75. package/dist/main/cosmos/extensions/distribution.js +9 -9
  76. package/dist/main/cosmos/extensions/gov.d.ts +13 -13
  77. package/dist/main/cosmos/extensions/gov.js +14 -8
  78. package/dist/main/cosmos/index.d.ts +8 -8
  79. package/dist/main/google/api/http.js +18 -21
  80. package/dist/main/google/protobuf/any.js +3 -4
  81. package/dist/main/google/protobuf/duration.js +3 -4
  82. package/dist/main/google/protobuf/timestamp.js +3 -4
  83. package/dist/main/services/cosmostation.js +1 -1
  84. package/dist/main/tendermint/abci/types.js +183 -223
  85. package/dist/main/tendermint/crypto/keys.js +3 -4
  86. package/dist/main/tendermint/crypto/proof.js +19 -24
  87. package/dist/main/tendermint/types/params.js +15 -20
  88. package/dist/main/tendermint/types/types.js +57 -68
  89. package/dist/main/tendermint/types/validator.js +10 -13
  90. package/dist/main/tendermint/version/types.js +6 -8
  91. package/dist/main/types/core.d.ts +2 -1
  92. package/dist/main/types/core.js +2 -0
  93. package/dist/main/wasm/v1/authz.d.ts +20 -471
  94. package/dist/main/wasm/v1/authz.js +129 -148
  95. package/dist/main/wasm/v1/genesis.d.ts +14 -1020
  96. package/dist/main/wasm/v1/genesis.js +169 -140
  97. package/dist/main/wasm/v1/ibc.d.ts +13 -62
  98. package/dist/main/wasm/v1/ibc.js +91 -76
  99. package/dist/main/wasm/v1/index.d.ts +1 -2
  100. package/dist/main/wasm/v1/pagination.js +9 -11
  101. package/dist/main/wasm/v1/proposal.d.ts +23 -720
  102. package/dist/main/wasm/v1/proposal.js +634 -465
  103. package/dist/main/wasm/v1/query.d.ts +35 -1201
  104. package/dist/main/wasm/v1/query.js +370 -363
  105. package/dist/main/wasm/v1/tx.d.ts +37 -788
  106. package/dist/main/wasm/v1/tx.js +621 -497
  107. package/dist/main/wasm/v1/types.d.ts +19 -297
  108. package/dist/main/wasm/v1/types.js +219 -190
  109. package/dist/module/client/index.js +4 -3
  110. package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
  111. package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
  112. package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -120
  113. package/dist/module/coreum/asset/ft/v1/event.js +721 -109
  114. package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -517
  115. package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
  116. package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -63
  117. package/dist/module/coreum/asset/ft/v1/params.js +35 -27
  118. package/dist/module/coreum/asset/ft/v1/query.d.ts +86 -1950
  119. package/dist/module/coreum/asset/ft/v1/query.js +672 -180
  120. package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -249
  121. package/dist/module/coreum/asset/ft/v1/token.js +236 -152
  122. package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -755
  123. package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
  124. package/dist/module/coreum/asset/index.d.ts +2 -3
  125. package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
  126. package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
  127. package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -147
  128. package/dist/module/coreum/asset/nft/v1/event.js +448 -112
  129. package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -286
  130. package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
  131. package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -108
  132. package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
  133. package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -38
  134. package/dist/module/coreum/asset/nft/v1/params.js +16 -16
  135. package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -706
  136. package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
  137. package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -266
  138. package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
  139. package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -19
  140. package/dist/module/coreum/asset/nft/v1/types.js +269 -39
  141. package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -32
  142. package/dist/module/coreum/customparams/v1/genesis.js +25 -18
  143. package/dist/module/coreum/customparams/v1/params.d.ts +11 -19
  144. package/dist/module/coreum/customparams/v1/params.js +21 -14
  145. package/dist/module/coreum/customparams/v1/query.d.ts +14 -40
  146. package/dist/module/coreum/customparams/v1/query.js +32 -23
  147. package/dist/module/coreum/dex/index.d.ts +1 -0
  148. package/dist/module/coreum/dex/index.js +9 -0
  149. package/dist/module/coreum/dex/v1/event.d.ts +73 -0
  150. package/dist/module/coreum/dex/v1/event.js +467 -0
  151. package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
  152. package/dist/module/coreum/dex/v1/genesis.js +315 -0
  153. package/dist/module/coreum/dex/v1/order.d.ts +172 -0
  154. package/dist/module/coreum/dex/v1/order.js +1128 -0
  155. package/dist/module/coreum/dex/v1/params.d.ts +34 -0
  156. package/dist/module/coreum/dex/v1/params.js +136 -0
  157. package/dist/module/coreum/dex/v1/query.d.ts +133 -0
  158. package/dist/module/coreum/dex/v1/query.js +871 -0
  159. package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
  160. package/dist/module/coreum/dex/v1/tx.js +519 -0
  161. package/dist/module/coreum/extensions/dex.d.ts +12 -0
  162. package/dist/module/coreum/extensions/dex.js +28 -0
  163. package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -233
  164. package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
  165. package/dist/module/coreum/feemodel/v1/params.d.ts +14 -337
  166. package/dist/module/coreum/feemodel/v1/params.js +105 -54
  167. package/dist/module/coreum/feemodel/v1/query.d.ts +30 -261
  168. package/dist/module/coreum/feemodel/v1/query.js +191 -35
  169. package/dist/module/coreum/index.d.ts +46 -0
  170. package/dist/module/coreum/index.js +57 -0
  171. package/dist/module/coreum/nft/index.d.ts +1 -2
  172. package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -79
  173. package/dist/module/coreum/nft/v1beta1/event.js +90 -58
  174. package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -435
  175. package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
  176. package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -114
  177. package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
  178. package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -1628
  179. package/dist/module/coreum/nft/v1beta1/query.js +231 -183
  180. package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -39
  181. package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
  182. package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
  183. package/dist/module/cosmos/extensions/gov.d.ts +13 -13
  184. package/dist/module/cosmos/index.d.ts +8 -8
  185. package/dist/module/services/cosmostation.js +1 -1
  186. package/dist/module/types/core.d.ts +2 -1
  187. package/dist/module/types/core.js +2 -0
  188. package/dist/module/wasm/v1/authz.d.ts +20 -471
  189. package/dist/module/wasm/v1/authz.js +111 -119
  190. package/dist/module/wasm/v1/genesis.d.ts +14 -1020
  191. package/dist/module/wasm/v1/genesis.js +161 -125
  192. package/dist/module/wasm/v1/ibc.d.ts +13 -62
  193. package/dist/module/wasm/v1/ibc.js +83 -62
  194. package/dist/module/wasm/v1/index.d.ts +1 -2
  195. package/dist/module/wasm/v1/proposal.d.ts +23 -720
  196. package/dist/module/wasm/v1/proposal.js +562 -377
  197. package/dist/module/wasm/v1/query.d.ts +35 -1201
  198. package/dist/module/wasm/v1/query.js +330 -301
  199. package/dist/module/wasm/v1/tx.d.ts +37 -788
  200. package/dist/module/wasm/v1/tx.js +551 -404
  201. package/dist/module/wasm/v1/types.d.ts +19 -297
  202. package/dist/module/wasm/v1/types.js +196 -156
  203. package/package.json +11 -10
@@ -1,9 +1,13 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.0
4
+ // protoc v3.21.12
5
+ // source: coreum-protos/ft/genesis.proto
1
6
  /* eslint-disable */
2
- import Long from "long";
3
- import _m0 from "protobufjs/minimal";
7
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
4
8
  import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
5
9
  import { Params } from "./params";
6
- import { Token } from "./token";
10
+ import { DEXSettings, Token } from "./token";
7
11
  export const protobufPackage = "coreum.asset.ft.v1";
8
12
  function createBaseGenesisState() {
9
13
  return {
@@ -11,10 +15,14 @@ function createBaseGenesisState() {
11
15
  tokens: [],
12
16
  frozenBalances: [],
13
17
  whitelistedBalances: [],
18
+ pendingTokenUpgrades: [],
19
+ dexLockedBalances: [],
20
+ dexExpectedToReceiveBalances: [],
21
+ dexSettings: [],
14
22
  };
15
23
  }
16
24
  export const GenesisState = {
17
- encode(message, writer = _m0.Writer.create()) {
25
+ encode(message, writer = new BinaryWriter()) {
18
26
  if (message.params !== undefined) {
19
27
  Params.encode(message.params, writer.uint32(10).fork()).ldelim();
20
28
  }
@@ -27,82 +35,143 @@ export const GenesisState = {
27
35
  for (const v of message.whitelistedBalances) {
28
36
  Balance.encode(v, writer.uint32(34).fork()).ldelim();
29
37
  }
38
+ for (const v of message.pendingTokenUpgrades) {
39
+ PendingTokenUpgrade.encode(v, writer.uint32(42).fork()).ldelim();
40
+ }
41
+ for (const v of message.dexLockedBalances) {
42
+ Balance.encode(v, writer.uint32(50).fork()).ldelim();
43
+ }
44
+ for (const v of message.dexExpectedToReceiveBalances) {
45
+ Balance.encode(v, writer.uint32(58).fork()).ldelim();
46
+ }
47
+ for (const v of message.dexSettings) {
48
+ DEXSettingsWithDenom.encode(v, writer.uint32(66).fork()).ldelim();
49
+ }
30
50
  return writer;
31
51
  },
32
52
  decode(input, length) {
33
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
53
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
34
54
  let end = length === undefined ? reader.len : reader.pos + length;
35
55
  const message = createBaseGenesisState();
36
56
  while (reader.pos < end) {
37
57
  const tag = reader.uint32();
38
58
  switch (tag >>> 3) {
39
- case 1:
40
- if (tag != 10) {
59
+ case 1: {
60
+ if (tag !== 10) {
41
61
  break;
42
62
  }
43
63
  message.params = Params.decode(reader, reader.uint32());
44
64
  continue;
45
- case 2:
46
- if (tag != 18) {
65
+ }
66
+ case 2: {
67
+ if (tag !== 18) {
47
68
  break;
48
69
  }
49
70
  message.tokens.push(Token.decode(reader, reader.uint32()));
50
71
  continue;
51
- case 3:
52
- if (tag != 26) {
72
+ }
73
+ case 3: {
74
+ if (tag !== 26) {
53
75
  break;
54
76
  }
55
77
  message.frozenBalances.push(Balance.decode(reader, reader.uint32()));
56
78
  continue;
57
- case 4:
58
- if (tag != 34) {
79
+ }
80
+ case 4: {
81
+ if (tag !== 34) {
59
82
  break;
60
83
  }
61
84
  message.whitelistedBalances.push(Balance.decode(reader, reader.uint32()));
62
85
  continue;
86
+ }
87
+ case 5: {
88
+ if (tag !== 42) {
89
+ break;
90
+ }
91
+ message.pendingTokenUpgrades.push(PendingTokenUpgrade.decode(reader, reader.uint32()));
92
+ continue;
93
+ }
94
+ case 6: {
95
+ if (tag !== 50) {
96
+ break;
97
+ }
98
+ message.dexLockedBalances.push(Balance.decode(reader, reader.uint32()));
99
+ continue;
100
+ }
101
+ case 7: {
102
+ if (tag !== 58) {
103
+ break;
104
+ }
105
+ message.dexExpectedToReceiveBalances.push(Balance.decode(reader, reader.uint32()));
106
+ continue;
107
+ }
108
+ case 8: {
109
+ if (tag !== 66) {
110
+ break;
111
+ }
112
+ message.dexSettings.push(DEXSettingsWithDenom.decode(reader, reader.uint32()));
113
+ continue;
114
+ }
63
115
  }
64
- if ((tag & 7) == 4 || tag == 0) {
116
+ if ((tag & 7) === 4 || tag === 0) {
65
117
  break;
66
118
  }
67
- reader.skipType(tag & 7);
119
+ reader.skip(tag & 7);
68
120
  }
69
121
  return message;
70
122
  },
71
123
  fromJSON(object) {
72
124
  return {
73
125
  params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
74
- tokens: Array.isArray(object?.tokens)
126
+ tokens: globalThis.Array.isArray(object?.tokens)
75
127
  ? object.tokens.map((e) => Token.fromJSON(e))
76
128
  : [],
77
- frozenBalances: Array.isArray(object?.frozenBalances)
129
+ frozenBalances: globalThis.Array.isArray(object?.frozenBalances)
78
130
  ? object.frozenBalances.map((e) => Balance.fromJSON(e))
79
131
  : [],
80
- whitelistedBalances: Array.isArray(object?.whitelistedBalances)
132
+ whitelistedBalances: globalThis.Array.isArray(object?.whitelistedBalances)
81
133
  ? object.whitelistedBalances.map((e) => Balance.fromJSON(e))
82
134
  : [],
135
+ pendingTokenUpgrades: globalThis.Array.isArray(object?.pendingTokenUpgrades)
136
+ ? object.pendingTokenUpgrades.map((e) => PendingTokenUpgrade.fromJSON(e))
137
+ : [],
138
+ dexLockedBalances: globalThis.Array.isArray(object?.dexLockedBalances)
139
+ ? object.dexLockedBalances.map((e) => Balance.fromJSON(e))
140
+ : [],
141
+ dexExpectedToReceiveBalances: globalThis.Array.isArray(object?.dexExpectedToReceiveBalances)
142
+ ? object.dexExpectedToReceiveBalances.map((e) => Balance.fromJSON(e))
143
+ : [],
144
+ dexSettings: globalThis.Array.isArray(object?.dexSettings)
145
+ ? object.dexSettings.map((e) => DEXSettingsWithDenom.fromJSON(e))
146
+ : [],
83
147
  };
84
148
  },
85
149
  toJSON(message) {
86
150
  const obj = {};
87
- message.params !== undefined &&
88
- (obj.params = message.params ? Params.toJSON(message.params) : undefined);
89
- if (message.tokens) {
90
- obj.tokens = message.tokens.map((e) => (e ? Token.toJSON(e) : undefined));
151
+ if (message.params !== undefined) {
152
+ obj.params = Params.toJSON(message.params);
153
+ }
154
+ if (message.tokens?.length) {
155
+ obj.tokens = message.tokens.map((e) => Token.toJSON(e));
91
156
  }
92
- else {
93
- obj.tokens = [];
157
+ if (message.frozenBalances?.length) {
158
+ obj.frozenBalances = message.frozenBalances.map((e) => Balance.toJSON(e));
94
159
  }
95
- if (message.frozenBalances) {
96
- obj.frozenBalances = message.frozenBalances.map((e) => e ? Balance.toJSON(e) : undefined);
160
+ if (message.whitelistedBalances?.length) {
161
+ obj.whitelistedBalances = message.whitelistedBalances.map((e) => Balance.toJSON(e));
97
162
  }
98
- else {
99
- obj.frozenBalances = [];
163
+ if (message.pendingTokenUpgrades?.length) {
164
+ obj.pendingTokenUpgrades = message.pendingTokenUpgrades.map((e) => PendingTokenUpgrade.toJSON(e));
100
165
  }
101
- if (message.whitelistedBalances) {
102
- obj.whitelistedBalances = message.whitelistedBalances.map((e) => e ? Balance.toJSON(e) : undefined);
166
+ if (message.dexLockedBalances?.length) {
167
+ obj.dexLockedBalances = message.dexLockedBalances.map((e) => Balance.toJSON(e));
103
168
  }
104
- else {
105
- obj.whitelistedBalances = [];
169
+ if (message.dexExpectedToReceiveBalances?.length) {
170
+ obj.dexExpectedToReceiveBalances =
171
+ message.dexExpectedToReceiveBalances.map((e) => Balance.toJSON(e));
172
+ }
173
+ if (message.dexSettings?.length) {
174
+ obj.dexSettings = message.dexSettings.map((e) => DEXSettingsWithDenom.toJSON(e));
106
175
  }
107
176
  return obj;
108
177
  },
@@ -120,6 +189,15 @@ export const GenesisState = {
120
189
  object.frozenBalances?.map((e) => Balance.fromPartial(e)) || [];
121
190
  message.whitelistedBalances =
122
191
  object.whitelistedBalances?.map((e) => Balance.fromPartial(e)) || [];
192
+ message.pendingTokenUpgrades =
193
+ object.pendingTokenUpgrades?.map((e) => PendingTokenUpgrade.fromPartial(e)) || [];
194
+ message.dexLockedBalances =
195
+ object.dexLockedBalances?.map((e) => Balance.fromPartial(e)) || [];
196
+ message.dexExpectedToReceiveBalances =
197
+ object.dexExpectedToReceiveBalances?.map((e) => Balance.fromPartial(e)) ||
198
+ [];
199
+ message.dexSettings =
200
+ object.dexSettings?.map((e) => DEXSettingsWithDenom.fromPartial(e)) || [];
123
201
  return message;
124
202
  },
125
203
  };
@@ -127,7 +205,7 @@ function createBaseBalance() {
127
205
  return { address: "", coins: [] };
128
206
  }
129
207
  export const Balance = {
130
- encode(message, writer = _m0.Writer.create()) {
208
+ encode(message, writer = new BinaryWriter()) {
131
209
  if (message.address !== "") {
132
210
  writer.uint32(10).string(message.address);
133
211
  }
@@ -137,48 +215,49 @@ export const Balance = {
137
215
  return writer;
138
216
  },
139
217
  decode(input, length) {
140
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
218
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
141
219
  let end = length === undefined ? reader.len : reader.pos + length;
142
220
  const message = createBaseBalance();
143
221
  while (reader.pos < end) {
144
222
  const tag = reader.uint32();
145
223
  switch (tag >>> 3) {
146
- case 1:
147
- if (tag != 10) {
224
+ case 1: {
225
+ if (tag !== 10) {
148
226
  break;
149
227
  }
150
228
  message.address = reader.string();
151
229
  continue;
152
- case 2:
153
- if (tag != 18) {
230
+ }
231
+ case 2: {
232
+ if (tag !== 18) {
154
233
  break;
155
234
  }
156
235
  message.coins.push(Coin.decode(reader, reader.uint32()));
157
236
  continue;
237
+ }
158
238
  }
159
- if ((tag & 7) == 4 || tag == 0) {
239
+ if ((tag & 7) === 4 || tag === 0) {
160
240
  break;
161
241
  }
162
- reader.skipType(tag & 7);
242
+ reader.skip(tag & 7);
163
243
  }
164
244
  return message;
165
245
  },
166
246
  fromJSON(object) {
167
247
  return {
168
- address: isSet(object.address) ? String(object.address) : "",
169
- coins: Array.isArray(object?.coins)
248
+ address: isSet(object.address) ? globalThis.String(object.address) : "",
249
+ coins: globalThis.Array.isArray(object?.coins)
170
250
  ? object.coins.map((e) => Coin.fromJSON(e))
171
251
  : [],
172
252
  };
173
253
  },
174
254
  toJSON(message) {
175
255
  const obj = {};
176
- message.address !== undefined && (obj.address = message.address);
177
- if (message.coins) {
178
- obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));
256
+ if (message.address !== "") {
257
+ obj.address = message.address;
179
258
  }
180
- else {
181
- obj.coins = [];
259
+ if (message.coins?.length) {
260
+ obj.coins = message.coins.map((e) => Coin.toJSON(e));
182
261
  }
183
262
  return obj;
184
263
  },
@@ -192,10 +271,147 @@ export const Balance = {
192
271
  return message;
193
272
  },
194
273
  };
195
- if (_m0.util.Long !== Long) {
196
- _m0.util.Long = Long;
197
- _m0.configure();
274
+ function createBasePendingTokenUpgrade() {
275
+ return { denom: "", version: 0 };
276
+ }
277
+ export const PendingTokenUpgrade = {
278
+ encode(message, writer = new BinaryWriter()) {
279
+ if (message.denom !== "") {
280
+ writer.uint32(10).string(message.denom);
281
+ }
282
+ if (message.version !== 0) {
283
+ writer.uint32(16).uint32(message.version);
284
+ }
285
+ return writer;
286
+ },
287
+ decode(input, length) {
288
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
289
+ let end = length === undefined ? reader.len : reader.pos + length;
290
+ const message = createBasePendingTokenUpgrade();
291
+ while (reader.pos < end) {
292
+ const tag = reader.uint32();
293
+ switch (tag >>> 3) {
294
+ case 1: {
295
+ if (tag !== 10) {
296
+ break;
297
+ }
298
+ message.denom = reader.string();
299
+ continue;
300
+ }
301
+ case 2: {
302
+ if (tag !== 16) {
303
+ break;
304
+ }
305
+ message.version = reader.uint32();
306
+ continue;
307
+ }
308
+ }
309
+ if ((tag & 7) === 4 || tag === 0) {
310
+ break;
311
+ }
312
+ reader.skip(tag & 7);
313
+ }
314
+ return message;
315
+ },
316
+ fromJSON(object) {
317
+ return {
318
+ denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
319
+ version: isSet(object.version) ? globalThis.Number(object.version) : 0,
320
+ };
321
+ },
322
+ toJSON(message) {
323
+ const obj = {};
324
+ if (message.denom !== "") {
325
+ obj.denom = message.denom;
326
+ }
327
+ if (message.version !== 0) {
328
+ obj.version = Math.round(message.version);
329
+ }
330
+ return obj;
331
+ },
332
+ create(base) {
333
+ return PendingTokenUpgrade.fromPartial(base ?? {});
334
+ },
335
+ fromPartial(object) {
336
+ const message = createBasePendingTokenUpgrade();
337
+ message.denom = object.denom ?? "";
338
+ message.version = object.version ?? 0;
339
+ return message;
340
+ },
341
+ };
342
+ function createBaseDEXSettingsWithDenom() {
343
+ return { denom: "", dexSettings: undefined };
198
344
  }
345
+ export const DEXSettingsWithDenom = {
346
+ encode(message, writer = new BinaryWriter()) {
347
+ if (message.denom !== "") {
348
+ writer.uint32(10).string(message.denom);
349
+ }
350
+ if (message.dexSettings !== undefined) {
351
+ DEXSettings.encode(message.dexSettings, writer.uint32(18).fork()).ldelim();
352
+ }
353
+ return writer;
354
+ },
355
+ decode(input, length) {
356
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
357
+ let end = length === undefined ? reader.len : reader.pos + length;
358
+ const message = createBaseDEXSettingsWithDenom();
359
+ while (reader.pos < end) {
360
+ const tag = reader.uint32();
361
+ switch (tag >>> 3) {
362
+ case 1: {
363
+ if (tag !== 10) {
364
+ break;
365
+ }
366
+ message.denom = reader.string();
367
+ continue;
368
+ }
369
+ case 2: {
370
+ if (tag !== 18) {
371
+ break;
372
+ }
373
+ message.dexSettings = DEXSettings.decode(reader, reader.uint32());
374
+ continue;
375
+ }
376
+ }
377
+ if ((tag & 7) === 4 || tag === 0) {
378
+ break;
379
+ }
380
+ reader.skip(tag & 7);
381
+ }
382
+ return message;
383
+ },
384
+ fromJSON(object) {
385
+ return {
386
+ denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
387
+ dexSettings: isSet(object.dexSettings)
388
+ ? DEXSettings.fromJSON(object.dexSettings)
389
+ : undefined,
390
+ };
391
+ },
392
+ toJSON(message) {
393
+ const obj = {};
394
+ if (message.denom !== "") {
395
+ obj.denom = message.denom;
396
+ }
397
+ if (message.dexSettings !== undefined) {
398
+ obj.dexSettings = DEXSettings.toJSON(message.dexSettings);
399
+ }
400
+ return obj;
401
+ },
402
+ create(base) {
403
+ return DEXSettingsWithDenom.fromPartial(base ?? {});
404
+ },
405
+ fromPartial(object) {
406
+ const message = createBaseDEXSettingsWithDenom();
407
+ message.denom = object.denom ?? "";
408
+ message.dexSettings =
409
+ object.dexSettings !== undefined && object.dexSettings !== null
410
+ ? DEXSettings.fromPartial(object.dexSettings)
411
+ : undefined;
412
+ return message;
413
+ },
414
+ };
199
415
  function isSet(value) {
200
416
  return value !== null && value !== undefined;
201
417
  }
@@ -1,6 +1,6 @@
1
- import _m0 from "protobufjs/minimal";
1
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
2
2
  import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
3
- import { Duration } from "../../../../google/protobuf/duration";
3
+ import { Duration } from "cosmjs-types/google/protobuf/duration";
4
4
  export declare const protobufPackage = "coreum.asset.ft.v1";
5
5
  /** Params store gov manageable parameters. */
6
6
  export interface Params {
@@ -11,68 +11,9 @@ export interface Params {
11
11
  /** token_upgrade_grace_period the period after which the token upgrade is executed effectively. */
12
12
  tokenUpgradeGracePeriod: Duration | undefined;
13
13
  }
14
- export declare const Params: {
15
- encode(message: Params, writer?: _m0.Writer): _m0.Writer;
16
- decode(input: _m0.Reader | Uint8Array, length?: number): Params;
17
- fromJSON(object: any): Params;
18
- toJSON(message: Params): unknown;
19
- create<I extends {
20
- issueFee?: {
21
- denom?: string;
22
- amount?: string;
23
- };
24
- tokenUpgradeDecisionTimeout?: Date | undefined;
25
- tokenUpgradeGracePeriod?: {
26
- seconds?: number;
27
- nanos?: number;
28
- };
29
- } & {
30
- issueFee?: {
31
- denom?: string;
32
- amount?: string;
33
- } & {
34
- denom?: string;
35
- amount?: string;
36
- } & { [K in Exclude<keyof I["issueFee"], keyof Coin>]: never; };
37
- tokenUpgradeDecisionTimeout?: Date | undefined;
38
- tokenUpgradeGracePeriod?: {
39
- seconds?: number;
40
- nanos?: number;
41
- } & {
42
- seconds?: number;
43
- nanos?: number;
44
- } & { [K_1 in Exclude<keyof I["tokenUpgradeGracePeriod"], keyof Duration>]: never; };
45
- } & { [K_2 in Exclude<keyof I, keyof Params>]: never; }>(base?: I): Params;
46
- fromPartial<I_1 extends {
47
- issueFee?: {
48
- denom?: string;
49
- amount?: string;
50
- };
51
- tokenUpgradeDecisionTimeout?: Date | undefined;
52
- tokenUpgradeGracePeriod?: {
53
- seconds?: number;
54
- nanos?: number;
55
- };
56
- } & {
57
- issueFee?: {
58
- denom?: string;
59
- amount?: string;
60
- } & {
61
- denom?: string;
62
- amount?: string;
63
- } & { [K_3 in Exclude<keyof I_1["issueFee"], keyof Coin>]: never; };
64
- tokenUpgradeDecisionTimeout?: Date | undefined;
65
- tokenUpgradeGracePeriod?: {
66
- seconds?: number;
67
- nanos?: number;
68
- } & {
69
- seconds?: number;
70
- nanos?: number;
71
- } & { [K_4 in Exclude<keyof I_1["tokenUpgradeGracePeriod"], keyof Duration>]: never; };
72
- } & { [K_5 in Exclude<keyof I_1, keyof Params>]: never; }>(object: I_1): Params;
73
- };
14
+ export declare const Params: MessageFns<Params>;
74
15
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
75
- export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
16
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
76
17
  [K in keyof T]?: DeepPartial<T[K]>;
77
18
  } : Partial<T>;
78
19
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -81,4 +22,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
81
22
  } & {
82
23
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
83
24
  };
25
+ export interface MessageFns<T> {
26
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
27
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
28
+ fromJSON(object: any): T;
29
+ toJSON(message: T): unknown;
30
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
31
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
32
+ }
84
33
  export {};
@@ -1,8 +1,13 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.0
4
+ // protoc v3.21.12
5
+ // source: coreum-protos/ft/params.proto
1
6
  /* eslint-disable */
2
- import _m0 from "protobufjs/minimal";
7
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
3
8
  import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
4
- import { Duration } from "../../../../google/protobuf/duration";
5
- import { Timestamp } from "../../../../google/protobuf/timestamp";
9
+ import { Duration } from "cosmjs-types/google/protobuf/duration";
10
+ import { Timestamp } from "cosmjs-types/google/protobuf/timestamp";
6
11
  export const protobufPackage = "coreum.asset.ft.v1";
7
12
  function createBaseParams() {
8
13
  return {
@@ -12,7 +17,7 @@ function createBaseParams() {
12
17
  };
13
18
  }
14
19
  export const Params = {
15
- encode(message, writer = _m0.Writer.create()) {
20
+ encode(message, writer = new BinaryWriter()) {
16
21
  if (message.issueFee !== undefined) {
17
22
  Coin.encode(message.issueFee, writer.uint32(10).fork()).ldelim();
18
23
  }
@@ -25,35 +30,38 @@ export const Params = {
25
30
  return writer;
26
31
  },
27
32
  decode(input, length) {
28
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
33
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
29
34
  let end = length === undefined ? reader.len : reader.pos + length;
30
35
  const message = createBaseParams();
31
36
  while (reader.pos < end) {
32
37
  const tag = reader.uint32();
33
38
  switch (tag >>> 3) {
34
- case 1:
39
+ case 1: {
35
40
  if (tag !== 10) {
36
41
  break;
37
42
  }
38
43
  message.issueFee = Coin.decode(reader, reader.uint32());
39
44
  continue;
40
- case 2:
45
+ }
46
+ case 2: {
41
47
  if (tag !== 18) {
42
48
  break;
43
49
  }
44
50
  message.tokenUpgradeDecisionTimeout = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
45
51
  continue;
46
- case 3:
52
+ }
53
+ case 3: {
47
54
  if (tag !== 26) {
48
55
  break;
49
56
  }
50
57
  message.tokenUpgradeGracePeriod = Duration.decode(reader, reader.uint32());
51
58
  continue;
59
+ }
52
60
  }
53
61
  if ((tag & 7) === 4 || tag === 0) {
54
62
  break;
55
63
  }
56
- reader.skipType(tag & 7);
64
+ reader.skip(tag & 7);
57
65
  }
58
66
  return message;
59
67
  },
@@ -72,17 +80,16 @@ export const Params = {
72
80
  },
73
81
  toJSON(message) {
74
82
  const obj = {};
75
- message.issueFee !== undefined &&
76
- (obj.issueFee = message.issueFee
77
- ? Coin.toJSON(message.issueFee)
78
- : undefined);
79
- message.tokenUpgradeDecisionTimeout !== undefined &&
80
- (obj.tokenUpgradeDecisionTimeout =
81
- message.tokenUpgradeDecisionTimeout.toISOString());
82
- message.tokenUpgradeGracePeriod !== undefined &&
83
- (obj.tokenUpgradeGracePeriod = message.tokenUpgradeGracePeriod
84
- ? Duration.toJSON(message.tokenUpgradeGracePeriod)
85
- : undefined);
83
+ if (message.issueFee !== undefined) {
84
+ obj.issueFee = Coin.toJSON(message.issueFee);
85
+ }
86
+ if (message.tokenUpgradeDecisionTimeout !== undefined) {
87
+ obj.tokenUpgradeDecisionTimeout =
88
+ message.tokenUpgradeDecisionTimeout.toISOString();
89
+ }
90
+ if (message.tokenUpgradeGracePeriod !== undefined) {
91
+ obj.tokenUpgradeGracePeriod = Duration.toJSON(message.tokenUpgradeGracePeriod);
92
+ }
86
93
  return obj;
87
94
  },
88
95
  create(base) {
@@ -105,21 +112,22 @@ export const Params = {
105
112
  },
106
113
  };
107
114
  function toTimestamp(date) {
108
- const seconds = date.getTime() / 1_000;
115
+ const seconds = Math.trunc(date.getTime() / 1_000);
109
116
  const nanos = (date.getTime() % 1_000) * 1_000_000;
110
- return { seconds, nanos };
117
+ return { seconds: BigInt(seconds), nanos };
111
118
  }
112
119
  function fromTimestamp(t) {
113
- let millis = (t.seconds || 0) * 1_000;
114
- millis += (t.nanos || 0) / 1_000_000;
115
- return new Date(millis);
120
+ const seconds = BigInt(t.seconds || 0);
121
+ const nanos = BigInt(t.nanos || 0);
122
+ const millis = seconds * BigInt(1_000) + nanos / BigInt(1_000_000);
123
+ return new Date(Number(millis)); // Convert bigint to number
116
124
  }
117
125
  function fromJsonTimestamp(o) {
118
- if (o instanceof Date) {
126
+ if (o instanceof globalThis.Date) {
119
127
  return o;
120
128
  }
121
129
  else if (typeof o === "string") {
122
- return new Date(o);
130
+ return new globalThis.Date(o);
123
131
  }
124
132
  else {
125
133
  return fromTimestamp(Timestamp.fromJSON(o));