coreum-js 2.16.3 → 2.17.0

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