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.
- package/dist/main/client/index.js +16 -17
- package/dist/main/coreum/asset/ft/v1/authz.d.ts +38 -0
- package/dist/main/coreum/asset/ft/v1/authz.js +122 -0
- package/dist/main/coreum/asset/ft/v1/event.d.ts +52 -120
- package/dist/main/coreum/asset/ft/v1/event.js +744 -138
- package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -517
- package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
- package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -63
- package/dist/main/coreum/asset/ft/v1/params.js +37 -33
- package/dist/main/coreum/asset/ft/v1/query.d.ts +86 -1950
- package/dist/main/coreum/asset/ft/v1/query.js +697 -217
- package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -249
- package/dist/main/coreum/asset/ft/v1/token.js +273 -197
- package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -755
- package/dist/main/coreum/asset/ft/v1/tx.js +502 -386
- package/dist/main/coreum/asset/index.d.ts +2 -3
- package/dist/main/coreum/asset/nft/v1/authz.d.ts +33 -0
- package/dist/main/coreum/asset/nft/v1/authz.js +137 -0
- package/dist/main/coreum/asset/nft/v1/event.d.ts +35 -147
- package/dist/main/coreum/asset/nft/v1/event.js +475 -147
- package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -286
- package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
- package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -108
- package/dist/main/coreum/asset/nft/v1/nft.js +136 -101
- package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -38
- package/dist/main/coreum/asset/nft/v1/params.js +17 -20
- package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -706
- package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
- package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -266
- package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
- package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -19
- package/dist/main/coreum/asset/nft/v1/types.js +273 -45
- package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -32
- package/dist/main/coreum/customparams/v1/genesis.js +26 -22
- package/dist/main/coreum/customparams/v1/params.d.ts +11 -19
- package/dist/main/coreum/customparams/v1/params.js +23 -20
- package/dist/main/coreum/customparams/v1/query.d.ts +14 -40
- package/dist/main/coreum/customparams/v1/query.js +35 -29
- package/dist/main/coreum/dex/index.d.ts +1 -0
- package/dist/main/coreum/dex/index.js +12 -0
- package/dist/main/coreum/dex/v1/event.d.ts +73 -0
- package/dist/main/coreum/dex/v1/event.js +470 -0
- package/dist/main/coreum/dex/v1/genesis.d.ts +49 -0
- package/dist/main/coreum/dex/v1/genesis.js +318 -0
- package/dist/main/coreum/dex/v1/order.d.ts +172 -0
- package/dist/main/coreum/dex/v1/order.js +1137 -0
- package/dist/main/coreum/dex/v1/params.d.ts +34 -0
- package/dist/main/coreum/dex/v1/params.js +139 -0
- package/dist/main/coreum/dex/v1/query.d.ts +133 -0
- package/dist/main/coreum/dex/v1/query.js +873 -0
- package/dist/main/coreum/dex/v1/tx.d.ts +102 -0
- package/dist/main/coreum/dex/v1/tx.js +521 -0
- package/dist/main/coreum/extensions/dex.d.ts +12 -0
- package/dist/main/coreum/extensions/dex.js +32 -0
- package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -233
- package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
- package/dist/main/coreum/feemodel/v1/params.d.ts +14 -337
- package/dist/main/coreum/feemodel/v1/params.js +113 -66
- package/dist/main/coreum/feemodel/v1/query.d.ts +30 -261
- package/dist/main/coreum/feemodel/v1/query.js +196 -43
- package/dist/main/coreum/index.d.ts +46 -0
- package/dist/main/coreum/index.js +58 -1
- package/dist/main/coreum/nft/index.d.ts +1 -2
- package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -79
- package/dist/main/coreum/nft/v1beta1/event.js +103 -77
- package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -435
- package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
- package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -114
- package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
- package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -1628
- package/dist/main/coreum/nft/v1beta1/query.js +259 -223
- package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -39
- package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
- package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/main/cosmos/extensions/distribution.js +9 -9
- package/dist/main/cosmos/extensions/gov.d.ts +13 -13
- package/dist/main/cosmos/extensions/gov.js +14 -8
- package/dist/main/cosmos/index.d.ts +8 -8
- package/dist/main/google/api/http.js +18 -21
- package/dist/main/google/protobuf/any.js +3 -4
- package/dist/main/google/protobuf/duration.js +3 -4
- package/dist/main/google/protobuf/timestamp.js +3 -4
- package/dist/main/services/cosmostation.js +1 -1
- package/dist/main/tendermint/abci/types.js +183 -223
- package/dist/main/tendermint/crypto/keys.js +3 -4
- package/dist/main/tendermint/crypto/proof.js +19 -24
- package/dist/main/tendermint/types/params.js +15 -20
- package/dist/main/tendermint/types/types.js +57 -68
- package/dist/main/tendermint/types/validator.js +10 -13
- package/dist/main/tendermint/version/types.js +6 -8
- package/dist/main/types/core.d.ts +2 -1
- package/dist/main/types/core.js +2 -0
- package/dist/main/wasm/v1/authz.d.ts +20 -471
- package/dist/main/wasm/v1/authz.js +129 -148
- package/dist/main/wasm/v1/genesis.d.ts +14 -1020
- package/dist/main/wasm/v1/genesis.js +169 -140
- package/dist/main/wasm/v1/ibc.d.ts +13 -62
- package/dist/main/wasm/v1/ibc.js +91 -76
- package/dist/main/wasm/v1/index.d.ts +1 -2
- package/dist/main/wasm/v1/pagination.js +9 -11
- package/dist/main/wasm/v1/proposal.d.ts +23 -720
- package/dist/main/wasm/v1/proposal.js +634 -465
- package/dist/main/wasm/v1/query.d.ts +35 -1201
- package/dist/main/wasm/v1/query.js +370 -363
- package/dist/main/wasm/v1/tx.d.ts +37 -788
- package/dist/main/wasm/v1/tx.js +621 -497
- package/dist/main/wasm/v1/types.d.ts +19 -297
- package/dist/main/wasm/v1/types.js +219 -190
- package/dist/module/client/index.js +4 -3
- package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
- package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
- package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -120
- package/dist/module/coreum/asset/ft/v1/event.js +721 -109
- package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -517
- package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
- package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -63
- package/dist/module/coreum/asset/ft/v1/params.js +35 -27
- package/dist/module/coreum/asset/ft/v1/query.d.ts +86 -1950
- package/dist/module/coreum/asset/ft/v1/query.js +672 -180
- package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -249
- package/dist/module/coreum/asset/ft/v1/token.js +236 -152
- package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -755
- package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
- package/dist/module/coreum/asset/index.d.ts +2 -3
- package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
- package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
- package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -147
- package/dist/module/coreum/asset/nft/v1/event.js +448 -112
- package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -286
- package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
- package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -108
- package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
- package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -38
- package/dist/module/coreum/asset/nft/v1/params.js +16 -16
- package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -706
- package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
- package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -266
- package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
- package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -19
- package/dist/module/coreum/asset/nft/v1/types.js +269 -39
- package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -32
- package/dist/module/coreum/customparams/v1/genesis.js +25 -18
- package/dist/module/coreum/customparams/v1/params.d.ts +11 -19
- package/dist/module/coreum/customparams/v1/params.js +21 -14
- package/dist/module/coreum/customparams/v1/query.d.ts +14 -40
- package/dist/module/coreum/customparams/v1/query.js +32 -23
- package/dist/module/coreum/dex/index.d.ts +1 -0
- package/dist/module/coreum/dex/index.js +9 -0
- package/dist/module/coreum/dex/v1/event.d.ts +73 -0
- package/dist/module/coreum/dex/v1/event.js +467 -0
- package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
- package/dist/module/coreum/dex/v1/genesis.js +315 -0
- package/dist/module/coreum/dex/v1/order.d.ts +172 -0
- package/dist/module/coreum/dex/v1/order.js +1128 -0
- package/dist/module/coreum/dex/v1/params.d.ts +34 -0
- package/dist/module/coreum/dex/v1/params.js +136 -0
- package/dist/module/coreum/dex/v1/query.d.ts +133 -0
- package/dist/module/coreum/dex/v1/query.js +871 -0
- package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
- package/dist/module/coreum/dex/v1/tx.js +519 -0
- package/dist/module/coreum/extensions/dex.d.ts +12 -0
- package/dist/module/coreum/extensions/dex.js +28 -0
- package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -233
- package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
- package/dist/module/coreum/feemodel/v1/params.d.ts +14 -337
- package/dist/module/coreum/feemodel/v1/params.js +105 -54
- package/dist/module/coreum/feemodel/v1/query.d.ts +30 -261
- package/dist/module/coreum/feemodel/v1/query.js +191 -35
- package/dist/module/coreum/index.d.ts +46 -0
- package/dist/module/coreum/index.js +57 -0
- package/dist/module/coreum/nft/index.d.ts +1 -2
- package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -79
- package/dist/module/coreum/nft/v1beta1/event.js +90 -58
- package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -435
- package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
- package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -114
- package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
- package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -1628
- package/dist/module/coreum/nft/v1beta1/query.js +231 -183
- package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -39
- package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
- package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/module/cosmos/extensions/gov.d.ts +13 -13
- package/dist/module/cosmos/index.d.ts +8 -8
- package/dist/module/services/cosmostation.js +1 -1
- package/dist/module/types/core.d.ts +2 -1
- package/dist/module/types/core.js +2 -0
- package/dist/module/wasm/v1/authz.d.ts +20 -471
- package/dist/module/wasm/v1/authz.js +111 -119
- package/dist/module/wasm/v1/genesis.d.ts +14 -1020
- package/dist/module/wasm/v1/genesis.js +161 -125
- package/dist/module/wasm/v1/ibc.d.ts +13 -62
- package/dist/module/wasm/v1/ibc.js +83 -62
- package/dist/module/wasm/v1/index.d.ts +1 -2
- package/dist/module/wasm/v1/proposal.d.ts +23 -720
- package/dist/module/wasm/v1/proposal.js +562 -377
- package/dist/module/wasm/v1/query.d.ts +35 -1201
- package/dist/module/wasm/v1/query.js +330 -301
- package/dist/module/wasm/v1/tx.d.ts +37 -788
- package/dist/module/wasm/v1/tx.js +551 -404
- package/dist/module/wasm/v1/types.d.ts +19 -297
- package/dist/module/wasm/v1/types.js +196 -156
- package/package.json +11 -10
|
@@ -1,6 +1,11 @@
|
|
|
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/token.proto
|
|
1
6
|
/* eslint-disable */
|
|
2
|
-
import
|
|
3
|
-
import { Timestamp } from "
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
|
|
8
|
+
import { Timestamp } from "cosmjs-types/google/protobuf/timestamp";
|
|
4
9
|
export const protobufPackage = "coreum.asset.ft.v1";
|
|
5
10
|
/** Feature defines possible features of fungible token. */
|
|
6
11
|
export var Feature;
|
|
@@ -109,7 +114,7 @@ function createBaseDefinition() {
|
|
|
109
114
|
};
|
|
110
115
|
}
|
|
111
116
|
export const Definition = {
|
|
112
|
-
encode(message, writer =
|
|
117
|
+
encode(message, writer = new BinaryWriter()) {
|
|
113
118
|
if (message.denom !== "") {
|
|
114
119
|
writer.uint32(10).string(message.denom);
|
|
115
120
|
}
|
|
@@ -145,25 +150,27 @@ export const Definition = {
|
|
|
145
150
|
return writer;
|
|
146
151
|
},
|
|
147
152
|
decode(input, length) {
|
|
148
|
-
const reader = input instanceof
|
|
153
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
149
154
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
150
155
|
const message = createBaseDefinition();
|
|
151
156
|
while (reader.pos < end) {
|
|
152
157
|
const tag = reader.uint32();
|
|
153
158
|
switch (tag >>> 3) {
|
|
154
|
-
case 1:
|
|
159
|
+
case 1: {
|
|
155
160
|
if (tag !== 10) {
|
|
156
161
|
break;
|
|
157
162
|
}
|
|
158
163
|
message.denom = reader.string();
|
|
159
164
|
continue;
|
|
160
|
-
|
|
165
|
+
}
|
|
166
|
+
case 2: {
|
|
161
167
|
if (tag !== 18) {
|
|
162
168
|
break;
|
|
163
169
|
}
|
|
164
170
|
message.issuer = reader.string();
|
|
165
171
|
continue;
|
|
166
|
-
|
|
172
|
+
}
|
|
173
|
+
case 3: {
|
|
167
174
|
if (tag === 24) {
|
|
168
175
|
message.features.push(reader.int32());
|
|
169
176
|
continue;
|
|
@@ -176,96 +183,118 @@ export const Definition = {
|
|
|
176
183
|
continue;
|
|
177
184
|
}
|
|
178
185
|
break;
|
|
179
|
-
|
|
186
|
+
}
|
|
187
|
+
case 4: {
|
|
180
188
|
if (tag !== 34) {
|
|
181
189
|
break;
|
|
182
190
|
}
|
|
183
191
|
message.burnRate = reader.string();
|
|
184
192
|
continue;
|
|
185
|
-
|
|
193
|
+
}
|
|
194
|
+
case 5: {
|
|
186
195
|
if (tag !== 42) {
|
|
187
196
|
break;
|
|
188
197
|
}
|
|
189
198
|
message.sendCommissionRate = reader.string();
|
|
190
199
|
continue;
|
|
191
|
-
|
|
200
|
+
}
|
|
201
|
+
case 6: {
|
|
192
202
|
if (tag !== 48) {
|
|
193
203
|
break;
|
|
194
204
|
}
|
|
195
205
|
message.version = reader.uint32();
|
|
196
206
|
continue;
|
|
197
|
-
|
|
207
|
+
}
|
|
208
|
+
case 7: {
|
|
198
209
|
if (tag !== 58) {
|
|
199
210
|
break;
|
|
200
211
|
}
|
|
201
212
|
message.uri = reader.string();
|
|
202
213
|
continue;
|
|
203
|
-
|
|
214
|
+
}
|
|
215
|
+
case 8: {
|
|
204
216
|
if (tag !== 66) {
|
|
205
217
|
break;
|
|
206
218
|
}
|
|
207
219
|
message.uriHash = reader.string();
|
|
208
220
|
continue;
|
|
209
|
-
|
|
221
|
+
}
|
|
222
|
+
case 9: {
|
|
210
223
|
if (tag !== 74) {
|
|
211
224
|
break;
|
|
212
225
|
}
|
|
213
226
|
message.extensionCwAddress = reader.string();
|
|
214
227
|
continue;
|
|
215
|
-
|
|
228
|
+
}
|
|
229
|
+
case 10: {
|
|
216
230
|
if (tag !== 82) {
|
|
217
231
|
break;
|
|
218
232
|
}
|
|
219
233
|
message.admin = reader.string();
|
|
220
234
|
continue;
|
|
235
|
+
}
|
|
221
236
|
}
|
|
222
237
|
if ((tag & 7) === 4 || tag === 0) {
|
|
223
238
|
break;
|
|
224
239
|
}
|
|
225
|
-
reader.
|
|
240
|
+
reader.skip(tag & 7);
|
|
226
241
|
}
|
|
227
242
|
return message;
|
|
228
243
|
},
|
|
229
244
|
fromJSON(object) {
|
|
230
245
|
return {
|
|
231
|
-
denom: isSet(object.denom) ? String(object.denom) : "",
|
|
232
|
-
issuer: isSet(object.issuer) ? String(object.issuer) : "",
|
|
233
|
-
features: Array.isArray(object?.features)
|
|
246
|
+
denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
|
|
247
|
+
issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "",
|
|
248
|
+
features: globalThis.Array.isArray(object?.features)
|
|
234
249
|
? object.features.map((e) => featureFromJSON(e))
|
|
235
250
|
: [],
|
|
236
|
-
burnRate: isSet(object.burnRate)
|
|
251
|
+
burnRate: isSet(object.burnRate)
|
|
252
|
+
? globalThis.String(object.burnRate)
|
|
253
|
+
: "",
|
|
237
254
|
sendCommissionRate: isSet(object.sendCommissionRate)
|
|
238
|
-
? String(object.sendCommissionRate)
|
|
255
|
+
? globalThis.String(object.sendCommissionRate)
|
|
239
256
|
: "",
|
|
240
|
-
version: isSet(object.version) ? Number(object.version) : 0,
|
|
241
|
-
uri: isSet(object.uri) ? String(object.uri) : "",
|
|
242
|
-
uriHash: isSet(object.uriHash) ? String(object.uriHash) : "",
|
|
257
|
+
version: isSet(object.version) ? globalThis.Number(object.version) : 0,
|
|
258
|
+
uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
|
|
259
|
+
uriHash: isSet(object.uriHash) ? globalThis.String(object.uriHash) : "",
|
|
243
260
|
extensionCwAddress: isSet(object.extensionCwAddress)
|
|
244
|
-
? String(object.extensionCwAddress)
|
|
261
|
+
? globalThis.String(object.extensionCwAddress)
|
|
245
262
|
: "",
|
|
246
|
-
admin: isSet(object.admin) ? String(object.admin) : "",
|
|
263
|
+
admin: isSet(object.admin) ? globalThis.String(object.admin) : "",
|
|
247
264
|
};
|
|
248
265
|
},
|
|
249
266
|
toJSON(message) {
|
|
250
267
|
const obj = {};
|
|
251
|
-
message.denom !==
|
|
252
|
-
|
|
253
|
-
|
|
268
|
+
if (message.denom !== "") {
|
|
269
|
+
obj.denom = message.denom;
|
|
270
|
+
}
|
|
271
|
+
if (message.issuer !== "") {
|
|
272
|
+
obj.issuer = message.issuer;
|
|
273
|
+
}
|
|
274
|
+
if (message.features?.length) {
|
|
254
275
|
obj.features = message.features.map((e) => featureToJSON(e));
|
|
255
276
|
}
|
|
256
|
-
|
|
257
|
-
obj.
|
|
258
|
-
}
|
|
259
|
-
message.
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
message.version !==
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
message.
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
message.
|
|
277
|
+
if (message.burnRate !== "") {
|
|
278
|
+
obj.burnRate = message.burnRate;
|
|
279
|
+
}
|
|
280
|
+
if (message.sendCommissionRate !== "") {
|
|
281
|
+
obj.sendCommissionRate = message.sendCommissionRate;
|
|
282
|
+
}
|
|
283
|
+
if (message.version !== 0) {
|
|
284
|
+
obj.version = Math.round(message.version);
|
|
285
|
+
}
|
|
286
|
+
if (message.uri !== "") {
|
|
287
|
+
obj.uri = message.uri;
|
|
288
|
+
}
|
|
289
|
+
if (message.uriHash !== "") {
|
|
290
|
+
obj.uriHash = message.uriHash;
|
|
291
|
+
}
|
|
292
|
+
if (message.extensionCwAddress !== "") {
|
|
293
|
+
obj.extensionCwAddress = message.extensionCwAddress;
|
|
294
|
+
}
|
|
295
|
+
if (message.admin !== "") {
|
|
296
|
+
obj.admin = message.admin;
|
|
297
|
+
}
|
|
269
298
|
return obj;
|
|
270
299
|
},
|
|
271
300
|
create(base) {
|
|
@@ -307,7 +336,7 @@ function createBaseToken() {
|
|
|
307
336
|
};
|
|
308
337
|
}
|
|
309
338
|
export const Token = {
|
|
310
|
-
encode(message, writer =
|
|
339
|
+
encode(message, writer = new BinaryWriter()) {
|
|
311
340
|
if (message.denom !== "") {
|
|
312
341
|
writer.uint32(10).string(message.denom);
|
|
313
342
|
}
|
|
@@ -326,7 +355,7 @@ export const Token = {
|
|
|
326
355
|
if (message.description !== "") {
|
|
327
356
|
writer.uint32(50).string(message.description);
|
|
328
357
|
}
|
|
329
|
-
if (message.globallyFrozen
|
|
358
|
+
if (message.globallyFrozen !== false) {
|
|
330
359
|
writer.uint32(56).bool(message.globallyFrozen);
|
|
331
360
|
}
|
|
332
361
|
writer.uint32(66).fork();
|
|
@@ -361,55 +390,62 @@ export const Token = {
|
|
|
361
390
|
return writer;
|
|
362
391
|
},
|
|
363
392
|
decode(input, length) {
|
|
364
|
-
const reader = input instanceof
|
|
393
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
365
394
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
366
395
|
const message = createBaseToken();
|
|
367
396
|
while (reader.pos < end) {
|
|
368
397
|
const tag = reader.uint32();
|
|
369
398
|
switch (tag >>> 3) {
|
|
370
|
-
case 1:
|
|
399
|
+
case 1: {
|
|
371
400
|
if (tag !== 10) {
|
|
372
401
|
break;
|
|
373
402
|
}
|
|
374
403
|
message.denom = reader.string();
|
|
375
404
|
continue;
|
|
376
|
-
|
|
405
|
+
}
|
|
406
|
+
case 2: {
|
|
377
407
|
if (tag !== 18) {
|
|
378
408
|
break;
|
|
379
409
|
}
|
|
380
410
|
message.issuer = reader.string();
|
|
381
411
|
continue;
|
|
382
|
-
|
|
412
|
+
}
|
|
413
|
+
case 3: {
|
|
383
414
|
if (tag !== 26) {
|
|
384
415
|
break;
|
|
385
416
|
}
|
|
386
417
|
message.symbol = reader.string();
|
|
387
418
|
continue;
|
|
388
|
-
|
|
419
|
+
}
|
|
420
|
+
case 4: {
|
|
389
421
|
if (tag !== 34) {
|
|
390
422
|
break;
|
|
391
423
|
}
|
|
392
424
|
message.subunit = reader.string();
|
|
393
425
|
continue;
|
|
394
|
-
|
|
426
|
+
}
|
|
427
|
+
case 5: {
|
|
395
428
|
if (tag !== 40) {
|
|
396
429
|
break;
|
|
397
430
|
}
|
|
398
431
|
message.precision = reader.uint32();
|
|
399
432
|
continue;
|
|
400
|
-
|
|
433
|
+
}
|
|
434
|
+
case 6: {
|
|
401
435
|
if (tag !== 50) {
|
|
402
436
|
break;
|
|
403
437
|
}
|
|
404
438
|
message.description = reader.string();
|
|
405
439
|
continue;
|
|
406
|
-
|
|
440
|
+
}
|
|
441
|
+
case 7: {
|
|
407
442
|
if (tag !== 56) {
|
|
408
443
|
break;
|
|
409
444
|
}
|
|
410
445
|
message.globallyFrozen = reader.bool();
|
|
411
446
|
continue;
|
|
412
|
-
|
|
447
|
+
}
|
|
448
|
+
case 8: {
|
|
413
449
|
if (tag === 64) {
|
|
414
450
|
message.features.push(reader.int32());
|
|
415
451
|
continue;
|
|
@@ -422,87 +458,102 @@ export const Token = {
|
|
|
422
458
|
continue;
|
|
423
459
|
}
|
|
424
460
|
break;
|
|
425
|
-
|
|
461
|
+
}
|
|
462
|
+
case 9: {
|
|
426
463
|
if (tag !== 74) {
|
|
427
464
|
break;
|
|
428
465
|
}
|
|
429
466
|
message.burnRate = reader.string();
|
|
430
467
|
continue;
|
|
431
|
-
|
|
468
|
+
}
|
|
469
|
+
case 10: {
|
|
432
470
|
if (tag !== 82) {
|
|
433
471
|
break;
|
|
434
472
|
}
|
|
435
473
|
message.sendCommissionRate = reader.string();
|
|
436
474
|
continue;
|
|
437
|
-
|
|
475
|
+
}
|
|
476
|
+
case 11: {
|
|
438
477
|
if (tag !== 88) {
|
|
439
478
|
break;
|
|
440
479
|
}
|
|
441
480
|
message.version = reader.uint32();
|
|
442
481
|
continue;
|
|
443
|
-
|
|
482
|
+
}
|
|
483
|
+
case 12: {
|
|
444
484
|
if (tag !== 98) {
|
|
445
485
|
break;
|
|
446
486
|
}
|
|
447
487
|
message.uri = reader.string();
|
|
448
488
|
continue;
|
|
449
|
-
|
|
489
|
+
}
|
|
490
|
+
case 13: {
|
|
450
491
|
if (tag !== 106) {
|
|
451
492
|
break;
|
|
452
493
|
}
|
|
453
494
|
message.uriHash = reader.string();
|
|
454
495
|
continue;
|
|
455
|
-
|
|
496
|
+
}
|
|
497
|
+
case 14: {
|
|
456
498
|
if (tag !== 114) {
|
|
457
499
|
break;
|
|
458
500
|
}
|
|
459
501
|
message.extensionCwAddress = reader.string();
|
|
460
502
|
continue;
|
|
461
|
-
|
|
503
|
+
}
|
|
504
|
+
case 15: {
|
|
462
505
|
if (tag !== 122) {
|
|
463
506
|
break;
|
|
464
507
|
}
|
|
465
508
|
message.admin = reader.string();
|
|
466
509
|
continue;
|
|
467
|
-
|
|
510
|
+
}
|
|
511
|
+
case 16: {
|
|
468
512
|
if (tag !== 130) {
|
|
469
513
|
break;
|
|
470
514
|
}
|
|
471
515
|
message.dexSettings = DEXSettings.decode(reader, reader.uint32());
|
|
472
516
|
continue;
|
|
517
|
+
}
|
|
473
518
|
}
|
|
474
519
|
if ((tag & 7) === 4 || tag === 0) {
|
|
475
520
|
break;
|
|
476
521
|
}
|
|
477
|
-
reader.
|
|
522
|
+
reader.skip(tag & 7);
|
|
478
523
|
}
|
|
479
524
|
return message;
|
|
480
525
|
},
|
|
481
526
|
fromJSON(object) {
|
|
482
527
|
return {
|
|
483
|
-
denom: isSet(object.denom) ? String(object.denom) : "",
|
|
484
|
-
issuer: isSet(object.issuer) ? String(object.issuer) : "",
|
|
485
|
-
symbol: isSet(object.symbol) ? String(object.symbol) : "",
|
|
486
|
-
subunit: isSet(object.subunit) ? String(object.subunit) : "",
|
|
487
|
-
precision: isSet(object.precision)
|
|
488
|
-
|
|
528
|
+
denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
|
|
529
|
+
issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "",
|
|
530
|
+
symbol: isSet(object.symbol) ? globalThis.String(object.symbol) : "",
|
|
531
|
+
subunit: isSet(object.subunit) ? globalThis.String(object.subunit) : "",
|
|
532
|
+
precision: isSet(object.precision)
|
|
533
|
+
? globalThis.Number(object.precision)
|
|
534
|
+
: 0,
|
|
535
|
+
description: isSet(object.description)
|
|
536
|
+
? globalThis.String(object.description)
|
|
537
|
+
: "",
|
|
489
538
|
globallyFrozen: isSet(object.globallyFrozen)
|
|
490
|
-
? Boolean(object.globallyFrozen)
|
|
539
|
+
? globalThis.Boolean(object.globallyFrozen)
|
|
491
540
|
: false,
|
|
492
|
-
features: Array.isArray(object?.features)
|
|
541
|
+
features: globalThis.Array.isArray(object?.features)
|
|
493
542
|
? object.features.map((e) => featureFromJSON(e))
|
|
494
543
|
: [],
|
|
495
|
-
burnRate: isSet(object.burnRate)
|
|
544
|
+
burnRate: isSet(object.burnRate)
|
|
545
|
+
? globalThis.String(object.burnRate)
|
|
546
|
+
: "",
|
|
496
547
|
sendCommissionRate: isSet(object.sendCommissionRate)
|
|
497
|
-
? String(object.sendCommissionRate)
|
|
548
|
+
? globalThis.String(object.sendCommissionRate)
|
|
498
549
|
: "",
|
|
499
|
-
version: isSet(object.version) ? Number(object.version) : 0,
|
|
500
|
-
uri: isSet(object.uri) ? String(object.uri) : "",
|
|
501
|
-
uriHash: isSet(object.uriHash) ? String(object.uriHash) : "",
|
|
550
|
+
version: isSet(object.version) ? globalThis.Number(object.version) : 0,
|
|
551
|
+
uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
|
|
552
|
+
uriHash: isSet(object.uriHash) ? globalThis.String(object.uriHash) : "",
|
|
502
553
|
extensionCwAddress: isSet(object.extensionCwAddress)
|
|
503
|
-
? String(object.extensionCwAddress)
|
|
554
|
+
? globalThis.String(object.extensionCwAddress)
|
|
504
555
|
: "",
|
|
505
|
-
admin: isSet(object.admin) ? String(object.admin) : "",
|
|
556
|
+
admin: isSet(object.admin) ? globalThis.String(object.admin) : "",
|
|
506
557
|
dexSettings: isSet(object.dexSettings)
|
|
507
558
|
? DEXSettings.fromJSON(object.dexSettings)
|
|
508
559
|
: undefined,
|
|
@@ -510,36 +561,54 @@ export const Token = {
|
|
|
510
561
|
},
|
|
511
562
|
toJSON(message) {
|
|
512
563
|
const obj = {};
|
|
513
|
-
message.denom !==
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
message.
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
message.
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
564
|
+
if (message.denom !== "") {
|
|
565
|
+
obj.denom = message.denom;
|
|
566
|
+
}
|
|
567
|
+
if (message.issuer !== "") {
|
|
568
|
+
obj.issuer = message.issuer;
|
|
569
|
+
}
|
|
570
|
+
if (message.symbol !== "") {
|
|
571
|
+
obj.symbol = message.symbol;
|
|
572
|
+
}
|
|
573
|
+
if (message.subunit !== "") {
|
|
574
|
+
obj.subunit = message.subunit;
|
|
575
|
+
}
|
|
576
|
+
if (message.precision !== 0) {
|
|
577
|
+
obj.precision = Math.round(message.precision);
|
|
578
|
+
}
|
|
579
|
+
if (message.description !== "") {
|
|
580
|
+
obj.description = message.description;
|
|
581
|
+
}
|
|
582
|
+
if (message.globallyFrozen !== false) {
|
|
583
|
+
obj.globallyFrozen = message.globallyFrozen;
|
|
584
|
+
}
|
|
585
|
+
if (message.features?.length) {
|
|
524
586
|
obj.features = message.features.map((e) => featureToJSON(e));
|
|
525
587
|
}
|
|
526
|
-
|
|
527
|
-
obj.
|
|
528
|
-
}
|
|
529
|
-
message.
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
message.version !==
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
message.
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
message.
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
588
|
+
if (message.burnRate !== "") {
|
|
589
|
+
obj.burnRate = message.burnRate;
|
|
590
|
+
}
|
|
591
|
+
if (message.sendCommissionRate !== "") {
|
|
592
|
+
obj.sendCommissionRate = message.sendCommissionRate;
|
|
593
|
+
}
|
|
594
|
+
if (message.version !== 0) {
|
|
595
|
+
obj.version = Math.round(message.version);
|
|
596
|
+
}
|
|
597
|
+
if (message.uri !== "") {
|
|
598
|
+
obj.uri = message.uri;
|
|
599
|
+
}
|
|
600
|
+
if (message.uriHash !== "") {
|
|
601
|
+
obj.uriHash = message.uriHash;
|
|
602
|
+
}
|
|
603
|
+
if (message.extensionCwAddress !== "") {
|
|
604
|
+
obj.extensionCwAddress = message.extensionCwAddress;
|
|
605
|
+
}
|
|
606
|
+
if (message.admin !== "") {
|
|
607
|
+
obj.admin = message.admin;
|
|
608
|
+
}
|
|
609
|
+
if (message.dexSettings !== undefined) {
|
|
610
|
+
obj.dexSettings = DEXSettings.toJSON(message.dexSettings);
|
|
611
|
+
}
|
|
543
612
|
return obj;
|
|
544
613
|
},
|
|
545
614
|
create(base) {
|
|
@@ -573,39 +642,44 @@ function createBaseDelayedTokenUpgradeV1() {
|
|
|
573
642
|
return { denom: "" };
|
|
574
643
|
}
|
|
575
644
|
export const DelayedTokenUpgradeV1 = {
|
|
576
|
-
encode(message, writer =
|
|
645
|
+
encode(message, writer = new BinaryWriter()) {
|
|
577
646
|
if (message.denom !== "") {
|
|
578
647
|
writer.uint32(10).string(message.denom);
|
|
579
648
|
}
|
|
580
649
|
return writer;
|
|
581
650
|
},
|
|
582
651
|
decode(input, length) {
|
|
583
|
-
const reader = input instanceof
|
|
652
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
584
653
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
585
654
|
const message = createBaseDelayedTokenUpgradeV1();
|
|
586
655
|
while (reader.pos < end) {
|
|
587
656
|
const tag = reader.uint32();
|
|
588
657
|
switch (tag >>> 3) {
|
|
589
|
-
case 1:
|
|
658
|
+
case 1: {
|
|
590
659
|
if (tag !== 10) {
|
|
591
660
|
break;
|
|
592
661
|
}
|
|
593
662
|
message.denom = reader.string();
|
|
594
663
|
continue;
|
|
664
|
+
}
|
|
595
665
|
}
|
|
596
666
|
if ((tag & 7) === 4 || tag === 0) {
|
|
597
667
|
break;
|
|
598
668
|
}
|
|
599
|
-
reader.
|
|
669
|
+
reader.skip(tag & 7);
|
|
600
670
|
}
|
|
601
671
|
return message;
|
|
602
672
|
},
|
|
603
673
|
fromJSON(object) {
|
|
604
|
-
return {
|
|
674
|
+
return {
|
|
675
|
+
denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
|
|
676
|
+
};
|
|
605
677
|
},
|
|
606
678
|
toJSON(message) {
|
|
607
679
|
const obj = {};
|
|
608
|
-
message.denom !==
|
|
680
|
+
if (message.denom !== "") {
|
|
681
|
+
obj.denom = message.denom;
|
|
682
|
+
}
|
|
609
683
|
return obj;
|
|
610
684
|
},
|
|
611
685
|
create(base) {
|
|
@@ -621,8 +695,8 @@ function createBaseTokenUpgradeV1Status() {
|
|
|
621
695
|
return { ibcEnabled: false, startTime: undefined, endTime: undefined };
|
|
622
696
|
}
|
|
623
697
|
export const TokenUpgradeV1Status = {
|
|
624
|
-
encode(message, writer =
|
|
625
|
-
if (message.ibcEnabled
|
|
698
|
+
encode(message, writer = new BinaryWriter()) {
|
|
699
|
+
if (message.ibcEnabled !== false) {
|
|
626
700
|
writer.uint32(8).bool(message.ibcEnabled);
|
|
627
701
|
}
|
|
628
702
|
if (message.startTime !== undefined) {
|
|
@@ -634,41 +708,46 @@ export const TokenUpgradeV1Status = {
|
|
|
634
708
|
return writer;
|
|
635
709
|
},
|
|
636
710
|
decode(input, length) {
|
|
637
|
-
const reader = input instanceof
|
|
711
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
638
712
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
639
713
|
const message = createBaseTokenUpgradeV1Status();
|
|
640
714
|
while (reader.pos < end) {
|
|
641
715
|
const tag = reader.uint32();
|
|
642
716
|
switch (tag >>> 3) {
|
|
643
|
-
case 1:
|
|
717
|
+
case 1: {
|
|
644
718
|
if (tag !== 8) {
|
|
645
719
|
break;
|
|
646
720
|
}
|
|
647
721
|
message.ibcEnabled = reader.bool();
|
|
648
722
|
continue;
|
|
649
|
-
|
|
723
|
+
}
|
|
724
|
+
case 2: {
|
|
650
725
|
if (tag !== 18) {
|
|
651
726
|
break;
|
|
652
727
|
}
|
|
653
728
|
message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
654
729
|
continue;
|
|
655
|
-
|
|
730
|
+
}
|
|
731
|
+
case 3: {
|
|
656
732
|
if (tag !== 26) {
|
|
657
733
|
break;
|
|
658
734
|
}
|
|
659
735
|
message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
660
736
|
continue;
|
|
737
|
+
}
|
|
661
738
|
}
|
|
662
739
|
if ((tag & 7) === 4 || tag === 0) {
|
|
663
740
|
break;
|
|
664
741
|
}
|
|
665
|
-
reader.
|
|
742
|
+
reader.skip(tag & 7);
|
|
666
743
|
}
|
|
667
744
|
return message;
|
|
668
745
|
},
|
|
669
746
|
fromJSON(object) {
|
|
670
747
|
return {
|
|
671
|
-
ibcEnabled: isSet(object.ibcEnabled)
|
|
748
|
+
ibcEnabled: isSet(object.ibcEnabled)
|
|
749
|
+
? globalThis.Boolean(object.ibcEnabled)
|
|
750
|
+
: false,
|
|
672
751
|
startTime: isSet(object.startTime)
|
|
673
752
|
? fromJsonTimestamp(object.startTime)
|
|
674
753
|
: undefined,
|
|
@@ -679,11 +758,15 @@ export const TokenUpgradeV1Status = {
|
|
|
679
758
|
},
|
|
680
759
|
toJSON(message) {
|
|
681
760
|
const obj = {};
|
|
682
|
-
message.ibcEnabled !==
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
message.
|
|
686
|
-
|
|
761
|
+
if (message.ibcEnabled !== false) {
|
|
762
|
+
obj.ibcEnabled = message.ibcEnabled;
|
|
763
|
+
}
|
|
764
|
+
if (message.startTime !== undefined) {
|
|
765
|
+
obj.startTime = message.startTime.toISOString();
|
|
766
|
+
}
|
|
767
|
+
if (message.endTime !== undefined) {
|
|
768
|
+
obj.endTime = message.endTime.toISOString();
|
|
769
|
+
}
|
|
687
770
|
return obj;
|
|
688
771
|
},
|
|
689
772
|
create(base) {
|
|
@@ -701,30 +784,31 @@ function createBaseTokenUpgradeStatuses() {
|
|
|
701
784
|
return { v1: undefined };
|
|
702
785
|
}
|
|
703
786
|
export const TokenUpgradeStatuses = {
|
|
704
|
-
encode(message, writer =
|
|
787
|
+
encode(message, writer = new BinaryWriter()) {
|
|
705
788
|
if (message.v1 !== undefined) {
|
|
706
789
|
TokenUpgradeV1Status.encode(message.v1, writer.uint32(10).fork()).ldelim();
|
|
707
790
|
}
|
|
708
791
|
return writer;
|
|
709
792
|
},
|
|
710
793
|
decode(input, length) {
|
|
711
|
-
const reader = input instanceof
|
|
794
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
712
795
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
713
796
|
const message = createBaseTokenUpgradeStatuses();
|
|
714
797
|
while (reader.pos < end) {
|
|
715
798
|
const tag = reader.uint32();
|
|
716
799
|
switch (tag >>> 3) {
|
|
717
|
-
case 1:
|
|
800
|
+
case 1: {
|
|
718
801
|
if (tag !== 10) {
|
|
719
802
|
break;
|
|
720
803
|
}
|
|
721
804
|
message.v1 = TokenUpgradeV1Status.decode(reader, reader.uint32());
|
|
722
805
|
continue;
|
|
806
|
+
}
|
|
723
807
|
}
|
|
724
808
|
if ((tag & 7) === 4 || tag === 0) {
|
|
725
809
|
break;
|
|
726
810
|
}
|
|
727
|
-
reader.
|
|
811
|
+
reader.skip(tag & 7);
|
|
728
812
|
}
|
|
729
813
|
return message;
|
|
730
814
|
},
|
|
@@ -737,10 +821,9 @@ export const TokenUpgradeStatuses = {
|
|
|
737
821
|
},
|
|
738
822
|
toJSON(message) {
|
|
739
823
|
const obj = {};
|
|
740
|
-
message.v1 !== undefined
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
: undefined);
|
|
824
|
+
if (message.v1 !== undefined) {
|
|
825
|
+
obj.v1 = TokenUpgradeV1Status.toJSON(message.v1);
|
|
826
|
+
}
|
|
744
827
|
return obj;
|
|
745
828
|
},
|
|
746
829
|
create(base) {
|
|
@@ -759,7 +842,7 @@ function createBaseDEXSettings() {
|
|
|
759
842
|
return { unifiedRefAmount: "", whitelistedDenoms: [] };
|
|
760
843
|
}
|
|
761
844
|
export const DEXSettings = {
|
|
762
|
-
encode(message, writer =
|
|
845
|
+
encode(message, writer = new BinaryWriter()) {
|
|
763
846
|
if (message.unifiedRefAmount !== "") {
|
|
764
847
|
writer.uint32(10).string(message.unifiedRefAmount);
|
|
765
848
|
}
|
|
@@ -769,51 +852,51 @@ export const DEXSettings = {
|
|
|
769
852
|
return writer;
|
|
770
853
|
},
|
|
771
854
|
decode(input, length) {
|
|
772
|
-
const reader = input instanceof
|
|
855
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
773
856
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
774
857
|
const message = createBaseDEXSettings();
|
|
775
858
|
while (reader.pos < end) {
|
|
776
859
|
const tag = reader.uint32();
|
|
777
860
|
switch (tag >>> 3) {
|
|
778
|
-
case 1:
|
|
861
|
+
case 1: {
|
|
779
862
|
if (tag !== 10) {
|
|
780
863
|
break;
|
|
781
864
|
}
|
|
782
865
|
message.unifiedRefAmount = reader.string();
|
|
783
866
|
continue;
|
|
784
|
-
|
|
867
|
+
}
|
|
868
|
+
case 2: {
|
|
785
869
|
if (tag !== 18) {
|
|
786
870
|
break;
|
|
787
871
|
}
|
|
788
872
|
message.whitelistedDenoms.push(reader.string());
|
|
789
873
|
continue;
|
|
874
|
+
}
|
|
790
875
|
}
|
|
791
876
|
if ((tag & 7) === 4 || tag === 0) {
|
|
792
877
|
break;
|
|
793
878
|
}
|
|
794
|
-
reader.
|
|
879
|
+
reader.skip(tag & 7);
|
|
795
880
|
}
|
|
796
881
|
return message;
|
|
797
882
|
},
|
|
798
883
|
fromJSON(object) {
|
|
799
884
|
return {
|
|
800
885
|
unifiedRefAmount: isSet(object.unifiedRefAmount)
|
|
801
|
-
? String(object.unifiedRefAmount)
|
|
886
|
+
? globalThis.String(object.unifiedRefAmount)
|
|
802
887
|
: "",
|
|
803
|
-
whitelistedDenoms: Array.isArray(object?.whitelistedDenoms)
|
|
804
|
-
? object.whitelistedDenoms.map((e) => String(e))
|
|
888
|
+
whitelistedDenoms: globalThis.Array.isArray(object?.whitelistedDenoms)
|
|
889
|
+
? object.whitelistedDenoms.map((e) => globalThis.String(e))
|
|
805
890
|
: [],
|
|
806
891
|
};
|
|
807
892
|
},
|
|
808
893
|
toJSON(message) {
|
|
809
894
|
const obj = {};
|
|
810
|
-
message.unifiedRefAmount !==
|
|
811
|
-
|
|
812
|
-
if (message.whitelistedDenoms) {
|
|
813
|
-
obj.whitelistedDenoms = message.whitelistedDenoms.map((e) => e);
|
|
895
|
+
if (message.unifiedRefAmount !== "") {
|
|
896
|
+
obj.unifiedRefAmount = message.unifiedRefAmount;
|
|
814
897
|
}
|
|
815
|
-
|
|
816
|
-
obj.whitelistedDenoms =
|
|
898
|
+
if (message.whitelistedDenoms?.length) {
|
|
899
|
+
obj.whitelistedDenoms = message.whitelistedDenoms;
|
|
817
900
|
}
|
|
818
901
|
return obj;
|
|
819
902
|
},
|
|
@@ -828,21 +911,22 @@ export const DEXSettings = {
|
|
|
828
911
|
},
|
|
829
912
|
};
|
|
830
913
|
function toTimestamp(date) {
|
|
831
|
-
const seconds = date.getTime() / 1_000;
|
|
914
|
+
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
832
915
|
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
833
|
-
return { seconds, nanos };
|
|
916
|
+
return { seconds: BigInt(seconds), nanos };
|
|
834
917
|
}
|
|
835
918
|
function fromTimestamp(t) {
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
919
|
+
const seconds = BigInt(t.seconds || 0);
|
|
920
|
+
const nanos = BigInt(t.nanos || 0);
|
|
921
|
+
const millis = seconds * BigInt(1000) + nanos / BigInt(1_000_000);
|
|
922
|
+
return new Date(Number(millis));
|
|
839
923
|
}
|
|
840
924
|
function fromJsonTimestamp(o) {
|
|
841
|
-
if (o instanceof Date) {
|
|
925
|
+
if (o instanceof globalThis.Date) {
|
|
842
926
|
return o;
|
|
843
927
|
}
|
|
844
928
|
else if (typeof o === "string") {
|
|
845
|
-
return new Date(o);
|
|
929
|
+
return new globalThis.Date(o);
|
|
846
930
|
}
|
|
847
931
|
else {
|
|
848
932
|
return fromTimestamp(Timestamp.fromJSON(o));
|