coreum-js 2.16.3 → 2.17.1

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 (236) hide show
  1. package/dist/main/client/index.js +15 -16
  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 -28
  5. package/dist/main/coreum/asset/ft/v1/event.js +744 -138
  6. package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -21
  7. package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
  8. package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -11
  9. package/dist/main/coreum/asset/ft/v1/params.js +37 -33
  10. package/dist/main/coreum/asset/ft/v1/query.d.ts +87 -127
  11. package/dist/main/coreum/asset/ft/v1/query.js +697 -217
  12. package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -51
  13. package/dist/main/coreum/asset/ft/v1/token.js +276 -200
  14. package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -147
  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 -43
  20. package/dist/main/coreum/asset/nft/v1/event.js +475 -147
  21. package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -36
  22. package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
  23. package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -26
  24. package/dist/main/coreum/asset/nft/v1/nft.js +139 -104
  25. package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -12
  26. package/dist/main/coreum/asset/nft/v1/params.js +17 -20
  27. package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -88
  28. package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
  29. package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -70
  30. package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
  31. package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -11
  32. package/dist/main/coreum/asset/nft/v1/types.js +273 -45
  33. package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -12
  34. package/dist/main/coreum/customparams/v1/genesis.js +26 -22
  35. package/dist/main/coreum/customparams/v1/params.d.ts +11 -11
  36. package/dist/main/coreum/customparams/v1/params.js +23 -20
  37. package/dist/main/coreum/customparams/v1/query.d.ts +14 -20
  38. package/dist/main/coreum/customparams/v1/query.js +35 -29
  39. package/dist/main/coreum/dex/index.d.ts +2 -0
  40. package/dist/main/coreum/dex/index.js +11 -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/extensions/ft.js +2 -1
  56. package/dist/main/coreum/extensions/nft.js +2 -1
  57. package/dist/main/coreum/extensions/nftbeta.js +2 -1
  58. package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -13
  59. package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
  60. package/dist/main/coreum/feemodel/v1/params.d.ts +14 -21
  61. package/dist/main/coreum/feemodel/v1/params.js +113 -66
  62. package/dist/main/coreum/feemodel/v1/query.d.ts +30 -37
  63. package/dist/main/coreum/feemodel/v1/query.js +196 -43
  64. package/dist/main/coreum/index.d.ts +46 -0
  65. package/dist/main/coreum/index.js +58 -1
  66. package/dist/main/coreum/nft/index.d.ts +1 -2
  67. package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -27
  68. package/dist/main/coreum/nft/v1beta1/event.js +103 -77
  69. package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -19
  70. package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
  71. package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -22
  72. package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
  73. package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -124
  74. package/dist/main/coreum/nft/v1beta1/query.js +259 -223
  75. package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -19
  76. package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
  77. package/dist/main/cosmos/extensions/bank.js +2 -1
  78. package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
  79. package/dist/main/cosmos/extensions/distribution.js +11 -10
  80. package/dist/main/cosmos/extensions/gov.d.ts +13 -13
  81. package/dist/main/cosmos/extensions/gov.js +16 -9
  82. package/dist/main/cosmos/index.d.ts +8 -8
  83. package/dist/main/google/api/http.d.ts +2636 -6
  84. package/dist/main/google/api/http.js +18 -21
  85. package/dist/main/google/protobuf/any.d.ts +14 -2
  86. package/dist/main/google/protobuf/any.js +6 -7
  87. package/dist/main/google/protobuf/duration.d.ts +14 -2
  88. package/dist/main/google/protobuf/duration.js +3 -4
  89. package/dist/main/google/protobuf/timestamp.d.ts +14 -2
  90. package/dist/main/google/protobuf/timestamp.js +3 -4
  91. package/dist/main/index.js +7 -17
  92. package/dist/main/services/cosmostation.js +1 -1
  93. package/dist/main/tendermint/abci/types.d.ts +6360 -92
  94. package/dist/main/tendermint/abci/types.js +195 -235
  95. package/dist/main/tendermint/crypto/keys.d.ts +14 -2
  96. package/dist/main/tendermint/crypto/keys.js +3 -4
  97. package/dist/main/tendermint/crypto/proof.d.ts +152 -10
  98. package/dist/main/tendermint/crypto/proof.js +19 -24
  99. package/dist/main/tendermint/types/params.d.ts +196 -12
  100. package/dist/main/tendermint/types/params.js +15 -20
  101. package/dist/main/tendermint/types/types.d.ts +1744 -26
  102. package/dist/main/tendermint/types/types.js +62 -73
  103. package/dist/main/tendermint/types/validator.d.ts +230 -6
  104. package/dist/main/tendermint/types/validator.js +10 -13
  105. package/dist/main/tendermint/version/types.d.ts +28 -4
  106. package/dist/main/tendermint/version/types.js +6 -8
  107. package/dist/main/types/core.d.ts +2 -1
  108. package/dist/main/types/core.js +2 -0
  109. package/dist/main/utils/convertStringToAny.d.ts +0 -1
  110. package/dist/main/utils/nft.js +2 -1
  111. package/dist/main/wasm/v1/authz.d.ts +20 -75
  112. package/dist/main/wasm/v1/authz.js +129 -148
  113. package/dist/main/wasm/v1/extensions/wasm.js +2 -1
  114. package/dist/main/wasm/v1/genesis.d.ts +14 -34
  115. package/dist/main/wasm/v1/genesis.js +169 -140
  116. package/dist/main/wasm/v1/ibc.d.ts +13 -26
  117. package/dist/main/wasm/v1/ibc.js +91 -76
  118. package/dist/main/wasm/v1/index.d.ts +1 -2
  119. package/dist/main/wasm/v1/pagination.d.ts +40 -4
  120. package/dist/main/wasm/v1/pagination.js +9 -11
  121. package/dist/main/wasm/v1/proposal.d.ts +23 -106
  122. package/dist/main/wasm/v1/proposal.js +634 -465
  123. package/dist/main/wasm/v1/query.d.ts +35 -187
  124. package/dist/main/wasm/v1/query.js +370 -363
  125. package/dist/main/wasm/v1/tx.d.ts +37 -210
  126. package/dist/main/wasm/v1/tx.js +621 -497
  127. package/dist/main/wasm/v1/types.d.ts +19 -67
  128. package/dist/main/wasm/v1/types.js +224 -195
  129. package/dist/module/client/index.js +2 -1
  130. package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
  131. package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
  132. package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -28
  133. package/dist/module/coreum/asset/ft/v1/event.js +721 -109
  134. package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -21
  135. package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
  136. package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -11
  137. package/dist/module/coreum/asset/ft/v1/params.js +35 -27
  138. package/dist/module/coreum/asset/ft/v1/query.d.ts +87 -127
  139. package/dist/module/coreum/asset/ft/v1/query.js +672 -180
  140. package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -51
  141. package/dist/module/coreum/asset/ft/v1/token.js +236 -152
  142. package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -147
  143. package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
  144. package/dist/module/coreum/asset/index.d.ts +2 -3
  145. package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
  146. package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
  147. package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -43
  148. package/dist/module/coreum/asset/nft/v1/event.js +448 -112
  149. package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -36
  150. package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
  151. package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -26
  152. package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
  153. package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -12
  154. package/dist/module/coreum/asset/nft/v1/params.js +16 -16
  155. package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -88
  156. package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
  157. package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -70
  158. package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
  159. package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -11
  160. package/dist/module/coreum/asset/nft/v1/types.js +269 -39
  161. package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -12
  162. package/dist/module/coreum/customparams/v1/genesis.js +25 -18
  163. package/dist/module/coreum/customparams/v1/params.d.ts +11 -11
  164. package/dist/module/coreum/customparams/v1/params.js +21 -14
  165. package/dist/module/coreum/customparams/v1/query.d.ts +14 -20
  166. package/dist/module/coreum/customparams/v1/query.js +32 -23
  167. package/dist/module/coreum/dex/index.d.ts +2 -0
  168. package/dist/module/coreum/dex/index.js +8 -0
  169. package/dist/module/coreum/dex/v1/event.d.ts +73 -0
  170. package/dist/module/coreum/dex/v1/event.js +467 -0
  171. package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
  172. package/dist/module/coreum/dex/v1/genesis.js +315 -0
  173. package/dist/module/coreum/dex/v1/order.d.ts +172 -0
  174. package/dist/module/coreum/dex/v1/order.js +1128 -0
  175. package/dist/module/coreum/dex/v1/params.d.ts +34 -0
  176. package/dist/module/coreum/dex/v1/params.js +136 -0
  177. package/dist/module/coreum/dex/v1/query.d.ts +133 -0
  178. package/dist/module/coreum/dex/v1/query.js +871 -0
  179. package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
  180. package/dist/module/coreum/dex/v1/tx.js +519 -0
  181. package/dist/module/coreum/extensions/dex.d.ts +12 -0
  182. package/dist/module/coreum/extensions/dex.js +28 -0
  183. package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -13
  184. package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
  185. package/dist/module/coreum/feemodel/v1/params.d.ts +14 -21
  186. package/dist/module/coreum/feemodel/v1/params.js +105 -54
  187. package/dist/module/coreum/feemodel/v1/query.d.ts +30 -37
  188. package/dist/module/coreum/feemodel/v1/query.js +191 -35
  189. package/dist/module/coreum/index.d.ts +46 -0
  190. package/dist/module/coreum/index.js +57 -0
  191. package/dist/module/coreum/nft/index.d.ts +1 -2
  192. package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -27
  193. package/dist/module/coreum/nft/v1beta1/event.js +90 -58
  194. package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -19
  195. package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
  196. package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -22
  197. package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
  198. package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -124
  199. package/dist/module/coreum/nft/v1beta1/query.js +231 -183
  200. package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -19
  201. package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
  202. package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
  203. package/dist/module/cosmos/extensions/gov.d.ts +13 -13
  204. package/dist/module/cosmos/index.d.ts +8 -8
  205. package/dist/module/google/api/http.d.ts +2636 -6
  206. package/dist/module/google/protobuf/any.d.ts +14 -2
  207. package/dist/module/google/protobuf/duration.d.ts +14 -2
  208. package/dist/module/google/protobuf/timestamp.d.ts +14 -2
  209. package/dist/module/services/cosmostation.js +1 -1
  210. package/dist/module/tendermint/abci/types.d.ts +6360 -92
  211. package/dist/module/tendermint/crypto/keys.d.ts +14 -2
  212. package/dist/module/tendermint/crypto/proof.d.ts +152 -10
  213. package/dist/module/tendermint/types/params.d.ts +196 -12
  214. package/dist/module/tendermint/types/types.d.ts +1744 -26
  215. package/dist/module/tendermint/types/validator.d.ts +230 -6
  216. package/dist/module/tendermint/version/types.d.ts +28 -4
  217. package/dist/module/types/core.d.ts +2 -1
  218. package/dist/module/types/core.js +2 -0
  219. package/dist/module/utils/convertStringToAny.d.ts +0 -1
  220. package/dist/module/wasm/v1/authz.d.ts +20 -75
  221. package/dist/module/wasm/v1/authz.js +111 -119
  222. package/dist/module/wasm/v1/genesis.d.ts +14 -34
  223. package/dist/module/wasm/v1/genesis.js +161 -125
  224. package/dist/module/wasm/v1/ibc.d.ts +13 -26
  225. package/dist/module/wasm/v1/ibc.js +83 -62
  226. package/dist/module/wasm/v1/index.d.ts +1 -2
  227. package/dist/module/wasm/v1/pagination.d.ts +40 -4
  228. package/dist/module/wasm/v1/proposal.d.ts +23 -106
  229. package/dist/module/wasm/v1/proposal.js +562 -377
  230. package/dist/module/wasm/v1/query.d.ts +35 -187
  231. package/dist/module/wasm/v1/query.js +330 -301
  232. package/dist/module/wasm/v1/tx.d.ts +37 -210
  233. package/dist/module/wasm/v1/tx.js +551 -404
  234. package/dist/module/wasm/v1/types.d.ts +19 -67
  235. package/dist/module/wasm/v1/types.js +196 -156
  236. package/package.json +11 -10
@@ -0,0 +1,871 @@
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/query.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
8
+ import { PageRequest, PageResponse, } from "cosmjs-types/cosmos/base/query/v1beta1/pagination";
9
+ import { Order, OrderBookData, sideFromJSON, sideToJSON } from "./order";
10
+ import { Params } from "./params";
11
+ export const protobufPackage = "coreum.dex.v1";
12
+ function createBaseQueryParamsRequest() {
13
+ return {};
14
+ }
15
+ export const QueryParamsRequest = {
16
+ encode(_, writer = new BinaryWriter()) {
17
+ return writer;
18
+ },
19
+ decode(input, length) {
20
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
21
+ let end = length === undefined ? reader.len : reader.pos + length;
22
+ const message = createBaseQueryParamsRequest();
23
+ while (reader.pos < end) {
24
+ const tag = reader.uint32();
25
+ switch (tag >>> 3) {
26
+ }
27
+ if ((tag & 7) === 4 || tag === 0) {
28
+ break;
29
+ }
30
+ reader.skip(tag & 7);
31
+ }
32
+ return message;
33
+ },
34
+ fromJSON(_) {
35
+ return {};
36
+ },
37
+ toJSON(_) {
38
+ const obj = {};
39
+ return obj;
40
+ },
41
+ create(base) {
42
+ return QueryParamsRequest.fromPartial(base ?? {});
43
+ },
44
+ fromPartial(_) {
45
+ const message = createBaseQueryParamsRequest();
46
+ return message;
47
+ },
48
+ };
49
+ function createBaseQueryParamsResponse() {
50
+ return { params: undefined };
51
+ }
52
+ export const QueryParamsResponse = {
53
+ encode(message, writer = new BinaryWriter()) {
54
+ if (message.params !== undefined) {
55
+ Params.encode(message.params, writer.uint32(10).fork()).ldelim();
56
+ }
57
+ return writer;
58
+ },
59
+ decode(input, length) {
60
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
61
+ let end = length === undefined ? reader.len : reader.pos + length;
62
+ const message = createBaseQueryParamsResponse();
63
+ while (reader.pos < end) {
64
+ const tag = reader.uint32();
65
+ switch (tag >>> 3) {
66
+ case 1: {
67
+ if (tag !== 10) {
68
+ break;
69
+ }
70
+ message.params = Params.decode(reader, reader.uint32());
71
+ continue;
72
+ }
73
+ }
74
+ if ((tag & 7) === 4 || tag === 0) {
75
+ break;
76
+ }
77
+ reader.skip(tag & 7);
78
+ }
79
+ return message;
80
+ },
81
+ fromJSON(object) {
82
+ return {
83
+ params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
84
+ };
85
+ },
86
+ toJSON(message) {
87
+ const obj = {};
88
+ if (message.params !== undefined) {
89
+ obj.params = Params.toJSON(message.params);
90
+ }
91
+ return obj;
92
+ },
93
+ create(base) {
94
+ return QueryParamsResponse.fromPartial(base ?? {});
95
+ },
96
+ fromPartial(object) {
97
+ const message = createBaseQueryParamsResponse();
98
+ message.params =
99
+ object.params !== undefined && object.params !== null
100
+ ? Params.fromPartial(object.params)
101
+ : undefined;
102
+ return message;
103
+ },
104
+ };
105
+ function createBaseQueryOrderRequest() {
106
+ return { creator: "", id: "" };
107
+ }
108
+ export const QueryOrderRequest = {
109
+ encode(message, writer = new BinaryWriter()) {
110
+ if (message.creator !== "") {
111
+ writer.uint32(10).string(message.creator);
112
+ }
113
+ if (message.id !== "") {
114
+ writer.uint32(18).string(message.id);
115
+ }
116
+ return writer;
117
+ },
118
+ decode(input, length) {
119
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
120
+ let end = length === undefined ? reader.len : reader.pos + length;
121
+ const message = createBaseQueryOrderRequest();
122
+ while (reader.pos < end) {
123
+ const tag = reader.uint32();
124
+ switch (tag >>> 3) {
125
+ case 1: {
126
+ if (tag !== 10) {
127
+ break;
128
+ }
129
+ message.creator = reader.string();
130
+ continue;
131
+ }
132
+ case 2: {
133
+ if (tag !== 18) {
134
+ break;
135
+ }
136
+ message.id = reader.string();
137
+ continue;
138
+ }
139
+ }
140
+ if ((tag & 7) === 4 || tag === 0) {
141
+ break;
142
+ }
143
+ reader.skip(tag & 7);
144
+ }
145
+ return message;
146
+ },
147
+ fromJSON(object) {
148
+ return {
149
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
150
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
151
+ };
152
+ },
153
+ toJSON(message) {
154
+ const obj = {};
155
+ if (message.creator !== "") {
156
+ obj.creator = message.creator;
157
+ }
158
+ if (message.id !== "") {
159
+ obj.id = message.id;
160
+ }
161
+ return obj;
162
+ },
163
+ create(base) {
164
+ return QueryOrderRequest.fromPartial(base ?? {});
165
+ },
166
+ fromPartial(object) {
167
+ const message = createBaseQueryOrderRequest();
168
+ message.creator = object.creator ?? "";
169
+ message.id = object.id ?? "";
170
+ return message;
171
+ },
172
+ };
173
+ function createBaseQueryOrderResponse() {
174
+ return { order: undefined };
175
+ }
176
+ export const QueryOrderResponse = {
177
+ encode(message, writer = new BinaryWriter()) {
178
+ if (message.order !== undefined) {
179
+ Order.encode(message.order, writer.uint32(10).fork()).ldelim();
180
+ }
181
+ return writer;
182
+ },
183
+ decode(input, length) {
184
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
185
+ let end = length === undefined ? reader.len : reader.pos + length;
186
+ const message = createBaseQueryOrderResponse();
187
+ while (reader.pos < end) {
188
+ const tag = reader.uint32();
189
+ switch (tag >>> 3) {
190
+ case 1: {
191
+ if (tag !== 10) {
192
+ break;
193
+ }
194
+ message.order = Order.decode(reader, reader.uint32());
195
+ continue;
196
+ }
197
+ }
198
+ if ((tag & 7) === 4 || tag === 0) {
199
+ break;
200
+ }
201
+ reader.skip(tag & 7);
202
+ }
203
+ return message;
204
+ },
205
+ fromJSON(object) {
206
+ return {
207
+ order: isSet(object.order) ? Order.fromJSON(object.order) : undefined,
208
+ };
209
+ },
210
+ toJSON(message) {
211
+ const obj = {};
212
+ if (message.order !== undefined) {
213
+ obj.order = Order.toJSON(message.order);
214
+ }
215
+ return obj;
216
+ },
217
+ create(base) {
218
+ return QueryOrderResponse.fromPartial(base ?? {});
219
+ },
220
+ fromPartial(object) {
221
+ const message = createBaseQueryOrderResponse();
222
+ message.order =
223
+ object.order !== undefined && object.order !== null
224
+ ? Order.fromPartial(object.order)
225
+ : undefined;
226
+ return message;
227
+ },
228
+ };
229
+ function createBaseQueryOrdersRequest() {
230
+ return { creator: "", pagination: undefined };
231
+ }
232
+ export const QueryOrdersRequest = {
233
+ encode(message, writer = new BinaryWriter()) {
234
+ if (message.creator !== "") {
235
+ writer.uint32(10).string(message.creator);
236
+ }
237
+ if (message.pagination !== undefined) {
238
+ PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
239
+ }
240
+ return writer;
241
+ },
242
+ decode(input, length) {
243
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
244
+ let end = length === undefined ? reader.len : reader.pos + length;
245
+ const message = createBaseQueryOrdersRequest();
246
+ while (reader.pos < end) {
247
+ const tag = reader.uint32();
248
+ switch (tag >>> 3) {
249
+ case 1: {
250
+ if (tag !== 10) {
251
+ break;
252
+ }
253
+ message.creator = reader.string();
254
+ continue;
255
+ }
256
+ case 2: {
257
+ if (tag !== 18) {
258
+ break;
259
+ }
260
+ message.pagination = PageRequest.decode(reader, reader.uint32());
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
+ creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
274
+ pagination: isSet(object.pagination)
275
+ ? PageRequest.fromJSON(object.pagination)
276
+ : undefined,
277
+ };
278
+ },
279
+ toJSON(message) {
280
+ const obj = {};
281
+ if (message.creator !== "") {
282
+ obj.creator = message.creator;
283
+ }
284
+ if (message.pagination !== undefined) {
285
+ obj.pagination = PageRequest.toJSON(message.pagination);
286
+ }
287
+ return obj;
288
+ },
289
+ create(base) {
290
+ return QueryOrdersRequest.fromPartial(base ?? {});
291
+ },
292
+ fromPartial(object) {
293
+ const message = createBaseQueryOrdersRequest();
294
+ message.creator = object.creator ?? "";
295
+ message.pagination =
296
+ object.pagination !== undefined && object.pagination !== null
297
+ ? PageRequest.fromPartial(object.pagination)
298
+ : undefined;
299
+ return message;
300
+ },
301
+ };
302
+ function createBaseQueryOrdersResponse() {
303
+ return { orders: [], pagination: undefined };
304
+ }
305
+ export const QueryOrdersResponse = {
306
+ encode(message, writer = new BinaryWriter()) {
307
+ for (const v of message.orders) {
308
+ Order.encode(v, writer.uint32(10).fork()).ldelim();
309
+ }
310
+ if (message.pagination !== undefined) {
311
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
312
+ }
313
+ return writer;
314
+ },
315
+ decode(input, length) {
316
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
317
+ let end = length === undefined ? reader.len : reader.pos + length;
318
+ const message = createBaseQueryOrdersResponse();
319
+ while (reader.pos < end) {
320
+ const tag = reader.uint32();
321
+ switch (tag >>> 3) {
322
+ case 1: {
323
+ if (tag !== 10) {
324
+ break;
325
+ }
326
+ message.orders.push(Order.decode(reader, reader.uint32()));
327
+ continue;
328
+ }
329
+ case 2: {
330
+ if (tag !== 18) {
331
+ break;
332
+ }
333
+ message.pagination = PageResponse.decode(reader, reader.uint32());
334
+ continue;
335
+ }
336
+ }
337
+ if ((tag & 7) === 4 || tag === 0) {
338
+ break;
339
+ }
340
+ reader.skip(tag & 7);
341
+ }
342
+ return message;
343
+ },
344
+ fromJSON(object) {
345
+ return {
346
+ orders: globalThis.Array.isArray(object?.orders)
347
+ ? object.orders.map((e) => Order.fromJSON(e))
348
+ : [],
349
+ pagination: isSet(object.pagination)
350
+ ? PageResponse.fromJSON(object.pagination)
351
+ : undefined,
352
+ };
353
+ },
354
+ toJSON(message) {
355
+ const obj = {};
356
+ if (message.orders?.length) {
357
+ obj.orders = message.orders.map((e) => Order.toJSON(e));
358
+ }
359
+ if (message.pagination !== undefined) {
360
+ obj.pagination = PageResponse.toJSON(message.pagination);
361
+ }
362
+ return obj;
363
+ },
364
+ create(base) {
365
+ return QueryOrdersResponse.fromPartial(base ?? {});
366
+ },
367
+ fromPartial(object) {
368
+ const message = createBaseQueryOrdersResponse();
369
+ message.orders = object.orders?.map((e) => Order.fromPartial(e)) || [];
370
+ message.pagination =
371
+ object.pagination !== undefined && object.pagination !== null
372
+ ? PageResponse.fromPartial(object.pagination)
373
+ : undefined;
374
+ return message;
375
+ },
376
+ };
377
+ function createBaseQueryOrderBooksRequest() {
378
+ return { pagination: undefined };
379
+ }
380
+ export const QueryOrderBooksRequest = {
381
+ encode(message, writer = new BinaryWriter()) {
382
+ if (message.pagination !== undefined) {
383
+ PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
384
+ }
385
+ return writer;
386
+ },
387
+ decode(input, length) {
388
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
389
+ let end = length === undefined ? reader.len : reader.pos + length;
390
+ const message = createBaseQueryOrderBooksRequest();
391
+ while (reader.pos < end) {
392
+ const tag = reader.uint32();
393
+ switch (tag >>> 3) {
394
+ case 1: {
395
+ if (tag !== 10) {
396
+ break;
397
+ }
398
+ message.pagination = PageRequest.decode(reader, reader.uint32());
399
+ continue;
400
+ }
401
+ }
402
+ if ((tag & 7) === 4 || tag === 0) {
403
+ break;
404
+ }
405
+ reader.skip(tag & 7);
406
+ }
407
+ return message;
408
+ },
409
+ fromJSON(object) {
410
+ return {
411
+ pagination: isSet(object.pagination)
412
+ ? PageRequest.fromJSON(object.pagination)
413
+ : undefined,
414
+ };
415
+ },
416
+ toJSON(message) {
417
+ const obj = {};
418
+ if (message.pagination !== undefined) {
419
+ obj.pagination = PageRequest.toJSON(message.pagination);
420
+ }
421
+ return obj;
422
+ },
423
+ create(base) {
424
+ return QueryOrderBooksRequest.fromPartial(base ?? {});
425
+ },
426
+ fromPartial(object) {
427
+ const message = createBaseQueryOrderBooksRequest();
428
+ message.pagination =
429
+ object.pagination !== undefined && object.pagination !== null
430
+ ? PageRequest.fromPartial(object.pagination)
431
+ : undefined;
432
+ return message;
433
+ },
434
+ };
435
+ function createBaseQueryOrderBooksResponse() {
436
+ return { orderBooks: [], pagination: undefined };
437
+ }
438
+ export const QueryOrderBooksResponse = {
439
+ encode(message, writer = new BinaryWriter()) {
440
+ for (const v of message.orderBooks) {
441
+ OrderBookData.encode(v, writer.uint32(10).fork()).ldelim();
442
+ }
443
+ if (message.pagination !== undefined) {
444
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
445
+ }
446
+ return writer;
447
+ },
448
+ decode(input, length) {
449
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
450
+ let end = length === undefined ? reader.len : reader.pos + length;
451
+ const message = createBaseQueryOrderBooksResponse();
452
+ while (reader.pos < end) {
453
+ const tag = reader.uint32();
454
+ switch (tag >>> 3) {
455
+ case 1: {
456
+ if (tag !== 10) {
457
+ break;
458
+ }
459
+ message.orderBooks.push(OrderBookData.decode(reader, reader.uint32()));
460
+ continue;
461
+ }
462
+ case 2: {
463
+ if (tag !== 18) {
464
+ break;
465
+ }
466
+ message.pagination = PageResponse.decode(reader, reader.uint32());
467
+ continue;
468
+ }
469
+ }
470
+ if ((tag & 7) === 4 || tag === 0) {
471
+ break;
472
+ }
473
+ reader.skip(tag & 7);
474
+ }
475
+ return message;
476
+ },
477
+ fromJSON(object) {
478
+ return {
479
+ orderBooks: globalThis.Array.isArray(object?.orderBooks)
480
+ ? object.orderBooks.map((e) => OrderBookData.fromJSON(e))
481
+ : [],
482
+ pagination: isSet(object.pagination)
483
+ ? PageResponse.fromJSON(object.pagination)
484
+ : undefined,
485
+ };
486
+ },
487
+ toJSON(message) {
488
+ const obj = {};
489
+ if (message.orderBooks?.length) {
490
+ obj.orderBooks = message.orderBooks.map((e) => OrderBookData.toJSON(e));
491
+ }
492
+ if (message.pagination !== undefined) {
493
+ obj.pagination = PageResponse.toJSON(message.pagination);
494
+ }
495
+ return obj;
496
+ },
497
+ create(base) {
498
+ return QueryOrderBooksResponse.fromPartial(base ?? {});
499
+ },
500
+ fromPartial(object) {
501
+ const message = createBaseQueryOrderBooksResponse();
502
+ message.orderBooks =
503
+ object.orderBooks?.map((e) => OrderBookData.fromPartial(e)) || [];
504
+ message.pagination =
505
+ object.pagination !== undefined && object.pagination !== null
506
+ ? PageResponse.fromPartial(object.pagination)
507
+ : undefined;
508
+ return message;
509
+ },
510
+ };
511
+ function createBaseQueryOrderBookOrdersRequest() {
512
+ return { baseDenom: "", quoteDenom: "", side: 0, pagination: undefined };
513
+ }
514
+ export const QueryOrderBookOrdersRequest = {
515
+ encode(message, writer = new BinaryWriter()) {
516
+ if (message.baseDenom !== "") {
517
+ writer.uint32(10).string(message.baseDenom);
518
+ }
519
+ if (message.quoteDenom !== "") {
520
+ writer.uint32(18).string(message.quoteDenom);
521
+ }
522
+ if (message.side !== 0) {
523
+ writer.uint32(24).int32(message.side);
524
+ }
525
+ if (message.pagination !== undefined) {
526
+ PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim();
527
+ }
528
+ return writer;
529
+ },
530
+ decode(input, length) {
531
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
532
+ let end = length === undefined ? reader.len : reader.pos + length;
533
+ const message = createBaseQueryOrderBookOrdersRequest();
534
+ while (reader.pos < end) {
535
+ const tag = reader.uint32();
536
+ switch (tag >>> 3) {
537
+ case 1: {
538
+ if (tag !== 10) {
539
+ break;
540
+ }
541
+ message.baseDenom = reader.string();
542
+ continue;
543
+ }
544
+ case 2: {
545
+ if (tag !== 18) {
546
+ break;
547
+ }
548
+ message.quoteDenom = reader.string();
549
+ continue;
550
+ }
551
+ case 3: {
552
+ if (tag !== 24) {
553
+ break;
554
+ }
555
+ message.side = reader.int32();
556
+ continue;
557
+ }
558
+ case 4: {
559
+ if (tag !== 34) {
560
+ break;
561
+ }
562
+ message.pagination = PageRequest.decode(reader, reader.uint32());
563
+ continue;
564
+ }
565
+ }
566
+ if ((tag & 7) === 4 || tag === 0) {
567
+ break;
568
+ }
569
+ reader.skip(tag & 7);
570
+ }
571
+ return message;
572
+ },
573
+ fromJSON(object) {
574
+ return {
575
+ baseDenom: isSet(object.baseDenom)
576
+ ? globalThis.String(object.baseDenom)
577
+ : "",
578
+ quoteDenom: isSet(object.quoteDenom)
579
+ ? globalThis.String(object.quoteDenom)
580
+ : "",
581
+ side: isSet(object.side) ? sideFromJSON(object.side) : 0,
582
+ pagination: isSet(object.pagination)
583
+ ? PageRequest.fromJSON(object.pagination)
584
+ : undefined,
585
+ };
586
+ },
587
+ toJSON(message) {
588
+ const obj = {};
589
+ if (message.baseDenom !== "") {
590
+ obj.baseDenom = message.baseDenom;
591
+ }
592
+ if (message.quoteDenom !== "") {
593
+ obj.quoteDenom = message.quoteDenom;
594
+ }
595
+ if (message.side !== 0) {
596
+ obj.side = sideToJSON(message.side);
597
+ }
598
+ if (message.pagination !== undefined) {
599
+ obj.pagination = PageRequest.toJSON(message.pagination);
600
+ }
601
+ return obj;
602
+ },
603
+ create(base) {
604
+ return QueryOrderBookOrdersRequest.fromPartial(base ?? {});
605
+ },
606
+ fromPartial(object) {
607
+ const message = createBaseQueryOrderBookOrdersRequest();
608
+ message.baseDenom = object.baseDenom ?? "";
609
+ message.quoteDenom = object.quoteDenom ?? "";
610
+ message.side = object.side ?? 0;
611
+ message.pagination =
612
+ object.pagination !== undefined && object.pagination !== null
613
+ ? PageRequest.fromPartial(object.pagination)
614
+ : undefined;
615
+ return message;
616
+ },
617
+ };
618
+ function createBaseQueryOrderBookOrdersResponse() {
619
+ return { orders: [], pagination: undefined };
620
+ }
621
+ export const QueryOrderBookOrdersResponse = {
622
+ encode(message, writer = new BinaryWriter()) {
623
+ for (const v of message.orders) {
624
+ Order.encode(v, writer.uint32(10).fork()).ldelim();
625
+ }
626
+ if (message.pagination !== undefined) {
627
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
628
+ }
629
+ return writer;
630
+ },
631
+ decode(input, length) {
632
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
633
+ let end = length === undefined ? reader.len : reader.pos + length;
634
+ const message = createBaseQueryOrderBookOrdersResponse();
635
+ while (reader.pos < end) {
636
+ const tag = reader.uint32();
637
+ switch (tag >>> 3) {
638
+ case 1: {
639
+ if (tag !== 10) {
640
+ break;
641
+ }
642
+ message.orders.push(Order.decode(reader, reader.uint32()));
643
+ continue;
644
+ }
645
+ case 2: {
646
+ if (tag !== 18) {
647
+ break;
648
+ }
649
+ message.pagination = PageResponse.decode(reader, reader.uint32());
650
+ continue;
651
+ }
652
+ }
653
+ if ((tag & 7) === 4 || tag === 0) {
654
+ break;
655
+ }
656
+ reader.skip(tag & 7);
657
+ }
658
+ return message;
659
+ },
660
+ fromJSON(object) {
661
+ return {
662
+ orders: globalThis.Array.isArray(object?.orders)
663
+ ? object.orders.map((e) => Order.fromJSON(e))
664
+ : [],
665
+ pagination: isSet(object.pagination)
666
+ ? PageResponse.fromJSON(object.pagination)
667
+ : undefined,
668
+ };
669
+ },
670
+ toJSON(message) {
671
+ const obj = {};
672
+ if (message.orders?.length) {
673
+ obj.orders = message.orders.map((e) => Order.toJSON(e));
674
+ }
675
+ if (message.pagination !== undefined) {
676
+ obj.pagination = PageResponse.toJSON(message.pagination);
677
+ }
678
+ return obj;
679
+ },
680
+ create(base) {
681
+ return QueryOrderBookOrdersResponse.fromPartial(base ?? {});
682
+ },
683
+ fromPartial(object) {
684
+ const message = createBaseQueryOrderBookOrdersResponse();
685
+ message.orders = object.orders?.map((e) => Order.fromPartial(e)) || [];
686
+ message.pagination =
687
+ object.pagination !== undefined && object.pagination !== null
688
+ ? PageResponse.fromPartial(object.pagination)
689
+ : undefined;
690
+ return message;
691
+ },
692
+ };
693
+ function createBaseQueryAccountDenomOrdersCountRequest() {
694
+ return { account: "", denom: "" };
695
+ }
696
+ export const QueryAccountDenomOrdersCountRequest = {
697
+ encode(message, writer = new BinaryWriter()) {
698
+ if (message.account !== "") {
699
+ writer.uint32(10).string(message.account);
700
+ }
701
+ if (message.denom !== "") {
702
+ writer.uint32(18).string(message.denom);
703
+ }
704
+ return writer;
705
+ },
706
+ decode(input, length) {
707
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
708
+ let end = length === undefined ? reader.len : reader.pos + length;
709
+ const message = createBaseQueryAccountDenomOrdersCountRequest();
710
+ while (reader.pos < end) {
711
+ const tag = reader.uint32();
712
+ switch (tag >>> 3) {
713
+ case 1: {
714
+ if (tag !== 10) {
715
+ break;
716
+ }
717
+ message.account = reader.string();
718
+ continue;
719
+ }
720
+ case 2: {
721
+ if (tag !== 18) {
722
+ break;
723
+ }
724
+ message.denom = reader.string();
725
+ continue;
726
+ }
727
+ }
728
+ if ((tag & 7) === 4 || tag === 0) {
729
+ break;
730
+ }
731
+ reader.skip(tag & 7);
732
+ }
733
+ return message;
734
+ },
735
+ fromJSON(object) {
736
+ return {
737
+ account: isSet(object.account) ? globalThis.String(object.account) : "",
738
+ denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
739
+ };
740
+ },
741
+ toJSON(message) {
742
+ const obj = {};
743
+ if (message.account !== "") {
744
+ obj.account = message.account;
745
+ }
746
+ if (message.denom !== "") {
747
+ obj.denom = message.denom;
748
+ }
749
+ return obj;
750
+ },
751
+ create(base) {
752
+ return QueryAccountDenomOrdersCountRequest.fromPartial(base ?? {});
753
+ },
754
+ fromPartial(object) {
755
+ const message = createBaseQueryAccountDenomOrdersCountRequest();
756
+ message.account = object.account ?? "";
757
+ message.denom = object.denom ?? "";
758
+ return message;
759
+ },
760
+ };
761
+ function createBaseQueryAccountDenomOrdersCountResponse() {
762
+ return { count: 0 };
763
+ }
764
+ export const QueryAccountDenomOrdersCountResponse = {
765
+ encode(message, writer = new BinaryWriter()) {
766
+ if (message.count !== 0) {
767
+ writer.uint32(8).uint64(message.count);
768
+ }
769
+ return writer;
770
+ },
771
+ decode(input, length) {
772
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
773
+ let end = length === undefined ? reader.len : reader.pos + length;
774
+ const message = createBaseQueryAccountDenomOrdersCountResponse();
775
+ while (reader.pos < end) {
776
+ const tag = reader.uint32();
777
+ switch (tag >>> 3) {
778
+ case 1: {
779
+ if (tag !== 8) {
780
+ break;
781
+ }
782
+ message.count = longToNumber(reader.uint64());
783
+ continue;
784
+ }
785
+ }
786
+ if ((tag & 7) === 4 || tag === 0) {
787
+ break;
788
+ }
789
+ reader.skip(tag & 7);
790
+ }
791
+ return message;
792
+ },
793
+ fromJSON(object) {
794
+ return {
795
+ count: isSet(object.count) ? globalThis.Number(object.count) : 0,
796
+ };
797
+ },
798
+ toJSON(message) {
799
+ const obj = {};
800
+ if (message.count !== 0) {
801
+ obj.count = Math.round(message.count);
802
+ }
803
+ return obj;
804
+ },
805
+ create(base) {
806
+ return QueryAccountDenomOrdersCountResponse.fromPartial(base ?? {});
807
+ },
808
+ fromPartial(object) {
809
+ const message = createBaseQueryAccountDenomOrdersCountResponse();
810
+ message.count = object.count ?? 0;
811
+ return message;
812
+ },
813
+ };
814
+ export const QueryServiceName = "coreum.dex.v1.Query";
815
+ export class QueryClientImpl {
816
+ rpc;
817
+ service;
818
+ constructor(rpc, opts) {
819
+ this.service = opts?.service || QueryServiceName;
820
+ this.rpc = rpc;
821
+ this.Params = this.Params.bind(this);
822
+ this.Order = this.Order.bind(this);
823
+ this.Orders = this.Orders.bind(this);
824
+ this.OrderBooks = this.OrderBooks.bind(this);
825
+ this.OrderBookOrders = this.OrderBookOrders.bind(this);
826
+ this.AccountDenomOrdersCount = this.AccountDenomOrdersCount.bind(this);
827
+ }
828
+ Params(request) {
829
+ const data = QueryParamsRequest.encode(request).finish();
830
+ const promise = this.rpc.request(this.service, "Params", data);
831
+ return promise.then((data) => QueryParamsResponse.decode(new BinaryReader(data)));
832
+ }
833
+ Order(request) {
834
+ const data = QueryOrderRequest.encode(request).finish();
835
+ const promise = this.rpc.request(this.service, "Order", data);
836
+ return promise.then((data) => QueryOrderResponse.decode(new BinaryReader(data)));
837
+ }
838
+ Orders(request) {
839
+ const data = QueryOrdersRequest.encode(request).finish();
840
+ const promise = this.rpc.request(this.service, "Orders", data);
841
+ return promise.then((data) => QueryOrdersResponse.decode(new BinaryReader(data)));
842
+ }
843
+ OrderBooks(request) {
844
+ const data = QueryOrderBooksRequest.encode(request).finish();
845
+ const promise = this.rpc.request(this.service, "OrderBooks", data);
846
+ return promise.then((data) => QueryOrderBooksResponse.decode(new BinaryReader(data)));
847
+ }
848
+ OrderBookOrders(request) {
849
+ const data = QueryOrderBookOrdersRequest.encode(request).finish();
850
+ const promise = this.rpc.request(this.service, "OrderBookOrders", data);
851
+ return promise.then((data) => QueryOrderBookOrdersResponse.decode(new BinaryReader(data)));
852
+ }
853
+ AccountDenomOrdersCount(request) {
854
+ const data = QueryAccountDenomOrdersCountRequest.encode(request).finish();
855
+ const promise = this.rpc.request(this.service, "AccountDenomOrdersCount", data);
856
+ return promise.then((data) => QueryAccountDenomOrdersCountResponse.decode(new BinaryReader(data)));
857
+ }
858
+ }
859
+ function longToNumber(int64) {
860
+ const num = globalThis.Number(int64.toString());
861
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
862
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
863
+ }
864
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
865
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
866
+ }
867
+ return num;
868
+ }
869
+ function isSet(value) {
870
+ return value !== null && value !== undefined;
871
+ }