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
@@ -1,66 +1,69 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.0
5
+ // protoc v3.21.12
6
+ // source: coreum-protos/customparams/params.proto
5
7
  Object.defineProperty(exports, "__esModule", { value: true });
6
8
  exports.StakingParams = exports.protobufPackage = void 0;
7
9
  /* eslint-disable */
8
- const long_1 = __importDefault(require("long"));
9
- const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ const binary_1 = require("cosmjs-types/binary");
10
11
  exports.protobufPackage = "coreum.customparams.v1";
11
12
  function createBaseStakingParams() {
12
13
  return { minSelfDelegation: "" };
13
14
  }
14
15
  exports.StakingParams = {
15
- encode(message, writer = minimal_1.default.Writer.create()) {
16
+ encode(message, writer = new binary_1.BinaryWriter()) {
16
17
  if (message.minSelfDelegation !== "") {
17
18
  writer.uint32(10).string(message.minSelfDelegation);
18
19
  }
19
20
  return writer;
20
21
  },
21
22
  decode(input, length) {
22
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
23
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
23
24
  let end = length === undefined ? reader.len : reader.pos + length;
24
25
  const message = createBaseStakingParams();
25
26
  while (reader.pos < end) {
26
27
  const tag = reader.uint32();
27
28
  switch (tag >>> 3) {
28
- case 1:
29
- if (tag != 10) {
29
+ case 1: {
30
+ if (tag !== 10) {
30
31
  break;
31
32
  }
32
33
  message.minSelfDelegation = reader.string();
33
34
  continue;
35
+ }
34
36
  }
35
- if ((tag & 7) == 4 || tag == 0) {
37
+ if ((tag & 7) === 4 || tag === 0) {
36
38
  break;
37
39
  }
38
- reader.skipType(tag & 7);
40
+ reader.skip(tag & 7);
39
41
  }
40
42
  return message;
41
43
  },
42
44
  fromJSON(object) {
43
- return { minSelfDelegation: isSet(object.minSelfDelegation) ? String(object.minSelfDelegation) : "" };
45
+ return {
46
+ minSelfDelegation: isSet(object.minSelfDelegation)
47
+ ? globalThis.String(object.minSelfDelegation)
48
+ : "",
49
+ };
44
50
  },
45
51
  toJSON(message) {
46
52
  const obj = {};
47
- message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation);
53
+ if (message.minSelfDelegation !== "") {
54
+ obj.minSelfDelegation = message.minSelfDelegation;
55
+ }
48
56
  return obj;
49
57
  },
50
58
  create(base) {
51
- return exports.StakingParams.fromPartial(base !== null && base !== void 0 ? base : {});
59
+ return exports.StakingParams.fromPartial(base ?? {});
52
60
  },
53
61
  fromPartial(object) {
54
- var _a;
55
62
  const message = createBaseStakingParams();
56
- message.minSelfDelegation = (_a = object.minSelfDelegation) !== null && _a !== void 0 ? _a : "";
63
+ message.minSelfDelegation = object.minSelfDelegation ?? "";
57
64
  return message;
58
65
  },
59
66
  };
60
- if (minimal_1.default.util.Long !== long_1.default) {
61
- minimal_1.default.util.Long = long_1.default;
62
- minimal_1.default.configure();
63
- }
64
67
  function isSet(value) {
65
68
  return value !== null && value !== undefined;
66
69
  }
@@ -1,5 +1,4 @@
1
- import Long from "long";
2
- import _m0 from "protobufjs/minimal";
1
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
3
2
  import { StakingParams } from "./params";
4
3
  export declare const protobufPackage = "coreum.customparams.v1";
5
4
  /** QueryStakingParamsRequest defines the request type for querying x/customparams staking parameters. */
@@ -7,49 +6,16 @@ export interface QueryStakingParamsRequest {
7
6
  }
8
7
  /** QueryStakingParamsResponse defines the response type for querying x/customparams staking parameters. */
9
8
  export interface QueryStakingParamsResponse {
10
- params?: StakingParams;
9
+ params: StakingParams | undefined;
11
10
  }
12
- export declare const QueryStakingParamsRequest: {
13
- encode(_: QueryStakingParamsRequest, writer?: _m0.Writer): _m0.Writer;
14
- decode(input: _m0.Reader | Uint8Array, length?: number): QueryStakingParamsRequest;
15
- fromJSON(_: any): QueryStakingParamsRequest;
16
- toJSON(_: QueryStakingParamsRequest): unknown;
17
- create<I extends {} & {} & { [K in Exclude<keyof I, never>]: never; }>(base?: I): QueryStakingParamsRequest;
18
- fromPartial<I_1 extends {} & {} & { [K_1 in Exclude<keyof I_1, never>]: never; }>(_: I_1): QueryStakingParamsRequest;
19
- };
20
- export declare const QueryStakingParamsResponse: {
21
- encode(message: QueryStakingParamsResponse, writer?: _m0.Writer): _m0.Writer;
22
- decode(input: _m0.Reader | Uint8Array, length?: number): QueryStakingParamsResponse;
23
- fromJSON(object: any): QueryStakingParamsResponse;
24
- toJSON(message: QueryStakingParamsResponse): unknown;
25
- create<I extends {
26
- params?: {
27
- minSelfDelegation?: string;
28
- };
29
- } & {
30
- params?: {
31
- minSelfDelegation?: string;
32
- } & {
33
- minSelfDelegation?: string;
34
- } & { [K in Exclude<keyof I["params"], "minSelfDelegation">]: never; };
35
- } & { [K_1 in Exclude<keyof I, "params">]: never; }>(base?: I): QueryStakingParamsResponse;
36
- fromPartial<I_1 extends {
37
- params?: {
38
- minSelfDelegation?: string;
39
- };
40
- } & {
41
- params?: {
42
- minSelfDelegation?: string;
43
- } & {
44
- minSelfDelegation?: string;
45
- } & { [K_2 in Exclude<keyof I_1["params"], "minSelfDelegation">]: never; };
46
- } & { [K_3 in Exclude<keyof I_1, "params">]: never; }>(object: I_1): QueryStakingParamsResponse;
47
- };
11
+ export declare const QueryStakingParamsRequest: MessageFns<QueryStakingParamsRequest>;
12
+ export declare const QueryStakingParamsResponse: MessageFns<QueryStakingParamsResponse>;
48
13
  /** Query defines the gRPC querier service. */
49
14
  export interface Query {
50
15
  /** StakingParams queries the staking parameters of the module. */
51
16
  StakingParams(request: QueryStakingParamsRequest): Promise<QueryStakingParamsResponse>;
52
17
  }
18
+ export declare const QueryServiceName = "coreum.customparams.v1.Query";
53
19
  export declare class QueryClientImpl implements Query {
54
20
  private readonly rpc;
55
21
  private readonly service;
@@ -62,7 +28,7 @@ interface Rpc {
62
28
  request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
63
29
  }
64
30
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
65
- export type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
31
+ 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 {} ? {
66
32
  [K in keyof T]?: DeepPartial<T[K]>;
67
33
  } : Partial<T>;
68
34
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -71,4 +37,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
71
37
  } & {
72
38
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
73
39
  };
40
+ export interface MessageFns<T> {
41
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
42
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
43
+ fromJSON(object: any): T;
44
+ toJSON(message: T): unknown;
45
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
46
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
47
+ }
74
48
  export {};
@@ -1,33 +1,34 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.0
5
+ // protoc v3.21.12
6
+ // source: coreum-protos/customparams/query.proto
5
7
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.QueryClientImpl = exports.QueryStakingParamsResponse = exports.QueryStakingParamsRequest = exports.protobufPackage = void 0;
8
+ exports.QueryClientImpl = exports.QueryServiceName = exports.QueryStakingParamsResponse = exports.QueryStakingParamsRequest = exports.protobufPackage = void 0;
7
9
  /* eslint-disable */
8
- const long_1 = __importDefault(require("long"));
9
- const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ const binary_1 = require("cosmjs-types/binary");
10
11
  const params_1 = require("./params");
11
12
  exports.protobufPackage = "coreum.customparams.v1";
12
13
  function createBaseQueryStakingParamsRequest() {
13
14
  return {};
14
15
  }
15
16
  exports.QueryStakingParamsRequest = {
16
- encode(_, writer = minimal_1.default.Writer.create()) {
17
+ encode(_, writer = new binary_1.BinaryWriter()) {
17
18
  return writer;
18
19
  },
19
20
  decode(input, length) {
20
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
21
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
21
22
  let end = length === undefined ? reader.len : reader.pos + length;
22
23
  const message = createBaseQueryStakingParamsRequest();
23
24
  while (reader.pos < end) {
24
25
  const tag = reader.uint32();
25
26
  switch (tag >>> 3) {
26
27
  }
27
- if ((tag & 7) == 4 || tag == 0) {
28
+ if ((tag & 7) === 4 || tag === 0) {
28
29
  break;
29
30
  }
30
- reader.skipType(tag & 7);
31
+ reader.skip(tag & 7);
31
32
  }
32
33
  return message;
33
34
  },
@@ -39,7 +40,7 @@ exports.QueryStakingParamsRequest = {
39
40
  return obj;
40
41
  },
41
42
  create(base) {
42
- return exports.QueryStakingParamsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
43
+ return exports.QueryStakingParamsRequest.fromPartial(base ?? {});
43
44
  },
44
45
  fromPartial(_) {
45
46
  const message = createBaseQueryStakingParamsRequest();
@@ -50,69 +51,74 @@ function createBaseQueryStakingParamsResponse() {
50
51
  return { params: undefined };
51
52
  }
52
53
  exports.QueryStakingParamsResponse = {
53
- encode(message, writer = minimal_1.default.Writer.create()) {
54
+ encode(message, writer = new binary_1.BinaryWriter()) {
54
55
  if (message.params !== undefined) {
55
56
  params_1.StakingParams.encode(message.params, writer.uint32(10).fork()).ldelim();
56
57
  }
57
58
  return writer;
58
59
  },
59
60
  decode(input, length) {
60
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
61
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
61
62
  let end = length === undefined ? reader.len : reader.pos + length;
62
63
  const message = createBaseQueryStakingParamsResponse();
63
64
  while (reader.pos < end) {
64
65
  const tag = reader.uint32();
65
66
  switch (tag >>> 3) {
66
- case 1:
67
- if (tag != 10) {
67
+ case 1: {
68
+ if (tag !== 10) {
68
69
  break;
69
70
  }
70
71
  message.params = params_1.StakingParams.decode(reader, reader.uint32());
71
72
  continue;
73
+ }
72
74
  }
73
- if ((tag & 7) == 4 || tag == 0) {
75
+ if ((tag & 7) === 4 || tag === 0) {
74
76
  break;
75
77
  }
76
- reader.skipType(tag & 7);
78
+ reader.skip(tag & 7);
77
79
  }
78
80
  return message;
79
81
  },
80
82
  fromJSON(object) {
81
- return { params: isSet(object.params) ? params_1.StakingParams.fromJSON(object.params) : undefined };
83
+ return {
84
+ params: isSet(object.params)
85
+ ? params_1.StakingParams.fromJSON(object.params)
86
+ : undefined,
87
+ };
82
88
  },
83
89
  toJSON(message) {
84
90
  const obj = {};
85
- message.params !== undefined && (obj.params = message.params ? params_1.StakingParams.toJSON(message.params) : undefined);
91
+ if (message.params !== undefined) {
92
+ obj.params = params_1.StakingParams.toJSON(message.params);
93
+ }
86
94
  return obj;
87
95
  },
88
96
  create(base) {
89
- return exports.QueryStakingParamsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
97
+ return exports.QueryStakingParamsResponse.fromPartial(base ?? {});
90
98
  },
91
99
  fromPartial(object) {
92
100
  const message = createBaseQueryStakingParamsResponse();
93
- message.params = (object.params !== undefined && object.params !== null)
94
- ? params_1.StakingParams.fromPartial(object.params)
95
- : undefined;
101
+ message.params =
102
+ object.params !== undefined && object.params !== null
103
+ ? params_1.StakingParams.fromPartial(object.params)
104
+ : undefined;
96
105
  return message;
97
106
  },
98
107
  };
108
+ exports.QueryServiceName = "coreum.customparams.v1.Query";
99
109
  class QueryClientImpl {
100
110
  constructor(rpc, opts) {
101
- this.service = (opts === null || opts === void 0 ? void 0 : opts.service) || "coreum.customparams.v1.Query";
111
+ this.service = opts?.service || exports.QueryServiceName;
102
112
  this.rpc = rpc;
103
113
  this.StakingParams = this.StakingParams.bind(this);
104
114
  }
105
115
  StakingParams(request) {
106
116
  const data = exports.QueryStakingParamsRequest.encode(request).finish();
107
117
  const promise = this.rpc.request(this.service, "StakingParams", data);
108
- return promise.then((data) => exports.QueryStakingParamsResponse.decode(minimal_1.default.Reader.create(data)));
118
+ return promise.then((data) => exports.QueryStakingParamsResponse.decode(new binary_1.BinaryReader(data)));
109
119
  }
110
120
  }
111
121
  exports.QueryClientImpl = QueryClientImpl;
112
- if (minimal_1.default.util.Long !== long_1.default) {
113
- minimal_1.default.util.Long = long_1.default;
114
- minimal_1.default.configure();
115
- }
116
122
  function isSet(value) {
117
123
  return value !== null && value !== undefined;
118
124
  }
@@ -0,0 +1 @@
1
+ export declare const dexRegistry: ReadonlyArray<[string, any]>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dexRegistry = void 0;
4
+ const types_1 = require("../../types");
5
+ const tx_1 = require("./v1/tx");
6
+ exports.dexRegistry = [
7
+ [types_1.CoreumTypeUrl.DEX + "MsgCancelOrder", tx_1.MsgCancelOrder],
8
+ [types_1.CoreumTypeUrl.DEX + "MsgPlaceOrder", tx_1.MsgPlaceOrder],
9
+ [types_1.CoreumTypeUrl.DEX + "MsgUpdateParams", tx_1.MsgUpdateParams],
10
+ [types_1.CoreumTypeUrl.DEX + "MsgServiceName", tx_1.MsgServiceName],
11
+ [types_1.CoreumTypeUrl.DEX + "MsgCancelOrdersByDenom", tx_1.MsgCancelOrdersByDenom],
12
+ ];
@@ -0,0 +1,73 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "coreum.dex.v1";
3
+ /** EventOrderPlaced is emitted when a new order is placed and new sequence is generated for it. */
4
+ export interface EventOrderPlaced {
5
+ /** creator is order creator address. */
6
+ creator: string;
7
+ /** id is unique order ID. */
8
+ id: string;
9
+ /** sequence is unique order sequence. */
10
+ sequence: number;
11
+ }
12
+ /** EventOrderReduced is emitted when the order is reduced during the matching. */
13
+ export interface EventOrderReduced {
14
+ /** creator is order creator address. */
15
+ creator: string;
16
+ /** id is unique order ID. */
17
+ id: string;
18
+ /** sequence is unique order sequence. */
19
+ sequence: number;
20
+ /** sent_coin is coin sent during matching. */
21
+ sentCoin: string;
22
+ /** received_coin is coin received during matching. */
23
+ receivedCoin: string;
24
+ }
25
+ /** EventOrderCreated is emitted when the limit order is saved to the order book. */
26
+ export interface EventOrderCreated {
27
+ /** creator is order creator address. */
28
+ creator: string;
29
+ /** id is unique order ID. */
30
+ id: string;
31
+ /** sequence is unique order sequence. */
32
+ sequence: number;
33
+ /** remaining_base_quantity - is remaining quantity of base denom which user wants to sell or buy. */
34
+ remainingBaseQuantity: string;
35
+ /** remaining_spendable_balance - is balance up to which user wants to spend to execute the order. */
36
+ remainingSpendableBalance: string;
37
+ }
38
+ /** EventOrderClosed is emitted when the order is closed during matching or manually, and removed from the order book. */
39
+ export interface EventOrderClosed {
40
+ /** creator is order creator address. */
41
+ creator: string;
42
+ /** id is unique order ID. */
43
+ id: string;
44
+ /** sequence is unique order sequence. */
45
+ sequence: number;
46
+ /** remaining_base_quantity - is remaining quantity of base denom which user wants to sell or buy. */
47
+ remainingBaseQuantity: string;
48
+ /** remaining_spendable_balance - is balance up to which user wants to spend to execute the order. */
49
+ remainingSpendableBalance: string;
50
+ }
51
+ export declare const EventOrderPlaced: MessageFns<EventOrderPlaced>;
52
+ export declare const EventOrderReduced: MessageFns<EventOrderReduced>;
53
+ export declare const EventOrderCreated: MessageFns<EventOrderCreated>;
54
+ export declare const EventOrderClosed: MessageFns<EventOrderClosed>;
55
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
56
+ 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 {} ? {
57
+ [K in keyof T]?: DeepPartial<T[K]>;
58
+ } : Partial<T>;
59
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
60
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
61
+ [K in keyof P]: Exact<P[K], I[K]>;
62
+ } & {
63
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
64
+ };
65
+ export interface MessageFns<T> {
66
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
67
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
68
+ fromJSON(object: any): T;
69
+ toJSON(message: T): unknown;
70
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
71
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
72
+ }
73
+ export {};