coreum-js 2.16.3 → 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 +15 -16
- 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 -28
- package/dist/main/coreum/asset/ft/v1/event.js +744 -138
- package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -21
- package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
- package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -11
- package/dist/main/coreum/asset/ft/v1/params.js +37 -33
- package/dist/main/coreum/asset/ft/v1/query.d.ts +87 -127
- package/dist/main/coreum/asset/ft/v1/query.js +697 -217
- package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -51
- package/dist/main/coreum/asset/ft/v1/token.js +276 -200
- package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -147
- 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 -43
- package/dist/main/coreum/asset/nft/v1/event.js +475 -147
- package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -36
- package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
- package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -26
- package/dist/main/coreum/asset/nft/v1/nft.js +139 -104
- package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -12
- package/dist/main/coreum/asset/nft/v1/params.js +17 -20
- package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -88
- package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
- package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -70
- package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
- package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -11
- package/dist/main/coreum/asset/nft/v1/types.js +273 -45
- package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -12
- package/dist/main/coreum/customparams/v1/genesis.js +26 -22
- package/dist/main/coreum/customparams/v1/params.d.ts +11 -11
- package/dist/main/coreum/customparams/v1/params.js +23 -20
- package/dist/main/coreum/customparams/v1/query.d.ts +14 -20
- 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/extensions/ft.js +2 -1
- package/dist/main/coreum/extensions/nft.js +2 -1
- package/dist/main/coreum/extensions/nftbeta.js +2 -1
- package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -13
- package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
- package/dist/main/coreum/feemodel/v1/params.d.ts +14 -21
- package/dist/main/coreum/feemodel/v1/params.js +113 -66
- package/dist/main/coreum/feemodel/v1/query.d.ts +30 -37
- 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 -27
- package/dist/main/coreum/nft/v1beta1/event.js +103 -77
- package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -19
- package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
- package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -22
- package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
- package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -124
- package/dist/main/coreum/nft/v1beta1/query.js +259 -223
- package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -19
- package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
- package/dist/main/cosmos/extensions/bank.js +2 -1
- package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/main/cosmos/extensions/distribution.js +11 -10
- package/dist/main/cosmos/extensions/gov.d.ts +13 -13
- package/dist/main/cosmos/extensions/gov.js +16 -9
- package/dist/main/cosmos/index.d.ts +8 -8
- package/dist/main/google/api/http.d.ts +2636 -6
- package/dist/main/google/api/http.js +18 -21
- package/dist/main/google/protobuf/any.d.ts +14 -2
- package/dist/main/google/protobuf/any.js +6 -7
- package/dist/main/google/protobuf/duration.d.ts +14 -2
- package/dist/main/google/protobuf/duration.js +3 -4
- package/dist/main/google/protobuf/timestamp.d.ts +14 -2
- package/dist/main/google/protobuf/timestamp.js +3 -4
- package/dist/main/index.js +7 -17
- package/dist/main/services/cosmostation.js +1 -1
- package/dist/main/tendermint/abci/types.d.ts +6360 -92
- package/dist/main/tendermint/abci/types.js +195 -235
- package/dist/main/tendermint/crypto/keys.d.ts +14 -2
- package/dist/main/tendermint/crypto/keys.js +3 -4
- package/dist/main/tendermint/crypto/proof.d.ts +152 -10
- package/dist/main/tendermint/crypto/proof.js +19 -24
- package/dist/main/tendermint/types/params.d.ts +196 -12
- package/dist/main/tendermint/types/params.js +15 -20
- package/dist/main/tendermint/types/types.d.ts +1744 -26
- package/dist/main/tendermint/types/types.js +62 -73
- package/dist/main/tendermint/types/validator.d.ts +230 -6
- package/dist/main/tendermint/types/validator.js +10 -13
- package/dist/main/tendermint/version/types.d.ts +28 -4
- 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/utils/convertStringToAny.d.ts +0 -1
- package/dist/main/utils/nft.js +2 -1
- package/dist/main/wasm/v1/authz.d.ts +20 -75
- package/dist/main/wasm/v1/authz.js +129 -148
- package/dist/main/wasm/v1/extensions/wasm.js +2 -1
- package/dist/main/wasm/v1/genesis.d.ts +14 -34
- package/dist/main/wasm/v1/genesis.js +169 -140
- package/dist/main/wasm/v1/ibc.d.ts +13 -26
- 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.d.ts +40 -4
- package/dist/main/wasm/v1/pagination.js +9 -11
- package/dist/main/wasm/v1/proposal.d.ts +23 -106
- package/dist/main/wasm/v1/proposal.js +634 -465
- package/dist/main/wasm/v1/query.d.ts +35 -187
- package/dist/main/wasm/v1/query.js +370 -363
- package/dist/main/wasm/v1/tx.d.ts +37 -210
- package/dist/main/wasm/v1/tx.js +621 -497
- package/dist/main/wasm/v1/types.d.ts +19 -67
- package/dist/main/wasm/v1/types.js +224 -195
- package/dist/module/client/index.js +2 -1
- 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 -28
- package/dist/module/coreum/asset/ft/v1/event.js +721 -109
- package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -21
- package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
- package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -11
- package/dist/module/coreum/asset/ft/v1/params.js +35 -27
- package/dist/module/coreum/asset/ft/v1/query.d.ts +87 -127
- package/dist/module/coreum/asset/ft/v1/query.js +672 -180
- package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -51
- package/dist/module/coreum/asset/ft/v1/token.js +236 -152
- package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -147
- 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 -43
- package/dist/module/coreum/asset/nft/v1/event.js +448 -112
- package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -36
- package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
- package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -26
- package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
- package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -12
- package/dist/module/coreum/asset/nft/v1/params.js +16 -16
- package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -88
- package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
- package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -70
- package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
- package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -11
- package/dist/module/coreum/asset/nft/v1/types.js +269 -39
- package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -12
- package/dist/module/coreum/customparams/v1/genesis.js +25 -18
- package/dist/module/coreum/customparams/v1/params.d.ts +11 -11
- package/dist/module/coreum/customparams/v1/params.js +21 -14
- package/dist/module/coreum/customparams/v1/query.d.ts +14 -20
- 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 -13
- package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
- package/dist/module/coreum/feemodel/v1/params.d.ts +14 -21
- package/dist/module/coreum/feemodel/v1/params.js +105 -54
- package/dist/module/coreum/feemodel/v1/query.d.ts +30 -37
- 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 -27
- package/dist/module/coreum/nft/v1beta1/event.js +90 -58
- package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -19
- package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
- package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -22
- package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
- package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -124
- package/dist/module/coreum/nft/v1beta1/query.js +231 -183
- package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -19
- 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/google/api/http.d.ts +2636 -6
- package/dist/module/google/protobuf/any.d.ts +14 -2
- package/dist/module/google/protobuf/duration.d.ts +14 -2
- package/dist/module/google/protobuf/timestamp.d.ts +14 -2
- package/dist/module/services/cosmostation.js +1 -1
- package/dist/module/tendermint/abci/types.d.ts +6360 -92
- package/dist/module/tendermint/crypto/keys.d.ts +14 -2
- package/dist/module/tendermint/crypto/proof.d.ts +152 -10
- package/dist/module/tendermint/types/params.d.ts +196 -12
- package/dist/module/tendermint/types/types.d.ts +1744 -26
- package/dist/module/tendermint/types/validator.d.ts +230 -6
- package/dist/module/tendermint/version/types.d.ts +28 -4
- package/dist/module/types/core.d.ts +2 -1
- package/dist/module/types/core.js +2 -0
- package/dist/module/utils/convertStringToAny.d.ts +0 -1
- package/dist/module/wasm/v1/authz.d.ts +20 -75
- package/dist/module/wasm/v1/authz.js +111 -119
- package/dist/module/wasm/v1/genesis.d.ts +14 -34
- package/dist/module/wasm/v1/genesis.js +161 -125
- package/dist/module/wasm/v1/ibc.d.ts +13 -26
- package/dist/module/wasm/v1/ibc.js +83 -62
- package/dist/module/wasm/v1/index.d.ts +1 -2
- package/dist/module/wasm/v1/pagination.d.ts +40 -4
- package/dist/module/wasm/v1/proposal.d.ts +23 -106
- package/dist/module/wasm/v1/proposal.js +562 -377
- package/dist/module/wasm/v1/query.d.ts +35 -187
- package/dist/module/wasm/v1/query.js +330 -301
- package/dist/module/wasm/v1/tx.d.ts +37 -210
- package/dist/module/wasm/v1/tx.js +551 -404
- package/dist/module/wasm/v1/types.d.ts +19 -67
- package/dist/module/wasm/v1/types.js +196 -156
- package/package.json +11 -10
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.6.1
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: coreum-protos/dex/genesis.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.AccountDenomOrdersCount = exports.OrderBookDataWithID = exports.GenesisState = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const binary_1 = require("cosmjs-types/binary");
|
|
11
|
+
const order_1 = require("./order");
|
|
12
|
+
const params_1 = require("./params");
|
|
13
|
+
exports.protobufPackage = "coreum.dex.v1";
|
|
14
|
+
function createBaseGenesisState() {
|
|
15
|
+
return {
|
|
16
|
+
params: undefined,
|
|
17
|
+
orderBooks: [],
|
|
18
|
+
orders: [],
|
|
19
|
+
orderSequence: 0,
|
|
20
|
+
accountsDenomsOrdersCounts: [],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
exports.GenesisState = {
|
|
24
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
25
|
+
if (message.params !== undefined) {
|
|
26
|
+
params_1.Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
|
27
|
+
}
|
|
28
|
+
for (const v of message.orderBooks) {
|
|
29
|
+
exports.OrderBookDataWithID.encode(v, writer.uint32(18).fork()).ldelim();
|
|
30
|
+
}
|
|
31
|
+
for (const v of message.orders) {
|
|
32
|
+
order_1.Order.encode(v, writer.uint32(26).fork()).ldelim();
|
|
33
|
+
}
|
|
34
|
+
if (message.orderSequence !== 0) {
|
|
35
|
+
writer.uint32(32).uint64(message.orderSequence);
|
|
36
|
+
}
|
|
37
|
+
for (const v of message.accountsDenomsOrdersCounts) {
|
|
38
|
+
exports.AccountDenomOrdersCount.encode(v, writer.uint32(42).fork()).ldelim();
|
|
39
|
+
}
|
|
40
|
+
return writer;
|
|
41
|
+
},
|
|
42
|
+
decode(input, length) {
|
|
43
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
44
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
45
|
+
const message = createBaseGenesisState();
|
|
46
|
+
while (reader.pos < end) {
|
|
47
|
+
const tag = reader.uint32();
|
|
48
|
+
switch (tag >>> 3) {
|
|
49
|
+
case 1: {
|
|
50
|
+
if (tag !== 10) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
message.params = params_1.Params.decode(reader, reader.uint32());
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
case 2: {
|
|
57
|
+
if (tag !== 18) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
message.orderBooks.push(exports.OrderBookDataWithID.decode(reader, reader.uint32()));
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
case 3: {
|
|
64
|
+
if (tag !== 26) {
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
message.orders.push(order_1.Order.decode(reader, reader.uint32()));
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
case 4: {
|
|
71
|
+
if (tag !== 32) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
message.orderSequence = longToNumber(reader.uint64());
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
case 5: {
|
|
78
|
+
if (tag !== 42) {
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
message.accountsDenomsOrdersCounts.push(exports.AccountDenomOrdersCount.decode(reader, reader.uint32()));
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
reader.skip(tag & 7);
|
|
89
|
+
}
|
|
90
|
+
return message;
|
|
91
|
+
},
|
|
92
|
+
fromJSON(object) {
|
|
93
|
+
return {
|
|
94
|
+
params: isSet(object.params) ? params_1.Params.fromJSON(object.params) : undefined,
|
|
95
|
+
orderBooks: globalThis.Array.isArray(object?.orderBooks)
|
|
96
|
+
? object.orderBooks.map((e) => exports.OrderBookDataWithID.fromJSON(e))
|
|
97
|
+
: [],
|
|
98
|
+
orders: globalThis.Array.isArray(object?.orders)
|
|
99
|
+
? object.orders.map((e) => order_1.Order.fromJSON(e))
|
|
100
|
+
: [],
|
|
101
|
+
orderSequence: isSet(object.orderSequence)
|
|
102
|
+
? globalThis.Number(object.orderSequence)
|
|
103
|
+
: 0,
|
|
104
|
+
accountsDenomsOrdersCounts: globalThis.Array.isArray(object?.accountsDenomsOrdersCounts)
|
|
105
|
+
? object.accountsDenomsOrdersCounts.map((e) => exports.AccountDenomOrdersCount.fromJSON(e))
|
|
106
|
+
: [],
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
toJSON(message) {
|
|
110
|
+
const obj = {};
|
|
111
|
+
if (message.params !== undefined) {
|
|
112
|
+
obj.params = params_1.Params.toJSON(message.params);
|
|
113
|
+
}
|
|
114
|
+
if (message.orderBooks?.length) {
|
|
115
|
+
obj.orderBooks = message.orderBooks.map((e) => exports.OrderBookDataWithID.toJSON(e));
|
|
116
|
+
}
|
|
117
|
+
if (message.orders?.length) {
|
|
118
|
+
obj.orders = message.orders.map((e) => order_1.Order.toJSON(e));
|
|
119
|
+
}
|
|
120
|
+
if (message.orderSequence !== 0) {
|
|
121
|
+
obj.orderSequence = Math.round(message.orderSequence);
|
|
122
|
+
}
|
|
123
|
+
if (message.accountsDenomsOrdersCounts?.length) {
|
|
124
|
+
obj.accountsDenomsOrdersCounts = message.accountsDenomsOrdersCounts.map((e) => exports.AccountDenomOrdersCount.toJSON(e));
|
|
125
|
+
}
|
|
126
|
+
return obj;
|
|
127
|
+
},
|
|
128
|
+
create(base) {
|
|
129
|
+
return exports.GenesisState.fromPartial(base ?? {});
|
|
130
|
+
},
|
|
131
|
+
fromPartial(object) {
|
|
132
|
+
const message = createBaseGenesisState();
|
|
133
|
+
message.params =
|
|
134
|
+
object.params !== undefined && object.params !== null
|
|
135
|
+
? params_1.Params.fromPartial(object.params)
|
|
136
|
+
: undefined;
|
|
137
|
+
message.orderBooks =
|
|
138
|
+
object.orderBooks?.map((e) => exports.OrderBookDataWithID.fromPartial(e)) || [];
|
|
139
|
+
message.orders = object.orders?.map((e) => order_1.Order.fromPartial(e)) || [];
|
|
140
|
+
message.orderSequence = object.orderSequence ?? 0;
|
|
141
|
+
message.accountsDenomsOrdersCounts =
|
|
142
|
+
object.accountsDenomsOrdersCounts?.map((e) => exports.AccountDenomOrdersCount.fromPartial(e)) || [];
|
|
143
|
+
return message;
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
function createBaseOrderBookDataWithID() {
|
|
147
|
+
return { id: 0, data: undefined };
|
|
148
|
+
}
|
|
149
|
+
exports.OrderBookDataWithID = {
|
|
150
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
151
|
+
if (message.id !== 0) {
|
|
152
|
+
writer.uint32(8).uint32(message.id);
|
|
153
|
+
}
|
|
154
|
+
if (message.data !== undefined) {
|
|
155
|
+
order_1.OrderBookData.encode(message.data, writer.uint32(18).fork()).ldelim();
|
|
156
|
+
}
|
|
157
|
+
return writer;
|
|
158
|
+
},
|
|
159
|
+
decode(input, length) {
|
|
160
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
161
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
162
|
+
const message = createBaseOrderBookDataWithID();
|
|
163
|
+
while (reader.pos < end) {
|
|
164
|
+
const tag = reader.uint32();
|
|
165
|
+
switch (tag >>> 3) {
|
|
166
|
+
case 1: {
|
|
167
|
+
if (tag !== 8) {
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
message.id = reader.uint32();
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
case 2: {
|
|
174
|
+
if (tag !== 18) {
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
message.data = order_1.OrderBookData.decode(reader, reader.uint32());
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
reader.skip(tag & 7);
|
|
185
|
+
}
|
|
186
|
+
return message;
|
|
187
|
+
},
|
|
188
|
+
fromJSON(object) {
|
|
189
|
+
return {
|
|
190
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
191
|
+
data: isSet(object.data)
|
|
192
|
+
? order_1.OrderBookData.fromJSON(object.data)
|
|
193
|
+
: undefined,
|
|
194
|
+
};
|
|
195
|
+
},
|
|
196
|
+
toJSON(message) {
|
|
197
|
+
const obj = {};
|
|
198
|
+
if (message.id !== 0) {
|
|
199
|
+
obj.id = Math.round(message.id);
|
|
200
|
+
}
|
|
201
|
+
if (message.data !== undefined) {
|
|
202
|
+
obj.data = order_1.OrderBookData.toJSON(message.data);
|
|
203
|
+
}
|
|
204
|
+
return obj;
|
|
205
|
+
},
|
|
206
|
+
create(base) {
|
|
207
|
+
return exports.OrderBookDataWithID.fromPartial(base ?? {});
|
|
208
|
+
},
|
|
209
|
+
fromPartial(object) {
|
|
210
|
+
const message = createBaseOrderBookDataWithID();
|
|
211
|
+
message.id = object.id ?? 0;
|
|
212
|
+
message.data =
|
|
213
|
+
object.data !== undefined && object.data !== null
|
|
214
|
+
? order_1.OrderBookData.fromPartial(object.data)
|
|
215
|
+
: undefined;
|
|
216
|
+
return message;
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
function createBaseAccountDenomOrdersCount() {
|
|
220
|
+
return { accountNumber: 0, denom: "", ordersCount: 0 };
|
|
221
|
+
}
|
|
222
|
+
exports.AccountDenomOrdersCount = {
|
|
223
|
+
encode(message, writer = new binary_1.BinaryWriter()) {
|
|
224
|
+
if (message.accountNumber !== 0) {
|
|
225
|
+
writer.uint32(8).uint64(message.accountNumber);
|
|
226
|
+
}
|
|
227
|
+
if (message.denom !== "") {
|
|
228
|
+
writer.uint32(18).string(message.denom);
|
|
229
|
+
}
|
|
230
|
+
if (message.ordersCount !== 0) {
|
|
231
|
+
writer.uint32(24).uint64(message.ordersCount);
|
|
232
|
+
}
|
|
233
|
+
return writer;
|
|
234
|
+
},
|
|
235
|
+
decode(input, length) {
|
|
236
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
237
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
238
|
+
const message = createBaseAccountDenomOrdersCount();
|
|
239
|
+
while (reader.pos < end) {
|
|
240
|
+
const tag = reader.uint32();
|
|
241
|
+
switch (tag >>> 3) {
|
|
242
|
+
case 1: {
|
|
243
|
+
if (tag !== 8) {
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
message.accountNumber = longToNumber(reader.uint64());
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
case 2: {
|
|
250
|
+
if (tag !== 18) {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
message.denom = reader.string();
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
case 3: {
|
|
257
|
+
if (tag !== 24) {
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
message.ordersCount = longToNumber(reader.uint64());
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
reader.skip(tag & 7);
|
|
268
|
+
}
|
|
269
|
+
return message;
|
|
270
|
+
},
|
|
271
|
+
fromJSON(object) {
|
|
272
|
+
return {
|
|
273
|
+
accountNumber: isSet(object.accountNumber)
|
|
274
|
+
? globalThis.Number(object.accountNumber)
|
|
275
|
+
: 0,
|
|
276
|
+
denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
|
|
277
|
+
ordersCount: isSet(object.ordersCount)
|
|
278
|
+
? globalThis.Number(object.ordersCount)
|
|
279
|
+
: 0,
|
|
280
|
+
};
|
|
281
|
+
},
|
|
282
|
+
toJSON(message) {
|
|
283
|
+
const obj = {};
|
|
284
|
+
if (message.accountNumber !== 0) {
|
|
285
|
+
obj.accountNumber = Math.round(message.accountNumber);
|
|
286
|
+
}
|
|
287
|
+
if (message.denom !== "") {
|
|
288
|
+
obj.denom = message.denom;
|
|
289
|
+
}
|
|
290
|
+
if (message.ordersCount !== 0) {
|
|
291
|
+
obj.ordersCount = Math.round(message.ordersCount);
|
|
292
|
+
}
|
|
293
|
+
return obj;
|
|
294
|
+
},
|
|
295
|
+
create(base) {
|
|
296
|
+
return exports.AccountDenomOrdersCount.fromPartial(base ?? {});
|
|
297
|
+
},
|
|
298
|
+
fromPartial(object) {
|
|
299
|
+
const message = createBaseAccountDenomOrdersCount();
|
|
300
|
+
message.accountNumber = object.accountNumber ?? 0;
|
|
301
|
+
message.denom = object.denom ?? "";
|
|
302
|
+
message.ordersCount = object.ordersCount ?? 0;
|
|
303
|
+
return message;
|
|
304
|
+
},
|
|
305
|
+
};
|
|
306
|
+
function longToNumber(int64) {
|
|
307
|
+
const num = globalThis.Number(int64.toString());
|
|
308
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
309
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
310
|
+
}
|
|
311
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
312
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
313
|
+
}
|
|
314
|
+
return num;
|
|
315
|
+
}
|
|
316
|
+
function isSet(value) {
|
|
317
|
+
return value !== null && value !== undefined;
|
|
318
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
|
|
2
|
+
import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
|
|
3
|
+
export declare const protobufPackage = "coreum.dex.v1";
|
|
4
|
+
/** Side is order side. */
|
|
5
|
+
export declare enum Side {
|
|
6
|
+
/** SIDE_UNSPECIFIED - SIDE_UNSPECIFIED reserves the default value, to protect against unexpected settings. */
|
|
7
|
+
SIDE_UNSPECIFIED = 0,
|
|
8
|
+
/** SIDE_BUY - SIDE_BUY means that the order is to buy base_denom quantity with the price. */
|
|
9
|
+
SIDE_BUY = 1,
|
|
10
|
+
/** SIDE_SELL - SIDE_SELL means that the order is to sell base_denom quantity with the price. */
|
|
11
|
+
SIDE_SELL = 2,
|
|
12
|
+
UNRECOGNIZED = -1
|
|
13
|
+
}
|
|
14
|
+
export declare function sideFromJSON(object: any): Side;
|
|
15
|
+
export declare function sideToJSON(object: Side): string;
|
|
16
|
+
/** Type is order type. */
|
|
17
|
+
export declare enum OrderType {
|
|
18
|
+
/** ORDER_TYPE_UNSPECIFIED - order_type_unspecified reserves the default value, to protect against unexpected settings. */
|
|
19
|
+
ORDER_TYPE_UNSPECIFIED = 0,
|
|
20
|
+
/** ORDER_TYPE_LIMIT - order_type_limit means that the order is limit order. */
|
|
21
|
+
ORDER_TYPE_LIMIT = 1,
|
|
22
|
+
/** ORDER_TYPE_MARKET - limit order_type_market that the order is market order. */
|
|
23
|
+
ORDER_TYPE_MARKET = 2,
|
|
24
|
+
UNRECOGNIZED = -1
|
|
25
|
+
}
|
|
26
|
+
export declare function orderTypeFromJSON(object: any): OrderType;
|
|
27
|
+
export declare function orderTypeToJSON(object: OrderType): string;
|
|
28
|
+
/** TimeInForce is order time in force. */
|
|
29
|
+
export declare enum TimeInForce {
|
|
30
|
+
/** TIME_IN_FORCE_UNSPECIFIED - time_in_force_unspecified reserves the default value, to protect against unexpected settings. */
|
|
31
|
+
TIME_IN_FORCE_UNSPECIFIED = 0,
|
|
32
|
+
/** TIME_IN_FORCE_GTC - time_in_force_gtc means that the order remains active until it is fully executed or manually canceled. */
|
|
33
|
+
TIME_IN_FORCE_GTC = 1,
|
|
34
|
+
/**
|
|
35
|
+
* TIME_IN_FORCE_IOC - time_in_force_ioc means that order must be executed immediately, either in full or partially. Any portion of the
|
|
36
|
+
* order that cannot be filled immediately is canceled.
|
|
37
|
+
*/
|
|
38
|
+
TIME_IN_FORCE_IOC = 2,
|
|
39
|
+
/** TIME_IN_FORCE_FOK - time_in_force_fok means that order must be fully executed or canceled. */
|
|
40
|
+
TIME_IN_FORCE_FOK = 3,
|
|
41
|
+
UNRECOGNIZED = -1
|
|
42
|
+
}
|
|
43
|
+
export declare function timeInForceFromJSON(object: any): TimeInForce;
|
|
44
|
+
export declare function timeInForceToJSON(object: TimeInForce): string;
|
|
45
|
+
/** GoodTil is a good til order settings. */
|
|
46
|
+
export interface GoodTil {
|
|
47
|
+
/** good_til_block_height means that order remains active until a specific blockchain block height is reached. */
|
|
48
|
+
goodTilBlockHeight: number;
|
|
49
|
+
/** good_til_block_time means that order remains active until a specific blockchain block time is reached. */
|
|
50
|
+
goodTilBlockTime: Date | undefined;
|
|
51
|
+
}
|
|
52
|
+
/** CancelGoodTil is a cancel good til message for the delay router. */
|
|
53
|
+
export interface CancelGoodTil {
|
|
54
|
+
/** creator is order creator address. */
|
|
55
|
+
creator: string;
|
|
56
|
+
/** order_sequence is order sequence. */
|
|
57
|
+
orderSequence: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Order represents a DEX order, encapsulating both limit and market orders. It contains comprehensive information about
|
|
61
|
+
* the order's state.
|
|
62
|
+
*/
|
|
63
|
+
export interface Order {
|
|
64
|
+
/** creator is order creator address. */
|
|
65
|
+
creator: string;
|
|
66
|
+
/** type is order type. */
|
|
67
|
+
type: OrderType;
|
|
68
|
+
/** id is unique order ID. */
|
|
69
|
+
id: string;
|
|
70
|
+
/** sequence is unique order sequence generated at the time of the order placement. */
|
|
71
|
+
sequence: number;
|
|
72
|
+
/** base_denom is base order denom. */
|
|
73
|
+
baseDenom: string;
|
|
74
|
+
/** quote_denom is quote order denom */
|
|
75
|
+
quoteDenom: string;
|
|
76
|
+
/** price is value of one unit of the base_denom expressed in terms of the quote_denom. */
|
|
77
|
+
price: string;
|
|
78
|
+
/** quantity is amount of the base base_denom being traded. */
|
|
79
|
+
quantity: string;
|
|
80
|
+
/** side is order side. */
|
|
81
|
+
side: Side;
|
|
82
|
+
/** remaining_base_quantity - is remaining quantity of base denom which user wants to sell or buy. */
|
|
83
|
+
remainingBaseQuantity: string;
|
|
84
|
+
/** remaining_spendable_balance - is balance up to which user wants to spend to execute the order. */
|
|
85
|
+
remainingSpendableBalance: string;
|
|
86
|
+
/** good_til is order good til */
|
|
87
|
+
goodTil: GoodTil | undefined;
|
|
88
|
+
/** time_in_force is order time in force */
|
|
89
|
+
timeInForce: TimeInForce;
|
|
90
|
+
/** reserve is the reserve required to save the order in the order book */
|
|
91
|
+
reserve: Coin | undefined;
|
|
92
|
+
}
|
|
93
|
+
/** OrderData represents the order information for the store missing in the order book record. */
|
|
94
|
+
export interface OrderData {
|
|
95
|
+
/** order ID provided by the creator. */
|
|
96
|
+
orderId: string;
|
|
97
|
+
/** order_book_id is order book ID. */
|
|
98
|
+
orderBookId: number;
|
|
99
|
+
/** price is value of one unit of the base_denom expressed in terms of the quote_denom. */
|
|
100
|
+
price: string;
|
|
101
|
+
/** quantity is amount of the base base_denom being traded. */
|
|
102
|
+
quantity: string;
|
|
103
|
+
/** side is order side. */
|
|
104
|
+
side: Side;
|
|
105
|
+
/** good_til is order good til */
|
|
106
|
+
goodTil: GoodTil | undefined;
|
|
107
|
+
/** reserve is the reserve required to save the order in the order book */
|
|
108
|
+
reserve: Coin | undefined;
|
|
109
|
+
}
|
|
110
|
+
/** OrderBookData is a order book data used by order for the store. */
|
|
111
|
+
export interface OrderBookData {
|
|
112
|
+
/** base_denom is base order book denom. */
|
|
113
|
+
baseDenom: string;
|
|
114
|
+
/** quote_denom is quote order book denom */
|
|
115
|
+
quoteDenom: string;
|
|
116
|
+
}
|
|
117
|
+
/** OrderBookRecord is a single order book record, it combines both key and value from the store. */
|
|
118
|
+
export interface OrderBookRecord {
|
|
119
|
+
/** order_book_id is order book ID. */
|
|
120
|
+
orderBookId: number;
|
|
121
|
+
/** side is order side. */
|
|
122
|
+
side: Side;
|
|
123
|
+
/** price is order book record price. */
|
|
124
|
+
price: string;
|
|
125
|
+
/** order_sequence is order sequence. */
|
|
126
|
+
orderSequence: number;
|
|
127
|
+
/** order ID provided by the creator. */
|
|
128
|
+
orderId: string;
|
|
129
|
+
/** account_number is account number which corresponds the order creator. */
|
|
130
|
+
accountNumber: number;
|
|
131
|
+
/** remaining_base_quantity - is remaining quantity of base denom which user wants to sell or buy. */
|
|
132
|
+
remainingBaseQuantity: string;
|
|
133
|
+
/** remaining_spendable_balance - is balance up to which user wants to spend to execute the order. */
|
|
134
|
+
remainingSpendableBalance: string;
|
|
135
|
+
}
|
|
136
|
+
/** OrderBookRecordData is a single order book record used for the store. */
|
|
137
|
+
export interface OrderBookRecordData {
|
|
138
|
+
/** order ID provided by the creator. */
|
|
139
|
+
orderId: string;
|
|
140
|
+
/** account_number is account number which corresponds the order creator. */
|
|
141
|
+
accountNumber: number;
|
|
142
|
+
/** remaining_base_quantity - is remaining quantity of base denom which user wants to sell or buy. */
|
|
143
|
+
remainingBaseQuantity: string;
|
|
144
|
+
/** remaining_spendable_balance - is balance up to which user wants to spend to execute the order. */
|
|
145
|
+
remainingSpendableBalance: string;
|
|
146
|
+
}
|
|
147
|
+
export declare const GoodTil: MessageFns<GoodTil>;
|
|
148
|
+
export declare const CancelGoodTil: MessageFns<CancelGoodTil>;
|
|
149
|
+
export declare const Order: MessageFns<Order>;
|
|
150
|
+
export declare const OrderData: MessageFns<OrderData>;
|
|
151
|
+
export declare const OrderBookData: MessageFns<OrderBookData>;
|
|
152
|
+
export declare const OrderBookRecord: MessageFns<OrderBookRecord>;
|
|
153
|
+
export declare const OrderBookRecordData: MessageFns<OrderBookRecordData>;
|
|
154
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
155
|
+
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 {} ? {
|
|
156
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
157
|
+
} : Partial<T>;
|
|
158
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
159
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
160
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
161
|
+
} & {
|
|
162
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
163
|
+
};
|
|
164
|
+
export interface MessageFns<T> {
|
|
165
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
166
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
167
|
+
fromJSON(object: any): T;
|
|
168
|
+
toJSON(message: T): unknown;
|
|
169
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
170
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
171
|
+
}
|
|
172
|
+
export {};
|