@meshsdk/transaction 1.9.0-beta.74 → 1.9.0-beta.76

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
@@ -3345,6 +3345,19 @@ var MeshTxBuilderCore = class {
3345
3345
  }
3346
3346
  return this;
3347
3347
  };
3348
+ /**
3349
+ * Add metadata script to the transaction
3350
+ * @param scriptCbor The script in CBOR format
3351
+ * @param scriptType The type of the script, either "Native", "PlutusV1", "PlutusV2" or "PlutusV3"
3352
+ * @returns The MeshTxBuilder instance
3353
+ */
3354
+ metadataScript = (scriptCbor, scriptType) => {
3355
+ this.meshTxBuilderBody.scriptMetadata.push({
3356
+ scriptCbor,
3357
+ scriptType
3358
+ });
3359
+ return this;
3360
+ };
3348
3361
  /**
3349
3362
  * Sign the transaction with the private key
3350
3363
  * @param skeyHex The private key in cborHex (with or without 5820 prefix, i.e. the format when generated from cardano-cli)
package/dist/index.d.cts CHANGED
@@ -497,6 +497,13 @@ declare class MeshTxBuilderCore {
497
497
  * @returns The MeshTxBuilder instance
498
498
  */
499
499
  metadataValue: (label: number | bigint | string, metadata: Metadatum | object) => this;
500
+ /**
501
+ * Add metadata script to the transaction
502
+ * @param scriptCbor The script in CBOR format
503
+ * @param scriptType The type of the script, either "Native", "PlutusV1", "PlutusV2" or "PlutusV3"
504
+ * @returns The MeshTxBuilder instance
505
+ */
506
+ metadataScript: (scriptCbor: string, scriptType: "Native" | "PlutusV1" | "PlutusV2" | "PlutusV3") => this;
500
507
  /**
501
508
  * Sign the transaction with the private key
502
509
  * @param skeyHex The private key in cborHex (with or without 5820 prefix, i.e. the format when generated from cardano-cli)
package/dist/index.d.ts CHANGED
@@ -497,6 +497,13 @@ declare class MeshTxBuilderCore {
497
497
  * @returns The MeshTxBuilder instance
498
498
  */
499
499
  metadataValue: (label: number | bigint | string, metadata: Metadatum | object) => this;
500
+ /**
501
+ * Add metadata script to the transaction
502
+ * @param scriptCbor The script in CBOR format
503
+ * @param scriptType The type of the script, either "Native", "PlutusV1", "PlutusV2" or "PlutusV3"
504
+ * @returns The MeshTxBuilder instance
505
+ */
506
+ metadataScript: (scriptCbor: string, scriptType: "Native" | "PlutusV1" | "PlutusV2" | "PlutusV3") => this;
500
507
  /**
501
508
  * Sign the transaction with the private key
502
509
  * @param skeyHex The private key in cborHex (with or without 5820 prefix, i.e. the format when generated from cardano-cli)
package/dist/index.js CHANGED
@@ -3319,6 +3319,19 @@ var MeshTxBuilderCore = class {
3319
3319
  }
3320
3320
  return this;
3321
3321
  };
3322
+ /**
3323
+ * Add metadata script to the transaction
3324
+ * @param scriptCbor The script in CBOR format
3325
+ * @param scriptType The type of the script, either "Native", "PlutusV1", "PlutusV2" or "PlutusV3"
3326
+ * @returns The MeshTxBuilder instance
3327
+ */
3328
+ metadataScript = (scriptCbor, scriptType) => {
3329
+ this.meshTxBuilderBody.scriptMetadata.push({
3330
+ scriptCbor,
3331
+ scriptType
3332
+ });
3333
+ return this;
3334
+ };
3322
3335
  /**
3323
3336
  * Sign the transaction with the private key
3324
3337
  * @param skeyHex The private key in cborHex (with or without 5820 prefix, i.e. the format when generated from cardano-cli)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshsdk/transaction",
3
- "version": "1.9.0-beta.74",
3
+ "version": "1.9.0-beta.76",
4
4
  "description": "Transactions - https://meshjs.dev/apis/transaction",
5
5
  "main": "./dist/index.cjs",
6
6
  "browser": "./dist/index.js",
@@ -35,8 +35,8 @@
35
35
  "typescript": "^5.3.3"
36
36
  },
37
37
  "dependencies": {
38
- "@meshsdk/common": "1.9.0-beta.74",
39
- "@meshsdk/core-cst": "1.9.0-beta.74",
38
+ "@meshsdk/common": "1.9.0-beta.76",
39
+ "@meshsdk/core-cst": "1.9.0-beta.76",
40
40
  "@cardano-sdk/core": "^0.45.5",
41
41
  "@cardano-sdk/util": "^0.15.5",
42
42
  "@cardano-sdk/input-selection": "^0.13.33",