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 = "cosmos.nft.v1beta1";
5
4
  /** Class defines the class of the nft type. */
6
5
  export interface Class {
@@ -17,7 +16,7 @@ export interface Class {
17
16
  /** uri_hash is a hash of the document pointed by uri. Optional */
18
17
  uriHash: string;
19
18
  /** data is the app specific metadata of the NFT class. Optional */
20
- data?: Any;
19
+ data: Any | undefined;
21
20
  }
22
21
  /** NFT defines the NFT. */
23
22
  export interface NFT {
@@ -30,118 +29,12 @@ export interface NFT {
30
29
  /** uri_hash is a hash of the document pointed by uri */
31
30
  uriHash: string;
32
31
  /** data is an app specific data of the NFT. Optional */
33
- data?: Any;
32
+ data: Any | undefined;
34
33
  }
35
- export declare const Class: {
36
- encode(message: Class, writer?: _m0.Writer): _m0.Writer;
37
- decode(input: _m0.Reader | Uint8Array, length?: number): Class;
38
- fromJSON(object: any): Class;
39
- toJSON(message: Class): unknown;
40
- create<I extends {
41
- id?: string;
42
- name?: string;
43
- symbol?: string;
44
- description?: string;
45
- uri?: string;
46
- uriHash?: string;
47
- data?: {
48
- typeUrl?: string;
49
- value?: Uint8Array;
50
- };
51
- } & {
52
- id?: string;
53
- name?: string;
54
- symbol?: string;
55
- description?: string;
56
- uri?: string;
57
- uriHash?: string;
58
- data?: {
59
- typeUrl?: string;
60
- value?: Uint8Array;
61
- } & {
62
- typeUrl?: string;
63
- value?: Uint8Array;
64
- } & { [K in Exclude<keyof I["data"], keyof Any>]: never; };
65
- } & { [K_1 in Exclude<keyof I, keyof Class>]: never; }>(base?: I): Class;
66
- fromPartial<I_1 extends {
67
- id?: string;
68
- name?: string;
69
- symbol?: string;
70
- description?: string;
71
- uri?: string;
72
- uriHash?: string;
73
- data?: {
74
- typeUrl?: string;
75
- value?: Uint8Array;
76
- };
77
- } & {
78
- id?: string;
79
- name?: string;
80
- symbol?: string;
81
- description?: string;
82
- uri?: string;
83
- uriHash?: string;
84
- data?: {
85
- typeUrl?: string;
86
- value?: Uint8Array;
87
- } & {
88
- typeUrl?: string;
89
- value?: Uint8Array;
90
- } & { [K_2 in Exclude<keyof I_1["data"], keyof Any>]: never; };
91
- } & { [K_3 in Exclude<keyof I_1, keyof Class>]: never; }>(object: I_1): Class;
92
- };
93
- export declare const NFT: {
94
- encode(message: NFT, writer?: _m0.Writer): _m0.Writer;
95
- decode(input: _m0.Reader | Uint8Array, length?: number): NFT;
96
- fromJSON(object: any): NFT;
97
- toJSON(message: NFT): unknown;
98
- create<I extends {
99
- classId?: string;
100
- id?: string;
101
- uri?: string;
102
- uriHash?: string;
103
- data?: {
104
- typeUrl?: string;
105
- value?: Uint8Array;
106
- };
107
- } & {
108
- classId?: string;
109
- id?: string;
110
- uri?: string;
111
- uriHash?: string;
112
- data?: {
113
- typeUrl?: string;
114
- value?: Uint8Array;
115
- } & {
116
- typeUrl?: string;
117
- value?: Uint8Array;
118
- } & { [K in Exclude<keyof I["data"], keyof Any>]: never; };
119
- } & { [K_1 in Exclude<keyof I, keyof NFT>]: never; }>(base?: I): NFT;
120
- fromPartial<I_1 extends {
121
- classId?: string;
122
- id?: string;
123
- uri?: string;
124
- uriHash?: string;
125
- data?: {
126
- typeUrl?: string;
127
- value?: Uint8Array;
128
- };
129
- } & {
130
- classId?: string;
131
- id?: string;
132
- uri?: string;
133
- uriHash?: string;
134
- data?: {
135
- typeUrl?: string;
136
- value?: Uint8Array;
137
- } & {
138
- typeUrl?: string;
139
- value?: Uint8Array;
140
- } & { [K_2 in Exclude<keyof I_1["data"], keyof Any>]: never; };
141
- } & { [K_3 in Exclude<keyof I_1, keyof NFT>]: never; }>(object: I_1): NFT;
142
- };
34
+ export declare const Class: MessageFns<Class>;
35
+ export declare const NFT: MessageFns<NFT>;
143
36
  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 {} ? {
37
+ 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
38
  [K in keyof T]?: DeepPartial<T[K]>;
146
39
  } : Partial<T>;
147
40
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -150,4 +43,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
150
43
  } & {
151
44
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
152
45
  };
46
+ export interface MessageFns<T> {
47
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
48
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
49
+ fromJSON(object: any): T;
50
+ toJSON(message: T): unknown;
51
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
52
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
53
+ }
153
54
  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: cosmos-sdk/proto/cosmos/nft/v1beta1/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 = "cosmos.nft.v1beta1";
6
10
  function createBaseClass() {
7
11
  return {
@@ -15,7 +19,7 @@ function createBaseClass() {
15
19
  };
16
20
  }
17
21
  export const Class = {
18
- encode(message, writer = _m0.Writer.create()) {
22
+ encode(message, writer = new BinaryWriter()) {
19
23
  if (message.id !== "") {
20
24
  writer.uint32(10).string(message.id);
21
25
  }
@@ -40,84 +44,105 @@ export const Class = {
40
44
  return writer;
41
45
  },
42
46
  decode(input, length) {
43
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
47
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
44
48
  let end = length === undefined ? reader.len : reader.pos + length;
45
49
  const message = createBaseClass();
46
50
  while (reader.pos < end) {
47
51
  const tag = reader.uint32();
48
52
  switch (tag >>> 3) {
49
- case 1:
50
- if (tag != 10) {
53
+ case 1: {
54
+ if (tag !== 10) {
51
55
  break;
52
56
  }
53
57
  message.id = reader.string();
54
58
  continue;
55
- case 2:
56
- if (tag != 18) {
59
+ }
60
+ case 2: {
61
+ if (tag !== 18) {
57
62
  break;
58
63
  }
59
64
  message.name = reader.string();
60
65
  continue;
61
- case 3:
62
- if (tag != 26) {
66
+ }
67
+ case 3: {
68
+ if (tag !== 26) {
63
69
  break;
64
70
  }
65
71
  message.symbol = reader.string();
66
72
  continue;
67
- case 4:
68
- if (tag != 34) {
73
+ }
74
+ case 4: {
75
+ if (tag !== 34) {
69
76
  break;
70
77
  }
71
78
  message.description = reader.string();
72
79
  continue;
73
- case 5:
74
- if (tag != 42) {
80
+ }
81
+ case 5: {
82
+ if (tag !== 42) {
75
83
  break;
76
84
  }
77
85
  message.uri = reader.string();
78
86
  continue;
79
- case 6:
80
- if (tag != 50) {
87
+ }
88
+ case 6: {
89
+ if (tag !== 50) {
81
90
  break;
82
91
  }
83
92
  message.uriHash = reader.string();
84
93
  continue;
85
- case 7:
86
- if (tag != 58) {
94
+ }
95
+ case 7: {
96
+ if (tag !== 58) {
87
97
  break;
88
98
  }
89
99
  message.data = Any.decode(reader, reader.uint32());
90
100
  continue;
101
+ }
91
102
  }
92
- if ((tag & 7) == 4 || tag == 0) {
103
+ if ((tag & 7) === 4 || tag === 0) {
93
104
  break;
94
105
  }
95
- reader.skipType(tag & 7);
106
+ reader.skip(tag & 7);
96
107
  }
97
108
  return message;
98
109
  },
99
110
  fromJSON(object) {
100
111
  return {
101
- id: isSet(object.id) ? String(object.id) : "",
102
- name: isSet(object.name) ? String(object.name) : "",
103
- symbol: isSet(object.symbol) ? String(object.symbol) : "",
104
- description: isSet(object.description) ? String(object.description) : "",
105
- uri: isSet(object.uri) ? String(object.uri) : "",
106
- uriHash: isSet(object.uriHash) ? String(object.uriHash) : "",
112
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
113
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
114
+ symbol: isSet(object.symbol) ? globalThis.String(object.symbol) : "",
115
+ description: isSet(object.description)
116
+ ? globalThis.String(object.description)
117
+ : "",
118
+ uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
119
+ uriHash: isSet(object.uriHash) ? globalThis.String(object.uriHash) : "",
107
120
  data: isSet(object.data) ? Any.fromJSON(object.data) : undefined,
108
121
  };
109
122
  },
110
123
  toJSON(message) {
111
124
  const obj = {};
112
- message.id !== undefined && (obj.id = message.id);
113
- message.name !== undefined && (obj.name = message.name);
114
- message.symbol !== undefined && (obj.symbol = message.symbol);
115
- message.description !== undefined &&
116
- (obj.description = message.description);
117
- message.uri !== undefined && (obj.uri = message.uri);
118
- message.uriHash !== undefined && (obj.uriHash = message.uriHash);
119
- message.data !== undefined &&
120
- (obj.data = message.data ? Any.toJSON(message.data) : undefined);
125
+ if (message.id !== "") {
126
+ obj.id = message.id;
127
+ }
128
+ if (message.name !== "") {
129
+ obj.name = message.name;
130
+ }
131
+ if (message.symbol !== "") {
132
+ obj.symbol = message.symbol;
133
+ }
134
+ if (message.description !== "") {
135
+ obj.description = message.description;
136
+ }
137
+ if (message.uri !== "") {
138
+ obj.uri = message.uri;
139
+ }
140
+ if (message.uriHash !== "") {
141
+ obj.uriHash = message.uriHash;
142
+ }
143
+ if (message.data !== undefined) {
144
+ obj.data = Any.toJSON(message.data);
145
+ }
121
146
  return obj;
122
147
  },
123
148
  create(base) {
@@ -142,7 +167,7 @@ function createBaseNFT() {
142
167
  return { classId: "", id: "", uri: "", uriHash: "", data: undefined };
143
168
  }
144
169
  export const NFT = {
145
- encode(message, writer = _m0.Writer.create()) {
170
+ encode(message, writer = new BinaryWriter()) {
146
171
  if (message.classId !== "") {
147
172
  writer.uint32(10).string(message.classId);
148
173
  }
@@ -161,67 +186,81 @@ export const NFT = {
161
186
  return writer;
162
187
  },
163
188
  decode(input, length) {
164
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
189
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
165
190
  let end = length === undefined ? reader.len : reader.pos + length;
166
191
  const message = createBaseNFT();
167
192
  while (reader.pos < end) {
168
193
  const tag = reader.uint32();
169
194
  switch (tag >>> 3) {
170
- case 1:
171
- if (tag != 10) {
195
+ case 1: {
196
+ if (tag !== 10) {
172
197
  break;
173
198
  }
174
199
  message.classId = reader.string();
175
200
  continue;
176
- case 2:
177
- if (tag != 18) {
201
+ }
202
+ case 2: {
203
+ if (tag !== 18) {
178
204
  break;
179
205
  }
180
206
  message.id = reader.string();
181
207
  continue;
182
- case 3:
183
- if (tag != 26) {
208
+ }
209
+ case 3: {
210
+ if (tag !== 26) {
184
211
  break;
185
212
  }
186
213
  message.uri = reader.string();
187
214
  continue;
188
- case 4:
189
- if (tag != 34) {
215
+ }
216
+ case 4: {
217
+ if (tag !== 34) {
190
218
  break;
191
219
  }
192
220
  message.uriHash = reader.string();
193
221
  continue;
194
- case 10:
195
- if (tag != 82) {
222
+ }
223
+ case 10: {
224
+ if (tag !== 82) {
196
225
  break;
197
226
  }
198
227
  message.data = Any.decode(reader, reader.uint32());
199
228
  continue;
229
+ }
200
230
  }
201
- if ((tag & 7) == 4 || tag == 0) {
231
+ if ((tag & 7) === 4 || tag === 0) {
202
232
  break;
203
233
  }
204
- reader.skipType(tag & 7);
234
+ reader.skip(tag & 7);
205
235
  }
206
236
  return message;
207
237
  },
208
238
  fromJSON(object) {
209
239
  return {
210
- classId: isSet(object.classId) ? String(object.classId) : "",
211
- id: isSet(object.id) ? String(object.id) : "",
212
- uri: isSet(object.uri) ? String(object.uri) : "",
213
- uriHash: isSet(object.uriHash) ? String(object.uriHash) : "",
240
+ classId: isSet(object.classId) ? globalThis.String(object.classId) : "",
241
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
242
+ uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
243
+ uriHash: isSet(object.uriHash) ? globalThis.String(object.uriHash) : "",
214
244
  data: isSet(object.data) ? Any.fromJSON(object.data) : undefined,
215
245
  };
216
246
  },
217
247
  toJSON(message) {
218
248
  const obj = {};
219
- message.classId !== undefined && (obj.classId = message.classId);
220
- message.id !== undefined && (obj.id = message.id);
221
- message.uri !== undefined && (obj.uri = message.uri);
222
- message.uriHash !== undefined && (obj.uriHash = message.uriHash);
223
- message.data !== undefined &&
224
- (obj.data = message.data ? Any.toJSON(message.data) : undefined);
249
+ if (message.classId !== "") {
250
+ obj.classId = message.classId;
251
+ }
252
+ if (message.id !== "") {
253
+ obj.id = message.id;
254
+ }
255
+ if (message.uri !== "") {
256
+ obj.uri = message.uri;
257
+ }
258
+ if (message.uriHash !== "") {
259
+ obj.uriHash = message.uriHash;
260
+ }
261
+ if (message.data !== undefined) {
262
+ obj.data = Any.toJSON(message.data);
263
+ }
225
264
  return obj;
226
265
  },
227
266
  create(base) {
@@ -240,10 +279,6 @@ export const NFT = {
240
279
  return message;
241
280
  },
242
281
  };
243
- if (_m0.util.Long !== Long) {
244
- _m0.util.Long = Long;
245
- _m0.configure();
246
- }
247
282
  function isSet(value) {
248
283
  return value !== null && value !== undefined;
249
284
  }