@meshsdk/transaction 1.7.5 → 1.7.6

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
@@ -905,6 +905,22 @@ var MeshTxBuilderCore = class {
905
905
  });
906
906
  return this;
907
907
  };
908
+ /**
909
+ * Update DRep certificate, and adds it to the transaction
910
+ * @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
911
+ * @param anchor The DRep anchor, consists of a URL and a hash of the doc
912
+ */
913
+ drepUpdateCertificate = (drepId, anchor) => {
914
+ this.meshTxBuilderBody.certificates.push({
915
+ type: "BasicCertificate",
916
+ certType: {
917
+ type: "DRepUpdate",
918
+ drepId,
919
+ anchor
920
+ }
921
+ });
922
+ return this;
923
+ };
908
924
  /**
909
925
  * Dregister DRep certificate, and adds it to the transaction
910
926
  * @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
package/dist/index.d.cts CHANGED
@@ -336,6 +336,12 @@ declare class MeshTxBuilderCore {
336
336
  * @returns The MeshTxBuilder instance
337
337
  */
338
338
  drepDeregistrationCertificate: (drepId: string, coin?: string) => this;
339
+ /**
340
+ * Update DRep certificate, and adds it to the transaction
341
+ * @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
342
+ * @param anchor The DRep anchor, consists of a URL and a hash of the doc
343
+ */
344
+ drepUpdateCertificate: (drepId: string, anchor?: Anchor) => this;
339
345
  /**
340
346
  * Dregister DRep certificate, and adds it to the transaction
341
347
  * @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
package/dist/index.d.ts CHANGED
@@ -336,6 +336,12 @@ declare class MeshTxBuilderCore {
336
336
  * @returns The MeshTxBuilder instance
337
337
  */
338
338
  drepDeregistrationCertificate: (drepId: string, coin?: string) => this;
339
+ /**
340
+ * Update DRep certificate, and adds it to the transaction
341
+ * @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
342
+ * @param anchor The DRep anchor, consists of a URL and a hash of the doc
343
+ */
344
+ drepUpdateCertificate: (drepId: string, anchor?: Anchor) => this;
339
345
  /**
340
346
  * Dregister DRep certificate, and adds it to the transaction
341
347
  * @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
package/dist/index.js CHANGED
@@ -872,6 +872,22 @@ var MeshTxBuilderCore = class {
872
872
  });
873
873
  return this;
874
874
  };
875
+ /**
876
+ * Update DRep certificate, and adds it to the transaction
877
+ * @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
878
+ * @param anchor The DRep anchor, consists of a URL and a hash of the doc
879
+ */
880
+ drepUpdateCertificate = (drepId, anchor) => {
881
+ this.meshTxBuilderBody.certificates.push({
882
+ type: "BasicCertificate",
883
+ certType: {
884
+ type: "DRepUpdate",
885
+ drepId,
886
+ anchor
887
+ }
888
+ });
889
+ return this;
890
+ };
875
891
  /**
876
892
  * Dregister DRep certificate, and adds it to the transaction
877
893
  * @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@meshsdk/transaction",
3
- "version": "1.7.5",
3
+ "version": "1.7.6",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
+ "browser": "./dist/index.js",
6
7
  "module": "./dist/index.js",
7
8
  "types": "./dist/index.d.ts",
8
9
  "type": "module",
@@ -34,9 +35,9 @@
34
35
  "typescript": "^5.3.3"
35
36
  },
36
37
  "dependencies": {
37
- "@meshsdk/common": "1.7.5",
38
- "@meshsdk/core-csl": "1.7.5",
39
- "@meshsdk/core-cst": "1.7.5",
38
+ "@meshsdk/common": "1.7.6",
39
+ "@meshsdk/core-csl": "1.7.6",
40
+ "@meshsdk/core-cst": "1.7.6",
40
41
  "json-bigint": "^1.0.0"
41
42
  },
42
43
  "prettier": "@meshsdk/configs/prettier",