carbon-js-sdk 0.3.30 → 0.3.31
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/README.md +1 -1
- package/lib/CarbonSDK.js +0 -5
- package/lib/clients/CarbonQueryClient.js +2 -2
- package/lib/clients/ETHClient.js +15 -15
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/NEOClient.js +7 -7
- package/lib/clients/ZILClient.js +16 -16
- package/lib/codec/bank/event.d.ts +12 -0
- package/lib/codec/bank/event.js +74 -1
- package/lib/codec/bank/query.d.ts +48 -0
- package/lib/codec/bank/query.js +250 -1
- package/lib/codec/book/query.d.ts +26 -0
- package/lib/codec/book/query.js +140 -1
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/tx/v1beta1/tx.js +2 -2
- package/lib/codec/headersync/consensus_peers.d.ts +26 -0
- package/lib/codec/headersync/consensus_peers.js +166 -1
- package/lib/codec/headersync/export.d.ts +1 -1
- package/lib/codec/headersync/export.js +3 -1
- package/lib/codec/headersync/genesis.d.ts +3 -3
- package/lib/codec/headersync/genesis.js +8 -8
- package/lib/codec/headersync/query.d.ts +2 -2
- package/lib/codec/headersync/query.js +14 -12
- package/lib/codec/ibc/applications/fee/v1/ack.d.ts +24 -0
- package/lib/codec/ibc/applications/fee/v1/ack.js +125 -0
- package/lib/codec/ibc/applications/fee/v1/fee.d.ts +68 -0
- package/lib/codec/ibc/applications/fee/v1/fee.js +289 -0
- package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +93 -0
- package/lib/codec/ibc/applications/fee/v1/genesis.js +390 -0
- package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +25 -0
- package/lib/codec/ibc/applications/fee/v1/metadata.js +71 -0
- package/lib/codec/ibc/applications/fee/v1/query.d.ts +312 -0
- package/lib/codec/ibc/applications/fee/v1/query.js +1187 -0
- package/lib/codec/ibc/applications/fee/v1/tx.d.ts +171 -0
- package/lib/codec/ibc/applications/fee/v1/tx.js +524 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +78 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.js +296 -0
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +80 -0
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.js +439 -0
- package/lib/codec/index.d.ts +8 -3
- package/lib/codec/index.js +418 -397
- package/lib/codec/misc/query.d.ts +16 -2
- package/lib/codec/misc/query.js +120 -22
- package/lib/codec/sequence/genesis.d.ts +30 -0
- package/lib/codec/sequence/genesis.js +122 -0
- package/lib/codec/sequence/query.d.ts +63 -0
- package/lib/codec/sequence/query.js +208 -0
- package/lib/codec/sequence/tx.d.ts +41 -0
- package/lib/codec/sequence/tx.js +148 -0
- package/lib/constant/generic.d.ts +6 -1
- package/lib/constant/generic.js +7 -3
- package/lib/constant/ibc.d.ts +1 -5
- package/lib/constant/ibc.js +95 -94
- package/lib/constant/token.d.ts +1 -0
- package/lib/constant/token.js +2 -1
- package/lib/modules/cdp.js +43 -43
- package/lib/modules/gov.js +14 -14
- package/lib/modules/liquiditypool.js +1 -1
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +3 -3
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
- package/lib/provider/amino/types/admin.js +30 -30
- package/lib/provider/amino/types/bank.js +1 -1
- package/lib/provider/amino/types/broker.js +1 -1
- package/lib/provider/amino/types/cdp.js +22 -22
- package/lib/provider/amino/types/coin.js +2 -2
- package/lib/provider/amino/types/gov.js +4 -4
- package/lib/provider/amino/types/ibc.js +1 -1
- package/lib/provider/amino/types/leverage.js +1 -1
- package/lib/provider/amino/types/liquidityPool.js +7 -7
- package/lib/provider/amino/types/market.js +1 -1
- package/lib/provider/amino/types/oracle.js +1 -1
- package/lib/provider/amino/types/order.js +4 -4
- package/lib/provider/amino/types/position.js +1 -1
- package/lib/provider/amino/types/profile.js +1 -1
- package/lib/provider/amino/types/staking.js +4 -4
- package/lib/provider/amino/types/subaccount.js +3 -3
- package/lib/provider/amino/utils.js +11 -11
- package/lib/provider/keplr/KeplrAccount.d.ts +6 -11
- package/lib/provider/keplr/KeplrAccount.js +15 -9
- package/lib/provider/leap/LeapAccount.d.ts +6 -11
- package/lib/provider/leap/LeapAccount.js +14 -8
- package/lib/provider/ledger/ledger.js +2 -2
- package/lib/provider/metamask/MetaMask.js +1 -1
- package/lib/provider/o3/O3Wallet.js +2 -2
- package/lib/util/address.js +13 -13
- package/lib/util/api.js +4 -4
- package/lib/util/fetch.js +1 -1
- package/lib/util/generic.js +3 -3
- package/lib/util/number.js +5 -5
- package/lib/util/tx.d.ts +2 -0
- package/lib/wallet/CarbonSigner.js +2 -2
- package/lib/wallet/CarbonSigningClient.js +8 -8
- package/lib/wallet/CarbonWallet.js +6 -6
- package/lib/websocket/connector.js +3 -3
- package/package.json +8 -7
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ConsensusPeers_PeersEntry = exports.ConsensusPeers = exports.Peer = exports.protobufPackage = void 0;
|
|
6
|
+
exports.ZionConsensusPeers_PeersEntry = exports.ZionConsensusPeers = exports.ConsensusPeers_PeersEntry = exports.ConsensusPeers = exports.Peer = exports.protobufPackage = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
@@ -212,6 +212,171 @@ exports.ConsensusPeers_PeersEntry = {
|
|
|
212
212
|
return message;
|
|
213
213
|
},
|
|
214
214
|
};
|
|
215
|
+
const baseZionConsensusPeers = {
|
|
216
|
+
chainId: long_1.default.UZERO,
|
|
217
|
+
epochStartHeight: 0,
|
|
218
|
+
epochEndHeight: 0,
|
|
219
|
+
};
|
|
220
|
+
exports.ZionConsensusPeers = {
|
|
221
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
222
|
+
if (!message.chainId.isZero()) {
|
|
223
|
+
writer.uint32(8).uint64(message.chainId);
|
|
224
|
+
}
|
|
225
|
+
if (message.epochStartHeight !== 0) {
|
|
226
|
+
writer.uint32(16).uint32(message.epochStartHeight);
|
|
227
|
+
}
|
|
228
|
+
if (message.epochEndHeight !== 0) {
|
|
229
|
+
writer.uint32(24).uint32(message.epochEndHeight);
|
|
230
|
+
}
|
|
231
|
+
Object.entries(message.peers).forEach(([key, value]) => {
|
|
232
|
+
exports.ZionConsensusPeers_PeersEntry.encode({ key: key, value }, writer.uint32(34).fork()).ldelim();
|
|
233
|
+
});
|
|
234
|
+
return writer;
|
|
235
|
+
},
|
|
236
|
+
decode(input, length) {
|
|
237
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
238
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
239
|
+
const message = Object.assign({}, baseZionConsensusPeers);
|
|
240
|
+
message.peers = {};
|
|
241
|
+
while (reader.pos < end) {
|
|
242
|
+
const tag = reader.uint32();
|
|
243
|
+
switch (tag >>> 3) {
|
|
244
|
+
case 1:
|
|
245
|
+
message.chainId = reader.uint64();
|
|
246
|
+
break;
|
|
247
|
+
case 2:
|
|
248
|
+
message.epochStartHeight = reader.uint32();
|
|
249
|
+
break;
|
|
250
|
+
case 3:
|
|
251
|
+
message.epochEndHeight = reader.uint32();
|
|
252
|
+
break;
|
|
253
|
+
case 4:
|
|
254
|
+
const entry4 = exports.ZionConsensusPeers_PeersEntry.decode(reader, reader.uint32());
|
|
255
|
+
if (entry4.value !== undefined) {
|
|
256
|
+
message.peers[entry4.key] = entry4.value;
|
|
257
|
+
}
|
|
258
|
+
break;
|
|
259
|
+
default:
|
|
260
|
+
reader.skipType(tag & 7);
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return message;
|
|
265
|
+
},
|
|
266
|
+
fromJSON(object) {
|
|
267
|
+
var _a;
|
|
268
|
+
const message = Object.assign({}, baseZionConsensusPeers);
|
|
269
|
+
message.chainId =
|
|
270
|
+
object.chainId !== undefined && object.chainId !== null
|
|
271
|
+
? long_1.default.fromString(object.chainId)
|
|
272
|
+
: long_1.default.UZERO;
|
|
273
|
+
message.epochStartHeight =
|
|
274
|
+
object.epochStartHeight !== undefined && object.epochStartHeight !== null
|
|
275
|
+
? Number(object.epochStartHeight)
|
|
276
|
+
: 0;
|
|
277
|
+
message.epochEndHeight =
|
|
278
|
+
object.epochEndHeight !== undefined && object.epochEndHeight !== null
|
|
279
|
+
? Number(object.epochEndHeight)
|
|
280
|
+
: 0;
|
|
281
|
+
message.peers = Object.entries((_a = object.peers) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
282
|
+
acc[key] = exports.Peer.fromJSON(value);
|
|
283
|
+
return acc;
|
|
284
|
+
}, {});
|
|
285
|
+
return message;
|
|
286
|
+
},
|
|
287
|
+
toJSON(message) {
|
|
288
|
+
const obj = {};
|
|
289
|
+
message.chainId !== undefined &&
|
|
290
|
+
(obj.chainId = (message.chainId || long_1.default.UZERO).toString());
|
|
291
|
+
message.epochStartHeight !== undefined &&
|
|
292
|
+
(obj.epochStartHeight = message.epochStartHeight);
|
|
293
|
+
message.epochEndHeight !== undefined &&
|
|
294
|
+
(obj.epochEndHeight = message.epochEndHeight);
|
|
295
|
+
obj.peers = {};
|
|
296
|
+
if (message.peers) {
|
|
297
|
+
Object.entries(message.peers).forEach(([k, v]) => {
|
|
298
|
+
obj.peers[k] = exports.Peer.toJSON(v);
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
return obj;
|
|
302
|
+
},
|
|
303
|
+
fromPartial(object) {
|
|
304
|
+
var _a, _b, _c;
|
|
305
|
+
const message = Object.assign({}, baseZionConsensusPeers);
|
|
306
|
+
message.chainId =
|
|
307
|
+
object.chainId !== undefined && object.chainId !== null
|
|
308
|
+
? long_1.default.fromValue(object.chainId)
|
|
309
|
+
: long_1.default.UZERO;
|
|
310
|
+
message.epochStartHeight = (_a = object.epochStartHeight) !== null && _a !== void 0 ? _a : 0;
|
|
311
|
+
message.epochEndHeight = (_b = object.epochEndHeight) !== null && _b !== void 0 ? _b : 0;
|
|
312
|
+
message.peers = Object.entries((_c = object.peers) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
|
|
313
|
+
if (value !== undefined) {
|
|
314
|
+
acc[key] = exports.Peer.fromPartial(value);
|
|
315
|
+
}
|
|
316
|
+
return acc;
|
|
317
|
+
}, {});
|
|
318
|
+
return message;
|
|
319
|
+
},
|
|
320
|
+
};
|
|
321
|
+
const baseZionConsensusPeers_PeersEntry = { key: "" };
|
|
322
|
+
exports.ZionConsensusPeers_PeersEntry = {
|
|
323
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
324
|
+
if (message.key !== "") {
|
|
325
|
+
writer.uint32(10).string(message.key);
|
|
326
|
+
}
|
|
327
|
+
if (message.value !== undefined) {
|
|
328
|
+
exports.Peer.encode(message.value, writer.uint32(18).fork()).ldelim();
|
|
329
|
+
}
|
|
330
|
+
return writer;
|
|
331
|
+
},
|
|
332
|
+
decode(input, length) {
|
|
333
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
334
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
335
|
+
const message = Object.assign({}, baseZionConsensusPeers_PeersEntry);
|
|
336
|
+
while (reader.pos < end) {
|
|
337
|
+
const tag = reader.uint32();
|
|
338
|
+
switch (tag >>> 3) {
|
|
339
|
+
case 1:
|
|
340
|
+
message.key = reader.string();
|
|
341
|
+
break;
|
|
342
|
+
case 2:
|
|
343
|
+
message.value = exports.Peer.decode(reader, reader.uint32());
|
|
344
|
+
break;
|
|
345
|
+
default:
|
|
346
|
+
reader.skipType(tag & 7);
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return message;
|
|
351
|
+
},
|
|
352
|
+
fromJSON(object) {
|
|
353
|
+
const message = Object.assign({}, baseZionConsensusPeers_PeersEntry);
|
|
354
|
+
message.key =
|
|
355
|
+
object.key !== undefined && object.key !== null ? String(object.key) : "";
|
|
356
|
+
message.value =
|
|
357
|
+
object.value !== undefined && object.value !== null
|
|
358
|
+
? exports.Peer.fromJSON(object.value)
|
|
359
|
+
: undefined;
|
|
360
|
+
return message;
|
|
361
|
+
},
|
|
362
|
+
toJSON(message) {
|
|
363
|
+
const obj = {};
|
|
364
|
+
message.key !== undefined && (obj.key = message.key);
|
|
365
|
+
message.value !== undefined &&
|
|
366
|
+
(obj.value = message.value ? exports.Peer.toJSON(message.value) : undefined);
|
|
367
|
+
return obj;
|
|
368
|
+
},
|
|
369
|
+
fromPartial(object) {
|
|
370
|
+
var _a;
|
|
371
|
+
const message = Object.assign({}, baseZionConsensusPeers_PeersEntry);
|
|
372
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
373
|
+
message.value =
|
|
374
|
+
object.value !== undefined && object.value !== null
|
|
375
|
+
? exports.Peer.fromPartial(object.value)
|
|
376
|
+
: undefined;
|
|
377
|
+
return message;
|
|
378
|
+
},
|
|
379
|
+
};
|
|
215
380
|
if (minimal_1.default.util.Long !== long_1.default) {
|
|
216
381
|
minimal_1.default.util.Long = long_1.default;
|
|
217
382
|
minimal_1.default.configure();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Peer, ConsensusPeers, ConsensusPeers_PeersEntry } from "./consensus_peers";
|
|
1
|
+
export { Peer, ConsensusPeers, ConsensusPeers_PeersEntry, ZionConsensusPeers, ZionConsensusPeers_PeersEntry } from "./consensus_peers";
|
|
2
2
|
export { GenesisState_ConsensusPeersEntry, GenesisState_CheckpointHashesEntry, GenesisState_ZionConsensusPeersEntry, GenesisState_ZionCheckpointHashesEntry } from "./genesis";
|
|
3
3
|
export { QueryGetConsensusPeersRequest, QueryGetConsensusPeersResponse, QueryGetZionConsensusPeersRequest, QueryGetZionConsensusPeersResponse } from "./query";
|
|
4
4
|
export { MsgSyncGenesis, MsgSyncGenesisResponse, MsgSyncHeaders, MsgSyncHeadersResponse } from "./tx";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MsgSyncHeadersResponse = exports.MsgSyncHeaders = exports.MsgSyncGenesisResponse = exports.MsgSyncGenesis = exports.QueryGetZionConsensusPeersResponse = exports.QueryGetZionConsensusPeersRequest = exports.QueryGetConsensusPeersResponse = exports.QueryGetConsensusPeersRequest = exports.GenesisState_ZionCheckpointHashesEntry = exports.GenesisState_ZionConsensusPeersEntry = exports.GenesisState_CheckpointHashesEntry = exports.GenesisState_ConsensusPeersEntry = exports.ConsensusPeers_PeersEntry = exports.ConsensusPeers = exports.Peer = void 0;
|
|
3
|
+
exports.MsgSyncHeadersResponse = exports.MsgSyncHeaders = exports.MsgSyncGenesisResponse = exports.MsgSyncGenesis = exports.QueryGetZionConsensusPeersResponse = exports.QueryGetZionConsensusPeersRequest = exports.QueryGetConsensusPeersResponse = exports.QueryGetConsensusPeersRequest = exports.GenesisState_ZionCheckpointHashesEntry = exports.GenesisState_ZionConsensusPeersEntry = exports.GenesisState_CheckpointHashesEntry = exports.GenesisState_ConsensusPeersEntry = exports.ZionConsensusPeers_PeersEntry = exports.ZionConsensusPeers = exports.ConsensusPeers_PeersEntry = exports.ConsensusPeers = exports.Peer = void 0;
|
|
4
4
|
var consensus_peers_1 = require("./consensus_peers");
|
|
5
5
|
Object.defineProperty(exports, "Peer", { enumerable: true, get: function () { return consensus_peers_1.Peer; } });
|
|
6
6
|
Object.defineProperty(exports, "ConsensusPeers", { enumerable: true, get: function () { return consensus_peers_1.ConsensusPeers; } });
|
|
7
7
|
Object.defineProperty(exports, "ConsensusPeers_PeersEntry", { enumerable: true, get: function () { return consensus_peers_1.ConsensusPeers_PeersEntry; } });
|
|
8
|
+
Object.defineProperty(exports, "ZionConsensusPeers", { enumerable: true, get: function () { return consensus_peers_1.ZionConsensusPeers; } });
|
|
9
|
+
Object.defineProperty(exports, "ZionConsensusPeers_PeersEntry", { enumerable: true, get: function () { return consensus_peers_1.ZionConsensusPeers_PeersEntry; } });
|
|
8
10
|
var genesis_1 = require("./genesis");
|
|
9
11
|
Object.defineProperty(exports, "GenesisState_ConsensusPeersEntry", { enumerable: true, get: function () { return genesis_1.GenesisState_ConsensusPeersEntry; } });
|
|
10
12
|
Object.defineProperty(exports, "GenesisState_CheckpointHashesEntry", { enumerable: true, get: function () { return genesis_1.GenesisState_CheckpointHashesEntry; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { ConsensusPeers } from "./consensus_peers";
|
|
3
|
+
import { ConsensusPeers, ZionConsensusPeers } from "./consensus_peers";
|
|
4
4
|
export declare const protobufPackage = "Switcheo.carbon.headersync";
|
|
5
5
|
/** GenesisState defines the headersync module's genesis state. */
|
|
6
6
|
export interface GenesisState {
|
|
@@ -14,7 +14,7 @@ export interface GenesisState {
|
|
|
14
14
|
};
|
|
15
15
|
/** Peers for each Zion PoS chain by chain ID. */
|
|
16
16
|
zionConsensusPeers: {
|
|
17
|
-
[key: string]:
|
|
17
|
+
[key: string]: ZionConsensusPeers;
|
|
18
18
|
};
|
|
19
19
|
/** Header Hash for Zion blocks where consensus public keys is updated for PoS chain by chain ID. */
|
|
20
20
|
zionCheckpointHashes: {
|
|
@@ -31,7 +31,7 @@ export interface GenesisState_CheckpointHashesEntry {
|
|
|
31
31
|
}
|
|
32
32
|
export interface GenesisState_ZionConsensusPeersEntry {
|
|
33
33
|
key: string;
|
|
34
|
-
value?:
|
|
34
|
+
value?: ZionConsensusPeers;
|
|
35
35
|
}
|
|
36
36
|
export interface GenesisState_ZionCheckpointHashesEntry {
|
|
37
37
|
key: string;
|
|
@@ -80,7 +80,7 @@ exports.GenesisState = {
|
|
|
80
80
|
return acc;
|
|
81
81
|
}, {});
|
|
82
82
|
message.zionConsensusPeers = Object.entries((_c = object.zionConsensusPeers) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
|
|
83
|
-
acc[key] = consensus_peers_1.
|
|
83
|
+
acc[key] = consensus_peers_1.ZionConsensusPeers.fromJSON(value);
|
|
84
84
|
return acc;
|
|
85
85
|
}, {});
|
|
86
86
|
message.zionCheckpointHashes = Object.entries((_d = object.zionCheckpointHashes) !== null && _d !== void 0 ? _d : {}).reduce((acc, [key, value]) => {
|
|
@@ -106,7 +106,7 @@ exports.GenesisState = {
|
|
|
106
106
|
obj.zionConsensusPeers = {};
|
|
107
107
|
if (message.zionConsensusPeers) {
|
|
108
108
|
Object.entries(message.zionConsensusPeers).forEach(([k, v]) => {
|
|
109
|
-
obj.zionConsensusPeers[k] = consensus_peers_1.
|
|
109
|
+
obj.zionConsensusPeers[k] = consensus_peers_1.ZionConsensusPeers.toJSON(v);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
obj.zionCheckpointHashes = {};
|
|
@@ -134,7 +134,7 @@ exports.GenesisState = {
|
|
|
134
134
|
}, {});
|
|
135
135
|
message.zionConsensusPeers = Object.entries((_c = object.zionConsensusPeers) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
|
|
136
136
|
if (value !== undefined) {
|
|
137
|
-
acc[key] = consensus_peers_1.
|
|
137
|
+
acc[key] = consensus_peers_1.ZionConsensusPeers.fromPartial(value);
|
|
138
138
|
}
|
|
139
139
|
return acc;
|
|
140
140
|
}, {});
|
|
@@ -272,7 +272,7 @@ exports.GenesisState_ZionConsensusPeersEntry = {
|
|
|
272
272
|
writer.uint32(10).string(message.key);
|
|
273
273
|
}
|
|
274
274
|
if (message.value !== undefined) {
|
|
275
|
-
consensus_peers_1.
|
|
275
|
+
consensus_peers_1.ZionConsensusPeers.encode(message.value, writer.uint32(18).fork()).ldelim();
|
|
276
276
|
}
|
|
277
277
|
return writer;
|
|
278
278
|
},
|
|
@@ -287,7 +287,7 @@ exports.GenesisState_ZionConsensusPeersEntry = {
|
|
|
287
287
|
message.key = reader.string();
|
|
288
288
|
break;
|
|
289
289
|
case 2:
|
|
290
|
-
message.value = consensus_peers_1.
|
|
290
|
+
message.value = consensus_peers_1.ZionConsensusPeers.decode(reader, reader.uint32());
|
|
291
291
|
break;
|
|
292
292
|
default:
|
|
293
293
|
reader.skipType(tag & 7);
|
|
@@ -302,7 +302,7 @@ exports.GenesisState_ZionConsensusPeersEntry = {
|
|
|
302
302
|
object.key !== undefined && object.key !== null ? String(object.key) : "";
|
|
303
303
|
message.value =
|
|
304
304
|
object.value !== undefined && object.value !== null
|
|
305
|
-
? consensus_peers_1.
|
|
305
|
+
? consensus_peers_1.ZionConsensusPeers.fromJSON(object.value)
|
|
306
306
|
: undefined;
|
|
307
307
|
return message;
|
|
308
308
|
},
|
|
@@ -311,7 +311,7 @@ exports.GenesisState_ZionConsensusPeersEntry = {
|
|
|
311
311
|
message.key !== undefined && (obj.key = message.key);
|
|
312
312
|
message.value !== undefined &&
|
|
313
313
|
(obj.value = message.value
|
|
314
|
-
? consensus_peers_1.
|
|
314
|
+
? consensus_peers_1.ZionConsensusPeers.toJSON(message.value)
|
|
315
315
|
: undefined);
|
|
316
316
|
return obj;
|
|
317
317
|
},
|
|
@@ -321,7 +321,7 @@ exports.GenesisState_ZionConsensusPeersEntry = {
|
|
|
321
321
|
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
322
322
|
message.value =
|
|
323
323
|
object.value !== undefined && object.value !== null
|
|
324
|
-
? consensus_peers_1.
|
|
324
|
+
? consensus_peers_1.ZionConsensusPeers.fromPartial(object.value)
|
|
325
325
|
: undefined;
|
|
326
326
|
return message;
|
|
327
327
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { ConsensusPeers } from "./consensus_peers";
|
|
3
|
+
import { ConsensusPeers, ZionConsensusPeers } from "./consensus_peers";
|
|
4
4
|
export declare const protobufPackage = "Switcheo.carbon.headersync";
|
|
5
5
|
export interface QueryGetConsensusPeersRequest {
|
|
6
6
|
chainId: Long;
|
|
@@ -12,7 +12,7 @@ export interface QueryGetZionConsensusPeersRequest {
|
|
|
12
12
|
chainId: Long;
|
|
13
13
|
}
|
|
14
14
|
export interface QueryGetZionConsensusPeersResponse {
|
|
15
|
-
|
|
15
|
+
zionConsensusPeers?: ZionConsensusPeers;
|
|
16
16
|
}
|
|
17
17
|
export declare const QueryGetConsensusPeersRequest: {
|
|
18
18
|
encode(message: QueryGetConsensusPeersRequest, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -158,8 +158,8 @@ exports.QueryGetZionConsensusPeersRequest = {
|
|
|
158
158
|
const baseQueryGetZionConsensusPeersResponse = {};
|
|
159
159
|
exports.QueryGetZionConsensusPeersResponse = {
|
|
160
160
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
161
|
-
if (message.
|
|
162
|
-
consensus_peers_1.
|
|
161
|
+
if (message.zionConsensusPeers !== undefined) {
|
|
162
|
+
consensus_peers_1.ZionConsensusPeers.encode(message.zionConsensusPeers, writer.uint32(10).fork()).ldelim();
|
|
163
163
|
}
|
|
164
164
|
return writer;
|
|
165
165
|
},
|
|
@@ -171,7 +171,7 @@ exports.QueryGetZionConsensusPeersResponse = {
|
|
|
171
171
|
const tag = reader.uint32();
|
|
172
172
|
switch (tag >>> 3) {
|
|
173
173
|
case 1:
|
|
174
|
-
message.
|
|
174
|
+
message.zionConsensusPeers = consensus_peers_1.ZionConsensusPeers.decode(reader, reader.uint32());
|
|
175
175
|
break;
|
|
176
176
|
default:
|
|
177
177
|
reader.skipType(tag & 7);
|
|
@@ -182,25 +182,27 @@ exports.QueryGetZionConsensusPeersResponse = {
|
|
|
182
182
|
},
|
|
183
183
|
fromJSON(object) {
|
|
184
184
|
const message = Object.assign({}, baseQueryGetZionConsensusPeersResponse);
|
|
185
|
-
message.
|
|
186
|
-
object.
|
|
187
|
-
|
|
185
|
+
message.zionConsensusPeers =
|
|
186
|
+
object.zionConsensusPeers !== undefined &&
|
|
187
|
+
object.zionConsensusPeers !== null
|
|
188
|
+
? consensus_peers_1.ZionConsensusPeers.fromJSON(object.zionConsensusPeers)
|
|
188
189
|
: undefined;
|
|
189
190
|
return message;
|
|
190
191
|
},
|
|
191
192
|
toJSON(message) {
|
|
192
193
|
const obj = {};
|
|
193
|
-
message.
|
|
194
|
-
(obj.
|
|
195
|
-
? consensus_peers_1.
|
|
194
|
+
message.zionConsensusPeers !== undefined &&
|
|
195
|
+
(obj.zionConsensusPeers = message.zionConsensusPeers
|
|
196
|
+
? consensus_peers_1.ZionConsensusPeers.toJSON(message.zionConsensusPeers)
|
|
196
197
|
: undefined);
|
|
197
198
|
return obj;
|
|
198
199
|
},
|
|
199
200
|
fromPartial(object) {
|
|
200
201
|
const message = Object.assign({}, baseQueryGetZionConsensusPeersResponse);
|
|
201
|
-
message.
|
|
202
|
-
object.
|
|
203
|
-
|
|
202
|
+
message.zionConsensusPeers =
|
|
203
|
+
object.zionConsensusPeers !== undefined &&
|
|
204
|
+
object.zionConsensusPeers !== null
|
|
205
|
+
? consensus_peers_1.ZionConsensusPeers.fromPartial(object.zionConsensusPeers)
|
|
204
206
|
: undefined;
|
|
205
207
|
return message;
|
|
206
208
|
},
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import Long from "long";
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
export declare const protobufPackage = "ibc.applications.fee.v1";
|
|
4
|
+
/** IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware */
|
|
5
|
+
export interface IncentivizedAcknowledgement {
|
|
6
|
+
/** the underlying app acknowledgement bytes */
|
|
7
|
+
appAcknowledgement: Uint8Array;
|
|
8
|
+
/** the relayer address which submits the recv packet message */
|
|
9
|
+
forwardRelayerAddress: string;
|
|
10
|
+
/** success flag of the base application callback */
|
|
11
|
+
underlyingAppSuccess: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const IncentivizedAcknowledgement: {
|
|
14
|
+
encode(message: IncentivizedAcknowledgement, writer?: _m0.Writer): _m0.Writer;
|
|
15
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): IncentivizedAcknowledgement;
|
|
16
|
+
fromJSON(object: any): IncentivizedAcknowledgement;
|
|
17
|
+
toJSON(message: IncentivizedAcknowledgement): unknown;
|
|
18
|
+
fromPartial(object: DeepPartial<IncentivizedAcknowledgement>): IncentivizedAcknowledgement;
|
|
19
|
+
};
|
|
20
|
+
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
21
|
+
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
22
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
23
|
+
} : Partial<T>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IncentivizedAcknowledgement = exports.protobufPackage = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const long_1 = __importDefault(require("long"));
|
|
9
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
+
exports.protobufPackage = "ibc.applications.fee.v1";
|
|
11
|
+
const baseIncentivizedAcknowledgement = {
|
|
12
|
+
forwardRelayerAddress: "",
|
|
13
|
+
underlyingAppSuccess: false,
|
|
14
|
+
};
|
|
15
|
+
exports.IncentivizedAcknowledgement = {
|
|
16
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
17
|
+
if (message.appAcknowledgement.length !== 0) {
|
|
18
|
+
writer.uint32(10).bytes(message.appAcknowledgement);
|
|
19
|
+
}
|
|
20
|
+
if (message.forwardRelayerAddress !== "") {
|
|
21
|
+
writer.uint32(18).string(message.forwardRelayerAddress);
|
|
22
|
+
}
|
|
23
|
+
if (message.underlyingAppSuccess === true) {
|
|
24
|
+
writer.uint32(24).bool(message.underlyingAppSuccess);
|
|
25
|
+
}
|
|
26
|
+
return writer;
|
|
27
|
+
},
|
|
28
|
+
decode(input, length) {
|
|
29
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
30
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
31
|
+
const message = Object.assign({}, baseIncentivizedAcknowledgement);
|
|
32
|
+
message.appAcknowledgement = new Uint8Array();
|
|
33
|
+
while (reader.pos < end) {
|
|
34
|
+
const tag = reader.uint32();
|
|
35
|
+
switch (tag >>> 3) {
|
|
36
|
+
case 1:
|
|
37
|
+
message.appAcknowledgement = reader.bytes();
|
|
38
|
+
break;
|
|
39
|
+
case 2:
|
|
40
|
+
message.forwardRelayerAddress = reader.string();
|
|
41
|
+
break;
|
|
42
|
+
case 3:
|
|
43
|
+
message.underlyingAppSuccess = reader.bool();
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
reader.skipType(tag & 7);
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return message;
|
|
51
|
+
},
|
|
52
|
+
fromJSON(object) {
|
|
53
|
+
const message = Object.assign({}, baseIncentivizedAcknowledgement);
|
|
54
|
+
message.appAcknowledgement =
|
|
55
|
+
object.appAcknowledgement !== undefined &&
|
|
56
|
+
object.appAcknowledgement !== null
|
|
57
|
+
? bytesFromBase64(object.appAcknowledgement)
|
|
58
|
+
: new Uint8Array();
|
|
59
|
+
message.forwardRelayerAddress =
|
|
60
|
+
object.forwardRelayerAddress !== undefined &&
|
|
61
|
+
object.forwardRelayerAddress !== null
|
|
62
|
+
? String(object.forwardRelayerAddress)
|
|
63
|
+
: "";
|
|
64
|
+
message.underlyingAppSuccess =
|
|
65
|
+
object.underlyingAppSuccess !== undefined &&
|
|
66
|
+
object.underlyingAppSuccess !== null
|
|
67
|
+
? Boolean(object.underlyingAppSuccess)
|
|
68
|
+
: false;
|
|
69
|
+
return message;
|
|
70
|
+
},
|
|
71
|
+
toJSON(message) {
|
|
72
|
+
const obj = {};
|
|
73
|
+
message.appAcknowledgement !== undefined &&
|
|
74
|
+
(obj.appAcknowledgement = base64FromBytes(message.appAcknowledgement !== undefined
|
|
75
|
+
? message.appAcknowledgement
|
|
76
|
+
: new Uint8Array()));
|
|
77
|
+
message.forwardRelayerAddress !== undefined &&
|
|
78
|
+
(obj.forwardRelayerAddress = message.forwardRelayerAddress);
|
|
79
|
+
message.underlyingAppSuccess !== undefined &&
|
|
80
|
+
(obj.underlyingAppSuccess = message.underlyingAppSuccess);
|
|
81
|
+
return obj;
|
|
82
|
+
},
|
|
83
|
+
fromPartial(object) {
|
|
84
|
+
var _a, _b, _c;
|
|
85
|
+
const message = Object.assign({}, baseIncentivizedAcknowledgement);
|
|
86
|
+
message.appAcknowledgement = (_a = object.appAcknowledgement) !== null && _a !== void 0 ? _a : new Uint8Array();
|
|
87
|
+
message.forwardRelayerAddress = (_b = object.forwardRelayerAddress) !== null && _b !== void 0 ? _b : "";
|
|
88
|
+
message.underlyingAppSuccess = (_c = object.underlyingAppSuccess) !== null && _c !== void 0 ? _c : false;
|
|
89
|
+
return message;
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
var globalThis = (() => {
|
|
93
|
+
if (typeof globalThis !== "undefined")
|
|
94
|
+
return globalThis;
|
|
95
|
+
if (typeof self !== "undefined")
|
|
96
|
+
return self;
|
|
97
|
+
if (typeof window !== "undefined")
|
|
98
|
+
return window;
|
|
99
|
+
if (typeof global !== "undefined")
|
|
100
|
+
return global;
|
|
101
|
+
throw "Unable to locate global object";
|
|
102
|
+
})();
|
|
103
|
+
const atob = globalThis.atob ||
|
|
104
|
+
((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
|
|
105
|
+
function bytesFromBase64(b64) {
|
|
106
|
+
const bin = atob(b64);
|
|
107
|
+
const arr = new Uint8Array(bin.length);
|
|
108
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
109
|
+
arr[i] = bin.charCodeAt(i);
|
|
110
|
+
}
|
|
111
|
+
return arr;
|
|
112
|
+
}
|
|
113
|
+
const btoa = globalThis.btoa ||
|
|
114
|
+
((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
|
|
115
|
+
function base64FromBytes(arr) {
|
|
116
|
+
const bin = [];
|
|
117
|
+
for (const byte of arr) {
|
|
118
|
+
bin.push(String.fromCharCode(byte));
|
|
119
|
+
}
|
|
120
|
+
return btoa(bin.join(""));
|
|
121
|
+
}
|
|
122
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
123
|
+
minimal_1.default.util.Long = long_1.default;
|
|
124
|
+
minimal_1.default.configure();
|
|
125
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import Long from "long";
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { PacketId } from "../../../core/channel/v1/channel";
|
|
4
|
+
import { Coin } from "../../../../cosmos/base/v1beta1/coin";
|
|
5
|
+
export declare const protobufPackage = "ibc.applications.fee.v1";
|
|
6
|
+
/** Fee defines the ICS29 receive, acknowledgement and timeout fees */
|
|
7
|
+
export interface Fee {
|
|
8
|
+
/** the packet receive fee */
|
|
9
|
+
recvFee: Coin[];
|
|
10
|
+
/** the packet acknowledgement fee */
|
|
11
|
+
ackFee: Coin[];
|
|
12
|
+
/** the packet timeout fee */
|
|
13
|
+
timeoutFee: Coin[];
|
|
14
|
+
}
|
|
15
|
+
/** PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers */
|
|
16
|
+
export interface PacketFee {
|
|
17
|
+
/** fee encapsulates the recv, ack and timeout fees associated with an IBC packet */
|
|
18
|
+
fee?: Fee;
|
|
19
|
+
/** the refund address for unspent fees */
|
|
20
|
+
refundAddress: string;
|
|
21
|
+
/** optional list of relayers permitted to receive fees */
|
|
22
|
+
relayers: string[];
|
|
23
|
+
}
|
|
24
|
+
/** PacketFees contains a list of type PacketFee */
|
|
25
|
+
export interface PacketFees {
|
|
26
|
+
/** list of packet fees */
|
|
27
|
+
packetFees: PacketFee[];
|
|
28
|
+
}
|
|
29
|
+
/** IdentifiedPacketFees contains a list of type PacketFee and associated PacketId */
|
|
30
|
+
export interface IdentifiedPacketFees {
|
|
31
|
+
/** unique packet identifier comprised of the channel ID, port ID and sequence */
|
|
32
|
+
packetId?: PacketId;
|
|
33
|
+
/** list of packet fees */
|
|
34
|
+
packetFees: PacketFee[];
|
|
35
|
+
}
|
|
36
|
+
export declare const Fee: {
|
|
37
|
+
encode(message: Fee, writer?: _m0.Writer): _m0.Writer;
|
|
38
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Fee;
|
|
39
|
+
fromJSON(object: any): Fee;
|
|
40
|
+
toJSON(message: Fee): unknown;
|
|
41
|
+
fromPartial(object: DeepPartial<Fee>): Fee;
|
|
42
|
+
};
|
|
43
|
+
export declare const PacketFee: {
|
|
44
|
+
encode(message: PacketFee, writer?: _m0.Writer): _m0.Writer;
|
|
45
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PacketFee;
|
|
46
|
+
fromJSON(object: any): PacketFee;
|
|
47
|
+
toJSON(message: PacketFee): unknown;
|
|
48
|
+
fromPartial(object: DeepPartial<PacketFee>): PacketFee;
|
|
49
|
+
};
|
|
50
|
+
export declare const PacketFees: {
|
|
51
|
+
encode(message: PacketFees, writer?: _m0.Writer): _m0.Writer;
|
|
52
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PacketFees;
|
|
53
|
+
fromJSON(object: any): PacketFees;
|
|
54
|
+
toJSON(message: PacketFees): unknown;
|
|
55
|
+
fromPartial(object: DeepPartial<PacketFees>): PacketFees;
|
|
56
|
+
};
|
|
57
|
+
export declare const IdentifiedPacketFees: {
|
|
58
|
+
encode(message: IdentifiedPacketFees, writer?: _m0.Writer): _m0.Writer;
|
|
59
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): IdentifiedPacketFees;
|
|
60
|
+
fromJSON(object: any): IdentifiedPacketFees;
|
|
61
|
+
toJSON(message: IdentifiedPacketFees): unknown;
|
|
62
|
+
fromPartial(object: DeepPartial<IdentifiedPacketFees>): IdentifiedPacketFees;
|
|
63
|
+
};
|
|
64
|
+
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
65
|
+
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
66
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
67
|
+
} : Partial<T>;
|
|
68
|
+
export {};
|