coreum-js 2.16.3 → 2.17.1

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 +2 -0
  40. package/dist/main/coreum/dex/index.js +11 -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 +2 -0
  168. package/dist/module/coreum/dex/index.js +8 -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,19 +1,38 @@
1
- import Long from "long";
2
- import _m0 from "protobufjs/minimal";
1
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
3
2
  export declare const protobufPackage = "coreum.asset.nft.v1";
3
+ /** DataEditor defines possible data editors. */
4
+ export declare enum DataEditor {
5
+ admin = 0,
6
+ owner = 1,
7
+ UNRECOGNIZED = -1
8
+ }
9
+ export declare function dataEditorFromJSON(object: any): DataEditor;
10
+ export declare function dataEditorToJSON(object: DataEditor): string;
11
+ /** DataBytes represents the immutable data. */
4
12
  export interface DataBytes {
5
13
  Data: Uint8Array;
6
14
  }
7
- export declare const DataBytes: {
8
- encode(message: DataBytes, writer?: _m0.Writer): _m0.Writer;
9
- decode(input: _m0.Reader | Uint8Array, length?: number): DataBytes;
10
- fromJSON(object: any): DataBytes;
11
- toJSON(message: DataBytes): unknown;
12
- create<I extends Exact<DeepPartial<DataBytes>, I>>(base?: I): DataBytes;
13
- fromPartial<I extends Exact<DeepPartial<DataBytes>, I>>(object: I): DataBytes;
14
- };
15
+ /** DataDynamicItem contains the updatable data and modification types. */
16
+ export interface DataDynamicItem {
17
+ /** contains the set of the data editors, if empty no one can update. */
18
+ editors: DataEditor[];
19
+ data: Uint8Array;
20
+ }
21
+ /** DataDynamicIndexed contains the data and it's index in the DataDynamic. */
22
+ export interface DataDynamicIndexedItem {
23
+ index: number;
24
+ data: Uint8Array;
25
+ }
26
+ /** DataDynamic is dynamic data which contains the list of the items allowed to be modified base on their modification types. */
27
+ export interface DataDynamic {
28
+ items: DataDynamicItem[];
29
+ }
30
+ export declare const DataBytes: MessageFns<DataBytes>;
31
+ export declare const DataDynamicItem: MessageFns<DataDynamicItem>;
32
+ export declare const DataDynamicIndexedItem: MessageFns<DataDynamicIndexedItem>;
33
+ export declare const DataDynamic: MessageFns<DataDynamic>;
15
34
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
16
- 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 {} ? {
35
+ 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 {} ? {
17
36
  [K in keyof T]?: DeepPartial<T[K]>;
18
37
  } : Partial<T>;
19
38
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -22,4 +41,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
22
41
  } & {
23
42
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
24
43
  };
44
+ export interface MessageFns<T> {
45
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
46
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
47
+ fromJSON(object: any): T;
48
+ toJSON(message: T): unknown;
49
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
50
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
51
+ }
25
52
  export {};
@@ -1,45 +1,87 @@
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/types.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
  export const protobufPackage = "coreum.asset.nft.v1";
9
+ /** DataEditor defines possible data editors. */
10
+ export var DataEditor;
11
+ (function (DataEditor) {
12
+ DataEditor[DataEditor["admin"] = 0] = "admin";
13
+ DataEditor[DataEditor["owner"] = 1] = "owner";
14
+ DataEditor[DataEditor["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
15
+ })(DataEditor || (DataEditor = {}));
16
+ export function dataEditorFromJSON(object) {
17
+ switch (object) {
18
+ case 0:
19
+ case "admin":
20
+ return DataEditor.admin;
21
+ case 1:
22
+ case "owner":
23
+ return DataEditor.owner;
24
+ case -1:
25
+ case "UNRECOGNIZED":
26
+ default:
27
+ return DataEditor.UNRECOGNIZED;
28
+ }
29
+ }
30
+ export function dataEditorToJSON(object) {
31
+ switch (object) {
32
+ case DataEditor.admin:
33
+ return "admin";
34
+ case DataEditor.owner:
35
+ return "owner";
36
+ case DataEditor.UNRECOGNIZED:
37
+ default:
38
+ return "UNRECOGNIZED";
39
+ }
40
+ }
5
41
  function createBaseDataBytes() {
6
- return { Data: new Uint8Array() };
42
+ return { Data: new Uint8Array(0) };
7
43
  }
8
44
  export const DataBytes = {
9
- encode(message, writer = _m0.Writer.create()) {
45
+ encode(message, writer = new BinaryWriter()) {
10
46
  if (message.Data.length !== 0) {
11
47
  writer.uint32(10).bytes(message.Data);
12
48
  }
13
49
  return writer;
14
50
  },
15
51
  decode(input, length) {
16
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
52
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
17
53
  let end = length === undefined ? reader.len : reader.pos + length;
18
54
  const message = createBaseDataBytes();
19
55
  while (reader.pos < end) {
20
56
  const tag = reader.uint32();
21
57
  switch (tag >>> 3) {
22
- case 1:
23
- if (tag != 10) {
58
+ case 1: {
59
+ if (tag !== 10) {
24
60
  break;
25
61
  }
26
62
  message.Data = reader.bytes();
27
63
  continue;
64
+ }
28
65
  }
29
- if ((tag & 7) == 4 || tag == 0) {
66
+ if ((tag & 7) === 4 || tag === 0) {
30
67
  break;
31
68
  }
32
- reader.skipType(tag & 7);
69
+ reader.skip(tag & 7);
33
70
  }
34
71
  return message;
35
72
  },
36
73
  fromJSON(object) {
37
- return { Data: isSet(object.Data) ? bytesFromBase64(object.Data) : new Uint8Array() };
74
+ return {
75
+ Data: isSet(object.Data)
76
+ ? bytesFromBase64(object.Data)
77
+ : new Uint8Array(0),
78
+ };
38
79
  },
39
80
  toJSON(message) {
40
81
  const obj = {};
41
- message.Data !== undefined &&
42
- (obj.Data = base64FromBytes(message.Data !== undefined ? message.Data : new Uint8Array()));
82
+ if (message.Data.length !== 0) {
83
+ obj.Data = base64FromBytes(message.Data);
84
+ }
43
85
  return obj;
44
86
  },
45
87
  create(base) {
@@ -47,31 +89,223 @@ export const DataBytes = {
47
89
  },
48
90
  fromPartial(object) {
49
91
  const message = createBaseDataBytes();
50
- message.Data = object.Data ?? new Uint8Array();
92
+ message.Data = object.Data ?? new Uint8Array(0);
93
+ return message;
94
+ },
95
+ };
96
+ function createBaseDataDynamicItem() {
97
+ return { editors: [], data: new Uint8Array(0) };
98
+ }
99
+ export const DataDynamicItem = {
100
+ encode(message, writer = new BinaryWriter()) {
101
+ writer.uint32(10).fork();
102
+ for (const v of message.editors) {
103
+ writer.int32(v);
104
+ }
105
+ writer.ldelim();
106
+ if (message.data.length !== 0) {
107
+ writer.uint32(18).bytes(message.data);
108
+ }
109
+ return writer;
110
+ },
111
+ decode(input, length) {
112
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
113
+ let end = length === undefined ? reader.len : reader.pos + length;
114
+ const message = createBaseDataDynamicItem();
115
+ while (reader.pos < end) {
116
+ const tag = reader.uint32();
117
+ switch (tag >>> 3) {
118
+ case 1: {
119
+ if (tag === 8) {
120
+ message.editors.push(reader.int32());
121
+ continue;
122
+ }
123
+ if (tag === 10) {
124
+ const end2 = reader.uint32() + reader.pos;
125
+ while (reader.pos < end2) {
126
+ message.editors.push(reader.int32());
127
+ }
128
+ continue;
129
+ }
130
+ break;
131
+ }
132
+ case 2: {
133
+ if (tag !== 18) {
134
+ break;
135
+ }
136
+ message.data = reader.bytes();
137
+ continue;
138
+ }
139
+ }
140
+ if ((tag & 7) === 4 || tag === 0) {
141
+ break;
142
+ }
143
+ reader.skip(tag & 7);
144
+ }
145
+ return message;
146
+ },
147
+ fromJSON(object) {
148
+ return {
149
+ editors: globalThis.Array.isArray(object?.editors)
150
+ ? object.editors.map((e) => dataEditorFromJSON(e))
151
+ : [],
152
+ data: isSet(object.data)
153
+ ? bytesFromBase64(object.data)
154
+ : new Uint8Array(0),
155
+ };
156
+ },
157
+ toJSON(message) {
158
+ const obj = {};
159
+ if (message.editors?.length) {
160
+ obj.editors = message.editors.map((e) => dataEditorToJSON(e));
161
+ }
162
+ if (message.data.length !== 0) {
163
+ obj.data = base64FromBytes(message.data);
164
+ }
165
+ return obj;
166
+ },
167
+ create(base) {
168
+ return DataDynamicItem.fromPartial(base ?? {});
169
+ },
170
+ fromPartial(object) {
171
+ const message = createBaseDataDynamicItem();
172
+ message.editors = object.editors?.map((e) => e) || [];
173
+ message.data = object.data ?? new Uint8Array(0);
174
+ return message;
175
+ },
176
+ };
177
+ function createBaseDataDynamicIndexedItem() {
178
+ return { index: 0, data: new Uint8Array(0) };
179
+ }
180
+ export const DataDynamicIndexedItem = {
181
+ encode(message, writer = new BinaryWriter()) {
182
+ if (message.index !== 0) {
183
+ writer.uint32(8).uint32(message.index);
184
+ }
185
+ if (message.data.length !== 0) {
186
+ writer.uint32(18).bytes(message.data);
187
+ }
188
+ return writer;
189
+ },
190
+ decode(input, length) {
191
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
192
+ let end = length === undefined ? reader.len : reader.pos + length;
193
+ const message = createBaseDataDynamicIndexedItem();
194
+ while (reader.pos < end) {
195
+ const tag = reader.uint32();
196
+ switch (tag >>> 3) {
197
+ case 1: {
198
+ if (tag !== 8) {
199
+ break;
200
+ }
201
+ message.index = reader.uint32();
202
+ continue;
203
+ }
204
+ case 2: {
205
+ if (tag !== 18) {
206
+ break;
207
+ }
208
+ message.data = reader.bytes();
209
+ continue;
210
+ }
211
+ }
212
+ if ((tag & 7) === 4 || tag === 0) {
213
+ break;
214
+ }
215
+ reader.skip(tag & 7);
216
+ }
217
+ return message;
218
+ },
219
+ fromJSON(object) {
220
+ return {
221
+ index: isSet(object.index) ? globalThis.Number(object.index) : 0,
222
+ data: isSet(object.data)
223
+ ? bytesFromBase64(object.data)
224
+ : new Uint8Array(0),
225
+ };
226
+ },
227
+ toJSON(message) {
228
+ const obj = {};
229
+ if (message.index !== 0) {
230
+ obj.index = Math.round(message.index);
231
+ }
232
+ if (message.data.length !== 0) {
233
+ obj.data = base64FromBytes(message.data);
234
+ }
235
+ return obj;
236
+ },
237
+ create(base) {
238
+ return DataDynamicIndexedItem.fromPartial(base ?? {});
239
+ },
240
+ fromPartial(object) {
241
+ const message = createBaseDataDynamicIndexedItem();
242
+ message.index = object.index ?? 0;
243
+ message.data = object.data ?? new Uint8Array(0);
244
+ return message;
245
+ },
246
+ };
247
+ function createBaseDataDynamic() {
248
+ return { items: [] };
249
+ }
250
+ export const DataDynamic = {
251
+ encode(message, writer = new BinaryWriter()) {
252
+ for (const v of message.items) {
253
+ DataDynamicItem.encode(v, writer.uint32(10).fork()).ldelim();
254
+ }
255
+ return writer;
256
+ },
257
+ decode(input, length) {
258
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
259
+ let end = length === undefined ? reader.len : reader.pos + length;
260
+ const message = createBaseDataDynamic();
261
+ while (reader.pos < end) {
262
+ const tag = reader.uint32();
263
+ switch (tag >>> 3) {
264
+ case 1: {
265
+ if (tag !== 10) {
266
+ break;
267
+ }
268
+ message.items.push(DataDynamicItem.decode(reader, reader.uint32()));
269
+ continue;
270
+ }
271
+ }
272
+ if ((tag & 7) === 4 || tag === 0) {
273
+ break;
274
+ }
275
+ reader.skip(tag & 7);
276
+ }
277
+ return message;
278
+ },
279
+ fromJSON(object) {
280
+ return {
281
+ items: globalThis.Array.isArray(object?.items)
282
+ ? object.items.map((e) => DataDynamicItem.fromJSON(e))
283
+ : [],
284
+ };
285
+ },
286
+ toJSON(message) {
287
+ const obj = {};
288
+ if (message.items?.length) {
289
+ obj.items = message.items.map((e) => DataDynamicItem.toJSON(e));
290
+ }
291
+ return obj;
292
+ },
293
+ create(base) {
294
+ return DataDynamic.fromPartial(base ?? {});
295
+ },
296
+ fromPartial(object) {
297
+ const message = createBaseDataDynamic();
298
+ message.items =
299
+ object.items?.map((e) => DataDynamicItem.fromPartial(e)) || [];
51
300
  return message;
52
301
  },
53
302
  };
54
- var tsProtoGlobalThis = (() => {
55
- if (typeof globalThis !== "undefined") {
56
- return globalThis;
57
- }
58
- if (typeof self !== "undefined") {
59
- return self;
60
- }
61
- if (typeof window !== "undefined") {
62
- return window;
63
- }
64
- if (typeof global !== "undefined") {
65
- return global;
66
- }
67
- throw "Unable to locate global object";
68
- })();
69
303
  function bytesFromBase64(b64) {
70
- if (tsProtoGlobalThis.Buffer) {
71
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
304
+ if (globalThis.Buffer) {
305
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
72
306
  }
73
307
  else {
74
- const bin = tsProtoGlobalThis.atob(b64);
308
+ const bin = globalThis.atob(b64);
75
309
  const arr = new Uint8Array(bin.length);
76
310
  for (let i = 0; i < bin.length; ++i) {
77
311
  arr[i] = bin.charCodeAt(i);
@@ -80,21 +314,17 @@ function bytesFromBase64(b64) {
80
314
  }
81
315
  }
82
316
  function base64FromBytes(arr) {
83
- if (tsProtoGlobalThis.Buffer) {
84
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
317
+ if (globalThis.Buffer) {
318
+ return globalThis.Buffer.from(arr).toString("base64");
85
319
  }
86
320
  else {
87
321
  const bin = [];
88
322
  arr.forEach((byte) => {
89
- bin.push(String.fromCharCode(byte));
323
+ bin.push(globalThis.String.fromCharCode(byte));
90
324
  });
91
- return tsProtoGlobalThis.btoa(bin.join(""));
325
+ return globalThis.btoa(bin.join(""));
92
326
  }
93
327
  }
94
- if (_m0.util.Long !== Long) {
95
- _m0.util.Long = Long;
96
- _m0.configure();
97
- }
98
328
  function isSet(value) {
99
329
  return value !== null && value !== undefined;
100
330
  }
@@ -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 { StakingParams } from "./params";
4
3
  export declare const protobufPackage = "coreum.customparams.v1";
5
4
  /** GenesisState defines the module's genesis state. */
6
5
  export interface GenesisState {
7
6
  /** staking_params defines staking parameters of the module. */
8
- stakingParams?: StakingParams;
7
+ stakingParams: StakingParams | undefined;
9
8
  }
10
- export declare const GenesisState: {
11
- encode(message: GenesisState, writer?: _m0.Writer): _m0.Writer;
12
- decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState;
13
- fromJSON(object: any): GenesisState;
14
- toJSON(message: GenesisState): unknown;
15
- create<I extends Exact<DeepPartial<GenesisState>, I>>(base?: I): GenesisState;
16
- fromPartial<I extends Exact<DeepPartial<GenesisState>, I>>(object: I): GenesisState;
17
- };
9
+ export declare const GenesisState: MessageFns<GenesisState>;
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,46 +1,56 @@
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/customparams/genesis.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 { StakingParams } from "./params";
5
9
  export const protobufPackage = "coreum.customparams.v1";
6
10
  function createBaseGenesisState() {
7
11
  return { stakingParams: undefined };
8
12
  }
9
13
  export const GenesisState = {
10
- encode(message, writer = _m0.Writer.create()) {
14
+ encode(message, writer = new BinaryWriter()) {
11
15
  if (message.stakingParams !== undefined) {
12
16
  StakingParams.encode(message.stakingParams, 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 = createBaseGenesisState();
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.stakingParams = StakingParams.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
  },
37
42
  fromJSON(object) {
38
- return { stakingParams: isSet(object.stakingParams) ? StakingParams.fromJSON(object.stakingParams) : undefined };
43
+ return {
44
+ stakingParams: isSet(object.stakingParams)
45
+ ? StakingParams.fromJSON(object.stakingParams)
46
+ : undefined,
47
+ };
39
48
  },
40
49
  toJSON(message) {
41
50
  const obj = {};
42
- message.stakingParams !== undefined &&
43
- (obj.stakingParams = message.stakingParams ? StakingParams.toJSON(message.stakingParams) : undefined);
51
+ if (message.stakingParams !== undefined) {
52
+ obj.stakingParams = StakingParams.toJSON(message.stakingParams);
53
+ }
44
54
  return obj;
45
55
  },
46
56
  create(base) {
@@ -48,16 +58,13 @@ export const GenesisState = {
48
58
  },
49
59
  fromPartial(object) {
50
60
  const message = createBaseGenesisState();
51
- message.stakingParams = (object.stakingParams !== undefined && object.stakingParams !== null)
52
- ? StakingParams.fromPartial(object.stakingParams)
53
- : undefined;
61
+ message.stakingParams =
62
+ object.stakingParams !== undefined && object.stakingParams !== null
63
+ ? StakingParams.fromPartial(object.stakingParams)
64
+ : undefined;
54
65
  return message;
55
66
  },
56
67
  };
57
- if (_m0.util.Long !== Long) {
58
- _m0.util.Long = Long;
59
- _m0.configure();
60
- }
61
68
  function isSet(value) {
62
69
  return value !== null && value !== undefined;
63
70
  }
@@ -1,21 +1,13 @@
1
- import Long from "long";
2
- import _m0 from "protobufjs/minimal";
1
+ import { BinaryReader, BinaryWriter } from "cosmjs-types/binary";
3
2
  export declare const protobufPackage = "coreum.customparams.v1";
4
3
  /** StakingParams defines the set of additional staking params for the staking module wrapper. */
5
4
  export interface StakingParams {
6
5
  /** min_self_delegation is the validators global self declared minimum for delegation. */
7
6
  minSelfDelegation: string;
8
7
  }
9
- export declare const StakingParams: {
10
- encode(message: StakingParams, writer?: _m0.Writer): _m0.Writer;
11
- decode(input: _m0.Reader | Uint8Array, length?: number): StakingParams;
12
- fromJSON(object: any): StakingParams;
13
- toJSON(message: StakingParams): unknown;
14
- create<I extends Exact<DeepPartial<StakingParams>, I>>(base?: I): StakingParams;
15
- fromPartial<I extends Exact<DeepPartial<StakingParams>, I>>(object: I): StakingParams;
16
- };
8
+ export declare const StakingParams: MessageFns<StakingParams>;
17
9
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
18
- 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 {} ? {
10
+ 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 {} ? {
19
11
  [K in keyof T]?: DeepPartial<T[K]>;
20
12
  } : Partial<T>;
21
13
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -24,4 +16,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
24
16
  } & {
25
17
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
26
18
  };
19
+ export interface MessageFns<T> {
20
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
21
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
22
+ fromJSON(object: any): T;
23
+ toJSON(message: T): unknown;
24
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
25
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
26
+ }
27
27
  export {};
@@ -1,44 +1,55 @@
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/customparams/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
  export const protobufPackage = "coreum.customparams.v1";
5
9
  function createBaseStakingParams() {
6
10
  return { minSelfDelegation: "" };
7
11
  }
8
12
  export const StakingParams = {
9
- encode(message, writer = _m0.Writer.create()) {
13
+ encode(message, writer = new BinaryWriter()) {
10
14
  if (message.minSelfDelegation !== "") {
11
15
  writer.uint32(10).string(message.minSelfDelegation);
12
16
  }
13
17
  return writer;
14
18
  },
15
19
  decode(input, length) {
16
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
20
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
17
21
  let end = length === undefined ? reader.len : reader.pos + length;
18
22
  const message = createBaseStakingParams();
19
23
  while (reader.pos < end) {
20
24
  const tag = reader.uint32();
21
25
  switch (tag >>> 3) {
22
- case 1:
23
- if (tag != 10) {
26
+ case 1: {
27
+ if (tag !== 10) {
24
28
  break;
25
29
  }
26
30
  message.minSelfDelegation = reader.string();
27
31
  continue;
32
+ }
28
33
  }
29
- if ((tag & 7) == 4 || tag == 0) {
34
+ if ((tag & 7) === 4 || tag === 0) {
30
35
  break;
31
36
  }
32
- reader.skipType(tag & 7);
37
+ reader.skip(tag & 7);
33
38
  }
34
39
  return message;
35
40
  },
36
41
  fromJSON(object) {
37
- return { minSelfDelegation: isSet(object.minSelfDelegation) ? String(object.minSelfDelegation) : "" };
42
+ return {
43
+ minSelfDelegation: isSet(object.minSelfDelegation)
44
+ ? globalThis.String(object.minSelfDelegation)
45
+ : "",
46
+ };
38
47
  },
39
48
  toJSON(message) {
40
49
  const obj = {};
41
- message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation);
50
+ if (message.minSelfDelegation !== "") {
51
+ obj.minSelfDelegation = message.minSelfDelegation;
52
+ }
42
53
  return obj;
43
54
  },
44
55
  create(base) {
@@ -50,10 +61,6 @@ export const StakingParams = {
50
61
  return message;
51
62
  },
52
63
  };
53
- if (_m0.util.Long !== Long) {
54
- _m0.util.Long = Long;
55
- _m0.configure();
56
- }
57
64
  function isSet(value) {
58
65
  return value !== null && value !== undefined;
59
66
  }