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
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.6.1
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: coreum-protos/dex/event.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
export const protobufPackage = "coreum.dex.v1";
|
|
9
|
+
function createBaseEventOrderPlaced() {
|
|
10
|
+
return { creator: "", id: "", sequence: 0 };
|
|
11
|
+
}
|
|
12
|
+
export const EventOrderPlaced = {
|
|
13
|
+
encode(message, writer = new BinaryWriter()) {
|
|
14
|
+
if (message.creator !== "") {
|
|
15
|
+
writer.uint32(10).string(message.creator);
|
|
16
|
+
}
|
|
17
|
+
if (message.id !== "") {
|
|
18
|
+
writer.uint32(18).string(message.id);
|
|
19
|
+
}
|
|
20
|
+
if (message.sequence !== 0) {
|
|
21
|
+
writer.uint32(24).uint64(message.sequence);
|
|
22
|
+
}
|
|
23
|
+
return writer;
|
|
24
|
+
},
|
|
25
|
+
decode(input, length) {
|
|
26
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
27
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
28
|
+
const message = createBaseEventOrderPlaced();
|
|
29
|
+
while (reader.pos < end) {
|
|
30
|
+
const tag = reader.uint32();
|
|
31
|
+
switch (tag >>> 3) {
|
|
32
|
+
case 1: {
|
|
33
|
+
if (tag !== 10) {
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
message.creator = reader.string();
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
case 2: {
|
|
40
|
+
if (tag !== 18) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
message.id = reader.string();
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
case 3: {
|
|
47
|
+
if (tag !== 24) {
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
message.sequence = longToNumber(reader.uint64());
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
reader.skip(tag & 7);
|
|
58
|
+
}
|
|
59
|
+
return message;
|
|
60
|
+
},
|
|
61
|
+
fromJSON(object) {
|
|
62
|
+
return {
|
|
63
|
+
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
64
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
65
|
+
sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
toJSON(message) {
|
|
69
|
+
const obj = {};
|
|
70
|
+
if (message.creator !== "") {
|
|
71
|
+
obj.creator = message.creator;
|
|
72
|
+
}
|
|
73
|
+
if (message.id !== "") {
|
|
74
|
+
obj.id = message.id;
|
|
75
|
+
}
|
|
76
|
+
if (message.sequence !== 0) {
|
|
77
|
+
obj.sequence = Math.round(message.sequence);
|
|
78
|
+
}
|
|
79
|
+
return obj;
|
|
80
|
+
},
|
|
81
|
+
create(base) {
|
|
82
|
+
return EventOrderPlaced.fromPartial(base ?? {});
|
|
83
|
+
},
|
|
84
|
+
fromPartial(object) {
|
|
85
|
+
const message = createBaseEventOrderPlaced();
|
|
86
|
+
message.creator = object.creator ?? "";
|
|
87
|
+
message.id = object.id ?? "";
|
|
88
|
+
message.sequence = object.sequence ?? 0;
|
|
89
|
+
return message;
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
function createBaseEventOrderReduced() {
|
|
93
|
+
return { creator: "", id: "", sequence: 0, sentCoin: "", receivedCoin: "" };
|
|
94
|
+
}
|
|
95
|
+
export const EventOrderReduced = {
|
|
96
|
+
encode(message, writer = new BinaryWriter()) {
|
|
97
|
+
if (message.creator !== "") {
|
|
98
|
+
writer.uint32(10).string(message.creator);
|
|
99
|
+
}
|
|
100
|
+
if (message.id !== "") {
|
|
101
|
+
writer.uint32(18).string(message.id);
|
|
102
|
+
}
|
|
103
|
+
if (message.sequence !== 0) {
|
|
104
|
+
writer.uint32(24).uint64(message.sequence);
|
|
105
|
+
}
|
|
106
|
+
if (message.sentCoin !== "") {
|
|
107
|
+
writer.uint32(34).string(message.sentCoin);
|
|
108
|
+
}
|
|
109
|
+
if (message.receivedCoin !== "") {
|
|
110
|
+
writer.uint32(42).string(message.receivedCoin);
|
|
111
|
+
}
|
|
112
|
+
return writer;
|
|
113
|
+
},
|
|
114
|
+
decode(input, length) {
|
|
115
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
116
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
117
|
+
const message = createBaseEventOrderReduced();
|
|
118
|
+
while (reader.pos < end) {
|
|
119
|
+
const tag = reader.uint32();
|
|
120
|
+
switch (tag >>> 3) {
|
|
121
|
+
case 1: {
|
|
122
|
+
if (tag !== 10) {
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
message.creator = reader.string();
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
case 2: {
|
|
129
|
+
if (tag !== 18) {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
message.id = reader.string();
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
case 3: {
|
|
136
|
+
if (tag !== 24) {
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
message.sequence = longToNumber(reader.uint64());
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
case 4: {
|
|
143
|
+
if (tag !== 34) {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
message.sentCoin = reader.string();
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
case 5: {
|
|
150
|
+
if (tag !== 42) {
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
message.receivedCoin = reader.string();
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
reader.skip(tag & 7);
|
|
161
|
+
}
|
|
162
|
+
return message;
|
|
163
|
+
},
|
|
164
|
+
fromJSON(object) {
|
|
165
|
+
return {
|
|
166
|
+
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
167
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
168
|
+
sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
|
|
169
|
+
sentCoin: isSet(object.sentCoin)
|
|
170
|
+
? globalThis.String(object.sentCoin)
|
|
171
|
+
: "",
|
|
172
|
+
receivedCoin: isSet(object.receivedCoin)
|
|
173
|
+
? globalThis.String(object.receivedCoin)
|
|
174
|
+
: "",
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
toJSON(message) {
|
|
178
|
+
const obj = {};
|
|
179
|
+
if (message.creator !== "") {
|
|
180
|
+
obj.creator = message.creator;
|
|
181
|
+
}
|
|
182
|
+
if (message.id !== "") {
|
|
183
|
+
obj.id = message.id;
|
|
184
|
+
}
|
|
185
|
+
if (message.sequence !== 0) {
|
|
186
|
+
obj.sequence = Math.round(message.sequence);
|
|
187
|
+
}
|
|
188
|
+
if (message.sentCoin !== "") {
|
|
189
|
+
obj.sentCoin = message.sentCoin;
|
|
190
|
+
}
|
|
191
|
+
if (message.receivedCoin !== "") {
|
|
192
|
+
obj.receivedCoin = message.receivedCoin;
|
|
193
|
+
}
|
|
194
|
+
return obj;
|
|
195
|
+
},
|
|
196
|
+
create(base) {
|
|
197
|
+
return EventOrderReduced.fromPartial(base ?? {});
|
|
198
|
+
},
|
|
199
|
+
fromPartial(object) {
|
|
200
|
+
const message = createBaseEventOrderReduced();
|
|
201
|
+
message.creator = object.creator ?? "";
|
|
202
|
+
message.id = object.id ?? "";
|
|
203
|
+
message.sequence = object.sequence ?? 0;
|
|
204
|
+
message.sentCoin = object.sentCoin ?? "";
|
|
205
|
+
message.receivedCoin = object.receivedCoin ?? "";
|
|
206
|
+
return message;
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
function createBaseEventOrderCreated() {
|
|
210
|
+
return {
|
|
211
|
+
creator: "",
|
|
212
|
+
id: "",
|
|
213
|
+
sequence: 0,
|
|
214
|
+
remainingBaseQuantity: "",
|
|
215
|
+
remainingSpendableBalance: "",
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
export const EventOrderCreated = {
|
|
219
|
+
encode(message, writer = new BinaryWriter()) {
|
|
220
|
+
if (message.creator !== "") {
|
|
221
|
+
writer.uint32(10).string(message.creator);
|
|
222
|
+
}
|
|
223
|
+
if (message.id !== "") {
|
|
224
|
+
writer.uint32(18).string(message.id);
|
|
225
|
+
}
|
|
226
|
+
if (message.sequence !== 0) {
|
|
227
|
+
writer.uint32(24).uint64(message.sequence);
|
|
228
|
+
}
|
|
229
|
+
if (message.remainingBaseQuantity !== "") {
|
|
230
|
+
writer.uint32(34).string(message.remainingBaseQuantity);
|
|
231
|
+
}
|
|
232
|
+
if (message.remainingSpendableBalance !== "") {
|
|
233
|
+
writer.uint32(42).string(message.remainingSpendableBalance);
|
|
234
|
+
}
|
|
235
|
+
return writer;
|
|
236
|
+
},
|
|
237
|
+
decode(input, length) {
|
|
238
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
239
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
240
|
+
const message = createBaseEventOrderCreated();
|
|
241
|
+
while (reader.pos < end) {
|
|
242
|
+
const tag = reader.uint32();
|
|
243
|
+
switch (tag >>> 3) {
|
|
244
|
+
case 1: {
|
|
245
|
+
if (tag !== 10) {
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
message.creator = reader.string();
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
case 2: {
|
|
252
|
+
if (tag !== 18) {
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
message.id = reader.string();
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
case 3: {
|
|
259
|
+
if (tag !== 24) {
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
message.sequence = longToNumber(reader.uint64());
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
case 4: {
|
|
266
|
+
if (tag !== 34) {
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
message.remainingBaseQuantity = reader.string();
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
case 5: {
|
|
273
|
+
if (tag !== 42) {
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
message.remainingSpendableBalance = reader.string();
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
reader.skip(tag & 7);
|
|
284
|
+
}
|
|
285
|
+
return message;
|
|
286
|
+
},
|
|
287
|
+
fromJSON(object) {
|
|
288
|
+
return {
|
|
289
|
+
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
290
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
291
|
+
sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
|
|
292
|
+
remainingBaseQuantity: isSet(object.remainingBaseQuantity)
|
|
293
|
+
? globalThis.String(object.remainingBaseQuantity)
|
|
294
|
+
: "",
|
|
295
|
+
remainingSpendableBalance: isSet(object.remainingSpendableBalance)
|
|
296
|
+
? globalThis.String(object.remainingSpendableBalance)
|
|
297
|
+
: "",
|
|
298
|
+
};
|
|
299
|
+
},
|
|
300
|
+
toJSON(message) {
|
|
301
|
+
const obj = {};
|
|
302
|
+
if (message.creator !== "") {
|
|
303
|
+
obj.creator = message.creator;
|
|
304
|
+
}
|
|
305
|
+
if (message.id !== "") {
|
|
306
|
+
obj.id = message.id;
|
|
307
|
+
}
|
|
308
|
+
if (message.sequence !== 0) {
|
|
309
|
+
obj.sequence = Math.round(message.sequence);
|
|
310
|
+
}
|
|
311
|
+
if (message.remainingBaseQuantity !== "") {
|
|
312
|
+
obj.remainingBaseQuantity = message.remainingBaseQuantity;
|
|
313
|
+
}
|
|
314
|
+
if (message.remainingSpendableBalance !== "") {
|
|
315
|
+
obj.remainingSpendableBalance = message.remainingSpendableBalance;
|
|
316
|
+
}
|
|
317
|
+
return obj;
|
|
318
|
+
},
|
|
319
|
+
create(base) {
|
|
320
|
+
return EventOrderCreated.fromPartial(base ?? {});
|
|
321
|
+
},
|
|
322
|
+
fromPartial(object) {
|
|
323
|
+
const message = createBaseEventOrderCreated();
|
|
324
|
+
message.creator = object.creator ?? "";
|
|
325
|
+
message.id = object.id ?? "";
|
|
326
|
+
message.sequence = object.sequence ?? 0;
|
|
327
|
+
message.remainingBaseQuantity = object.remainingBaseQuantity ?? "";
|
|
328
|
+
message.remainingSpendableBalance = object.remainingSpendableBalance ?? "";
|
|
329
|
+
return message;
|
|
330
|
+
},
|
|
331
|
+
};
|
|
332
|
+
function createBaseEventOrderClosed() {
|
|
333
|
+
return {
|
|
334
|
+
creator: "",
|
|
335
|
+
id: "",
|
|
336
|
+
sequence: 0,
|
|
337
|
+
remainingBaseQuantity: "",
|
|
338
|
+
remainingSpendableBalance: "",
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
export const EventOrderClosed = {
|
|
342
|
+
encode(message, writer = new BinaryWriter()) {
|
|
343
|
+
if (message.creator !== "") {
|
|
344
|
+
writer.uint32(10).string(message.creator);
|
|
345
|
+
}
|
|
346
|
+
if (message.id !== "") {
|
|
347
|
+
writer.uint32(18).string(message.id);
|
|
348
|
+
}
|
|
349
|
+
if (message.sequence !== 0) {
|
|
350
|
+
writer.uint32(24).uint64(message.sequence);
|
|
351
|
+
}
|
|
352
|
+
if (message.remainingBaseQuantity !== "") {
|
|
353
|
+
writer.uint32(34).string(message.remainingBaseQuantity);
|
|
354
|
+
}
|
|
355
|
+
if (message.remainingSpendableBalance !== "") {
|
|
356
|
+
writer.uint32(42).string(message.remainingSpendableBalance);
|
|
357
|
+
}
|
|
358
|
+
return writer;
|
|
359
|
+
},
|
|
360
|
+
decode(input, length) {
|
|
361
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
362
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
363
|
+
const message = createBaseEventOrderClosed();
|
|
364
|
+
while (reader.pos < end) {
|
|
365
|
+
const tag = reader.uint32();
|
|
366
|
+
switch (tag >>> 3) {
|
|
367
|
+
case 1: {
|
|
368
|
+
if (tag !== 10) {
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
message.creator = reader.string();
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
374
|
+
case 2: {
|
|
375
|
+
if (tag !== 18) {
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
message.id = reader.string();
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
case 3: {
|
|
382
|
+
if (tag !== 24) {
|
|
383
|
+
break;
|
|
384
|
+
}
|
|
385
|
+
message.sequence = longToNumber(reader.uint64());
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
case 4: {
|
|
389
|
+
if (tag !== 34) {
|
|
390
|
+
break;
|
|
391
|
+
}
|
|
392
|
+
message.remainingBaseQuantity = reader.string();
|
|
393
|
+
continue;
|
|
394
|
+
}
|
|
395
|
+
case 5: {
|
|
396
|
+
if (tag !== 42) {
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
message.remainingSpendableBalance = reader.string();
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
reader.skip(tag & 7);
|
|
407
|
+
}
|
|
408
|
+
return message;
|
|
409
|
+
},
|
|
410
|
+
fromJSON(object) {
|
|
411
|
+
return {
|
|
412
|
+
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
413
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
414
|
+
sequence: isSet(object.sequence) ? globalThis.Number(object.sequence) : 0,
|
|
415
|
+
remainingBaseQuantity: isSet(object.remainingBaseQuantity)
|
|
416
|
+
? globalThis.String(object.remainingBaseQuantity)
|
|
417
|
+
: "",
|
|
418
|
+
remainingSpendableBalance: isSet(object.remainingSpendableBalance)
|
|
419
|
+
? globalThis.String(object.remainingSpendableBalance)
|
|
420
|
+
: "",
|
|
421
|
+
};
|
|
422
|
+
},
|
|
423
|
+
toJSON(message) {
|
|
424
|
+
const obj = {};
|
|
425
|
+
if (message.creator !== "") {
|
|
426
|
+
obj.creator = message.creator;
|
|
427
|
+
}
|
|
428
|
+
if (message.id !== "") {
|
|
429
|
+
obj.id = message.id;
|
|
430
|
+
}
|
|
431
|
+
if (message.sequence !== 0) {
|
|
432
|
+
obj.sequence = Math.round(message.sequence);
|
|
433
|
+
}
|
|
434
|
+
if (message.remainingBaseQuantity !== "") {
|
|
435
|
+
obj.remainingBaseQuantity = message.remainingBaseQuantity;
|
|
436
|
+
}
|
|
437
|
+
if (message.remainingSpendableBalance !== "") {
|
|
438
|
+
obj.remainingSpendableBalance = message.remainingSpendableBalance;
|
|
439
|
+
}
|
|
440
|
+
return obj;
|
|
441
|
+
},
|
|
442
|
+
create(base) {
|
|
443
|
+
return EventOrderClosed.fromPartial(base ?? {});
|
|
444
|
+
},
|
|
445
|
+
fromPartial(object) {
|
|
446
|
+
const message = createBaseEventOrderClosed();
|
|
447
|
+
message.creator = object.creator ?? "";
|
|
448
|
+
message.id = object.id ?? "";
|
|
449
|
+
message.sequence = object.sequence ?? 0;
|
|
450
|
+
message.remainingBaseQuantity = object.remainingBaseQuantity ?? "";
|
|
451
|
+
message.remainingSpendableBalance = object.remainingSpendableBalance ?? "";
|
|
452
|
+
return message;
|
|
453
|
+
},
|
|
454
|
+
};
|
|
455
|
+
function longToNumber(int64) {
|
|
456
|
+
const num = globalThis.Number(int64.toString());
|
|
457
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
458
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
459
|
+
}
|
|
460
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
461
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
462
|
+
}
|
|
463
|
+
return num;
|
|
464
|
+
}
|
|
465
|
+
function isSet(value) {
|
|
466
|
+
return value !== null && value !== undefined;
|
|
467
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
|
|
2
|
+
import { Order, OrderBookData } from "./order";
|
|
3
|
+
import { Params } from "./params";
|
|
4
|
+
export declare const protobufPackage = "coreum.dex.v1";
|
|
5
|
+
/** GenesisState defines the module genesis state. */
|
|
6
|
+
export interface GenesisState {
|
|
7
|
+
/** params defines all the parameters of the module. */
|
|
8
|
+
params: Params | undefined;
|
|
9
|
+
orderBooks: OrderBookDataWithID[];
|
|
10
|
+
orders: Order[];
|
|
11
|
+
/** order_sequence is current order sequence; */
|
|
12
|
+
orderSequence: number;
|
|
13
|
+
accountsDenomsOrdersCounts: AccountDenomOrdersCount[];
|
|
14
|
+
}
|
|
15
|
+
/** OrderBookDataWithID is a order book data with it's corresponding ID. */
|
|
16
|
+
export interface OrderBookDataWithID {
|
|
17
|
+
/** id is order book ID. */
|
|
18
|
+
id: number;
|
|
19
|
+
/** data is order book data. */
|
|
20
|
+
data: OrderBookData | undefined;
|
|
21
|
+
}
|
|
22
|
+
/** AccountDenomOrderCount is a count of orders per account and denom. */
|
|
23
|
+
export interface AccountDenomOrdersCount {
|
|
24
|
+
accountNumber: number;
|
|
25
|
+
denom: string;
|
|
26
|
+
ordersCount: number;
|
|
27
|
+
}
|
|
28
|
+
export declare const GenesisState: MessageFns<GenesisState>;
|
|
29
|
+
export declare const OrderBookDataWithID: MessageFns<OrderBookDataWithID>;
|
|
30
|
+
export declare const AccountDenomOrdersCount: MessageFns<AccountDenomOrdersCount>;
|
|
31
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
32
|
+
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 {} ? {
|
|
33
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
34
|
+
} : Partial<T>;
|
|
35
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
36
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
37
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
38
|
+
} & {
|
|
39
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
40
|
+
};
|
|
41
|
+
export interface MessageFns<T> {
|
|
42
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
43
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
44
|
+
fromJSON(object: any): T;
|
|
45
|
+
toJSON(message: T): unknown;
|
|
46
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
47
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
48
|
+
}
|
|
49
|
+
export {};
|