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,7 +1,11 @@
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/nft/nft.proto
1
6
  /* eslint-disable */
2
- import Long from "long";
3
- import _m0 from "protobufjs/minimal";
4
- import { Any } from "../../../../google/protobuf/any";
7
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
8
+ import { Any } from "cosmjs-types/google/protobuf/any";
5
9
  export const protobufPackage = "coreum.asset.nft.v1";
6
10
  /** ClassFeature defines possible features of non-fungible token class. */
7
11
  export var ClassFeature;
@@ -11,6 +15,7 @@ export var ClassFeature;
11
15
  ClassFeature[ClassFeature["whitelisting"] = 2] = "whitelisting";
12
16
  ClassFeature[ClassFeature["disable_sending"] = 3] = "disable_sending";
13
17
  ClassFeature[ClassFeature["soulbound"] = 4] = "soulbound";
18
+ ClassFeature[ClassFeature["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
14
19
  })(ClassFeature || (ClassFeature = {}));
15
20
  export function classFeatureFromJSON(object) {
16
21
  switch (object) {
@@ -29,8 +34,10 @@ export function classFeatureFromJSON(object) {
29
34
  case 4:
30
35
  case "soulbound":
31
36
  return ClassFeature.soulbound;
37
+ case -1:
38
+ case "UNRECOGNIZED":
32
39
  default:
33
- return undefined;
40
+ return ClassFeature.UNRECOGNIZED;
34
41
  }
35
42
  }
36
43
  export function classFeatureToJSON(object) {
@@ -45,13 +52,16 @@ export function classFeatureToJSON(object) {
45
52
  return "disable_sending";
46
53
  case ClassFeature.soulbound:
47
54
  return "soulbound";
55
+ case ClassFeature.UNRECOGNIZED:
56
+ default:
57
+ return "UNRECOGNIZED";
48
58
  }
49
59
  }
50
60
  function createBaseClassDefinition() {
51
61
  return { id: "", issuer: "", features: [], royaltyRate: "" };
52
62
  }
53
63
  export const ClassDefinition = {
54
- encode(message, writer = _m0.Writer.create()) {
64
+ encode(message, writer = new BinaryWriter()) {
55
65
  if (message.id !== "") {
56
66
  writer.uint32(10).string(message.id);
57
67
  }
@@ -69,30 +79,32 @@ export const ClassDefinition = {
69
79
  return writer;
70
80
  },
71
81
  decode(input, length) {
72
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
82
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
73
83
  let end = length === undefined ? reader.len : reader.pos + length;
74
84
  const message = createBaseClassDefinition();
75
85
  while (reader.pos < end) {
76
86
  const tag = reader.uint32();
77
87
  switch (tag >>> 3) {
78
- case 1:
79
- if (tag != 10) {
88
+ case 1: {
89
+ if (tag !== 10) {
80
90
  break;
81
91
  }
82
92
  message.id = reader.string();
83
93
  continue;
84
- case 2:
85
- if (tag != 18) {
94
+ }
95
+ case 2: {
96
+ if (tag !== 18) {
86
97
  break;
87
98
  }
88
99
  message.issuer = reader.string();
89
100
  continue;
90
- case 3:
91
- if (tag == 24) {
101
+ }
102
+ case 3: {
103
+ if (tag === 24) {
92
104
  message.features.push(reader.int32());
93
105
  continue;
94
106
  }
95
- if (tag == 26) {
107
+ if (tag === 26) {
96
108
  const end2 = reader.uint32() + reader.pos;
97
109
  while (reader.pos < end2) {
98
110
  message.features.push(reader.int32());
@@ -100,42 +112,48 @@ export const ClassDefinition = {
100
112
  continue;
101
113
  }
102
114
  break;
103
- case 4:
104
- if (tag != 34) {
115
+ }
116
+ case 4: {
117
+ if (tag !== 34) {
105
118
  break;
106
119
  }
107
120
  message.royaltyRate = reader.string();
108
121
  continue;
122
+ }
109
123
  }
110
- if ((tag & 7) == 4 || tag == 0) {
124
+ if ((tag & 7) === 4 || tag === 0) {
111
125
  break;
112
126
  }
113
- reader.skipType(tag & 7);
127
+ reader.skip(tag & 7);
114
128
  }
115
129
  return message;
116
130
  },
117
131
  fromJSON(object) {
118
132
  return {
119
- id: isSet(object.id) ? String(object.id) : "",
120
- issuer: isSet(object.issuer) ? String(object.issuer) : "",
121
- features: Array.isArray(object?.features)
133
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
134
+ issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "",
135
+ features: globalThis.Array.isArray(object?.features)
122
136
  ? object.features.map((e) => classFeatureFromJSON(e))
123
137
  : [],
124
- royaltyRate: isSet(object.royaltyRate) ? String(object.royaltyRate) : "",
138
+ royaltyRate: isSet(object.royaltyRate)
139
+ ? globalThis.String(object.royaltyRate)
140
+ : "",
125
141
  };
126
142
  },
127
143
  toJSON(message) {
128
144
  const obj = {};
129
- message.id !== undefined && (obj.id = message.id);
130
- message.issuer !== undefined && (obj.issuer = message.issuer);
131
- if (message.features) {
145
+ if (message.id !== "") {
146
+ obj.id = message.id;
147
+ }
148
+ if (message.issuer !== "") {
149
+ obj.issuer = message.issuer;
150
+ }
151
+ if (message.features?.length) {
132
152
  obj.features = message.features.map((e) => classFeatureToJSON(e));
133
153
  }
134
- else {
135
- obj.features = [];
154
+ if (message.royaltyRate !== "") {
155
+ obj.royaltyRate = message.royaltyRate;
136
156
  }
137
- message.royaltyRate !== undefined &&
138
- (obj.royaltyRate = message.royaltyRate);
139
157
  return obj;
140
158
  },
141
159
  create(base) {
@@ -165,7 +183,7 @@ function createBaseClass() {
165
183
  };
166
184
  }
167
185
  export const Class = {
168
- encode(message, writer = _m0.Writer.create()) {
186
+ encode(message, writer = new BinaryWriter()) {
169
187
  if (message.id !== "") {
170
188
  writer.uint32(10).string(message.id);
171
189
  }
@@ -201,66 +219,74 @@ export const Class = {
201
219
  return writer;
202
220
  },
203
221
  decode(input, length) {
204
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
222
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
205
223
  let end = length === undefined ? reader.len : reader.pos + length;
206
224
  const message = createBaseClass();
207
225
  while (reader.pos < end) {
208
226
  const tag = reader.uint32();
209
227
  switch (tag >>> 3) {
210
- case 1:
211
- if (tag != 10) {
228
+ case 1: {
229
+ if (tag !== 10) {
212
230
  break;
213
231
  }
214
232
  message.id = reader.string();
215
233
  continue;
216
- case 2:
217
- if (tag != 18) {
234
+ }
235
+ case 2: {
236
+ if (tag !== 18) {
218
237
  break;
219
238
  }
220
239
  message.issuer = reader.string();
221
240
  continue;
222
- case 3:
223
- if (tag != 26) {
241
+ }
242
+ case 3: {
243
+ if (tag !== 26) {
224
244
  break;
225
245
  }
226
246
  message.name = reader.string();
227
247
  continue;
228
- case 4:
229
- if (tag != 34) {
248
+ }
249
+ case 4: {
250
+ if (tag !== 34) {
230
251
  break;
231
252
  }
232
253
  message.symbol = reader.string();
233
254
  continue;
234
- case 5:
235
- if (tag != 42) {
255
+ }
256
+ case 5: {
257
+ if (tag !== 42) {
236
258
  break;
237
259
  }
238
260
  message.description = reader.string();
239
261
  continue;
240
- case 6:
241
- if (tag != 50) {
262
+ }
263
+ case 6: {
264
+ if (tag !== 50) {
242
265
  break;
243
266
  }
244
267
  message.uri = reader.string();
245
268
  continue;
246
- case 7:
247
- if (tag != 58) {
269
+ }
270
+ case 7: {
271
+ if (tag !== 58) {
248
272
  break;
249
273
  }
250
274
  message.uriHash = reader.string();
251
275
  continue;
252
- case 8:
253
- if (tag != 66) {
276
+ }
277
+ case 8: {
278
+ if (tag !== 66) {
254
279
  break;
255
280
  }
256
281
  message.data = Any.decode(reader, reader.uint32());
257
282
  continue;
258
- case 9:
259
- if (tag == 72) {
283
+ }
284
+ case 9: {
285
+ if (tag === 72) {
260
286
  message.features.push(reader.int32());
261
287
  continue;
262
288
  }
263
- if (tag == 74) {
289
+ if (tag === 74) {
264
290
  const end2 = reader.uint32() + reader.pos;
265
291
  while (reader.pos < end2) {
266
292
  message.features.push(reader.int32());
@@ -268,56 +294,74 @@ export const Class = {
268
294
  continue;
269
295
  }
270
296
  break;
271
- case 10:
272
- if (tag != 82) {
297
+ }
298
+ case 10: {
299
+ if (tag !== 82) {
273
300
  break;
274
301
  }
275
302
  message.royaltyRate = reader.string();
276
303
  continue;
304
+ }
277
305
  }
278
- if ((tag & 7) == 4 || tag == 0) {
306
+ if ((tag & 7) === 4 || tag === 0) {
279
307
  break;
280
308
  }
281
- reader.skipType(tag & 7);
309
+ reader.skip(tag & 7);
282
310
  }
283
311
  return message;
284
312
  },
285
313
  fromJSON(object) {
286
314
  return {
287
- id: isSet(object.id) ? String(object.id) : "",
288
- issuer: isSet(object.issuer) ? String(object.issuer) : "",
289
- name: isSet(object.name) ? String(object.name) : "",
290
- symbol: isSet(object.symbol) ? String(object.symbol) : "",
291
- description: isSet(object.description) ? String(object.description) : "",
292
- uri: isSet(object.uri) ? String(object.uri) : "",
293
- uriHash: isSet(object.uriHash) ? String(object.uriHash) : "",
315
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
316
+ issuer: isSet(object.issuer) ? globalThis.String(object.issuer) : "",
317
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
318
+ symbol: isSet(object.symbol) ? globalThis.String(object.symbol) : "",
319
+ description: isSet(object.description)
320
+ ? globalThis.String(object.description)
321
+ : "",
322
+ uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
323
+ uriHash: isSet(object.uriHash) ? globalThis.String(object.uriHash) : "",
294
324
  data: isSet(object.data) ? Any.fromJSON(object.data) : undefined,
295
- features: Array.isArray(object?.features)
325
+ features: globalThis.Array.isArray(object?.features)
296
326
  ? object.features.map((e) => classFeatureFromJSON(e))
297
327
  : [],
298
- royaltyRate: isSet(object.royaltyRate) ? String(object.royaltyRate) : "",
328
+ royaltyRate: isSet(object.royaltyRate)
329
+ ? globalThis.String(object.royaltyRate)
330
+ : "",
299
331
  };
300
332
  },
301
333
  toJSON(message) {
302
334
  const obj = {};
303
- message.id !== undefined && (obj.id = message.id);
304
- message.issuer !== undefined && (obj.issuer = message.issuer);
305
- message.name !== undefined && (obj.name = message.name);
306
- message.symbol !== undefined && (obj.symbol = message.symbol);
307
- message.description !== undefined &&
308
- (obj.description = message.description);
309
- message.uri !== undefined && (obj.uri = message.uri);
310
- message.uriHash !== undefined && (obj.uriHash = message.uriHash);
311
- message.data !== undefined &&
312
- (obj.data = message.data ? Any.toJSON(message.data) : undefined);
313
- if (message.features) {
335
+ if (message.id !== "") {
336
+ obj.id = message.id;
337
+ }
338
+ if (message.issuer !== "") {
339
+ obj.issuer = message.issuer;
340
+ }
341
+ if (message.name !== "") {
342
+ obj.name = message.name;
343
+ }
344
+ if (message.symbol !== "") {
345
+ obj.symbol = message.symbol;
346
+ }
347
+ if (message.description !== "") {
348
+ obj.description = message.description;
349
+ }
350
+ if (message.uri !== "") {
351
+ obj.uri = message.uri;
352
+ }
353
+ if (message.uriHash !== "") {
354
+ obj.uriHash = message.uriHash;
355
+ }
356
+ if (message.data !== undefined) {
357
+ obj.data = Any.toJSON(message.data);
358
+ }
359
+ if (message.features?.length) {
314
360
  obj.features = message.features.map((e) => classFeatureToJSON(e));
315
361
  }
316
- else {
317
- obj.features = [];
362
+ if (message.royaltyRate !== "") {
363
+ obj.royaltyRate = message.royaltyRate;
318
364
  }
319
- message.royaltyRate !== undefined &&
320
- (obj.royaltyRate = message.royaltyRate);
321
365
  return obj;
322
366
  },
323
367
  create(base) {
@@ -341,10 +385,6 @@ export const Class = {
341
385
  return message;
342
386
  },
343
387
  };
344
- if (_m0.util.Long !== Long) {
345
- _m0.util.Long = Long;
346
- _m0.configure();
347
- }
348
388
  function isSet(value) {
349
389
  return value !== null && value !== undefined;
350
390
  }
@@ -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,36 +1,41 @@
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/nft/params.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
  export const protobufPackage = "coreum.asset.nft.v1";
6
10
  function createBaseParams() {
7
11
  return { mintFee: undefined };
8
12
  }
9
13
  export const Params = {
10
- encode(message, writer = _m0.Writer.create()) {
14
+ encode(message, writer = new BinaryWriter()) {
11
15
  if (message.mintFee !== undefined) {
12
16
  Coin.encode(message.mintFee, writer.uint32(10).fork()).ldelim();
13
17
  }
14
18
  return writer;
15
19
  },
16
20
  decode(input, length) {
17
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
21
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
18
22
  let end = length === undefined ? reader.len : reader.pos + length;
19
23
  const message = createBaseParams();
20
24
  while (reader.pos < end) {
21
25
  const tag = reader.uint32();
22
26
  switch (tag >>> 3) {
23
- case 1:
24
- if (tag != 10) {
27
+ case 1: {
28
+ if (tag !== 10) {
25
29
  break;
26
30
  }
27
31
  message.mintFee = Coin.decode(reader, reader.uint32());
28
32
  continue;
33
+ }
29
34
  }
30
- if ((tag & 7) == 4 || tag == 0) {
35
+ if ((tag & 7) === 4 || tag === 0) {
31
36
  break;
32
37
  }
33
- reader.skipType(tag & 7);
38
+ reader.skip(tag & 7);
34
39
  }
35
40
  return message;
36
41
  },
@@ -43,10 +48,9 @@ export const Params = {
43
48
  },
44
49
  toJSON(message) {
45
50
  const obj = {};
46
- message.mintFee !== undefined &&
47
- (obj.mintFee = message.mintFee
48
- ? Coin.toJSON(message.mintFee)
49
- : undefined);
51
+ if (message.mintFee !== undefined) {
52
+ obj.mintFee = Coin.toJSON(message.mintFee);
53
+ }
50
54
  return obj;
51
55
  },
52
56
  create(base) {
@@ -61,10 +65,6 @@ export const Params = {
61
65
  return message;
62
66
  },
63
67
  };
64
- if (_m0.util.Long !== Long) {
65
- _m0.util.Long = Long;
66
- _m0.configure();
67
- }
68
68
  function isSet(value) {
69
69
  return value !== null && value !== undefined;
70
70
  }