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
@@ -1,19 +1,24 @@
1
- import Long from "long";
2
- import _m0 from "protobufjs/minimal";
1
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
3
2
  import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
4
3
  import { Params } from "./params";
5
- import { Token } from "./token";
4
+ import { DEXSettings, Token } from "./token";
6
5
  export declare const protobufPackage = "coreum.asset.ft.v1";
7
6
  /** GenesisState defines the module genesis state. */
8
7
  export interface GenesisState {
9
8
  /** params defines all the parameters of the module. */
10
- params?: Params;
9
+ params: Params | undefined;
11
10
  /** tokens keep the fungible token state */
12
11
  tokens: Token[];
13
12
  /** frozen_balances contains the frozen balances on all of the accounts */
14
13
  frozenBalances: Balance[];
15
14
  /** whitelisted_balances contains the whitelisted balances on all of the accounts */
16
15
  whitelistedBalances: Balance[];
16
+ /** pending_token_upgrades contains pending token upgrades. */
17
+ pendingTokenUpgrades: PendingTokenUpgrade[];
18
+ /** dex_locked_balances contains the DEX locked balances on all of the accounts */
19
+ dexLockedBalances: Balance[];
20
+ dexExpectedToReceiveBalances: Balance[];
21
+ dexSettings: DEXSettingsWithDenom[];
17
22
  }
18
23
  /** Balance defines an account address and balance pair used module genesis genesis state. */
19
24
  export interface Balance {
@@ -22,24 +27,21 @@ export interface Balance {
22
27
  /** coins defines the different coins this balance holds. */
23
28
  coins: Coin[];
24
29
  }
25
- export declare const GenesisState: {
26
- encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer;
27
- decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState;
28
- fromJSON(object: any): GenesisState;
29
- toJSON(message: GenesisState): unknown;
30
- create<I extends Exact<DeepPartial<GenesisState>, I>>(base?: I): GenesisState;
31
- fromPartial<I extends Exact<DeepPartial<GenesisState>, I>>(object: I): GenesisState;
32
- };
33
- export declare const Balance: {
34
- encode(message: Balance, writer?: _m0.Writer): _m0.Writer;
35
- decode(input: _m0.Reader | Uint8Array, length?: number): Balance;
36
- fromJSON(object: any): Balance;
37
- toJSON(message: Balance): unknown;
38
- create<I extends Exact<DeepPartial<Balance>, I>>(base?: I): Balance;
39
- fromPartial<I extends Exact<DeepPartial<Balance>, I>>(object: I): Balance;
40
- };
30
+ /** PendingTokenUpgrade stores the version of pending token upgrade. */
31
+ export interface PendingTokenUpgrade {
32
+ denom: string;
33
+ version: number;
34
+ }
35
+ export interface DEXSettingsWithDenom {
36
+ denom: string;
37
+ dexSettings: DEXSettings | undefined;
38
+ }
39
+ export declare const GenesisState: MessageFns<GenesisState>;
40
+ export declare const Balance: MessageFns<Balance>;
41
+ export declare const PendingTokenUpgrade: MessageFns<PendingTokenUpgrade>;
42
+ export declare const DEXSettingsWithDenom: MessageFns<DEXSettingsWithDenom>;
41
43
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
42
- 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 {} ? {
44
+ 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 {} ? {
43
45
  [K in keyof T]?: DeepPartial<T[K]>;
44
46
  } : Partial<T>;
45
47
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -48,4 +50,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
48
50
  } & {
49
51
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
50
52
  };
53
+ export interface MessageFns<T> {
54
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
55
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
56
+ fromJSON(object: any): T;
57
+ toJSON(message: T): unknown;
58
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
59
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
60
+ }
51
61
  export {};
@@ -1,9 +1,13 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.7.0
4
+ // protoc v3.21.12
5
+ // source: coreum-protos/ft/genesis.proto
1
6
  /* eslint-disable */
2
- import Long from "long";
3
- import _m0 from "protobufjs/minimal";
7
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
4
8
  import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
5
9
  import { Params } from "./params";
6
- import { Token } from "./token";
10
+ import { DEXSettings, Token } from "./token";
7
11
  export const protobufPackage = "coreum.asset.ft.v1";
8
12
  function createBaseGenesisState() {
9
13
  return {
@@ -11,10 +15,14 @@ function createBaseGenesisState() {
11
15
  tokens: [],
12
16
  frozenBalances: [],
13
17
  whitelistedBalances: [],
18
+ pendingTokenUpgrades: [],
19
+ dexLockedBalances: [],
20
+ dexExpectedToReceiveBalances: [],
21
+ dexSettings: [],
14
22
  };
15
23
  }
16
24
  export const GenesisState = {
17
- encode(message, writer = _m0.Writer.create()) {
25
+ encode(message, writer = new BinaryWriter()) {
18
26
  if (message.params !== undefined) {
19
27
  Params.encode(message.params, writer.uint32(10).fork()).ldelim();
20
28
  }
@@ -27,82 +35,143 @@ export const GenesisState = {
27
35
  for (const v of message.whitelistedBalances) {
28
36
  Balance.encode(v, writer.uint32(34).fork()).ldelim();
29
37
  }
38
+ for (const v of message.pendingTokenUpgrades) {
39
+ PendingTokenUpgrade.encode(v, writer.uint32(42).fork()).ldelim();
40
+ }
41
+ for (const v of message.dexLockedBalances) {
42
+ Balance.encode(v, writer.uint32(50).fork()).ldelim();
43
+ }
44
+ for (const v of message.dexExpectedToReceiveBalances) {
45
+ Balance.encode(v, writer.uint32(58).fork()).ldelim();
46
+ }
47
+ for (const v of message.dexSettings) {
48
+ DEXSettingsWithDenom.encode(v, writer.uint32(66).fork()).ldelim();
49
+ }
30
50
  return writer;
31
51
  },
32
52
  decode(input, length) {
33
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
53
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
34
54
  let end = length === undefined ? reader.len : reader.pos + length;
35
55
  const message = createBaseGenesisState();
36
56
  while (reader.pos < end) {
37
57
  const tag = reader.uint32();
38
58
  switch (tag >>> 3) {
39
- case 1:
40
- if (tag != 10) {
59
+ case 1: {
60
+ if (tag !== 10) {
41
61
  break;
42
62
  }
43
63
  message.params = Params.decode(reader, reader.uint32());
44
64
  continue;
45
- case 2:
46
- if (tag != 18) {
65
+ }
66
+ case 2: {
67
+ if (tag !== 18) {
47
68
  break;
48
69
  }
49
70
  message.tokens.push(Token.decode(reader, reader.uint32()));
50
71
  continue;
51
- case 3:
52
- if (tag != 26) {
72
+ }
73
+ case 3: {
74
+ if (tag !== 26) {
53
75
  break;
54
76
  }
55
77
  message.frozenBalances.push(Balance.decode(reader, reader.uint32()));
56
78
  continue;
57
- case 4:
58
- if (tag != 34) {
79
+ }
80
+ case 4: {
81
+ if (tag !== 34) {
59
82
  break;
60
83
  }
61
84
  message.whitelistedBalances.push(Balance.decode(reader, reader.uint32()));
62
85
  continue;
86
+ }
87
+ case 5: {
88
+ if (tag !== 42) {
89
+ break;
90
+ }
91
+ message.pendingTokenUpgrades.push(PendingTokenUpgrade.decode(reader, reader.uint32()));
92
+ continue;
93
+ }
94
+ case 6: {
95
+ if (tag !== 50) {
96
+ break;
97
+ }
98
+ message.dexLockedBalances.push(Balance.decode(reader, reader.uint32()));
99
+ continue;
100
+ }
101
+ case 7: {
102
+ if (tag !== 58) {
103
+ break;
104
+ }
105
+ message.dexExpectedToReceiveBalances.push(Balance.decode(reader, reader.uint32()));
106
+ continue;
107
+ }
108
+ case 8: {
109
+ if (tag !== 66) {
110
+ break;
111
+ }
112
+ message.dexSettings.push(DEXSettingsWithDenom.decode(reader, reader.uint32()));
113
+ continue;
114
+ }
63
115
  }
64
- if ((tag & 7) == 4 || tag == 0) {
116
+ if ((tag & 7) === 4 || tag === 0) {
65
117
  break;
66
118
  }
67
- reader.skipType(tag & 7);
119
+ reader.skip(tag & 7);
68
120
  }
69
121
  return message;
70
122
  },
71
123
  fromJSON(object) {
72
124
  return {
73
125
  params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
74
- tokens: Array.isArray(object?.tokens)
126
+ tokens: globalThis.Array.isArray(object?.tokens)
75
127
  ? object.tokens.map((e) => Token.fromJSON(e))
76
128
  : [],
77
- frozenBalances: Array.isArray(object?.frozenBalances)
129
+ frozenBalances: globalThis.Array.isArray(object?.frozenBalances)
78
130
  ? object.frozenBalances.map((e) => Balance.fromJSON(e))
79
131
  : [],
80
- whitelistedBalances: Array.isArray(object?.whitelistedBalances)
132
+ whitelistedBalances: globalThis.Array.isArray(object?.whitelistedBalances)
81
133
  ? object.whitelistedBalances.map((e) => Balance.fromJSON(e))
82
134
  : [],
135
+ pendingTokenUpgrades: globalThis.Array.isArray(object?.pendingTokenUpgrades)
136
+ ? object.pendingTokenUpgrades.map((e) => PendingTokenUpgrade.fromJSON(e))
137
+ : [],
138
+ dexLockedBalances: globalThis.Array.isArray(object?.dexLockedBalances)
139
+ ? object.dexLockedBalances.map((e) => Balance.fromJSON(e))
140
+ : [],
141
+ dexExpectedToReceiveBalances: globalThis.Array.isArray(object?.dexExpectedToReceiveBalances)
142
+ ? object.dexExpectedToReceiveBalances.map((e) => Balance.fromJSON(e))
143
+ : [],
144
+ dexSettings: globalThis.Array.isArray(object?.dexSettings)
145
+ ? object.dexSettings.map((e) => DEXSettingsWithDenom.fromJSON(e))
146
+ : [],
83
147
  };
84
148
  },
85
149
  toJSON(message) {
86
150
  const obj = {};
87
- message.params !== undefined &&
88
- (obj.params = message.params ? Params.toJSON(message.params) : undefined);
89
- if (message.tokens) {
90
- obj.tokens = message.tokens.map((e) => (e ? Token.toJSON(e) : undefined));
151
+ if (message.params !== undefined) {
152
+ obj.params = Params.toJSON(message.params);
153
+ }
154
+ if (message.tokens?.length) {
155
+ obj.tokens = message.tokens.map((e) => Token.toJSON(e));
91
156
  }
92
- else {
93
- obj.tokens = [];
157
+ if (message.frozenBalances?.length) {
158
+ obj.frozenBalances = message.frozenBalances.map((e) => Balance.toJSON(e));
94
159
  }
95
- if (message.frozenBalances) {
96
- obj.frozenBalances = message.frozenBalances.map((e) => e ? Balance.toJSON(e) : undefined);
160
+ if (message.whitelistedBalances?.length) {
161
+ obj.whitelistedBalances = message.whitelistedBalances.map((e) => Balance.toJSON(e));
97
162
  }
98
- else {
99
- obj.frozenBalances = [];
163
+ if (message.pendingTokenUpgrades?.length) {
164
+ obj.pendingTokenUpgrades = message.pendingTokenUpgrades.map((e) => PendingTokenUpgrade.toJSON(e));
100
165
  }
101
- if (message.whitelistedBalances) {
102
- obj.whitelistedBalances = message.whitelistedBalances.map((e) => e ? Balance.toJSON(e) : undefined);
166
+ if (message.dexLockedBalances?.length) {
167
+ obj.dexLockedBalances = message.dexLockedBalances.map((e) => Balance.toJSON(e));
103
168
  }
104
- else {
105
- obj.whitelistedBalances = [];
169
+ if (message.dexExpectedToReceiveBalances?.length) {
170
+ obj.dexExpectedToReceiveBalances =
171
+ message.dexExpectedToReceiveBalances.map((e) => Balance.toJSON(e));
172
+ }
173
+ if (message.dexSettings?.length) {
174
+ obj.dexSettings = message.dexSettings.map((e) => DEXSettingsWithDenom.toJSON(e));
106
175
  }
107
176
  return obj;
108
177
  },
@@ -120,6 +189,15 @@ export const GenesisState = {
120
189
  object.frozenBalances?.map((e) => Balance.fromPartial(e)) || [];
121
190
  message.whitelistedBalances =
122
191
  object.whitelistedBalances?.map((e) => Balance.fromPartial(e)) || [];
192
+ message.pendingTokenUpgrades =
193
+ object.pendingTokenUpgrades?.map((e) => PendingTokenUpgrade.fromPartial(e)) || [];
194
+ message.dexLockedBalances =
195
+ object.dexLockedBalances?.map((e) => Balance.fromPartial(e)) || [];
196
+ message.dexExpectedToReceiveBalances =
197
+ object.dexExpectedToReceiveBalances?.map((e) => Balance.fromPartial(e)) ||
198
+ [];
199
+ message.dexSettings =
200
+ object.dexSettings?.map((e) => DEXSettingsWithDenom.fromPartial(e)) || [];
123
201
  return message;
124
202
  },
125
203
  };
@@ -127,7 +205,7 @@ function createBaseBalance() {
127
205
  return { address: "", coins: [] };
128
206
  }
129
207
  export const Balance = {
130
- encode(message, writer = _m0.Writer.create()) {
208
+ encode(message, writer = new BinaryWriter()) {
131
209
  if (message.address !== "") {
132
210
  writer.uint32(10).string(message.address);
133
211
  }
@@ -137,48 +215,49 @@ export const Balance = {
137
215
  return writer;
138
216
  },
139
217
  decode(input, length) {
140
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
218
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
141
219
  let end = length === undefined ? reader.len : reader.pos + length;
142
220
  const message = createBaseBalance();
143
221
  while (reader.pos < end) {
144
222
  const tag = reader.uint32();
145
223
  switch (tag >>> 3) {
146
- case 1:
147
- if (tag != 10) {
224
+ case 1: {
225
+ if (tag !== 10) {
148
226
  break;
149
227
  }
150
228
  message.address = reader.string();
151
229
  continue;
152
- case 2:
153
- if (tag != 18) {
230
+ }
231
+ case 2: {
232
+ if (tag !== 18) {
154
233
  break;
155
234
  }
156
235
  message.coins.push(Coin.decode(reader, reader.uint32()));
157
236
  continue;
237
+ }
158
238
  }
159
- if ((tag & 7) == 4 || tag == 0) {
239
+ if ((tag & 7) === 4 || tag === 0) {
160
240
  break;
161
241
  }
162
- reader.skipType(tag & 7);
242
+ reader.skip(tag & 7);
163
243
  }
164
244
  return message;
165
245
  },
166
246
  fromJSON(object) {
167
247
  return {
168
- address: isSet(object.address) ? String(object.address) : "",
169
- coins: Array.isArray(object?.coins)
248
+ address: isSet(object.address) ? globalThis.String(object.address) : "",
249
+ coins: globalThis.Array.isArray(object?.coins)
170
250
  ? object.coins.map((e) => Coin.fromJSON(e))
171
251
  : [],
172
252
  };
173
253
  },
174
254
  toJSON(message) {
175
255
  const obj = {};
176
- message.address !== undefined && (obj.address = message.address);
177
- if (message.coins) {
178
- obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));
256
+ if (message.address !== "") {
257
+ obj.address = message.address;
179
258
  }
180
- else {
181
- obj.coins = [];
259
+ if (message.coins?.length) {
260
+ obj.coins = message.coins.map((e) => Coin.toJSON(e));
182
261
  }
183
262
  return obj;
184
263
  },
@@ -192,10 +271,147 @@ export const Balance = {
192
271
  return message;
193
272
  },
194
273
  };
195
- if (_m0.util.Long !== Long) {
196
- _m0.util.Long = Long;
197
- _m0.configure();
274
+ function createBasePendingTokenUpgrade() {
275
+ return { denom: "", version: 0 };
276
+ }
277
+ export const PendingTokenUpgrade = {
278
+ encode(message, writer = new BinaryWriter()) {
279
+ if (message.denom !== "") {
280
+ writer.uint32(10).string(message.denom);
281
+ }
282
+ if (message.version !== 0) {
283
+ writer.uint32(16).uint32(message.version);
284
+ }
285
+ return writer;
286
+ },
287
+ decode(input, length) {
288
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
289
+ let end = length === undefined ? reader.len : reader.pos + length;
290
+ const message = createBasePendingTokenUpgrade();
291
+ while (reader.pos < end) {
292
+ const tag = reader.uint32();
293
+ switch (tag >>> 3) {
294
+ case 1: {
295
+ if (tag !== 10) {
296
+ break;
297
+ }
298
+ message.denom = reader.string();
299
+ continue;
300
+ }
301
+ case 2: {
302
+ if (tag !== 16) {
303
+ break;
304
+ }
305
+ message.version = reader.uint32();
306
+ continue;
307
+ }
308
+ }
309
+ if ((tag & 7) === 4 || tag === 0) {
310
+ break;
311
+ }
312
+ reader.skip(tag & 7);
313
+ }
314
+ return message;
315
+ },
316
+ fromJSON(object) {
317
+ return {
318
+ denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
319
+ version: isSet(object.version) ? globalThis.Number(object.version) : 0,
320
+ };
321
+ },
322
+ toJSON(message) {
323
+ const obj = {};
324
+ if (message.denom !== "") {
325
+ obj.denom = message.denom;
326
+ }
327
+ if (message.version !== 0) {
328
+ obj.version = Math.round(message.version);
329
+ }
330
+ return obj;
331
+ },
332
+ create(base) {
333
+ return PendingTokenUpgrade.fromPartial(base ?? {});
334
+ },
335
+ fromPartial(object) {
336
+ const message = createBasePendingTokenUpgrade();
337
+ message.denom = object.denom ?? "";
338
+ message.version = object.version ?? 0;
339
+ return message;
340
+ },
341
+ };
342
+ function createBaseDEXSettingsWithDenom() {
343
+ return { denom: "", dexSettings: undefined };
198
344
  }
345
+ export const DEXSettingsWithDenom = {
346
+ encode(message, writer = new BinaryWriter()) {
347
+ if (message.denom !== "") {
348
+ writer.uint32(10).string(message.denom);
349
+ }
350
+ if (message.dexSettings !== undefined) {
351
+ DEXSettings.encode(message.dexSettings, writer.uint32(18).fork()).ldelim();
352
+ }
353
+ return writer;
354
+ },
355
+ decode(input, length) {
356
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
357
+ let end = length === undefined ? reader.len : reader.pos + length;
358
+ const message = createBaseDEXSettingsWithDenom();
359
+ while (reader.pos < end) {
360
+ const tag = reader.uint32();
361
+ switch (tag >>> 3) {
362
+ case 1: {
363
+ if (tag !== 10) {
364
+ break;
365
+ }
366
+ message.denom = reader.string();
367
+ continue;
368
+ }
369
+ case 2: {
370
+ if (tag !== 18) {
371
+ break;
372
+ }
373
+ message.dexSettings = DEXSettings.decode(reader, reader.uint32());
374
+ continue;
375
+ }
376
+ }
377
+ if ((tag & 7) === 4 || tag === 0) {
378
+ break;
379
+ }
380
+ reader.skip(tag & 7);
381
+ }
382
+ return message;
383
+ },
384
+ fromJSON(object) {
385
+ return {
386
+ denom: isSet(object.denom) ? globalThis.String(object.denom) : "",
387
+ dexSettings: isSet(object.dexSettings)
388
+ ? DEXSettings.fromJSON(object.dexSettings)
389
+ : undefined,
390
+ };
391
+ },
392
+ toJSON(message) {
393
+ const obj = {};
394
+ if (message.denom !== "") {
395
+ obj.denom = message.denom;
396
+ }
397
+ if (message.dexSettings !== undefined) {
398
+ obj.dexSettings = DEXSettings.toJSON(message.dexSettings);
399
+ }
400
+ return obj;
401
+ },
402
+ create(base) {
403
+ return DEXSettingsWithDenom.fromPartial(base ?? {});
404
+ },
405
+ fromPartial(object) {
406
+ const message = createBaseDEXSettingsWithDenom();
407
+ message.denom = object.denom ?? "";
408
+ message.dexSettings =
409
+ object.dexSettings !== undefined && object.dexSettings !== null
410
+ ? DEXSettings.fromPartial(object.dexSettings)
411
+ : undefined;
412
+ return message;
413
+ },
414
+ };
199
415
  function isSet(value) {
200
416
  return value !== null && value !== undefined;
201
417
  }
@@ -1,6 +1,6 @@
1
- import _m0 from "protobufjs/minimal";
1
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
2
2
  import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
3
- import { Duration } from "../../../../google/protobuf/duration";
3
+ import { Duration } from "cosmjs-types/google/protobuf/duration";
4
4
  export declare const protobufPackage = "coreum.asset.ft.v1";
5
5
  /** Params store gov manageable parameters. */
6
6
  export interface Params {
@@ -11,16 +11,9 @@ export interface Params {
11
11
  /** token_upgrade_grace_period the period after which the token upgrade is executed effectively. */
12
12
  tokenUpgradeGracePeriod: Duration | undefined;
13
13
  }
14
- export declare const Params: {
15
- encode(message: Params, writer?: _m0.Writer): _m0.Writer;
16
- decode(input: _m0.Reader | Uint8Array, length?: number): Params;
17
- fromJSON(object: any): Params;
18
- toJSON(message: Params): unknown;
19
- create<I extends Exact<DeepPartial<Params>, I>>(base?: I): Params;
20
- fromPartial<I extends Exact<DeepPartial<Params>, I>>(object: I): Params;
21
- };
14
+ export declare const Params: MessageFns<Params>;
22
15
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
23
- export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
16
+ 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 {} ? {
24
17
  [K in keyof T]?: DeepPartial<T[K]>;
25
18
  } : Partial<T>;
26
19
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -29,4 +22,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
29
22
  } & {
30
23
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
31
24
  };
25
+ export interface MessageFns<T> {
26
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
27
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
28
+ fromJSON(object: any): T;
29
+ toJSON(message: T): unknown;
30
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
31
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
32
+ }
32
33
  export {};