@meshsdk/transaction 1.7.4 → 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 +33 -0
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +33 -0
- package/package.json +5 -4
package/dist/index.cjs
CHANGED
|
@@ -905,6 +905,39 @@ 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
|
+
};
|
|
924
|
+
/**
|
|
925
|
+
* Dregister DRep certificate, and adds it to the transaction
|
|
926
|
+
* @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
|
|
927
|
+
* @param rewardAddress The bech32 reward address (i.e. start with `stake_xxxxx`)
|
|
928
|
+
* @returns The MeshTxBuilder instance
|
|
929
|
+
*/
|
|
930
|
+
voteDelegationCertificate = (drep, rewardAddress) => {
|
|
931
|
+
this.meshTxBuilderBody.certificates.push({
|
|
932
|
+
type: "BasicCertificate",
|
|
933
|
+
certType: {
|
|
934
|
+
type: "VoteDelegation",
|
|
935
|
+
drep,
|
|
936
|
+
stakeKeyAddress: rewardAddress
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
return this;
|
|
940
|
+
};
|
|
908
941
|
/**
|
|
909
942
|
* Adds a script witness to the certificate
|
|
910
943
|
* @param scriptCbor The CborHex of the script
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Protocol, MintItem, TxIn, Withdrawal, PubKeyTxIn, RefTxIn, MeshTxBuilderBody, Asset, BuilderData, LanguageVersion, PoolParams, Anchor, UTxO, UtxoSelectionStrategy, Network, Redeemer, Action, IFetcher, ISubmitter, IEvaluator, IMeshTxSerializer, ScriptSource, SimpleScriptSourceInfo, NativeScript, IInitiator, Recipient, Token, PlutusScript, Budget, Data, Mint } from '@meshsdk/common';
|
|
1
|
+
import { Protocol, MintItem, TxIn, Withdrawal, PubKeyTxIn, RefTxIn, MeshTxBuilderBody, Asset, BuilderData, LanguageVersion, PoolParams, Anchor, DRep, UTxO, UtxoSelectionStrategy, Network, Redeemer, Action, IFetcher, ISubmitter, IEvaluator, IMeshTxSerializer, ScriptSource, SimpleScriptSourceInfo, NativeScript, IInitiator, Recipient, Token, PlutusScript, Budget, Data, Mint } from '@meshsdk/common';
|
|
2
2
|
|
|
3
3
|
declare class MeshTxBuilderCore {
|
|
4
4
|
txEvaluationMultiplier: number;
|
|
@@ -336,6 +336,19 @@ 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;
|
|
345
|
+
/**
|
|
346
|
+
* Dregister DRep certificate, and adds it to the transaction
|
|
347
|
+
* @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
|
|
348
|
+
* @param rewardAddress The bech32 reward address (i.e. start with `stake_xxxxx`)
|
|
349
|
+
* @returns The MeshTxBuilder instance
|
|
350
|
+
*/
|
|
351
|
+
voteDelegationCertificate: (drep: DRep, rewardAddress: string) => this;
|
|
339
352
|
/**
|
|
340
353
|
* Adds a script witness to the certificate
|
|
341
354
|
* @param scriptCbor The CborHex of the script
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Protocol, MintItem, TxIn, Withdrawal, PubKeyTxIn, RefTxIn, MeshTxBuilderBody, Asset, BuilderData, LanguageVersion, PoolParams, Anchor, UTxO, UtxoSelectionStrategy, Network, Redeemer, Action, IFetcher, ISubmitter, IEvaluator, IMeshTxSerializer, ScriptSource, SimpleScriptSourceInfo, NativeScript, IInitiator, Recipient, Token, PlutusScript, Budget, Data, Mint } from '@meshsdk/common';
|
|
1
|
+
import { Protocol, MintItem, TxIn, Withdrawal, PubKeyTxIn, RefTxIn, MeshTxBuilderBody, Asset, BuilderData, LanguageVersion, PoolParams, Anchor, DRep, UTxO, UtxoSelectionStrategy, Network, Redeemer, Action, IFetcher, ISubmitter, IEvaluator, IMeshTxSerializer, ScriptSource, SimpleScriptSourceInfo, NativeScript, IInitiator, Recipient, Token, PlutusScript, Budget, Data, Mint } from '@meshsdk/common';
|
|
2
2
|
|
|
3
3
|
declare class MeshTxBuilderCore {
|
|
4
4
|
txEvaluationMultiplier: number;
|
|
@@ -336,6 +336,19 @@ 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;
|
|
345
|
+
/**
|
|
346
|
+
* Dregister DRep certificate, and adds it to the transaction
|
|
347
|
+
* @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
|
|
348
|
+
* @param rewardAddress The bech32 reward address (i.e. start with `stake_xxxxx`)
|
|
349
|
+
* @returns The MeshTxBuilder instance
|
|
350
|
+
*/
|
|
351
|
+
voteDelegationCertificate: (drep: DRep, rewardAddress: string) => this;
|
|
339
352
|
/**
|
|
340
353
|
* Adds a script witness to the certificate
|
|
341
354
|
* @param scriptCbor The CborHex of the script
|
package/dist/index.js
CHANGED
|
@@ -872,6 +872,39 @@ 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
|
+
};
|
|
891
|
+
/**
|
|
892
|
+
* Dregister DRep certificate, and adds it to the transaction
|
|
893
|
+
* @param drepId The bech32 drep id (i.e. starts with `drep1xxxxx`)
|
|
894
|
+
* @param rewardAddress The bech32 reward address (i.e. start with `stake_xxxxx`)
|
|
895
|
+
* @returns The MeshTxBuilder instance
|
|
896
|
+
*/
|
|
897
|
+
voteDelegationCertificate = (drep, rewardAddress) => {
|
|
898
|
+
this.meshTxBuilderBody.certificates.push({
|
|
899
|
+
type: "BasicCertificate",
|
|
900
|
+
certType: {
|
|
901
|
+
type: "VoteDelegation",
|
|
902
|
+
drep,
|
|
903
|
+
stakeKeyAddress: rewardAddress
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
return this;
|
|
907
|
+
};
|
|
875
908
|
/**
|
|
876
909
|
* Adds a script witness to the certificate
|
|
877
910
|
* @param scriptCbor The CborHex of the script
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshsdk/transaction",
|
|
3
|
-
"version": "1.7.
|
|
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.
|
|
38
|
-
"@meshsdk/core-csl": "1.7.
|
|
39
|
-
"@meshsdk/core-cst": "1.7.
|
|
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",
|