coreum-js 2.16.2 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/dist/main/client/index.js +16 -17
  2. package/dist/main/coreum/asset/ft/v1/authz.d.ts +38 -0
  3. package/dist/main/coreum/asset/ft/v1/authz.js +122 -0
  4. package/dist/main/coreum/asset/ft/v1/event.d.ts +52 -120
  5. package/dist/main/coreum/asset/ft/v1/event.js +744 -138
  6. package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -517
  7. package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
  8. package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -63
  9. package/dist/main/coreum/asset/ft/v1/params.js +37 -33
  10. package/dist/main/coreum/asset/ft/v1/query.d.ts +86 -1950
  11. package/dist/main/coreum/asset/ft/v1/query.js +697 -217
  12. package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -249
  13. package/dist/main/coreum/asset/ft/v1/token.js +273 -197
  14. package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -755
  15. package/dist/main/coreum/asset/ft/v1/tx.js +502 -386
  16. package/dist/main/coreum/asset/index.d.ts +2 -3
  17. package/dist/main/coreum/asset/nft/v1/authz.d.ts +33 -0
  18. package/dist/main/coreum/asset/nft/v1/authz.js +137 -0
  19. package/dist/main/coreum/asset/nft/v1/event.d.ts +35 -147
  20. package/dist/main/coreum/asset/nft/v1/event.js +475 -147
  21. package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -286
  22. package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
  23. package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -108
  24. package/dist/main/coreum/asset/nft/v1/nft.js +136 -101
  25. package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -38
  26. package/dist/main/coreum/asset/nft/v1/params.js +17 -20
  27. package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -706
  28. package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
  29. package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -266
  30. package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
  31. package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -19
  32. package/dist/main/coreum/asset/nft/v1/types.js +273 -45
  33. package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -32
  34. package/dist/main/coreum/customparams/v1/genesis.js +26 -22
  35. package/dist/main/coreum/customparams/v1/params.d.ts +11 -19
  36. package/dist/main/coreum/customparams/v1/params.js +23 -20
  37. package/dist/main/coreum/customparams/v1/query.d.ts +14 -40
  38. package/dist/main/coreum/customparams/v1/query.js +35 -29
  39. package/dist/main/coreum/dex/index.d.ts +1 -0
  40. package/dist/main/coreum/dex/index.js +12 -0
  41. package/dist/main/coreum/dex/v1/event.d.ts +73 -0
  42. package/dist/main/coreum/dex/v1/event.js +470 -0
  43. package/dist/main/coreum/dex/v1/genesis.d.ts +49 -0
  44. package/dist/main/coreum/dex/v1/genesis.js +318 -0
  45. package/dist/main/coreum/dex/v1/order.d.ts +172 -0
  46. package/dist/main/coreum/dex/v1/order.js +1137 -0
  47. package/dist/main/coreum/dex/v1/params.d.ts +34 -0
  48. package/dist/main/coreum/dex/v1/params.js +139 -0
  49. package/dist/main/coreum/dex/v1/query.d.ts +133 -0
  50. package/dist/main/coreum/dex/v1/query.js +873 -0
  51. package/dist/main/coreum/dex/v1/tx.d.ts +102 -0
  52. package/dist/main/coreum/dex/v1/tx.js +521 -0
  53. package/dist/main/coreum/extensions/dex.d.ts +12 -0
  54. package/dist/main/coreum/extensions/dex.js +32 -0
  55. package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -233
  56. package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
  57. package/dist/main/coreum/feemodel/v1/params.d.ts +14 -337
  58. package/dist/main/coreum/feemodel/v1/params.js +113 -66
  59. package/dist/main/coreum/feemodel/v1/query.d.ts +30 -261
  60. package/dist/main/coreum/feemodel/v1/query.js +196 -43
  61. package/dist/main/coreum/index.d.ts +46 -0
  62. package/dist/main/coreum/index.js +58 -1
  63. package/dist/main/coreum/nft/index.d.ts +1 -2
  64. package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -79
  65. package/dist/main/coreum/nft/v1beta1/event.js +103 -77
  66. package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -435
  67. package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
  68. package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -114
  69. package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
  70. package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -1628
  71. package/dist/main/coreum/nft/v1beta1/query.js +259 -223
  72. package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -39
  73. package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
  74. package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
  75. package/dist/main/cosmos/extensions/distribution.js +9 -9
  76. package/dist/main/cosmos/extensions/gov.d.ts +13 -13
  77. package/dist/main/cosmos/extensions/gov.js +14 -8
  78. package/dist/main/cosmos/index.d.ts +8 -8
  79. package/dist/main/google/api/http.js +18 -21
  80. package/dist/main/google/protobuf/any.js +3 -4
  81. package/dist/main/google/protobuf/duration.js +3 -4
  82. package/dist/main/google/protobuf/timestamp.js +3 -4
  83. package/dist/main/services/cosmostation.js +1 -1
  84. package/dist/main/tendermint/abci/types.js +183 -223
  85. package/dist/main/tendermint/crypto/keys.js +3 -4
  86. package/dist/main/tendermint/crypto/proof.js +19 -24
  87. package/dist/main/tendermint/types/params.js +15 -20
  88. package/dist/main/tendermint/types/types.js +57 -68
  89. package/dist/main/tendermint/types/validator.js +10 -13
  90. package/dist/main/tendermint/version/types.js +6 -8
  91. package/dist/main/types/core.d.ts +2 -1
  92. package/dist/main/types/core.js +2 -0
  93. package/dist/main/wasm/v1/authz.d.ts +20 -471
  94. package/dist/main/wasm/v1/authz.js +129 -148
  95. package/dist/main/wasm/v1/genesis.d.ts +14 -1020
  96. package/dist/main/wasm/v1/genesis.js +169 -140
  97. package/dist/main/wasm/v1/ibc.d.ts +13 -62
  98. package/dist/main/wasm/v1/ibc.js +91 -76
  99. package/dist/main/wasm/v1/index.d.ts +1 -2
  100. package/dist/main/wasm/v1/pagination.js +9 -11
  101. package/dist/main/wasm/v1/proposal.d.ts +23 -720
  102. package/dist/main/wasm/v1/proposal.js +634 -465
  103. package/dist/main/wasm/v1/query.d.ts +35 -1201
  104. package/dist/main/wasm/v1/query.js +370 -363
  105. package/dist/main/wasm/v1/tx.d.ts +37 -788
  106. package/dist/main/wasm/v1/tx.js +621 -497
  107. package/dist/main/wasm/v1/types.d.ts +19 -297
  108. package/dist/main/wasm/v1/types.js +219 -190
  109. package/dist/module/client/index.js +4 -3
  110. package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
  111. package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
  112. package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -120
  113. package/dist/module/coreum/asset/ft/v1/event.js +721 -109
  114. package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -517
  115. package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
  116. package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -63
  117. package/dist/module/coreum/asset/ft/v1/params.js +35 -27
  118. package/dist/module/coreum/asset/ft/v1/query.d.ts +86 -1950
  119. package/dist/module/coreum/asset/ft/v1/query.js +672 -180
  120. package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -249
  121. package/dist/module/coreum/asset/ft/v1/token.js +236 -152
  122. package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -755
  123. package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
  124. package/dist/module/coreum/asset/index.d.ts +2 -3
  125. package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
  126. package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
  127. package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -147
  128. package/dist/module/coreum/asset/nft/v1/event.js +448 -112
  129. package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -286
  130. package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
  131. package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -108
  132. package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
  133. package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -38
  134. package/dist/module/coreum/asset/nft/v1/params.js +16 -16
  135. package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -706
  136. package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
  137. package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -266
  138. package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
  139. package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -19
  140. package/dist/module/coreum/asset/nft/v1/types.js +269 -39
  141. package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -32
  142. package/dist/module/coreum/customparams/v1/genesis.js +25 -18
  143. package/dist/module/coreum/customparams/v1/params.d.ts +11 -19
  144. package/dist/module/coreum/customparams/v1/params.js +21 -14
  145. package/dist/module/coreum/customparams/v1/query.d.ts +14 -40
  146. package/dist/module/coreum/customparams/v1/query.js +32 -23
  147. package/dist/module/coreum/dex/index.d.ts +1 -0
  148. package/dist/module/coreum/dex/index.js +9 -0
  149. package/dist/module/coreum/dex/v1/event.d.ts +73 -0
  150. package/dist/module/coreum/dex/v1/event.js +467 -0
  151. package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
  152. package/dist/module/coreum/dex/v1/genesis.js +315 -0
  153. package/dist/module/coreum/dex/v1/order.d.ts +172 -0
  154. package/dist/module/coreum/dex/v1/order.js +1128 -0
  155. package/dist/module/coreum/dex/v1/params.d.ts +34 -0
  156. package/dist/module/coreum/dex/v1/params.js +136 -0
  157. package/dist/module/coreum/dex/v1/query.d.ts +133 -0
  158. package/dist/module/coreum/dex/v1/query.js +871 -0
  159. package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
  160. package/dist/module/coreum/dex/v1/tx.js +519 -0
  161. package/dist/module/coreum/extensions/dex.d.ts +12 -0
  162. package/dist/module/coreum/extensions/dex.js +28 -0
  163. package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -233
  164. package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
  165. package/dist/module/coreum/feemodel/v1/params.d.ts +14 -337
  166. package/dist/module/coreum/feemodel/v1/params.js +105 -54
  167. package/dist/module/coreum/feemodel/v1/query.d.ts +30 -261
  168. package/dist/module/coreum/feemodel/v1/query.js +191 -35
  169. package/dist/module/coreum/index.d.ts +46 -0
  170. package/dist/module/coreum/index.js +57 -0
  171. package/dist/module/coreum/nft/index.d.ts +1 -2
  172. package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -79
  173. package/dist/module/coreum/nft/v1beta1/event.js +90 -58
  174. package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -435
  175. package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
  176. package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -114
  177. package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
  178. package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -1628
  179. package/dist/module/coreum/nft/v1beta1/query.js +231 -183
  180. package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -39
  181. package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
  182. package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
  183. package/dist/module/cosmos/extensions/gov.d.ts +13 -13
  184. package/dist/module/cosmos/index.d.ts +8 -8
  185. package/dist/module/services/cosmostation.js +1 -1
  186. package/dist/module/types/core.d.ts +2 -1
  187. package/dist/module/types/core.js +2 -0
  188. package/dist/module/wasm/v1/authz.d.ts +20 -471
  189. package/dist/module/wasm/v1/authz.js +111 -119
  190. package/dist/module/wasm/v1/genesis.d.ts +14 -1020
  191. package/dist/module/wasm/v1/genesis.js +161 -125
  192. package/dist/module/wasm/v1/ibc.d.ts +13 -62
  193. package/dist/module/wasm/v1/ibc.js +83 -62
  194. package/dist/module/wasm/v1/index.d.ts +1 -2
  195. package/dist/module/wasm/v1/proposal.d.ts +23 -720
  196. package/dist/module/wasm/v1/proposal.js +562 -377
  197. package/dist/module/wasm/v1/query.d.ts +35 -1201
  198. package/dist/module/wasm/v1/query.js +330 -301
  199. package/dist/module/wasm/v1/tx.d.ts +37 -788
  200. package/dist/module/wasm/v1/tx.js +551 -404
  201. package/dist/module/wasm/v1/types.d.ts +19 -297
  202. package/dist/module/wasm/v1/types.js +196 -156
  203. package/package.json +11 -10
@@ -0,0 +1,315 @@
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/genesis.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
8
+ import { Order, OrderBookData } from "./order";
9
+ import { Params } from "./params";
10
+ export const protobufPackage = "coreum.dex.v1";
11
+ function createBaseGenesisState() {
12
+ return {
13
+ params: undefined,
14
+ orderBooks: [],
15
+ orders: [],
16
+ orderSequence: 0,
17
+ accountsDenomsOrdersCounts: [],
18
+ };
19
+ }
20
+ export const GenesisState = {
21
+ encode(message, writer = new BinaryWriter()) {
22
+ if (message.params !== undefined) {
23
+ Params.encode(message.params, writer.uint32(10).fork()).ldelim();
24
+ }
25
+ for (const v of message.orderBooks) {
26
+ OrderBookDataWithID.encode(v, writer.uint32(18).fork()).ldelim();
27
+ }
28
+ for (const v of message.orders) {
29
+ Order.encode(v, writer.uint32(26).fork()).ldelim();
30
+ }
31
+ if (message.orderSequence !== 0) {
32
+ writer.uint32(32).uint64(message.orderSequence);
33
+ }
34
+ for (const v of message.accountsDenomsOrdersCounts) {
35
+ AccountDenomOrdersCount.encode(v, writer.uint32(42).fork()).ldelim();
36
+ }
37
+ return writer;
38
+ },
39
+ decode(input, length) {
40
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
41
+ let end = length === undefined ? reader.len : reader.pos + length;
42
+ const message = createBaseGenesisState();
43
+ while (reader.pos < end) {
44
+ const tag = reader.uint32();
45
+ switch (tag >>> 3) {
46
+ case 1: {
47
+ if (tag !== 10) {
48
+ break;
49
+ }
50
+ message.params = Params.decode(reader, reader.uint32());
51
+ continue;
52
+ }
53
+ case 2: {
54
+ if (tag !== 18) {
55
+ break;
56
+ }
57
+ message.orderBooks.push(OrderBookDataWithID.decode(reader, reader.uint32()));
58
+ continue;
59
+ }
60
+ case 3: {
61
+ if (tag !== 26) {
62
+ break;
63
+ }
64
+ message.orders.push(Order.decode(reader, reader.uint32()));
65
+ continue;
66
+ }
67
+ case 4: {
68
+ if (tag !== 32) {
69
+ break;
70
+ }
71
+ message.orderSequence = longToNumber(reader.uint64());
72
+ continue;
73
+ }
74
+ case 5: {
75
+ if (tag !== 42) {
76
+ break;
77
+ }
78
+ message.accountsDenomsOrdersCounts.push(AccountDenomOrdersCount.decode(reader, reader.uint32()));
79
+ continue;
80
+ }
81
+ }
82
+ if ((tag & 7) === 4 || tag === 0) {
83
+ break;
84
+ }
85
+ reader.skip(tag & 7);
86
+ }
87
+ return message;
88
+ },
89
+ fromJSON(object) {
90
+ return {
91
+ params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
92
+ orderBooks: globalThis.Array.isArray(object?.orderBooks)
93
+ ? object.orderBooks.map((e) => OrderBookDataWithID.fromJSON(e))
94
+ : [],
95
+ orders: globalThis.Array.isArray(object?.orders)
96
+ ? object.orders.map((e) => Order.fromJSON(e))
97
+ : [],
98
+ orderSequence: isSet(object.orderSequence)
99
+ ? globalThis.Number(object.orderSequence)
100
+ : 0,
101
+ accountsDenomsOrdersCounts: globalThis.Array.isArray(object?.accountsDenomsOrdersCounts)
102
+ ? object.accountsDenomsOrdersCounts.map((e) => AccountDenomOrdersCount.fromJSON(e))
103
+ : [],
104
+ };
105
+ },
106
+ toJSON(message) {
107
+ const obj = {};
108
+ if (message.params !== undefined) {
109
+ obj.params = Params.toJSON(message.params);
110
+ }
111
+ if (message.orderBooks?.length) {
112
+ obj.orderBooks = message.orderBooks.map((e) => OrderBookDataWithID.toJSON(e));
113
+ }
114
+ if (message.orders?.length) {
115
+ obj.orders = message.orders.map((e) => Order.toJSON(e));
116
+ }
117
+ if (message.orderSequence !== 0) {
118
+ obj.orderSequence = Math.round(message.orderSequence);
119
+ }
120
+ if (message.accountsDenomsOrdersCounts?.length) {
121
+ obj.accountsDenomsOrdersCounts = message.accountsDenomsOrdersCounts.map((e) => AccountDenomOrdersCount.toJSON(e));
122
+ }
123
+ return obj;
124
+ },
125
+ create(base) {
126
+ return GenesisState.fromPartial(base ?? {});
127
+ },
128
+ fromPartial(object) {
129
+ const message = createBaseGenesisState();
130
+ message.params =
131
+ object.params !== undefined && object.params !== null
132
+ ? Params.fromPartial(object.params)
133
+ : undefined;
134
+ message.orderBooks =
135
+ object.orderBooks?.map((e) => OrderBookDataWithID.fromPartial(e)) || [];
136
+ message.orders = object.orders?.map((e) => Order.fromPartial(e)) || [];
137
+ message.orderSequence = object.orderSequence ?? 0;
138
+ message.accountsDenomsOrdersCounts =
139
+ object.accountsDenomsOrdersCounts?.map((e) => AccountDenomOrdersCount.fromPartial(e)) || [];
140
+ return message;
141
+ },
142
+ };
143
+ function createBaseOrderBookDataWithID() {
144
+ return { id: 0, data: undefined };
145
+ }
146
+ export const OrderBookDataWithID = {
147
+ encode(message, writer = new BinaryWriter()) {
148
+ if (message.id !== 0) {
149
+ writer.uint32(8).uint32(message.id);
150
+ }
151
+ if (message.data !== undefined) {
152
+ OrderBookData.encode(message.data, writer.uint32(18).fork()).ldelim();
153
+ }
154
+ return writer;
155
+ },
156
+ decode(input, length) {
157
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
158
+ let end = length === undefined ? reader.len : reader.pos + length;
159
+ const message = createBaseOrderBookDataWithID();
160
+ while (reader.pos < end) {
161
+ const tag = reader.uint32();
162
+ switch (tag >>> 3) {
163
+ case 1: {
164
+ if (tag !== 8) {
165
+ break;
166
+ }
167
+ message.id = reader.uint32();
168
+ continue;
169
+ }
170
+ case 2: {
171
+ if (tag !== 18) {
172
+ break;
173
+ }
174
+ message.data = OrderBookData.decode(reader, reader.uint32());
175
+ continue;
176
+ }
177
+ }
178
+ if ((tag & 7) === 4 || tag === 0) {
179
+ break;
180
+ }
181
+ reader.skip(tag & 7);
182
+ }
183
+ return message;
184
+ },
185
+ fromJSON(object) {
186
+ return {
187
+ id: isSet(object.id) ? globalThis.Number(object.id) : 0,
188
+ data: isSet(object.data)
189
+ ? OrderBookData.fromJSON(object.data)
190
+ : undefined,
191
+ };
192
+ },
193
+ toJSON(message) {
194
+ const obj = {};
195
+ if (message.id !== 0) {
196
+ obj.id = Math.round(message.id);
197
+ }
198
+ if (message.data !== undefined) {
199
+ obj.data = OrderBookData.toJSON(message.data);
200
+ }
201
+ return obj;
202
+ },
203
+ create(base) {
204
+ return OrderBookDataWithID.fromPartial(base ?? {});
205
+ },
206
+ fromPartial(object) {
207
+ const message = createBaseOrderBookDataWithID();
208
+ message.id = object.id ?? 0;
209
+ message.data =
210
+ object.data !== undefined && object.data !== null
211
+ ? OrderBookData.fromPartial(object.data)
212
+ : undefined;
213
+ return message;
214
+ },
215
+ };
216
+ function createBaseAccountDenomOrdersCount() {
217
+ return { accountNumber: 0, denom: "", ordersCount: 0 };
218
+ }
219
+ export const AccountDenomOrdersCount = {
220
+ encode(message, writer = new BinaryWriter()) {
221
+ if (message.accountNumber !== 0) {
222
+ writer.uint32(8).uint64(message.accountNumber);
223
+ }
224
+ if (message.denom !== "") {
225
+ writer.uint32(18).string(message.denom);
226
+ }
227
+ if (message.ordersCount !== 0) {
228
+ writer.uint32(24).uint64(message.ordersCount);
229
+ }
230
+ return writer;
231
+ },
232
+ decode(input, length) {
233
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
234
+ let end = length === undefined ? reader.len : reader.pos + length;
235
+ const message = createBaseAccountDenomOrdersCount();
236
+ while (reader.pos < end) {
237
+ const tag = reader.uint32();
238
+ switch (tag >>> 3) {
239
+ case 1: {
240
+ if (tag !== 8) {
241
+ break;
242
+ }
243
+ message.accountNumber = longToNumber(reader.uint64());
244
+ continue;
245
+ }
246
+ case 2: {
247
+ if (tag !== 18) {
248
+ break;
249
+ }
250
+ message.denom = reader.string();
251
+ continue;
252
+ }
253
+ case 3: {
254
+ if (tag !== 24) {
255
+ break;
256
+ }
257
+ message.ordersCount = longToNumber(reader.uint64());
258
+ continue;
259
+ }
260
+ }
261
+ if ((tag & 7) === 4 || tag === 0) {
262
+ break;
263
+ }
264
+ reader.skip(tag & 7);
265
+ }
266
+ return message;
267
+ },
268
+ fromJSON(object) {
269
+ return {
270
+ accountNumber: isSet(object.accountNumber)
271
+ ? globalThis.Number(object.accountNumber)
272
+ : 0,
273
+ denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
274
+ ordersCount: isSet(object.ordersCount)
275
+ ? globalThis.Number(object.ordersCount)
276
+ : 0,
277
+ };
278
+ },
279
+ toJSON(message) {
280
+ const obj = {};
281
+ if (message.accountNumber !== 0) {
282
+ obj.accountNumber = Math.round(message.accountNumber);
283
+ }
284
+ if (message.denom !== "") {
285
+ obj.denom = message.denom;
286
+ }
287
+ if (message.ordersCount !== 0) {
288
+ obj.ordersCount = Math.round(message.ordersCount);
289
+ }
290
+ return obj;
291
+ },
292
+ create(base) {
293
+ return AccountDenomOrdersCount.fromPartial(base ?? {});
294
+ },
295
+ fromPartial(object) {
296
+ const message = createBaseAccountDenomOrdersCount();
297
+ message.accountNumber = object.accountNumber ?? 0;
298
+ message.denom = object.denom ?? "";
299
+ message.ordersCount = object.ordersCount ?? 0;
300
+ return message;
301
+ },
302
+ };
303
+ function longToNumber(int64) {
304
+ const num = globalThis.Number(int64.toString());
305
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
306
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
307
+ }
308
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
309
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
310
+ }
311
+ return num;
312
+ }
313
+ function isSet(value) {
314
+ return value !== null && value !== undefined;
315
+ }
@@ -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 {};