@meshsdk/core 1.9.0-beta.32 → 1.9.0-beta.35

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
@@ -70,10 +70,10 @@ module.exports = __toCommonJS(index_exports);
70
70
 
71
71
  // src/core.ts
72
72
  var core = __toESM(require("@meshsdk/core-cst"), 1);
73
- var applyParamsToScript2 = core.applyParamsToScript;
74
- var applyCborEncoding = (script) => {
73
+ var applyParamsToScript2 = (rawScript, params, type) => core.applyParamsToScript(rawScript, params, type);
74
+ var applyCborEncoding = (rawScript) => {
75
75
  return Buffer.from(
76
- core.applyEncoding(Buffer.from(script, "hex"), "SingleCBOR")
76
+ core.applyEncoding(Buffer.from(rawScript, "hex"), "SingleCBOR")
77
77
  ).toString("hex");
78
78
  };
79
79
 
package/dist/index.d.cts CHANGED
@@ -1,5 +1,4 @@
1
- import * as _meshsdk_common from '@meshsdk/common';
2
- import { BuilderData, PlutusDataType, NativeScript, LanguageVersion, PlutusScript, DeserializedAddress, PubKeyAddress, ScriptAddress, IMintingBlueprint, Data, ISpendingBlueprint, IWithdrawalBlueprint } from '@meshsdk/common';
1
+ import { Data, PlutusDataType, BuilderData, NativeScript, LanguageVersion, PlutusScript, DeserializedAddress, PubKeyAddress, ScriptAddress, IMintingBlueprint, ISpendingBlueprint, IWithdrawalBlueprint } from '@meshsdk/common';
3
2
  export * from '@meshsdk/common';
4
3
  import * as coreCst from '@meshsdk/core-cst';
5
4
  export { coreCst as core };
@@ -9,8 +8,24 @@ export * from '@meshsdk/provider';
9
8
  export * from '@meshsdk/transaction';
10
9
  export * from '@meshsdk/wallet';
11
10
 
12
- declare const applyParamsToScript: (rawScript: string, params: object[] | _meshsdk_common.Data[], type?: _meshsdk_common.PlutusDataType) => string;
13
- declare const applyCborEncoding: (script: string) => string;
11
+ /**
12
+ * Apply parameters to a given CIP57 blueprint compiledCode,
13
+ * making it ready for use in transactions
14
+ *
15
+ * @param rawScript - The raw script CborHex from blueprint.
16
+ * @param params - The parameters to apply, in an array.
17
+ * @param type - The type of the parameters, default to be Mesh's Data type. It could also be in JSON and raw CBOR.
18
+ * @returns The double-cbor encoded script CborHex with the parameters applied.
19
+ */
20
+ declare const applyParamsToScript: (rawScript: string, params: object[] | Data[], type?: PlutusDataType) => string;
21
+ /**
22
+ * Apply Cbor encoding to rawScript from CIP57 blueprint compiledCode,
23
+ * making it ready for use in transactions
24
+ *
25
+ * @param rawScript - The raw script CborHex from blueprint.
26
+ * @returns The double-cbor encoded script CborHex.
27
+ */
28
+ declare const applyCborEncoding: (rawScript: string) => string;
14
29
 
15
30
  /**
16
31
  * Resolve the private key from mnemonic words
@@ -166,7 +181,7 @@ declare const serializeRewardAddress: (hash: string, isScriptHash?: boolean, net
166
181
  /**
167
182
  * Serialize the data from Mesh or JSON format into CBOR hex
168
183
  * @param data The data in Mesh or JSON format
169
- * @param type The data type
184
+ * @param type The data type. Default to be Mesh data type
170
185
  * @returns The CBOR hex string
171
186
  */
172
187
  declare const serializeData: (rawData: BuilderData["content"], type?: Omit<PlutusDataType, "CBOR">) => string;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import * as _meshsdk_common from '@meshsdk/common';
2
- import { BuilderData, PlutusDataType, NativeScript, LanguageVersion, PlutusScript, DeserializedAddress, PubKeyAddress, ScriptAddress, IMintingBlueprint, Data, ISpendingBlueprint, IWithdrawalBlueprint } from '@meshsdk/common';
1
+ import { Data, PlutusDataType, BuilderData, NativeScript, LanguageVersion, PlutusScript, DeserializedAddress, PubKeyAddress, ScriptAddress, IMintingBlueprint, ISpendingBlueprint, IWithdrawalBlueprint } from '@meshsdk/common';
3
2
  export * from '@meshsdk/common';
4
3
  import * as coreCst from '@meshsdk/core-cst';
5
4
  export { coreCst as core };
@@ -9,8 +8,24 @@ export * from '@meshsdk/provider';
9
8
  export * from '@meshsdk/transaction';
10
9
  export * from '@meshsdk/wallet';
11
10
 
12
- declare const applyParamsToScript: (rawScript: string, params: object[] | _meshsdk_common.Data[], type?: _meshsdk_common.PlutusDataType) => string;
13
- declare const applyCborEncoding: (script: string) => string;
11
+ /**
12
+ * Apply parameters to a given CIP57 blueprint compiledCode,
13
+ * making it ready for use in transactions
14
+ *
15
+ * @param rawScript - The raw script CborHex from blueprint.
16
+ * @param params - The parameters to apply, in an array.
17
+ * @param type - The type of the parameters, default to be Mesh's Data type. It could also be in JSON and raw CBOR.
18
+ * @returns The double-cbor encoded script CborHex with the parameters applied.
19
+ */
20
+ declare const applyParamsToScript: (rawScript: string, params: object[] | Data[], type?: PlutusDataType) => string;
21
+ /**
22
+ * Apply Cbor encoding to rawScript from CIP57 blueprint compiledCode,
23
+ * making it ready for use in transactions
24
+ *
25
+ * @param rawScript - The raw script CborHex from blueprint.
26
+ * @returns The double-cbor encoded script CborHex.
27
+ */
28
+ declare const applyCborEncoding: (rawScript: string) => string;
14
29
 
15
30
  /**
16
31
  * Resolve the private key from mnemonic words
@@ -166,7 +181,7 @@ declare const serializeRewardAddress: (hash: string, isScriptHash?: boolean, net
166
181
  /**
167
182
  * Serialize the data from Mesh or JSON format into CBOR hex
168
183
  * @param data The data in Mesh or JSON format
169
- * @param type The data type
184
+ * @param type The data type. Default to be Mesh data type
170
185
  * @returns The CBOR hex string
171
186
  */
172
187
  declare const serializeData: (rawData: BuilderData["content"], type?: Omit<PlutusDataType, "CBOR">) => string;
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  // src/core.ts
2
2
  import * as core from "@meshsdk/core-cst";
3
- var applyParamsToScript2 = core.applyParamsToScript;
4
- var applyCborEncoding = (script) => {
3
+ var applyParamsToScript2 = (rawScript, params, type) => core.applyParamsToScript(rawScript, params, type);
4
+ var applyCborEncoding = (rawScript) => {
5
5
  return Buffer.from(
6
- core.applyEncoding(Buffer.from(script, "hex"), "SingleCBOR")
6
+ core.applyEncoding(Buffer.from(rawScript, "hex"), "SingleCBOR")
7
7
  ).toString("hex");
8
8
  };
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshsdk/core",
3
- "version": "1.9.0-beta.32",
3
+ "version": "1.9.0-beta.35",
4
4
  "description": "Mesh SDK Core - https://meshjs.dev/",
5
5
  "main": "./dist/index.cjs",
6
6
  "browser": "./dist/index.js",
@@ -33,12 +33,12 @@
33
33
  "typescript": "^5.3.3"
34
34
  },
35
35
  "dependencies": {
36
- "@meshsdk/common": "1.9.0-beta.32",
37
- "@meshsdk/core-cst": "1.9.0-beta.32",
38
- "@meshsdk/provider": "1.9.0-beta.32",
39
- "@meshsdk/react": "1.9.0-beta.32",
40
- "@meshsdk/transaction": "1.9.0-beta.32",
41
- "@meshsdk/wallet": "1.9.0-beta.32"
36
+ "@meshsdk/common": "1.9.0-beta.35",
37
+ "@meshsdk/core-cst": "1.9.0-beta.35",
38
+ "@meshsdk/provider": "1.9.0-beta.35",
39
+ "@meshsdk/react": "1.9.0-beta.35",
40
+ "@meshsdk/transaction": "1.9.0-beta.35",
41
+ "@meshsdk/wallet": "1.9.0-beta.35"
42
42
  },
43
43
  "prettier": "@meshsdk/configs/prettier",
44
44
  "publishConfig": {