coreum-js 2.8.20 → 2.8.22

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 (45) hide show
  1. package/dist/main/coreum/asset/nft/v1/query.d.ts +2 -2
  2. package/dist/main/coreum/nft/v1beta1/genesis.d.ts +6 -6
  3. package/dist/main/coreum/nft/v1beta1/query.d.ts +8 -8
  4. package/dist/main/cosmos/authz/v1beta1/genesis.d.ts +2 -2
  5. package/dist/main/cosmos/authz/v1beta1/query.d.ts +6 -6
  6. package/dist/main/cosmos/feegrant/v1beta1/genesis.d.ts +2 -2
  7. package/dist/main/cosmos/feegrant/v1beta1/query.d.ts +6 -6
  8. package/dist/main/cosmos/gov/v1beta1/genesis.d.ts +2 -2
  9. package/dist/main/cosmos/gov/v1beta1/query.d.ts +4 -4
  10. package/dist/main/cosmos/staking/v1beta1/genesis.d.ts +2 -2
  11. package/dist/main/cosmos/staking/v1beta1/query.d.ts +10 -10
  12. package/dist/main/cosmos/vesting/v1beta1/vesting.d.ts +10 -10
  13. package/dist/main/google/index.d.ts +1 -0
  14. package/dist/main/google/index.js +17 -0
  15. package/dist/main/google/protobuf/any.d.ts +2 -0
  16. package/dist/main/google/protobuf/any.js +6 -2
  17. package/dist/main/utils/convertStringToAny.d.ts +1 -0
  18. package/dist/main/utils/convertStringToAny.js +15 -0
  19. package/dist/main/utils/index.d.ts +1 -0
  20. package/dist/main/utils/index.js +1 -0
  21. package/dist/main/wasm/v1/genesis.d.ts +4 -4
  22. package/dist/main/wasm/v1/query.d.ts +2 -2
  23. package/dist/module/coreum/asset/nft/v1/query.d.ts +2 -2
  24. package/dist/module/coreum/nft/v1beta1/genesis.d.ts +6 -6
  25. package/dist/module/coreum/nft/v1beta1/query.d.ts +8 -8
  26. package/dist/module/cosmos/authz/v1beta1/genesis.d.ts +2 -2
  27. package/dist/module/cosmos/authz/v1beta1/query.d.ts +6 -6
  28. package/dist/module/cosmos/feegrant/v1beta1/genesis.d.ts +2 -2
  29. package/dist/module/cosmos/feegrant/v1beta1/query.d.ts +6 -6
  30. package/dist/module/cosmos/gov/v1beta1/genesis.d.ts +2 -2
  31. package/dist/module/cosmos/gov/v1beta1/query.d.ts +4 -4
  32. package/dist/module/cosmos/staking/v1beta1/genesis.d.ts +2 -2
  33. package/dist/module/cosmos/staking/v1beta1/query.d.ts +10 -10
  34. package/dist/module/cosmos/vesting/v1beta1/vesting.d.ts +10 -10
  35. package/dist/module/google/index.d.ts +1 -0
  36. package/dist/module/google/index.js +1 -0
  37. package/dist/module/google/protobuf/any.d.ts +2 -0
  38. package/dist/module/google/protobuf/any.js +5 -3
  39. package/dist/module/utils/convertStringToAny.d.ts +1 -0
  40. package/dist/module/utils/convertStringToAny.js +11 -0
  41. package/dist/module/utils/index.d.ts +1 -0
  42. package/dist/module/utils/index.js +1 -0
  43. package/dist/module/wasm/v1/genesis.d.ts +4 -4
  44. package/dist/module/wasm/v1/query.d.ts +2 -2
  45. package/package.json +2 -1
@@ -101,7 +101,7 @@ export declare const BaseVestingAccount: {
101
101
  } & {
102
102
  typeUrl?: string;
103
103
  value?: Uint8Array;
104
- } & { [K in Exclude<keyof I["baseAccount"]["pubKey"], keyof import("../../../google/protobuf/any").Any>]: never; };
104
+ } & { [K in Exclude<keyof I["baseAccount"]["pubKey"], keyof import("../../../google").Any>]: never; };
105
105
  accountNumber?: number;
106
106
  sequence?: number;
107
107
  } & { [K_1 in Exclude<keyof I["baseAccount"], keyof BaseAccount>]: never; };
@@ -186,7 +186,7 @@ export declare const BaseVestingAccount: {
186
186
  } & {
187
187
  typeUrl?: string;
188
188
  value?: Uint8Array;
189
- } & { [K_9 in Exclude<keyof I_1["baseAccount"]["pubKey"], keyof import("../../../google/protobuf/any").Any>]: never; };
189
+ } & { [K_9 in Exclude<keyof I_1["baseAccount"]["pubKey"], keyof import("../../../google").Any>]: never; };
190
190
  accountNumber?: number;
191
191
  sequence?: number;
192
192
  } & { [K_10 in Exclude<keyof I_1["baseAccount"], keyof BaseAccount>]: never; };
@@ -304,7 +304,7 @@ export declare const ContinuousVestingAccount: {
304
304
  } & {
305
305
  typeUrl?: string;
306
306
  value?: Uint8Array;
307
- } & { [K in Exclude<keyof I["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google/protobuf/any").Any>]: never; };
307
+ } & { [K in Exclude<keyof I["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google").Any>]: never; };
308
308
  accountNumber?: number;
309
309
  sequence?: number;
310
310
  } & { [K_1 in Exclude<keyof I["baseVestingAccount"]["baseAccount"], keyof BaseAccount>]: never; };
@@ -418,7 +418,7 @@ export declare const ContinuousVestingAccount: {
418
418
  } & {
419
419
  typeUrl?: string;
420
420
  value?: Uint8Array;
421
- } & { [K_10 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google/protobuf/any").Any>]: never; };
421
+ } & { [K_10 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google").Any>]: never; };
422
422
  accountNumber?: number;
423
423
  sequence?: number;
424
424
  } & { [K_11 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"], keyof BaseAccount>]: never; };
@@ -537,7 +537,7 @@ export declare const DelayedVestingAccount: {
537
537
  } & {
538
538
  typeUrl?: string;
539
539
  value?: Uint8Array;
540
- } & { [K in Exclude<keyof I["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google/protobuf/any").Any>]: never; };
540
+ } & { [K in Exclude<keyof I["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google").Any>]: never; };
541
541
  accountNumber?: number;
542
542
  sequence?: number;
543
543
  } & { [K_1 in Exclude<keyof I["baseVestingAccount"]["baseAccount"], keyof BaseAccount>]: never; };
@@ -649,7 +649,7 @@ export declare const DelayedVestingAccount: {
649
649
  } & {
650
650
  typeUrl?: string;
651
651
  value?: Uint8Array;
652
- } & { [K_10 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google/protobuf/any").Any>]: never; };
652
+ } & { [K_10 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google").Any>]: never; };
653
653
  accountNumber?: number;
654
654
  sequence?: number;
655
655
  } & { [K_11 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"], keyof BaseAccount>]: never; };
@@ -825,7 +825,7 @@ export declare const PeriodicVestingAccount: {
825
825
  } & {
826
826
  typeUrl?: string;
827
827
  value?: Uint8Array;
828
- } & { [K in Exclude<keyof I["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google/protobuf/any").Any>]: never; };
828
+ } & { [K in Exclude<keyof I["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google").Any>]: never; };
829
829
  accountNumber?: number;
830
830
  sequence?: number;
831
831
  } & { [K_1 in Exclude<keyof I["baseVestingAccount"]["baseAccount"], keyof BaseAccount>]: never; };
@@ -980,7 +980,7 @@ export declare const PeriodicVestingAccount: {
980
980
  } & {
981
981
  typeUrl?: string;
982
982
  value?: Uint8Array;
983
- } & { [K_14 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google/protobuf/any").Any>]: never; };
983
+ } & { [K_14 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google").Any>]: never; };
984
984
  accountNumber?: number;
985
985
  sequence?: number;
986
986
  } & { [K_15 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"], keyof BaseAccount>]: never; };
@@ -1133,7 +1133,7 @@ export declare const PermanentLockedAccount: {
1133
1133
  } & {
1134
1134
  typeUrl?: string;
1135
1135
  value?: Uint8Array;
1136
- } & { [K in Exclude<keyof I["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google/protobuf/any").Any>]: never; };
1136
+ } & { [K in Exclude<keyof I["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google").Any>]: never; };
1137
1137
  accountNumber?: number;
1138
1138
  sequence?: number;
1139
1139
  } & { [K_1 in Exclude<keyof I["baseVestingAccount"]["baseAccount"], keyof BaseAccount>]: never; };
@@ -1245,7 +1245,7 @@ export declare const PermanentLockedAccount: {
1245
1245
  } & {
1246
1246
  typeUrl?: string;
1247
1247
  value?: Uint8Array;
1248
- } & { [K_10 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google/protobuf/any").Any>]: never; };
1248
+ } & { [K_10 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"]["pubKey"], keyof import("../../../google").Any>]: never; };
1249
1249
  accountNumber?: number;
1250
1250
  sequence?: number;
1251
1251
  } & { [K_11 in Exclude<keyof I_1["baseVestingAccount"]["baseAccount"], keyof BaseAccount>]: never; };
@@ -0,0 +1 @@
1
+ export * from "./protobuf/any";
@@ -0,0 +1 @@
1
+ export * from "./protobuf/any";
@@ -135,6 +135,8 @@ export declare const Any: {
135
135
  value?: Uint8Array;
136
136
  } & { [K_1 in Exclude<keyof I_1, keyof Any>]: never; }>(object: I_1): Any;
137
137
  };
138
+ export declare function bytesFromBase64(b64: string): Uint8Array;
139
+ export declare function base64FromBytes(arr: Uint8Array): string;
138
140
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
139
141
  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 {} ? {
140
142
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -45,7 +45,9 @@ export const Any = {
45
45
  fromJSON(object) {
46
46
  return {
47
47
  typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "",
48
- value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(),
48
+ value: isSet(object.value)
49
+ ? bytesFromBase64(object.value)
50
+ : new Uint8Array(),
49
51
  };
50
52
  },
51
53
  toJSON(message) {
@@ -80,7 +82,7 @@ var tsProtoGlobalThis = (() => {
80
82
  }
81
83
  throw "Unable to locate global object";
82
84
  })();
83
- function bytesFromBase64(b64) {
85
+ export function bytesFromBase64(b64) {
84
86
  if (tsProtoGlobalThis.Buffer) {
85
87
  return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
86
88
  }
@@ -93,7 +95,7 @@ function bytesFromBase64(b64) {
93
95
  return arr;
94
96
  }
95
97
  }
96
- function base64FromBytes(arr) {
98
+ export function base64FromBytes(arr) {
97
99
  if (tsProtoGlobalThis.Buffer) {
98
100
  return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
99
101
  }
@@ -0,0 +1 @@
1
+ export declare const convertStringToAny: (message: string) => Any;
@@ -0,0 +1,11 @@
1
+ import { Any } from 'google-protobuf/google/protobuf/any_pb';
2
+ import { DataBytes } from '../coreum/asset/nft/v1/types';
3
+ export const convertStringToAny = (message) => {
4
+ const formattedValueOfData = btoa(message);
5
+ const dataBytesMessage = DataBytes.fromJSON({ Data: formattedValueOfData });
6
+ const dataBytesBinary = DataBytes.encode(dataBytesMessage).finish();
7
+ const formattedAnyDataValue = new Any();
8
+ formattedAnyDataValue.typeUrl = '/coreum.asset.nft.v1.DataBytes';
9
+ formattedAnyDataValue.value = dataBytesBinary;
10
+ return formattedValueOfData;
11
+ };
@@ -2,3 +2,4 @@ export * from "./wallet";
2
2
  export * from "./calculations";
3
3
  export * from "./nft";
4
4
  export * from "./ft";
5
+ export * from './convertStringToAny';
@@ -2,3 +2,4 @@ export * from "./wallet";
2
2
  export * from "./calculations";
3
3
  export * from "./nft";
4
4
  export * from "./ft";
5
+ export * from './convertStringToAny';
@@ -271,7 +271,7 @@ export declare const GenesisState: {
271
271
  } & {
272
272
  typeUrl?: string;
273
273
  value?: Uint8Array;
274
- } & { [K_9 in Exclude<keyof I["contracts"][number]["contractInfo"]["extension"], keyof import("../../google/protobuf/any").Any>]: never; };
274
+ } & { [K_9 in Exclude<keyof I["contracts"][number]["contractInfo"]["extension"], keyof import("../../google").Any>]: never; };
275
275
  } & { [K_10 in Exclude<keyof I["contracts"][number]["contractInfo"], keyof ContractInfo>]: never; };
276
276
  contractState?: {
277
277
  key?: Uint8Array;
@@ -605,7 +605,7 @@ export declare const GenesisState: {
605
605
  } & {
606
606
  typeUrl?: string;
607
607
  value?: Uint8Array;
608
- } & { [K_30 in Exclude<keyof I_1["contracts"][number]["contractInfo"]["extension"], keyof import("../../google/protobuf/any").Any>]: never; };
608
+ } & { [K_30 in Exclude<keyof I_1["contracts"][number]["contractInfo"]["extension"], keyof import("../../google").Any>]: never; };
609
609
  } & { [K_31 in Exclude<keyof I_1["contracts"][number]["contractInfo"], keyof ContractInfo>]: never; };
610
610
  contractState?: {
611
611
  key?: Uint8Array;
@@ -856,7 +856,7 @@ export declare const Contract: {
856
856
  } & {
857
857
  typeUrl?: string;
858
858
  value?: Uint8Array;
859
- } & { [K_1 in Exclude<keyof I["contractInfo"]["extension"], keyof import("../../google/protobuf/any").Any>]: never; };
859
+ } & { [K_1 in Exclude<keyof I["contractInfo"]["extension"], keyof import("../../google").Any>]: never; };
860
860
  } & { [K_2 in Exclude<keyof I["contractInfo"], keyof ContractInfo>]: never; };
861
861
  contractState?: {
862
862
  key?: Uint8Array;
@@ -973,7 +973,7 @@ export declare const Contract: {
973
973
  } & {
974
974
  typeUrl?: string;
975
975
  value?: Uint8Array;
976
- } & { [K_10 in Exclude<keyof I_1["contractInfo"]["extension"], keyof import("../../google/protobuf/any").Any>]: never; };
976
+ } & { [K_10 in Exclude<keyof I_1["contractInfo"]["extension"], keyof import("../../google").Any>]: never; };
977
977
  } & { [K_11 in Exclude<keyof I_1["contractInfo"], keyof ContractInfo>]: never; };
978
978
  contractState?: {
979
979
  key?: Uint8Array;
@@ -259,7 +259,7 @@ export declare const QueryContractInfoResponse: {
259
259
  } & {
260
260
  typeUrl?: string;
261
261
  value?: Uint8Array;
262
- } & { [K_1 in Exclude<keyof I["contractInfo"]["extension"], keyof import("../../google/protobuf/any").Any>]: never; };
262
+ } & { [K_1 in Exclude<keyof I["contractInfo"]["extension"], keyof import("../../google").Any>]: never; };
263
263
  } & { [K_2 in Exclude<keyof I["contractInfo"], keyof ContractInfo>]: never; };
264
264
  } & { [K_3 in Exclude<keyof I, keyof QueryContractInfoResponse>]: never; }>(base?: I): QueryContractInfoResponse;
265
265
  fromPartial<I_1 extends {
@@ -314,7 +314,7 @@ export declare const QueryContractInfoResponse: {
314
314
  } & {
315
315
  typeUrl?: string;
316
316
  value?: Uint8Array;
317
- } & { [K_5 in Exclude<keyof I_1["contractInfo"]["extension"], keyof import("../../google/protobuf/any").Any>]: never; };
317
+ } & { [K_5 in Exclude<keyof I_1["contractInfo"]["extension"], keyof import("../../google").Any>]: never; };
318
318
  } & { [K_6 in Exclude<keyof I_1["contractInfo"], keyof ContractInfo>]: never; };
319
319
  } & { [K_7 in Exclude<keyof I_1, keyof QueryContractInfoResponse>]: never; }>(object: I_1): QueryContractInfoResponse;
320
320
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coreum-js",
3
- "version": "2.8.20",
3
+ "version": "2.8.22",
4
4
  "description": "JS/TS Library to to easily make use of the Coreum Blockchain",
5
5
  "main": "dist/main/index.js",
6
6
  "module": "dist/module/index.js",
@@ -33,6 +33,7 @@
33
33
  "bech32": "^2.0.0",
34
34
  "bignumber.js": "^9.1.1",
35
35
  "eventemitter3": "^5.0.0",
36
+ "google-protobuf": "^3.21.2",
36
37
  "ws": "^8.13.0"
37
38
  },
38
39
  "devDependencies": {