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,13 +1,14 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.0
5
+ // protoc v3.21.12
6
+ // source: cosmos-sdk/proto/cosmos/nft/v1beta1/nft.proto
5
7
  Object.defineProperty(exports, "__esModule", { value: true });
6
8
  exports.NFT = exports.Class = exports.protobufPackage = void 0;
7
9
  /* eslint-disable */
8
- const long_1 = __importDefault(require("long"));
9
- const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
- const any_1 = require("../../../google/protobuf/any");
10
+ const binary_1 = require("cosmjs-types/binary");
11
+ const any_1 = require("cosmjs-types/google/protobuf/any");
11
12
  exports.protobufPackage = "cosmos.nft.v1beta1";
12
13
  function createBaseClass() {
13
14
  return {
@@ -21,7 +22,7 @@ function createBaseClass() {
21
22
  };
22
23
  }
23
24
  exports.Class = {
24
- encode(message, writer = minimal_1.default.Writer.create()) {
25
+ encode(message, writer = new binary_1.BinaryWriter()) {
25
26
  if (message.id !== "") {
26
27
  writer.uint32(10).string(message.id);
27
28
  }
@@ -46,98 +47,118 @@ exports.Class = {
46
47
  return writer;
47
48
  },
48
49
  decode(input, length) {
49
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
50
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
50
51
  let end = length === undefined ? reader.len : reader.pos + length;
51
52
  const message = createBaseClass();
52
53
  while (reader.pos < end) {
53
54
  const tag = reader.uint32();
54
55
  switch (tag >>> 3) {
55
- case 1:
56
- if (tag != 10) {
56
+ case 1: {
57
+ if (tag !== 10) {
57
58
  break;
58
59
  }
59
60
  message.id = reader.string();
60
61
  continue;
61
- case 2:
62
- if (tag != 18) {
62
+ }
63
+ case 2: {
64
+ if (tag !== 18) {
63
65
  break;
64
66
  }
65
67
  message.name = reader.string();
66
68
  continue;
67
- case 3:
68
- if (tag != 26) {
69
+ }
70
+ case 3: {
71
+ if (tag !== 26) {
69
72
  break;
70
73
  }
71
74
  message.symbol = reader.string();
72
75
  continue;
73
- case 4:
74
- if (tag != 34) {
76
+ }
77
+ case 4: {
78
+ if (tag !== 34) {
75
79
  break;
76
80
  }
77
81
  message.description = reader.string();
78
82
  continue;
79
- case 5:
80
- if (tag != 42) {
83
+ }
84
+ case 5: {
85
+ if (tag !== 42) {
81
86
  break;
82
87
  }
83
88
  message.uri = reader.string();
84
89
  continue;
85
- case 6:
86
- if (tag != 50) {
90
+ }
91
+ case 6: {
92
+ if (tag !== 50) {
87
93
  break;
88
94
  }
89
95
  message.uriHash = reader.string();
90
96
  continue;
91
- case 7:
92
- if (tag != 58) {
97
+ }
98
+ case 7: {
99
+ if (tag !== 58) {
93
100
  break;
94
101
  }
95
102
  message.data = any_1.Any.decode(reader, reader.uint32());
96
103
  continue;
104
+ }
97
105
  }
98
- if ((tag & 7) == 4 || tag == 0) {
106
+ if ((tag & 7) === 4 || tag === 0) {
99
107
  break;
100
108
  }
101
- reader.skipType(tag & 7);
109
+ reader.skip(tag & 7);
102
110
  }
103
111
  return message;
104
112
  },
105
113
  fromJSON(object) {
106
114
  return {
107
- id: isSet(object.id) ? String(object.id) : "",
108
- name: isSet(object.name) ? String(object.name) : "",
109
- symbol: isSet(object.symbol) ? String(object.symbol) : "",
110
- description: isSet(object.description) ? String(object.description) : "",
111
- uri: isSet(object.uri) ? String(object.uri) : "",
112
- uriHash: isSet(object.uriHash) ? String(object.uriHash) : "",
115
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
116
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
117
+ symbol: isSet(object.symbol) ? globalThis.String(object.symbol) : "",
118
+ description: isSet(object.description)
119
+ ? globalThis.String(object.description)
120
+ : "",
121
+ uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
122
+ uriHash: isSet(object.uriHash) ? globalThis.String(object.uriHash) : "",
113
123
  data: isSet(object.data) ? any_1.Any.fromJSON(object.data) : undefined,
114
124
  };
115
125
  },
116
126
  toJSON(message) {
117
127
  const obj = {};
118
- message.id !== undefined && (obj.id = message.id);
119
- message.name !== undefined && (obj.name = message.name);
120
- message.symbol !== undefined && (obj.symbol = message.symbol);
121
- message.description !== undefined &&
122
- (obj.description = message.description);
123
- message.uri !== undefined && (obj.uri = message.uri);
124
- message.uriHash !== undefined && (obj.uriHash = message.uriHash);
125
- message.data !== undefined &&
126
- (obj.data = message.data ? any_1.Any.toJSON(message.data) : undefined);
128
+ if (message.id !== "") {
129
+ obj.id = message.id;
130
+ }
131
+ if (message.name !== "") {
132
+ obj.name = message.name;
133
+ }
134
+ if (message.symbol !== "") {
135
+ obj.symbol = message.symbol;
136
+ }
137
+ if (message.description !== "") {
138
+ obj.description = message.description;
139
+ }
140
+ if (message.uri !== "") {
141
+ obj.uri = message.uri;
142
+ }
143
+ if (message.uriHash !== "") {
144
+ obj.uriHash = message.uriHash;
145
+ }
146
+ if (message.data !== undefined) {
147
+ obj.data = any_1.Any.toJSON(message.data);
148
+ }
127
149
  return obj;
128
150
  },
129
151
  create(base) {
130
- return exports.Class.fromPartial(base !== null && base !== void 0 ? base : {});
152
+ return exports.Class.fromPartial(base ?? {});
131
153
  },
132
154
  fromPartial(object) {
133
- var _a, _b, _c, _d, _e, _f;
134
155
  const message = createBaseClass();
135
- message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
136
- message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
137
- message.symbol = (_c = object.symbol) !== null && _c !== void 0 ? _c : "";
138
- message.description = (_d = object.description) !== null && _d !== void 0 ? _d : "";
139
- message.uri = (_e = object.uri) !== null && _e !== void 0 ? _e : "";
140
- message.uriHash = (_f = object.uriHash) !== null && _f !== void 0 ? _f : "";
156
+ message.id = object.id ?? "";
157
+ message.name = object.name ?? "";
158
+ message.symbol = object.symbol ?? "";
159
+ message.description = object.description ?? "";
160
+ message.uri = object.uri ?? "";
161
+ message.uriHash = object.uriHash ?? "";
141
162
  message.data =
142
163
  object.data !== undefined && object.data !== null
143
164
  ? any_1.Any.fromPartial(object.data)
@@ -149,7 +170,7 @@ function createBaseNFT() {
149
170
  return { classId: "", id: "", uri: "", uriHash: "", data: undefined };
150
171
  }
151
172
  exports.NFT = {
152
- encode(message, writer = minimal_1.default.Writer.create()) {
173
+ encode(message, writer = new binary_1.BinaryWriter()) {
153
174
  if (message.classId !== "") {
154
175
  writer.uint32(10).string(message.classId);
155
176
  }
@@ -168,79 +189,92 @@ exports.NFT = {
168
189
  return writer;
169
190
  },
170
191
  decode(input, length) {
171
- const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
192
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
172
193
  let end = length === undefined ? reader.len : reader.pos + length;
173
194
  const message = createBaseNFT();
174
195
  while (reader.pos < end) {
175
196
  const tag = reader.uint32();
176
197
  switch (tag >>> 3) {
177
- case 1:
178
- if (tag != 10) {
198
+ case 1: {
199
+ if (tag !== 10) {
179
200
  break;
180
201
  }
181
202
  message.classId = reader.string();
182
203
  continue;
183
- case 2:
184
- if (tag != 18) {
204
+ }
205
+ case 2: {
206
+ if (tag !== 18) {
185
207
  break;
186
208
  }
187
209
  message.id = reader.string();
188
210
  continue;
189
- case 3:
190
- if (tag != 26) {
211
+ }
212
+ case 3: {
213
+ if (tag !== 26) {
191
214
  break;
192
215
  }
193
216
  message.uri = reader.string();
194
217
  continue;
195
- case 4:
196
- if (tag != 34) {
218
+ }
219
+ case 4: {
220
+ if (tag !== 34) {
197
221
  break;
198
222
  }
199
223
  message.uriHash = reader.string();
200
224
  continue;
201
- case 10:
202
- if (tag != 82) {
225
+ }
226
+ case 10: {
227
+ if (tag !== 82) {
203
228
  break;
204
229
  }
205
230
  message.data = any_1.Any.decode(reader, reader.uint32());
206
231
  continue;
232
+ }
207
233
  }
208
- if ((tag & 7) == 4 || tag == 0) {
234
+ if ((tag & 7) === 4 || tag === 0) {
209
235
  break;
210
236
  }
211
- reader.skipType(tag & 7);
237
+ reader.skip(tag & 7);
212
238
  }
213
239
  return message;
214
240
  },
215
241
  fromJSON(object) {
216
242
  return {
217
- classId: isSet(object.classId) ? String(object.classId) : "",
218
- id: isSet(object.id) ? String(object.id) : "",
219
- uri: isSet(object.uri) ? String(object.uri) : "",
220
- uriHash: isSet(object.uriHash) ? String(object.uriHash) : "",
243
+ classId: isSet(object.classId) ? globalThis.String(object.classId) : "",
244
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
245
+ uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
246
+ uriHash: isSet(object.uriHash) ? globalThis.String(object.uriHash) : "",
221
247
  data: isSet(object.data) ? any_1.Any.fromJSON(object.data) : undefined,
222
248
  };
223
249
  },
224
250
  toJSON(message) {
225
251
  const obj = {};
226
- message.classId !== undefined && (obj.classId = message.classId);
227
- message.id !== undefined && (obj.id = message.id);
228
- message.uri !== undefined && (obj.uri = message.uri);
229
- message.uriHash !== undefined && (obj.uriHash = message.uriHash);
230
- message.data !== undefined &&
231
- (obj.data = message.data ? any_1.Any.toJSON(message.data) : undefined);
252
+ if (message.classId !== "") {
253
+ obj.classId = message.classId;
254
+ }
255
+ if (message.id !== "") {
256
+ obj.id = message.id;
257
+ }
258
+ if (message.uri !== "") {
259
+ obj.uri = message.uri;
260
+ }
261
+ if (message.uriHash !== "") {
262
+ obj.uriHash = message.uriHash;
263
+ }
264
+ if (message.data !== undefined) {
265
+ obj.data = any_1.Any.toJSON(message.data);
266
+ }
232
267
  return obj;
233
268
  },
234
269
  create(base) {
235
- return exports.NFT.fromPartial(base !== null && base !== void 0 ? base : {});
270
+ return exports.NFT.fromPartial(base ?? {});
236
271
  },
237
272
  fromPartial(object) {
238
- var _a, _b, _c, _d;
239
273
  const message = createBaseNFT();
240
- message.classId = (_a = object.classId) !== null && _a !== void 0 ? _a : "";
241
- message.id = (_b = object.id) !== null && _b !== void 0 ? _b : "";
242
- message.uri = (_c = object.uri) !== null && _c !== void 0 ? _c : "";
243
- message.uriHash = (_d = object.uriHash) !== null && _d !== void 0 ? _d : "";
274
+ message.classId = object.classId ?? "";
275
+ message.id = object.id ?? "";
276
+ message.uri = object.uri ?? "";
277
+ message.uriHash = object.uriHash ?? "";
244
278
  message.data =
245
279
  object.data !== undefined && object.data !== null
246
280
  ? any_1.Any.fromPartial(object.data)
@@ -248,10 +282,6 @@ exports.NFT = {
248
282
  return message;
249
283
  },
250
284
  };
251
- if (minimal_1.default.util.Long !== long_1.default) {
252
- minimal_1.default.util.Long = long_1.default;
253
- minimal_1.default.configure();
254
- }
255
285
  function isSet(value) {
256
286
  return value !== null && value !== undefined;
257
287
  }