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,27 +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 {
13
- Data?: Uint8Array;
14
- } & {
15
- Data?: Uint8Array;
16
- } & { [K in Exclude<keyof I, "Data">]: never; }>(base?: I): DataBytes;
17
- fromPartial<I_1 extends {
18
- Data?: Uint8Array;
19
- } & {
20
- Data?: Uint8Array;
21
- } & { [K_1 in Exclude<keyof I_1, "Data">]: never; }>(object: I_1): DataBytes;
22
- };
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>;
23
34
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
24
- 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 {} ? {
25
36
  [K in keyof T]?: DeepPartial<T[K]>;
26
37
  } : Partial<T>;
27
38
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -30,4 +41,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
30
41
  } & {
31
42
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
32
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
+ }
33
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,42 +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 {
16
- stakingParams?: {
17
- minSelfDelegation?: string;
18
- };
19
- } & {
20
- stakingParams?: {
21
- minSelfDelegation?: string;
22
- } & {
23
- minSelfDelegation?: string;
24
- } & { [K in Exclude<keyof I["stakingParams"], "minSelfDelegation">]: never; };
25
- } & { [K_1 in Exclude<keyof I, "stakingParams">]: never; }>(base?: I): GenesisState;
26
- fromPartial<I_1 extends {
27
- stakingParams?: {
28
- minSelfDelegation?: string;
29
- };
30
- } & {
31
- stakingParams?: {
32
- minSelfDelegation?: string;
33
- } & {
34
- minSelfDelegation?: string;
35
- } & { [K_2 in Exclude<keyof I_1["stakingParams"], "minSelfDelegation">]: never; };
36
- } & { [K_3 in Exclude<keyof I_1, "stakingParams">]: never; }>(object: I_1): GenesisState;
37
- };
9
+ export declare const GenesisState: MessageFns<GenesisState>;
38
10
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
39
- 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 {} ? {
40
12
  [K in keyof T]?: DeepPartial<T[K]>;
41
13
  } : Partial<T>;
42
14
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -45,4 +17,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
45
17
  } & {
46
18
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
47
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
+ }
48
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,29 +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 {
15
- minSelfDelegation?: string;
16
- } & {
17
- minSelfDelegation?: string;
18
- } & { [K in Exclude<keyof I, "minSelfDelegation">]: never; }>(base?: I): StakingParams;
19
- fromPartial<I_1 extends {
20
- minSelfDelegation?: string;
21
- } & {
22
- minSelfDelegation?: string;
23
- } & { [K_1 in Exclude<keyof I_1, "minSelfDelegation">]: never; }>(object: I_1): StakingParams;
24
- };
8
+ export declare const StakingParams: MessageFns<StakingParams>;
25
9
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
26
- 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 {} ? {
27
11
  [K in keyof T]?: DeepPartial<T[K]>;
28
12
  } : Partial<T>;
29
13
  type KeysOfUnion<T> = T extends T ? keyof T : never;
@@ -32,4 +16,12 @@ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
32
16
  } & {
33
17
  [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
34
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
+ }
35
27
  export {};