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
@@ -1,6 +1,5 @@
1
- import Long from "long";
2
- import _m0 from "protobufjs/minimal";
3
- import { Any } from "../../../../google/protobuf/any";
1
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
2
+ import { Any } from "cosmjs-types/google/protobuf/any";
4
3
  export declare const protobufPackage = "coreum.asset.nft.v1";
5
4
  /** ClassFeature defines possible features of non-fungible token class. */
6
5
  export declare enum ClassFeature {
@@ -8,7 +7,8 @@ export declare enum ClassFeature {
8
7
  freezing = 1,
9
8
  whitelisting = 2,
10
9
  disable_sending = 3,
11
- soulbound = 4
10
+ soulbound = 4,
11
+ UNRECOGNIZED = -1
12
12
  }
13
13
  export declare function classFeatureFromJSON(object: any): ClassFeature;
14
14
  export declare function classFeatureToJSON(object: ClassFeature): string;
@@ -18,8 +18,8 @@ export interface ClassDefinition {
18
18
  issuer: string;
19
19
  features: ClassFeature[];
20
20
  /**
21
- * royalty_rate is a number between 0 and 1,which will be used in coreum native Dex.
22
- * whenever an NFT this class is traded on the Dex, the traded amount will be multiplied by this value
21
+ * royalty_rate is a number between 0 and 1,which will be used in coreum native DEX.
22
+ * whenever an NFT this class is traded on the DEX, the traded amount will be multiplied by this value
23
23
  * that will be transferred to the issuer of the NFT.
24
24
  */
25
25
  royaltyRate: string;
@@ -33,33 +33,19 @@ export interface Class {
33
33
  description: string;
34
34
  uri: string;
35
35
  uriHash: string;
36
- data?: Any;
36
+ data: Any | undefined;
37
37
  features: ClassFeature[];
38
38
  /**
39
- * royalty_rate is a number between 0 and 1,which will be used in coreum native Dex.
40
- * whenever an NFT this class is traded on the Dex, the traded amount will be multiplied by this value
39
+ * royalty_rate is a number between 0 and 1,which will be used in coreum native DEX.
40
+ * whenever an NFT this class is traded on the DEX, the traded amount will be multiplied by this value
41
41
  * that will be transferred to the issuer of the NFT.
42
42
  */
43
43
  royaltyRate: string;
44
44
  }
45
- export declare const ClassDefinition: {
46
- encode(message: ClassDefinition, writer?: _m0.Writer): _m0.Writer;
47
- decode(input: _m0.Reader | Uint8Array, length?: number): ClassDefinition;
48
- fromJSON(object: any): ClassDefinition;
49
- toJSON(message: ClassDefinition): unknown;
50
- create<I extends Exact<DeepPartial<ClassDefinition>, I>>(base?: I): ClassDefinition;
51
- fromPartial<I extends Exact<DeepPartial<ClassDefinition>, I>>(object: I): ClassDefinition;
52
- };
53
- export declare const Class: {
54
- encode(message: Class, writer?: _m0.Writer): _m0.Writer;
55
- decode(input: _m0.Reader | Uint8Array, length?: number): Class;
56
- fromJSON(object: any): Class;
57
- toJSON(message: Class): unknown;
58
- create<I extends Exact<DeepPartial<Class>, I>>(base?: I): Class;
59
- fromPartial<I extends Exact<DeepPartial<Class>, I>>(object: I): Class;
60
- };
45
+ export declare const ClassDefinition: MessageFns<ClassDefinition>;
46
+ export declare const Class: MessageFns<Class>;
61
47
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
62
- 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 {} ? {
48
+ 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 {} ? {
63
49
  [K in keyof T]?: DeepPartial<T[K]>;
64
50
  } : Partial<T>;
65
51
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -68,4 +54,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
68
54
  } & {
69
55
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
70
56
  };
57
+ export interface MessageFns<T> {
58
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
59
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
60
+ fromJSON(object: any): T;
61
+ toJSON(message: T): unknown;
62
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
63
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
64
+ }
71
65
  export {};
@@ -1,15 +1,14 @@
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/nft/nft.proto
5
7
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Class = exports.ClassDefinition = exports.ClassFeature = exports.protobufPackage = void 0;
7
- exports.classFeatureFromJSON = classFeatureFromJSON;
8
- exports.classFeatureToJSON = classFeatureToJSON;
8
+ exports.Class = exports.ClassDefinition = exports.classFeatureToJSON = exports.classFeatureFromJSON = exports.ClassFeature = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
- const long_1 = __importDefault(require("long"));
11
- const minimal_1 = __importDefault(require("protobufjs/minimal"));
12
- const any_1 = require("../../../../google/protobuf/any");
10
+ const binary_1 = require("cosmjs-types/binary");
11
+ const any_1 = require("cosmjs-types/google/protobuf/any");
13
12
  exports.protobufPackage = "coreum.asset.nft.v1";
14
13
  /** ClassFeature defines possible features of non-fungible token class. */
15
14
  var ClassFeature;
@@ -19,6 +18,7 @@ var ClassFeature;
19
18
  ClassFeature[ClassFeature["whitelisting"] = 2] = "whitelisting";
20
19
  ClassFeature[ClassFeature["disable_sending"] = 3] = "disable_sending";
21
20
  ClassFeature[ClassFeature["soulbound"] = 4] = "soulbound";
21
+ ClassFeature[ClassFeature["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
22
22
  })(ClassFeature || (exports.ClassFeature = ClassFeature = {}));
23
23
  function classFeatureFromJSON(object) {
24
24
  switch (object) {
@@ -37,10 +37,13 @@ function classFeatureFromJSON(object) {
37
37
  case 4:
38
38
  case "soulbound":
39
39
  return ClassFeature.soulbound;
40
+ case -1:
41
+ case "UNRECOGNIZED":
40
42
  default:
41
- return undefined;
43
+ return ClassFeature.UNRECOGNIZED;
42
44
  }
43
45
  }
46
+ exports.classFeatureFromJSON = classFeatureFromJSON;
44
47
  function classFeatureToJSON(object) {
45
48
  switch (object) {
46
49
  case ClassFeature.burning:
@@ -53,13 +56,17 @@ function classFeatureToJSON(object) {
53
56
  return "disable_sending";
54
57
  case ClassFeature.soulbound:
55
58
  return "soulbound";
59
+ case ClassFeature.UNRECOGNIZED:
60
+ default:
61
+ return "UNRECOGNIZED";
56
62
  }
57
63
  }
64
+ exports.classFeatureToJSON = classFeatureToJSON;
58
65
  function createBaseClassDefinition() {
59
66
  return { id: "", issuer: "", features: [], royaltyRate: "" };
60
67
  }
61
68
  exports.ClassDefinition = {
62
- encode(message, writer = minimal_1.default.Writer.create()) {
69
+ encode(message, writer = new binary_1.BinaryWriter()) {
63
70
  if (message.id !== "") {
64
71
  writer.uint32(10).string(message.id);
65
72
  }
@@ -77,30 +84,32 @@ exports.ClassDefinition = {
77
84
  return writer;
78
85
  },
79
86
  decode(input, length) {
80
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
87
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
81
88
  let end = length === undefined ? reader.len : reader.pos + length;
82
89
  const message = createBaseClassDefinition();
83
90
  while (reader.pos < end) {
84
91
  const tag = reader.uint32();
85
92
  switch (tag >>> 3) {
86
- case 1:
87
- if (tag != 10) {
93
+ case 1: {
94
+ if (tag !== 10) {
88
95
  break;
89
96
  }
90
97
  message.id = reader.string();
91
98
  continue;
92
- case 2:
93
- if (tag != 18) {
99
+ }
100
+ case 2: {
101
+ if (tag !== 18) {
94
102
  break;
95
103
  }
96
104
  message.issuer = reader.string();
97
105
  continue;
98
- case 3:
99
- if (tag == 24) {
106
+ }
107
+ case 3: {
108
+ if (tag === 24) {
100
109
  message.features.push(reader.int32());
101
110
  continue;
102
111
  }
103
- if (tag == 26) {
112
+ if (tag === 26) {
104
113
  const end2 = reader.uint32() + reader.pos;
105
114
  while (reader.pos < end2) {
106
115
  message.features.push(reader.int32());
@@ -108,54 +117,59 @@ exports.ClassDefinition = {
108
117
  continue;
109
118
  }
110
119
  break;
111
- case 4:
112
- if (tag != 34) {
120
+ }
121
+ case 4: {
122
+ if (tag !== 34) {
113
123
  break;
114
124
  }
115
125
  message.royaltyRate = reader.string();
116
126
  continue;
127
+ }
117
128
  }
118
- if ((tag & 7) == 4 || tag == 0) {
129
+ if ((tag & 7) === 4 || tag === 0) {
119
130
  break;
120
131
  }
121
- reader.skipType(tag & 7);
132
+ reader.skip(tag & 7);
122
133
  }
123
134
  return message;
124
135
  },
125
136
  fromJSON(object) {
126
137
  return {
127
- id: isSet(object.id) ? String(object.id) : "",
128
- issuer: isSet(object.issuer) ? String(object.issuer) : "",
129
- features: Array.isArray(object === null || object === void 0 ? void 0 : object.features)
138
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
139
+ issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "",
140
+ features: globalThis.Array.isArray(object?.features)
130
141
  ? object.features.map((e) => classFeatureFromJSON(e))
131
142
  : [],
132
- royaltyRate: isSet(object.royaltyRate) ? String(object.royaltyRate) : "",
143
+ royaltyRate: isSet(object.royaltyRate)
144
+ ? globalThis.String(object.royaltyRate)
145
+ : "",
133
146
  };
134
147
  },
135
148
  toJSON(message) {
136
149
  const obj = {};
137
- message.id !== undefined && (obj.id = message.id);
138
- message.issuer !== undefined && (obj.issuer = message.issuer);
139
- if (message.features) {
150
+ if (message.id !== "") {
151
+ obj.id = message.id;
152
+ }
153
+ if (message.issuer !== "") {
154
+ obj.issuer = message.issuer;
155
+ }
156
+ if (message.features?.length) {
140
157
  obj.features = message.features.map((e) => classFeatureToJSON(e));
141
158
  }
142
- else {
143
- obj.features = [];
159
+ if (message.royaltyRate !== "") {
160
+ obj.royaltyRate = message.royaltyRate;
144
161
  }
145
- message.royaltyRate !== undefined &&
146
- (obj.royaltyRate = message.royaltyRate);
147
162
  return obj;
148
163
  },
149
164
  create(base) {
150
- return exports.ClassDefinition.fromPartial(base !== null && base !== void 0 ? base : {});
165
+ return exports.ClassDefinition.fromPartial(base ?? {});
151
166
  },
152
167
  fromPartial(object) {
153
- var _a, _b, _c, _d;
154
168
  const message = createBaseClassDefinition();
155
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
156
- message.issuer = (_b = object.issuer) !== null && _b !== void 0 ? _b : "";
157
- message.features = ((_c = object.features) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
158
- message.royaltyRate = (_d = object.royaltyRate) !== null && _d !== void 0 ? _d : "";
169
+ message.id = object.id ?? "";
170
+ message.issuer = object.issuer ?? "";
171
+ message.features = object.features?.map((e) => e) || [];
172
+ message.royaltyRate = object.royaltyRate ?? "";
159
173
  return message;
160
174
  },
161
175
  };
@@ -174,7 +188,7 @@ function createBaseClass() {
174
188
  };
175
189
  }
176
190
  exports.Class = {
177
- encode(message, writer = minimal_1.default.Writer.create()) {
191
+ encode(message, writer = new binary_1.BinaryWriter()) {
178
192
  if (message.id !== "") {
179
193
  writer.uint32(10).string(message.id);
180
194
  }
@@ -210,66 +224,74 @@ exports.Class = {
210
224
  return writer;
211
225
  },
212
226
  decode(input, length) {
213
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
227
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
214
228
  let end = length === undefined ? reader.len : reader.pos + length;
215
229
  const message = createBaseClass();
216
230
  while (reader.pos < end) {
217
231
  const tag = reader.uint32();
218
232
  switch (tag >>> 3) {
219
- case 1:
220
- if (tag != 10) {
233
+ case 1: {
234
+ if (tag !== 10) {
221
235
  break;
222
236
  }
223
237
  message.id = reader.string();
224
238
  continue;
225
- case 2:
226
- if (tag != 18) {
239
+ }
240
+ case 2: {
241
+ if (tag !== 18) {
227
242
  break;
228
243
  }
229
244
  message.issuer = reader.string();
230
245
  continue;
231
- case 3:
232
- if (tag != 26) {
246
+ }
247
+ case 3: {
248
+ if (tag !== 26) {
233
249
  break;
234
250
  }
235
251
  message.name = reader.string();
236
252
  continue;
237
- case 4:
238
- if (tag != 34) {
253
+ }
254
+ case 4: {
255
+ if (tag !== 34) {
239
256
  break;
240
257
  }
241
258
  message.symbol = reader.string();
242
259
  continue;
243
- case 5:
244
- if (tag != 42) {
260
+ }
261
+ case 5: {
262
+ if (tag !== 42) {
245
263
  break;
246
264
  }
247
265
  message.description = reader.string();
248
266
  continue;
249
- case 6:
250
- if (tag != 50) {
267
+ }
268
+ case 6: {
269
+ if (tag !== 50) {
251
270
  break;
252
271
  }
253
272
  message.uri = reader.string();
254
273
  continue;
255
- case 7:
256
- if (tag != 58) {
274
+ }
275
+ case 7: {
276
+ if (tag !== 58) {
257
277
  break;
258
278
  }
259
279
  message.uriHash = reader.string();
260
280
  continue;
261
- case 8:
262
- if (tag != 66) {
281
+ }
282
+ case 8: {
283
+ if (tag !== 66) {
263
284
  break;
264
285
  }
265
286
  message.data = any_1.Any.decode(reader, reader.uint32());
266
287
  continue;
267
- case 9:
268
- if (tag == 72) {
288
+ }
289
+ case 9: {
290
+ if (tag === 72) {
269
291
  message.features.push(reader.int32());
270
292
  continue;
271
293
  }
272
- if (tag == 74) {
294
+ if (tag === 74) {
273
295
  const end2 = reader.uint32() + reader.pos;
274
296
  while (reader.pos < end2) {
275
297
  message.features.push(reader.int32());
@@ -277,84 +299,97 @@ exports.Class = {
277
299
  continue;
278
300
  }
279
301
  break;
280
- case 10:
281
- if (tag != 82) {
302
+ }
303
+ case 10: {
304
+ if (tag !== 82) {
282
305
  break;
283
306
  }
284
307
  message.royaltyRate = reader.string();
285
308
  continue;
309
+ }
286
310
  }
287
- if ((tag & 7) == 4 || tag == 0) {
311
+ if ((tag & 7) === 4 || tag === 0) {
288
312
  break;
289
313
  }
290
- reader.skipType(tag & 7);
314
+ reader.skip(tag & 7);
291
315
  }
292
316
  return message;
293
317
  },
294
318
  fromJSON(object) {
295
319
  return {
296
- id: isSet(object.id) ? String(object.id) : "",
297
- issuer: isSet(object.issuer) ? String(object.issuer) : "",
298
- name: isSet(object.name) ? String(object.name) : "",
299
- symbol: isSet(object.symbol) ? String(object.symbol) : "",
300
- description: isSet(object.description) ? String(object.description) : "",
301
- uri: isSet(object.uri) ? String(object.uri) : "",
302
- uriHash: isSet(object.uriHash) ? String(object.uriHash) : "",
320
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
321
+ issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "",
322
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
323
+ symbol: isSet(object.symbol) ? globalThis.String(object.symbol) : "",
324
+ description: isSet(object.description)
325
+ ? globalThis.String(object.description)
326
+ : "",
327
+ uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
328
+ uriHash: isSet(object.uriHash) ? globalThis.String(object.uriHash) : "",
303
329
  data: isSet(object.data) ? any_1.Any.fromJSON(object.data) : undefined,
304
- features: Array.isArray(object === null || object === void 0 ? void 0 : object.features)
330
+ features: globalThis.Array.isArray(object?.features)
305
331
  ? object.features.map((e) => classFeatureFromJSON(e))
306
332
  : [],
307
- royaltyRate: isSet(object.royaltyRate) ? String(object.royaltyRate) : "",
333
+ royaltyRate: isSet(object.royaltyRate)
334
+ ? globalThis.String(object.royaltyRate)
335
+ : "",
308
336
  };
309
337
  },
310
338
  toJSON(message) {
311
339
  const obj = {};
312
- message.id !== undefined && (obj.id = message.id);
313
- message.issuer !== undefined && (obj.issuer = message.issuer);
314
- message.name !== undefined && (obj.name = message.name);
315
- message.symbol !== undefined && (obj.symbol = message.symbol);
316
- message.description !== undefined &&
317
- (obj.description = message.description);
318
- message.uri !== undefined && (obj.uri = message.uri);
319
- message.uriHash !== undefined && (obj.uriHash = message.uriHash);
320
- message.data !== undefined &&
321
- (obj.data = message.data ? any_1.Any.toJSON(message.data) : undefined);
322
- if (message.features) {
340
+ if (message.id !== "") {
341
+ obj.id = message.id;
342
+ }
343
+ if (message.issuer !== "") {
344
+ obj.issuer = message.issuer;
345
+ }
346
+ if (message.name !== "") {
347
+ obj.name = message.name;
348
+ }
349
+ if (message.symbol !== "") {
350
+ obj.symbol = message.symbol;
351
+ }
352
+ if (message.description !== "") {
353
+ obj.description = message.description;
354
+ }
355
+ if (message.uri !== "") {
356
+ obj.uri = message.uri;
357
+ }
358
+ if (message.uriHash !== "") {
359
+ obj.uriHash = message.uriHash;
360
+ }
361
+ if (message.data !== undefined) {
362
+ obj.data = any_1.Any.toJSON(message.data);
363
+ }
364
+ if (message.features?.length) {
323
365
  obj.features = message.features.map((e) => classFeatureToJSON(e));
324
366
  }
325
- else {
326
- obj.features = [];
367
+ if (message.royaltyRate !== "") {
368
+ obj.royaltyRate = message.royaltyRate;
327
369
  }
328
- message.royaltyRate !== undefined &&
329
- (obj.royaltyRate = message.royaltyRate);
330
370
  return obj;
331
371
  },
332
372
  create(base) {
333
- return exports.Class.fromPartial(base !== null && base !== void 0 ? base : {});
373
+ return exports.Class.fromPartial(base ?? {});
334
374
  },
335
375
  fromPartial(object) {
336
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
337
376
  const message = createBaseClass();
338
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
339
- message.issuer = (_b = object.issuer) !== null && _b !== void 0 ? _b : "";
340
- message.name = (_c = object.name) !== null && _c !== void 0 ? _c : "";
341
- message.symbol = (_d = object.symbol) !== null && _d !== void 0 ? _d : "";
342
- message.description = (_e = object.description) !== null && _e !== void 0 ? _e : "";
343
- message.uri = (_f = object.uri) !== null && _f !== void 0 ? _f : "";
344
- message.uriHash = (_g = object.uriHash) !== null && _g !== void 0 ? _g : "";
377
+ message.id = object.id ?? "";
378
+ message.issuer = object.issuer ?? "";
379
+ message.name = object.name ?? "";
380
+ message.symbol = object.symbol ?? "";
381
+ message.description = object.description ?? "";
382
+ message.uri = object.uri ?? "";
383
+ message.uriHash = object.uriHash ?? "";
345
384
  message.data =
346
385
  object.data !== undefined && object.data !== null
347
386
  ? any_1.Any.fromPartial(object.data)
348
387
  : undefined;
349
- message.features = ((_h = object.features) === null || _h === void 0 ? void 0 : _h.map((e) => e)) || [];
350
- message.royaltyRate = (_j = object.royaltyRate) !== null && _j !== void 0 ? _j : "";
388
+ message.features = object.features?.map((e) => e) || [];
389
+ message.royaltyRate = object.royaltyRate ?? "";
351
390
  return message;
352
391
  },
353
392
  };
354
- if (minimal_1.default.util.Long !== long_1.default) {
355
- minimal_1.default.util.Long = long_1.default;
356
- minimal_1.default.configure();
357
- }
358
393
  function isSet(value) {
359
394
  return value !== null && value !== undefined;
360
395
  }
@@ -1,22 +1,14 @@
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
  export declare const protobufPackage = "coreum.asset.nft.v1";
5
4
  /** Params store gov manageable parameters. */
6
5
  export interface Params {
7
6
  /** mint_fee is the fee burnt each time new NFT is minted */
8
- mintFee?: Coin;
7
+ mintFee: Coin | undefined;
9
8
  }
10
- export declare const Params: {
11
- encode(message: Params, writer?: _m0.Writer): _m0.Writer;
12
- decode(input: _m0.Reader | Uint8Array, length?: number): Params;
13
- fromJSON(object: any): Params;
14
- toJSON(message: Params): unknown;
15
- create<I extends Exact<DeepPartial<Params>, I>>(base?: I): Params;
16
- fromPartial<I extends Exact<DeepPartial<Params>, I>>(object: I): Params;
17
- };
9
+ export declare const Params: MessageFns<Params>;
18
10
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
19
- 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 {} ? {
11
+ 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 {} ? {
20
12
  [K in keyof T]?: DeepPartial<T[K]>;
21
13
  } : Partial<T>;
22
14
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -25,4 +17,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
25
17
  } & {
26
18
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
27
19
  };
20
+ export interface MessageFns<T> {
21
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
22
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
23
+ fromJSON(object: any): T;
24
+ toJSON(message: T): unknown;
25
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
26
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
27
+ }
28
28
  export {};
@@ -1,42 +1,44 @@
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/nft/params.proto
5
7
  Object.defineProperty(exports, "__esModule", { value: true });
6
8
  exports.Params = 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 coin_1 = require("cosmjs-types/cosmos/base/v1beta1/coin");
11
12
  exports.protobufPackage = "coreum.asset.nft.v1";
12
13
  function createBaseParams() {
13
14
  return { mintFee: undefined };
14
15
  }
15
16
  exports.Params = {
16
- encode(message, writer = minimal_1.default.Writer.create()) {
17
+ encode(message, writer = new binary_1.BinaryWriter()) {
17
18
  if (message.mintFee !== undefined) {
18
19
  coin_1.Coin.encode(message.mintFee, writer.uint32(10).fork()).ldelim();
19
20
  }
20
21
  return writer;
21
22
  },
22
23
  decode(input, length) {
23
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
24
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
24
25
  let end = length === undefined ? reader.len : reader.pos + length;
25
26
  const message = createBaseParams();
26
27
  while (reader.pos < end) {
27
28
  const tag = reader.uint32();
28
29
  switch (tag >>> 3) {
29
- case 1:
30
- if (tag != 10) {
30
+ case 1: {
31
+ if (tag !== 10) {
31
32
  break;
32
33
  }
33
34
  message.mintFee = coin_1.Coin.decode(reader, reader.uint32());
34
35
  continue;
36
+ }
35
37
  }
36
- if ((tag & 7) == 4 || tag == 0) {
38
+ if ((tag & 7) === 4 || tag === 0) {
37
39
  break;
38
40
  }
39
- reader.skipType(tag & 7);
41
+ reader.skip(tag & 7);
40
42
  }
41
43
  return message;
42
44
  },
@@ -49,14 +51,13 @@ exports.Params = {
49
51
  },
50
52
  toJSON(message) {
51
53
  const obj = {};
52
- message.mintFee !== undefined &&
53
- (obj.mintFee = message.mintFee
54
- ? coin_1.Coin.toJSON(message.mintFee)
55
- : undefined);
54
+ if (message.mintFee !== undefined) {
55
+ obj.mintFee = coin_1.Coin.toJSON(message.mintFee);
56
+ }
56
57
  return obj;
57
58
  },
58
59
  create(base) {
59
- return exports.Params.fromPartial(base !== null && base !== void 0 ? base : {});
60
+ return exports.Params.fromPartial(base ?? {});
60
61
  },
61
62
  fromPartial(object) {
62
63
  const message = createBaseParams();
@@ -67,10 +68,6 @@ exports.Params = {
67
68
  return message;
68
69
  },
69
70
  };
70
- if (minimal_1.default.util.Long !== long_1.default) {
71
- minimal_1.default.util.Long = long_1.default;
72
- minimal_1.default.configure();
73
- }
74
71
  function isSet(value) {
75
72
  return value !== null && value !== undefined;
76
73
  }