coreum-js 2.16.2 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/dist/main/client/index.js +16 -17
  2. package/dist/main/coreum/asset/ft/v1/authz.d.ts +38 -0
  3. package/dist/main/coreum/asset/ft/v1/authz.js +122 -0
  4. package/dist/main/coreum/asset/ft/v1/event.d.ts +52 -120
  5. package/dist/main/coreum/asset/ft/v1/event.js +744 -138
  6. package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -517
  7. package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
  8. package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -63
  9. package/dist/main/coreum/asset/ft/v1/params.js +37 -33
  10. package/dist/main/coreum/asset/ft/v1/query.d.ts +86 -1950
  11. package/dist/main/coreum/asset/ft/v1/query.js +697 -217
  12. package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -249
  13. package/dist/main/coreum/asset/ft/v1/token.js +273 -197
  14. package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -755
  15. package/dist/main/coreum/asset/ft/v1/tx.js +502 -386
  16. package/dist/main/coreum/asset/index.d.ts +2 -3
  17. package/dist/main/coreum/asset/nft/v1/authz.d.ts +33 -0
  18. package/dist/main/coreum/asset/nft/v1/authz.js +137 -0
  19. package/dist/main/coreum/asset/nft/v1/event.d.ts +35 -147
  20. package/dist/main/coreum/asset/nft/v1/event.js +475 -147
  21. package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -286
  22. package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
  23. package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -108
  24. package/dist/main/coreum/asset/nft/v1/nft.js +136 -101
  25. package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -38
  26. package/dist/main/coreum/asset/nft/v1/params.js +17 -20
  27. package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -706
  28. package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
  29. package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -266
  30. package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
  31. package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -19
  32. package/dist/main/coreum/asset/nft/v1/types.js +273 -45
  33. package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -32
  34. package/dist/main/coreum/customparams/v1/genesis.js +26 -22
  35. package/dist/main/coreum/customparams/v1/params.d.ts +11 -19
  36. package/dist/main/coreum/customparams/v1/params.js +23 -20
  37. package/dist/main/coreum/customparams/v1/query.d.ts +14 -40
  38. package/dist/main/coreum/customparams/v1/query.js +35 -29
  39. package/dist/main/coreum/dex/index.d.ts +1 -0
  40. package/dist/main/coreum/dex/index.js +12 -0
  41. package/dist/main/coreum/dex/v1/event.d.ts +73 -0
  42. package/dist/main/coreum/dex/v1/event.js +470 -0
  43. package/dist/main/coreum/dex/v1/genesis.d.ts +49 -0
  44. package/dist/main/coreum/dex/v1/genesis.js +318 -0
  45. package/dist/main/coreum/dex/v1/order.d.ts +172 -0
  46. package/dist/main/coreum/dex/v1/order.js +1137 -0
  47. package/dist/main/coreum/dex/v1/params.d.ts +34 -0
  48. package/dist/main/coreum/dex/v1/params.js +139 -0
  49. package/dist/main/coreum/dex/v1/query.d.ts +133 -0
  50. package/dist/main/coreum/dex/v1/query.js +873 -0
  51. package/dist/main/coreum/dex/v1/tx.d.ts +102 -0
  52. package/dist/main/coreum/dex/v1/tx.js +521 -0
  53. package/dist/main/coreum/extensions/dex.d.ts +12 -0
  54. package/dist/main/coreum/extensions/dex.js +32 -0
  55. package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -233
  56. package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
  57. package/dist/main/coreum/feemodel/v1/params.d.ts +14 -337
  58. package/dist/main/coreum/feemodel/v1/params.js +113 -66
  59. package/dist/main/coreum/feemodel/v1/query.d.ts +30 -261
  60. package/dist/main/coreum/feemodel/v1/query.js +196 -43
  61. package/dist/main/coreum/index.d.ts +46 -0
  62. package/dist/main/coreum/index.js +58 -1
  63. package/dist/main/coreum/nft/index.d.ts +1 -2
  64. package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -79
  65. package/dist/main/coreum/nft/v1beta1/event.js +103 -77
  66. package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -435
  67. package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
  68. package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -114
  69. package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
  70. package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -1628
  71. package/dist/main/coreum/nft/v1beta1/query.js +259 -223
  72. package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -39
  73. package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
  74. package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
  75. package/dist/main/cosmos/extensions/distribution.js +9 -9
  76. package/dist/main/cosmos/extensions/gov.d.ts +13 -13
  77. package/dist/main/cosmos/extensions/gov.js +14 -8
  78. package/dist/main/cosmos/index.d.ts +8 -8
  79. package/dist/main/google/api/http.js +18 -21
  80. package/dist/main/google/protobuf/any.js +3 -4
  81. package/dist/main/google/protobuf/duration.js +3 -4
  82. package/dist/main/google/protobuf/timestamp.js +3 -4
  83. package/dist/main/services/cosmostation.js +1 -1
  84. package/dist/main/tendermint/abci/types.js +183 -223
  85. package/dist/main/tendermint/crypto/keys.js +3 -4
  86. package/dist/main/tendermint/crypto/proof.js +19 -24
  87. package/dist/main/tendermint/types/params.js +15 -20
  88. package/dist/main/tendermint/types/types.js +57 -68
  89. package/dist/main/tendermint/types/validator.js +10 -13
  90. package/dist/main/tendermint/version/types.js +6 -8
  91. package/dist/main/types/core.d.ts +2 -1
  92. package/dist/main/types/core.js +2 -0
  93. package/dist/main/wasm/v1/authz.d.ts +20 -471
  94. package/dist/main/wasm/v1/authz.js +129 -148
  95. package/dist/main/wasm/v1/genesis.d.ts +14 -1020
  96. package/dist/main/wasm/v1/genesis.js +169 -140
  97. package/dist/main/wasm/v1/ibc.d.ts +13 -62
  98. package/dist/main/wasm/v1/ibc.js +91 -76
  99. package/dist/main/wasm/v1/index.d.ts +1 -2
  100. package/dist/main/wasm/v1/pagination.js +9 -11
  101. package/dist/main/wasm/v1/proposal.d.ts +23 -720
  102. package/dist/main/wasm/v1/proposal.js +634 -465
  103. package/dist/main/wasm/v1/query.d.ts +35 -1201
  104. package/dist/main/wasm/v1/query.js +370 -363
  105. package/dist/main/wasm/v1/tx.d.ts +37 -788
  106. package/dist/main/wasm/v1/tx.js +621 -497
  107. package/dist/main/wasm/v1/types.d.ts +19 -297
  108. package/dist/main/wasm/v1/types.js +219 -190
  109. package/dist/module/client/index.js +4 -3
  110. package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
  111. package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
  112. package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -120
  113. package/dist/module/coreum/asset/ft/v1/event.js +721 -109
  114. package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -517
  115. package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
  116. package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -63
  117. package/dist/module/coreum/asset/ft/v1/params.js +35 -27
  118. package/dist/module/coreum/asset/ft/v1/query.d.ts +86 -1950
  119. package/dist/module/coreum/asset/ft/v1/query.js +672 -180
  120. package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -249
  121. package/dist/module/coreum/asset/ft/v1/token.js +236 -152
  122. package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -755
  123. package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
  124. package/dist/module/coreum/asset/index.d.ts +2 -3
  125. package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
  126. package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
  127. package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -147
  128. package/dist/module/coreum/asset/nft/v1/event.js +448 -112
  129. package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -286
  130. package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
  131. package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -108
  132. package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
  133. package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -38
  134. package/dist/module/coreum/asset/nft/v1/params.js +16 -16
  135. package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -706
  136. package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
  137. package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -266
  138. package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
  139. package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -19
  140. package/dist/module/coreum/asset/nft/v1/types.js +269 -39
  141. package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -32
  142. package/dist/module/coreum/customparams/v1/genesis.js +25 -18
  143. package/dist/module/coreum/customparams/v1/params.d.ts +11 -19
  144. package/dist/module/coreum/customparams/v1/params.js +21 -14
  145. package/dist/module/coreum/customparams/v1/query.d.ts +14 -40
  146. package/dist/module/coreum/customparams/v1/query.js +32 -23
  147. package/dist/module/coreum/dex/index.d.ts +1 -0
  148. package/dist/module/coreum/dex/index.js +9 -0
  149. package/dist/module/coreum/dex/v1/event.d.ts +73 -0
  150. package/dist/module/coreum/dex/v1/event.js +467 -0
  151. package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
  152. package/dist/module/coreum/dex/v1/genesis.js +315 -0
  153. package/dist/module/coreum/dex/v1/order.d.ts +172 -0
  154. package/dist/module/coreum/dex/v1/order.js +1128 -0
  155. package/dist/module/coreum/dex/v1/params.d.ts +34 -0
  156. package/dist/module/coreum/dex/v1/params.js +136 -0
  157. package/dist/module/coreum/dex/v1/query.d.ts +133 -0
  158. package/dist/module/coreum/dex/v1/query.js +871 -0
  159. package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
  160. package/dist/module/coreum/dex/v1/tx.js +519 -0
  161. package/dist/module/coreum/extensions/dex.d.ts +12 -0
  162. package/dist/module/coreum/extensions/dex.js +28 -0
  163. package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -233
  164. package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
  165. package/dist/module/coreum/feemodel/v1/params.d.ts +14 -337
  166. package/dist/module/coreum/feemodel/v1/params.js +105 -54
  167. package/dist/module/coreum/feemodel/v1/query.d.ts +30 -261
  168. package/dist/module/coreum/feemodel/v1/query.js +191 -35
  169. package/dist/module/coreum/index.d.ts +46 -0
  170. package/dist/module/coreum/index.js +57 -0
  171. package/dist/module/coreum/nft/index.d.ts +1 -2
  172. package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -79
  173. package/dist/module/coreum/nft/v1beta1/event.js +90 -58
  174. package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -435
  175. package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
  176. package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -114
  177. package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
  178. package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -1628
  179. package/dist/module/coreum/nft/v1beta1/query.js +231 -183
  180. package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -39
  181. package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
  182. package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
  183. package/dist/module/cosmos/extensions/gov.d.ts +13 -13
  184. package/dist/module/cosmos/index.d.ts +8 -8
  185. package/dist/module/services/cosmostation.js +1 -1
  186. package/dist/module/types/core.d.ts +2 -1
  187. package/dist/module/types/core.js +2 -0
  188. package/dist/module/wasm/v1/authz.d.ts +20 -471
  189. package/dist/module/wasm/v1/authz.js +111 -119
  190. package/dist/module/wasm/v1/genesis.d.ts +14 -1020
  191. package/dist/module/wasm/v1/genesis.js +161 -125
  192. package/dist/module/wasm/v1/ibc.d.ts +13 -62
  193. package/dist/module/wasm/v1/ibc.js +83 -62
  194. package/dist/module/wasm/v1/index.d.ts +1 -2
  195. package/dist/module/wasm/v1/proposal.d.ts +23 -720
  196. package/dist/module/wasm/v1/proposal.js +562 -377
  197. package/dist/module/wasm/v1/query.d.ts +35 -1201
  198. package/dist/module/wasm/v1/query.js +330 -301
  199. package/dist/module/wasm/v1/tx.d.ts +37 -788
  200. package/dist/module/wasm/v1/tx.js +551 -404
  201. package/dist/module/wasm/v1/types.d.ts +19 -297
  202. package/dist/module/wasm/v1/types.js +196 -156
  203. package/package.json +11 -10
@@ -1,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,115 +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 {
51
- id?: string;
52
- issuer?: string;
53
- features?: ClassFeature[];
54
- royaltyRate?: string;
55
- } & {
56
- id?: string;
57
- issuer?: string;
58
- features?: ClassFeature[] & ClassFeature[] & { [K in Exclude<keyof I["features"], keyof ClassFeature[]>]: never; };
59
- royaltyRate?: string;
60
- } & { [K_1 in Exclude<keyof I, keyof ClassDefinition>]: never; }>(base?: I): ClassDefinition;
61
- fromPartial<I_1 extends {
62
- id?: string;
63
- issuer?: string;
64
- features?: ClassFeature[];
65
- royaltyRate?: string;
66
- } & {
67
- id?: string;
68
- issuer?: string;
69
- features?: ClassFeature[] & ClassFeature[] & { [K_2 in Exclude<keyof I_1["features"], keyof ClassFeature[]>]: never; };
70
- royaltyRate?: string;
71
- } & { [K_3 in Exclude<keyof I_1, keyof ClassDefinition>]: never; }>(object: I_1): ClassDefinition;
72
- };
73
- export declare const Class: {
74
- encode(message: Class, writer?: _m0.Writer): _m0.Writer;
75
- decode(input: _m0.Reader | Uint8Array, length?: number): Class;
76
- fromJSON(object: any): Class;
77
- toJSON(message: Class): unknown;
78
- create<I extends {
79
- id?: string;
80
- issuer?: string;
81
- name?: string;
82
- symbol?: string;
83
- description?: string;
84
- uri?: string;
85
- uriHash?: string;
86
- data?: {
87
- typeUrl?: string;
88
- value?: Uint8Array;
89
- };
90
- features?: ClassFeature[];
91
- royaltyRate?: string;
92
- } & {
93
- id?: string;
94
- issuer?: string;
95
- name?: string;
96
- symbol?: string;
97
- description?: string;
98
- uri?: string;
99
- uriHash?: string;
100
- data?: {
101
- typeUrl?: string;
102
- value?: Uint8Array;
103
- } & {
104
- typeUrl?: string;
105
- value?: Uint8Array;
106
- } & { [K in Exclude<keyof I["data"], keyof Any>]: never; };
107
- features?: ClassFeature[] & ClassFeature[] & { [K_1 in Exclude<keyof I["features"], keyof ClassFeature[]>]: never; };
108
- royaltyRate?: string;
109
- } & { [K_2 in Exclude<keyof I, keyof Class>]: never; }>(base?: I): Class;
110
- fromPartial<I_1 extends {
111
- id?: string;
112
- issuer?: string;
113
- name?: string;
114
- symbol?: string;
115
- description?: string;
116
- uri?: string;
117
- uriHash?: string;
118
- data?: {
119
- typeUrl?: string;
120
- value?: Uint8Array;
121
- };
122
- features?: ClassFeature[];
123
- royaltyRate?: string;
124
- } & {
125
- id?: string;
126
- issuer?: string;
127
- name?: string;
128
- symbol?: string;
129
- description?: string;
130
- uri?: string;
131
- uriHash?: string;
132
- data?: {
133
- typeUrl?: string;
134
- value?: Uint8Array;
135
- } & {
136
- typeUrl?: string;
137
- value?: Uint8Array;
138
- } & { [K_3 in Exclude<keyof I_1["data"], keyof Any>]: never; };
139
- features?: ClassFeature[] & ClassFeature[] & { [K_4 in Exclude<keyof I_1["features"], keyof ClassFeature[]>]: never; };
140
- royaltyRate?: string;
141
- } & { [K_5 in Exclude<keyof I_1, keyof Class>]: never; }>(object: I_1): Class;
142
- };
45
+ export declare const ClassDefinition: MessageFns<ClassDefinition>;
46
+ export declare const Class: MessageFns<Class>;
143
47
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
144
- 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 {} ? {
145
49
  [K in keyof T]?: DeepPartial<T[K]>;
146
50
  } : Partial<T>;
147
51
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -150,4 +54,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
150
54
  } & {
151
55
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
152
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
+ }
153
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,48 +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 {
16
- mintFee?: {
17
- denom?: string;
18
- amount?: string;
19
- };
20
- } & {
21
- mintFee?: {
22
- denom?: string;
23
- amount?: string;
24
- } & {
25
- denom?: string;
26
- amount?: string;
27
- } & { [K in Exclude<keyof I["mintFee"], keyof Coin>]: never; };
28
- } & { [K_1 in Exclude<keyof I, "mintFee">]: never; }>(base?: I): Params;
29
- fromPartial<I_1 extends {
30
- mintFee?: {
31
- denom?: string;
32
- amount?: string;
33
- };
34
- } & {
35
- mintFee?: {
36
- denom?: string;
37
- amount?: string;
38
- } & {
39
- denom?: string;
40
- amount?: string;
41
- } & { [K_2 in Exclude<keyof I_1["mintFee"], keyof Coin>]: never; };
42
- } & { [K_3 in Exclude<keyof I_1, "mintFee">]: never; }>(object: I_1): Params;
43
- };
9
+ export declare const Params: MessageFns<Params>;
44
10
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
45
- 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 {} ? {
46
12
  [K in keyof T]?: DeepPartial<T[K]>;
47
13
  } : Partial<T>;
48
14
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -51,4 +17,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
51
17
  } & {
52
18
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
53
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
+ }
54
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
  }