@meshsdk/core 1.9.0-beta.95 → 1.9.0-beta.97

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.
package/dist/index.cjs CHANGED
@@ -36,13 +36,13 @@ __export(index_exports, {
36
36
  WithdrawalBlueprint: () => WithdrawalBlueprint,
37
37
  applyCborEncoding: () => applyCborEncoding,
38
38
  applyParamsToScript: () => applyParamsToScript2,
39
- checkSignature: () => import_core_cst.checkSignature,
39
+ checkSignature: () => import_core_cst2.checkSignature,
40
40
  core: () => core,
41
41
  cst: () => cst,
42
42
  deserializeAddress: () => deserializeAddress,
43
43
  deserializeDatum: () => deserializeDatum,
44
44
  deserializePoolId: () => deserializePoolId,
45
- generateNonce: () => import_core_cst.generateNonce,
45
+ generateNonce: () => import_core_cst2.generateNonce,
46
46
  resolveDataHash: () => resolveDataHash,
47
47
  resolveNativeScriptAddress: () => resolveNativeScriptAddress,
48
48
  resolveNativeScriptHash: () => resolveNativeScriptHash,
@@ -64,7 +64,7 @@ __export(index_exports, {
64
64
  serializePlutusScript: () => serializePlutusScript,
65
65
  serializePoolId: () => serializePoolId,
66
66
  serializeRewardAddress: () => serializeRewardAddress,
67
- signData: () => import_core_cst.signData
67
+ signData: () => import_core_cst2.signData
68
68
  });
69
69
  module.exports = __toCommonJS(index_exports);
70
70
 
@@ -100,9 +100,13 @@ var resolveScriptRef = (script) => core.resolveScriptRef(script);
100
100
  var resolvePoolId = (hash) => core.resolvePoolId(hash);
101
101
 
102
102
  // src/utils/deserializer.ts
103
+ var import_core_cst = require("@meshsdk/core-cst");
103
104
  var deserializeAddress = (bech32) => core.deserializeBech32Address(bech32);
104
105
  var deserializeDatum = (datumCbor) => core.parseDatumCbor(datumCbor);
105
- var deserializePoolId = (poolId) => core.resolveEd25519KeyHash(poolId);
106
+ var deserializePoolId = (poolId) => {
107
+ const cardanoPoolId = (0, import_core_cst.PoolId)(poolId);
108
+ return import_core_cst.PoolId.toKeyHash(cardanoPoolId).toString();
109
+ };
106
110
 
107
111
  // src/utils/serializer.ts
108
112
  var serializeNativeScript = (script, stakeCredentialHash, networkId = 0, isScriptStakeCredential = false) => {
@@ -280,7 +284,7 @@ var cst = __toESM(require("@meshsdk/core-cst"), 1);
280
284
  __reExport(index_exports, require("@meshsdk/provider"), module.exports);
281
285
  __reExport(index_exports, require("@meshsdk/transaction"), module.exports);
282
286
  __reExport(index_exports, require("@meshsdk/wallet"), module.exports);
283
- var import_core_cst = require("@meshsdk/core-cst");
287
+ var import_core_cst2 = require("@meshsdk/core-cst");
284
288
  // Annotate the CommonJS export names for ESM import in node:
285
289
  0 && (module.exports = {
286
290
  MintingBlueprint,
package/dist/index.d.cts CHANGED
@@ -41,20 +41,20 @@ declare const resolvePrivateKey: (words: string[]) => string;
41
41
  * @param txHex The transaction hex
42
42
  * @returns The transaction hash
43
43
  */
44
- declare const resolveTxHash: (txHex: string) => any;
44
+ declare const resolveTxHash: (txHex: string) => string;
45
45
  /**
46
46
  * Hash Cardano data
47
47
  * @param rawData Cardano data in Mesh, JSON or CBOR type
48
48
  * @param type The data type, either Mesh, JSON or CBOR
49
49
  * @returns Cardano data hash
50
50
  */
51
- declare const resolveDataHash: (rawData: BuilderData["content"], type?: PlutusDataType) => any;
51
+ declare const resolveDataHash: (rawData: BuilderData["content"], type?: PlutusDataType) => string;
52
52
  /**
53
53
  * Hash Cardano native script
54
54
  * @param script Cardano native script in Mesh NativeScript type
55
55
  * @returns Cardano native script hash
56
56
  */
57
- declare const resolveNativeScriptHash: (script: NativeScript) => any;
57
+ declare const resolveNativeScriptHash: (script: NativeScript) => string;
58
58
  /**
59
59
  * Converting script cbor hex to script hash
60
60
  * @param scriptCode The script cbor hex
@@ -67,27 +67,27 @@ declare const resolveScriptHash: (scriptCode: string, version?: LanguageVersion)
67
67
  * @param bech32 The bech32 address
68
68
  * @returns The Ed25519 key hash
69
69
  */
70
- declare const resolveRewardAddress: (bech32: string) => any;
70
+ declare const resolveRewardAddress: (bech32: string) => string;
71
71
  /**
72
72
  * Resolve the stake key hash from bech32 address
73
73
  * @param bech32 The bech32 address, either in addrxxx or stakexxx
74
74
  * @returns The stake key hash
75
75
  */
76
- declare const resolveStakeKeyHash: (bech32: string) => any;
76
+ declare const resolveStakeKeyHash: (bech32: string) => string;
77
77
  /**
78
78
  *
79
79
  * @param scriptHash
80
80
  * @returns
81
81
  */
82
- declare const resolveScriptHashDRepId: (scriptHash: string) => any;
82
+ declare const resolveScriptHashDRepId: (scriptHash: string) => string;
83
83
  /**
84
84
  * Deprecated - use `serializePlutusScript` instead
85
85
  */
86
- declare const resolvePlutusScriptAddress: (script: PlutusScript, networkId?: number) => any;
86
+ declare const resolvePlutusScriptAddress: (script: PlutusScript, networkId?: number) => string;
87
87
  /**
88
88
  * Deprecated - use `serializeNativeScript` instead
89
89
  */
90
- declare const resolveNativeScriptAddress: (script: NativeScript, networkId?: number) => any;
90
+ declare const resolveNativeScriptAddress: (script: NativeScript, networkId?: number) => string;
91
91
  /**
92
92
  * Deprecated - use `serializeNativeScript` instead
93
93
  */
@@ -105,11 +105,11 @@ declare const resolvePlutusScriptHash: (bech32: string) => string;
105
105
  *
106
106
  * If you need this, please import @meshsdk/core-csl or @meshsdk/core-cst instead
107
107
  */
108
- declare const resolveScriptRef: (script: NativeScript | PlutusScript) => any;
108
+ declare const resolveScriptRef: (script: NativeScript | PlutusScript) => string;
109
109
  /**
110
110
  * Deprecated - use `serializePoolId` instead
111
111
  */
112
- declare const resolvePoolId: (hash: string) => any;
112
+ declare const resolvePoolId: (hash: string) => string;
113
113
 
114
114
  /**
115
115
  * Deserialize bech32 address into payment and staking parts, with visibility of whether they are script or key hash
@@ -169,7 +169,7 @@ declare const serializeAddressObj: (address: PubKeyAddress | ScriptAddress, netw
169
169
  * @param hash The pool hash
170
170
  * @returns The pool id
171
171
  */
172
- declare const serializePoolId: (hash: string) => any;
172
+ declare const serializePoolId: (hash: string) => string;
173
173
  /**
174
174
  * Serialize a script hash or key hash into bech32 reward address
175
175
  * @param hash The script hash or key hash
package/dist/index.d.ts CHANGED
@@ -41,20 +41,20 @@ declare const resolvePrivateKey: (words: string[]) => string;
41
41
  * @param txHex The transaction hex
42
42
  * @returns The transaction hash
43
43
  */
44
- declare const resolveTxHash: (txHex: string) => any;
44
+ declare const resolveTxHash: (txHex: string) => string;
45
45
  /**
46
46
  * Hash Cardano data
47
47
  * @param rawData Cardano data in Mesh, JSON or CBOR type
48
48
  * @param type The data type, either Mesh, JSON or CBOR
49
49
  * @returns Cardano data hash
50
50
  */
51
- declare const resolveDataHash: (rawData: BuilderData["content"], type?: PlutusDataType) => any;
51
+ declare const resolveDataHash: (rawData: BuilderData["content"], type?: PlutusDataType) => string;
52
52
  /**
53
53
  * Hash Cardano native script
54
54
  * @param script Cardano native script in Mesh NativeScript type
55
55
  * @returns Cardano native script hash
56
56
  */
57
- declare const resolveNativeScriptHash: (script: NativeScript) => any;
57
+ declare const resolveNativeScriptHash: (script: NativeScript) => string;
58
58
  /**
59
59
  * Converting script cbor hex to script hash
60
60
  * @param scriptCode The script cbor hex
@@ -67,27 +67,27 @@ declare const resolveScriptHash: (scriptCode: string, version?: LanguageVersion)
67
67
  * @param bech32 The bech32 address
68
68
  * @returns The Ed25519 key hash
69
69
  */
70
- declare const resolveRewardAddress: (bech32: string) => any;
70
+ declare const resolveRewardAddress: (bech32: string) => string;
71
71
  /**
72
72
  * Resolve the stake key hash from bech32 address
73
73
  * @param bech32 The bech32 address, either in addrxxx or stakexxx
74
74
  * @returns The stake key hash
75
75
  */
76
- declare const resolveStakeKeyHash: (bech32: string) => any;
76
+ declare const resolveStakeKeyHash: (bech32: string) => string;
77
77
  /**
78
78
  *
79
79
  * @param scriptHash
80
80
  * @returns
81
81
  */
82
- declare const resolveScriptHashDRepId: (scriptHash: string) => any;
82
+ declare const resolveScriptHashDRepId: (scriptHash: string) => string;
83
83
  /**
84
84
  * Deprecated - use `serializePlutusScript` instead
85
85
  */
86
- declare const resolvePlutusScriptAddress: (script: PlutusScript, networkId?: number) => any;
86
+ declare const resolvePlutusScriptAddress: (script: PlutusScript, networkId?: number) => string;
87
87
  /**
88
88
  * Deprecated - use `serializeNativeScript` instead
89
89
  */
90
- declare const resolveNativeScriptAddress: (script: NativeScript, networkId?: number) => any;
90
+ declare const resolveNativeScriptAddress: (script: NativeScript, networkId?: number) => string;
91
91
  /**
92
92
  * Deprecated - use `serializeNativeScript` instead
93
93
  */
@@ -105,11 +105,11 @@ declare const resolvePlutusScriptHash: (bech32: string) => string;
105
105
  *
106
106
  * If you need this, please import @meshsdk/core-csl or @meshsdk/core-cst instead
107
107
  */
108
- declare const resolveScriptRef: (script: NativeScript | PlutusScript) => any;
108
+ declare const resolveScriptRef: (script: NativeScript | PlutusScript) => string;
109
109
  /**
110
110
  * Deprecated - use `serializePoolId` instead
111
111
  */
112
- declare const resolvePoolId: (hash: string) => any;
112
+ declare const resolvePoolId: (hash: string) => string;
113
113
 
114
114
  /**
115
115
  * Deserialize bech32 address into payment and staking parts, with visibility of whether they are script or key hash
@@ -169,7 +169,7 @@ declare const serializeAddressObj: (address: PubKeyAddress | ScriptAddress, netw
169
169
  * @param hash The pool hash
170
170
  * @returns The pool id
171
171
  */
172
- declare const serializePoolId: (hash: string) => any;
172
+ declare const serializePoolId: (hash: string) => string;
173
173
  /**
174
174
  * Serialize a script hash or key hash into bech32 reward address
175
175
  * @param hash The script hash or key hash
package/dist/index.js CHANGED
@@ -30,9 +30,13 @@ var resolveScriptRef = (script) => core.resolveScriptRef(script);
30
30
  var resolvePoolId = (hash) => core.resolvePoolId(hash);
31
31
 
32
32
  // src/utils/deserializer.ts
33
+ import { PoolId } from "@meshsdk/core-cst";
33
34
  var deserializeAddress = (bech32) => core.deserializeBech32Address(bech32);
34
35
  var deserializeDatum = (datumCbor) => core.parseDatumCbor(datumCbor);
35
- var deserializePoolId = (poolId) => core.resolveEd25519KeyHash(poolId);
36
+ var deserializePoolId = (poolId) => {
37
+ const cardanoPoolId = PoolId(poolId);
38
+ return PoolId.toKeyHash(cardanoPoolId).toString();
39
+ };
36
40
 
37
41
  // src/utils/serializer.ts
38
42
  var serializeNativeScript = (script, stakeCredentialHash, networkId = 0, isScriptStakeCredential = false) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshsdk/core",
3
- "version": "1.9.0-beta.95",
3
+ "version": "1.9.0-beta.97",
4
4
  "description": "Mesh SDK Core - https://meshjs.dev/",
5
5
  "main": "./dist/index.cjs",
6
6
  "browser": "./dist/index.js",
@@ -33,11 +33,11 @@
33
33
  "typescript": "^5.3.3"
34
34
  },
35
35
  "dependencies": {
36
- "@meshsdk/common": "1.9.0-beta.95",
37
- "@meshsdk/core-cst": "1.9.0-beta.95",
38
- "@meshsdk/provider": "1.9.0-beta.95",
39
- "@meshsdk/transaction": "1.9.0-beta.95",
40
- "@meshsdk/wallet": "1.9.0-beta.95",
36
+ "@meshsdk/common": "1.9.0-beta.97",
37
+ "@meshsdk/core-cst": "1.9.0-beta.97",
38
+ "@meshsdk/provider": "1.9.0-beta.97",
39
+ "@meshsdk/transaction": "1.9.0-beta.97",
40
+ "@meshsdk/wallet": "1.9.0-beta.97",
41
41
  "libsodium-wrappers-sumo": "0.7.15"
42
42
  },
43
43
  "prettier": "@meshsdk/configs/prettier",