@meshsdk/transaction 1.9.0-beta.31 → 1.9.0-beta.32
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 +77 -15
- package/dist/index.d.cts +80 -10
- package/dist/index.d.ts +80 -10
- package/dist/index.js +77 -15
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -38751,7 +38751,8 @@ var Transaction2 = class {
|
|
|
38751
38751
|
return new import_core_cst5.Transaction(tx.body(), tx.witnessSet(), txAuxData).toCbor().toString();
|
|
38752
38752
|
}
|
|
38753
38753
|
/**
|
|
38754
|
-
*
|
|
38754
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38755
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38755
38756
|
*
|
|
38756
38757
|
* @param recipient The recipient of the output.
|
|
38757
38758
|
* @param assets The assets to send. Provide string for lovelace and Asset[] for tokens and/or lovelace.
|
|
@@ -38783,7 +38784,9 @@ var Transaction2 = class {
|
|
|
38783
38784
|
return this;
|
|
38784
38785
|
}
|
|
38785
38786
|
/**
|
|
38786
|
-
*
|
|
38787
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38788
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38789
|
+
*
|
|
38787
38790
|
* Use sendAssets instead:
|
|
38788
38791
|
* ```ts
|
|
38789
38792
|
* this.sendAssets(recipient, lovelace);
|
|
@@ -38800,7 +38803,9 @@ var Transaction2 = class {
|
|
|
38800
38803
|
return this.sendAssets(recipient, lovelace);
|
|
38801
38804
|
}
|
|
38802
38805
|
/**
|
|
38803
|
-
*
|
|
38806
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38807
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38808
|
+
*
|
|
38804
38809
|
* Please use sendAssets with helper function to obtain token unit instead:
|
|
38805
38810
|
* ```ts
|
|
38806
38811
|
* const assets = [{ unit: SUPPORTED_TOKENS.GIMBAL, quantity: "100" }]
|
|
@@ -38820,8 +38825,8 @@ var Transaction2 = class {
|
|
|
38820
38825
|
return this.sendAssets(recipient, assets);
|
|
38821
38826
|
}
|
|
38822
38827
|
/**
|
|
38823
|
-
*
|
|
38824
|
-
*
|
|
38828
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38829
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38825
38830
|
*
|
|
38826
38831
|
* ```ts
|
|
38827
38832
|
* const assets = value.output.amount;
|
|
@@ -38838,7 +38843,8 @@ var Transaction2 = class {
|
|
|
38838
38843
|
return this.sendAssets(recipient, assets);
|
|
38839
38844
|
}
|
|
38840
38845
|
/**
|
|
38841
|
-
*
|
|
38846
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38847
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38842
38848
|
*
|
|
38843
38849
|
* @param {UTxO[]} inputs The inputs to set.
|
|
38844
38850
|
* @returns {Transaction} The transaction.
|
|
@@ -38856,7 +38862,8 @@ var Transaction2 = class {
|
|
|
38856
38862
|
return this;
|
|
38857
38863
|
}
|
|
38858
38864
|
/**
|
|
38859
|
-
*
|
|
38865
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38866
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38860
38867
|
*
|
|
38861
38868
|
* @param {UTxO[]} inputs The reference inputs to set.
|
|
38862
38869
|
* @returns {Transaction} The transaction.
|
|
@@ -38871,6 +38878,9 @@ var Transaction2 = class {
|
|
|
38871
38878
|
return this;
|
|
38872
38879
|
}
|
|
38873
38880
|
/**
|
|
38881
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38882
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38883
|
+
*
|
|
38874
38884
|
* Sets the native script for the transaction.
|
|
38875
38885
|
* @param {NativeScript} script The native script to spend from.
|
|
38876
38886
|
* @param {UTxO} utxo The UTxO attached to the script.
|
|
@@ -38888,6 +38898,10 @@ var Transaction2 = class {
|
|
|
38888
38898
|
).txInScript(scriptCbor);
|
|
38889
38899
|
return this;
|
|
38890
38900
|
}
|
|
38901
|
+
/**
|
|
38902
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38903
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38904
|
+
*/
|
|
38891
38905
|
// TODO: nuke this probably as the input type is too confusing
|
|
38892
38906
|
redeemValue(options) {
|
|
38893
38907
|
const { value, script, datum, redeemer } = options;
|
|
@@ -38933,7 +38947,10 @@ var Transaction2 = class {
|
|
|
38933
38947
|
}
|
|
38934
38948
|
return this;
|
|
38935
38949
|
}
|
|
38936
|
-
|
|
38950
|
+
/**
|
|
38951
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38952
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38953
|
+
*/
|
|
38937
38954
|
mintAsset(forgeScript, mint, redeemer) {
|
|
38938
38955
|
const assetQuantity = mint.assetQuantity;
|
|
38939
38956
|
let assetNameHex = (0, import_common2.stringToHex)(mint.assetName);
|
|
@@ -39045,8 +39062,10 @@ var Transaction2 = class {
|
|
|
39045
39062
|
}
|
|
39046
39063
|
return this;
|
|
39047
39064
|
}
|
|
39048
|
-
|
|
39049
|
-
|
|
39065
|
+
/**
|
|
39066
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39067
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39068
|
+
*/
|
|
39050
39069
|
burnAsset(forgeScript, asset, redeemer) {
|
|
39051
39070
|
const assetQuantity = "-" + asset.quantity;
|
|
39052
39071
|
const mint = {
|
|
@@ -39061,6 +39080,9 @@ var Transaction2 = class {
|
|
|
39061
39080
|
return this;
|
|
39062
39081
|
}
|
|
39063
39082
|
/**
|
|
39083
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39084
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39085
|
+
*
|
|
39064
39086
|
* Sets the change address for the transaction.
|
|
39065
39087
|
*
|
|
39066
39088
|
* @param {string} changeAddress The change address.
|
|
@@ -39071,6 +39093,9 @@ var Transaction2 = class {
|
|
|
39071
39093
|
return this;
|
|
39072
39094
|
}
|
|
39073
39095
|
/**
|
|
39096
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39097
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39098
|
+
*
|
|
39074
39099
|
* Sets the collateral for the transaction.
|
|
39075
39100
|
*
|
|
39076
39101
|
* @param {UTxO[]} collateral - Set the UTxO for collateral.
|
|
@@ -39088,6 +39113,9 @@ var Transaction2 = class {
|
|
|
39088
39113
|
return this;
|
|
39089
39114
|
}
|
|
39090
39115
|
/**
|
|
39116
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39117
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39118
|
+
*
|
|
39091
39119
|
* Sets the network to use, this is mainly to know the cost models to be used to calculate script integrity hash
|
|
39092
39120
|
* @param network The specific network this transaction is being built for ("testnet" | "preview" | "preprod" | "mainnet")
|
|
39093
39121
|
* @returns The Transaction object.
|
|
@@ -39097,6 +39125,9 @@ var Transaction2 = class {
|
|
|
39097
39125
|
return this;
|
|
39098
39126
|
};
|
|
39099
39127
|
/**
|
|
39128
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39129
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39130
|
+
*
|
|
39100
39131
|
* Sets the required signers for the transaction.
|
|
39101
39132
|
*
|
|
39102
39133
|
* @param {string[]} addresses The addresses of the required signers.
|
|
@@ -39110,7 +39141,10 @@ var Transaction2 = class {
|
|
|
39110
39141
|
return this;
|
|
39111
39142
|
}
|
|
39112
39143
|
/**
|
|
39113
|
-
*
|
|
39144
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39145
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39146
|
+
*
|
|
39147
|
+
* Set the time to live for the transaction.
|
|
39114
39148
|
*
|
|
39115
39149
|
* @param {string} slot The slot number to expire the transaction at.
|
|
39116
39150
|
* @returns {Transaction} The Transaction object.
|
|
@@ -39121,7 +39155,10 @@ var Transaction2 = class {
|
|
|
39121
39155
|
return this;
|
|
39122
39156
|
}
|
|
39123
39157
|
/**
|
|
39124
|
-
*
|
|
39158
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39159
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39160
|
+
*
|
|
39161
|
+
* Sets the start slot for the transaction.
|
|
39125
39162
|
*
|
|
39126
39163
|
* @param {string} slot The start slot for the transaction.
|
|
39127
39164
|
* @returns {Transaction} The Transaction object.
|
|
@@ -39132,7 +39169,10 @@ var Transaction2 = class {
|
|
|
39132
39169
|
return this;
|
|
39133
39170
|
}
|
|
39134
39171
|
/**
|
|
39135
|
-
*
|
|
39172
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39173
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39174
|
+
*
|
|
39175
|
+
* Add a JSON metadata entry to the transaction.
|
|
39136
39176
|
*
|
|
39137
39177
|
* @param {number} label The label to use for the metadata entry.
|
|
39138
39178
|
* @param {unknown} metadata The value to use for the metadata entry.
|
|
@@ -39143,10 +39183,18 @@ var Transaction2 = class {
|
|
|
39143
39183
|
this.txBuilder.metadataValue(label, metadata);
|
|
39144
39184
|
return this;
|
|
39145
39185
|
}
|
|
39186
|
+
/**
|
|
39187
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39188
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39189
|
+
*/
|
|
39146
39190
|
withdrawRewards(rewardAddress, lovelace) {
|
|
39147
39191
|
this.txBuilder.withdrawal(rewardAddress, lovelace);
|
|
39148
39192
|
return this;
|
|
39149
39193
|
}
|
|
39194
|
+
/**
|
|
39195
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39196
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39197
|
+
*/
|
|
39150
39198
|
delegateStake(rewardAddress, poolId) {
|
|
39151
39199
|
this.txBuilder.delegateStakeCertificate(
|
|
39152
39200
|
rewardAddress,
|
|
@@ -39154,20 +39202,34 @@ var Transaction2 = class {
|
|
|
39154
39202
|
);
|
|
39155
39203
|
return this;
|
|
39156
39204
|
}
|
|
39205
|
+
/**
|
|
39206
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39207
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39208
|
+
*/
|
|
39157
39209
|
deregisterStake(rewardAddress) {
|
|
39158
39210
|
this.txBuilder.deregisterStakeCertificate(rewardAddress);
|
|
39159
39211
|
return this;
|
|
39160
39212
|
}
|
|
39213
|
+
/**
|
|
39214
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39215
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39216
|
+
*/
|
|
39161
39217
|
registerStake(rewardAddress) {
|
|
39162
39218
|
this.txBuilder.registerStakeCertificate(rewardAddress);
|
|
39163
39219
|
return this;
|
|
39164
39220
|
}
|
|
39165
|
-
|
|
39221
|
+
/**
|
|
39222
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39223
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39224
|
+
*/
|
|
39166
39225
|
registerPool(params) {
|
|
39167
39226
|
this.txBuilder.registerPoolCertificate(params);
|
|
39168
39227
|
return this;
|
|
39169
39228
|
}
|
|
39170
|
-
|
|
39229
|
+
/**
|
|
39230
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39231
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39232
|
+
*/
|
|
39171
39233
|
retirePool(poolId, epochNo) {
|
|
39172
39234
|
this.txBuilder.retirePoolCertificate(poolId, epochNo);
|
|
39173
39235
|
return this;
|
package/dist/index.d.cts
CHANGED
|
@@ -656,6 +656,9 @@ declare class ForgeScript {
|
|
|
656
656
|
interface TransactionOptions extends MeshTxBuilderOptions {
|
|
657
657
|
initiator: IInitiator;
|
|
658
658
|
}
|
|
659
|
+
/**
|
|
660
|
+
* Deprecated - Use `MeshTxBuilder` instead
|
|
661
|
+
*/
|
|
659
662
|
declare class Transaction {
|
|
660
663
|
txBuilder: MeshTxBuilder;
|
|
661
664
|
initiator: IInitiator;
|
|
@@ -667,7 +670,8 @@ declare class Transaction {
|
|
|
667
670
|
static readMetadata(cborTx: string): string;
|
|
668
671
|
static writeMetadata(cborTx: string, cborTxMetadata: string): string;
|
|
669
672
|
/**
|
|
670
|
-
*
|
|
673
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
674
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
671
675
|
*
|
|
672
676
|
* @param recipient The recipient of the output.
|
|
673
677
|
* @param assets The assets to send. Provide string for lovelace and Asset[] for tokens and/or lovelace.
|
|
@@ -676,7 +680,9 @@ declare class Transaction {
|
|
|
676
680
|
*/
|
|
677
681
|
sendAssets(recipient: Recipient, assets: Asset[] | string): Transaction;
|
|
678
682
|
/**
|
|
679
|
-
*
|
|
683
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
684
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
685
|
+
*
|
|
680
686
|
* Use sendAssets instead:
|
|
681
687
|
* ```ts
|
|
682
688
|
* this.sendAssets(recipient, lovelace);
|
|
@@ -691,7 +697,9 @@ declare class Transaction {
|
|
|
691
697
|
*/
|
|
692
698
|
sendLovelace(recipient: Recipient, lovelace: string): Transaction;
|
|
693
699
|
/**
|
|
694
|
-
*
|
|
700
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
701
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
702
|
+
*
|
|
695
703
|
* Please use sendAssets with helper function to obtain token unit instead:
|
|
696
704
|
* ```ts
|
|
697
705
|
* const assets = [{ unit: SUPPORTED_TOKENS.GIMBAL, quantity: "100" }]
|
|
@@ -708,8 +716,8 @@ declare class Transaction {
|
|
|
708
716
|
*/
|
|
709
717
|
sendToken(recipient: Recipient, ticker: Token, amount: string): Transaction;
|
|
710
718
|
/**
|
|
711
|
-
*
|
|
712
|
-
*
|
|
719
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
720
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
713
721
|
*
|
|
714
722
|
* ```ts
|
|
715
723
|
* const assets = value.output.amount;
|
|
@@ -723,26 +731,35 @@ declare class Transaction {
|
|
|
723
731
|
*/
|
|
724
732
|
sendValue(recipient: Recipient, value: UTxO): Transaction;
|
|
725
733
|
/**
|
|
726
|
-
*
|
|
734
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
735
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
727
736
|
*
|
|
728
737
|
* @param {UTxO[]} inputs The inputs to set.
|
|
729
738
|
* @returns {Transaction} The transaction.
|
|
730
739
|
*/
|
|
731
740
|
setTxInputs(inputs: UTxO[]): Transaction;
|
|
732
741
|
/**
|
|
733
|
-
*
|
|
742
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
743
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
734
744
|
*
|
|
735
745
|
* @param {UTxO[]} inputs The reference inputs to set.
|
|
736
746
|
* @returns {Transaction} The transaction.
|
|
737
747
|
*/
|
|
738
748
|
setTxRefInputs(inputs: UTxO[]): Transaction;
|
|
739
749
|
/**
|
|
750
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
751
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
752
|
+
*
|
|
740
753
|
* Sets the native script for the transaction.
|
|
741
754
|
* @param {NativeScript} script The native script to spend from.
|
|
742
755
|
* @param {UTxO} utxo The UTxO attached to the script.
|
|
743
756
|
* @returns {Transaction} The Transaction object.
|
|
744
757
|
*/
|
|
745
758
|
setNativeScriptInput(script: NativeScript$1, utxo: UTxO): Transaction;
|
|
759
|
+
/**
|
|
760
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
761
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
762
|
+
*/
|
|
746
763
|
redeemValue(options: {
|
|
747
764
|
value: UTxO;
|
|
748
765
|
script: PlutusScript | UTxO;
|
|
@@ -751,13 +768,24 @@ declare class Transaction {
|
|
|
751
768
|
};
|
|
752
769
|
datum?: Data | UTxO;
|
|
753
770
|
}): Transaction;
|
|
771
|
+
/**
|
|
772
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
773
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
774
|
+
*/
|
|
754
775
|
mintAsset(forgeScript: string | PlutusScript | UTxO, mint: Mint, redeemer?: Pick<Action, "data"> & {
|
|
755
776
|
budget?: Budget;
|
|
756
777
|
}): Transaction;
|
|
778
|
+
/**
|
|
779
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
780
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
781
|
+
*/
|
|
757
782
|
burnAsset(forgeScript: string | PlutusScript | UTxO, asset: Asset, redeemer?: Pick<Action, "data"> & {
|
|
758
783
|
budget?: Budget;
|
|
759
784
|
}): Transaction;
|
|
760
785
|
/**
|
|
786
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
787
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
788
|
+
*
|
|
761
789
|
* Sets the change address for the transaction.
|
|
762
790
|
*
|
|
763
791
|
* @param {string} changeAddress The change address.
|
|
@@ -765,6 +793,9 @@ declare class Transaction {
|
|
|
765
793
|
*/
|
|
766
794
|
setChangeAddress(changeAddress: string): Transaction;
|
|
767
795
|
/**
|
|
796
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
797
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
798
|
+
*
|
|
768
799
|
* Sets the collateral for the transaction.
|
|
769
800
|
*
|
|
770
801
|
* @param {UTxO[]} collateral - Set the UTxO for collateral.
|
|
@@ -772,12 +803,18 @@ declare class Transaction {
|
|
|
772
803
|
*/
|
|
773
804
|
setCollateral(collateral: UTxO[]): Transaction;
|
|
774
805
|
/**
|
|
806
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
807
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
808
|
+
*
|
|
775
809
|
* Sets the network to use, this is mainly to know the cost models to be used to calculate script integrity hash
|
|
776
810
|
* @param network The specific network this transaction is being built for ("testnet" | "preview" | "preprod" | "mainnet")
|
|
777
811
|
* @returns The Transaction object.
|
|
778
812
|
*/
|
|
779
813
|
setNetwork: (network: Network) => this;
|
|
780
814
|
/**
|
|
815
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
816
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
817
|
+
*
|
|
781
818
|
* Sets the required signers for the transaction.
|
|
782
819
|
*
|
|
783
820
|
* @param {string[]} addresses The addresses of the required signers.
|
|
@@ -785,7 +822,10 @@ declare class Transaction {
|
|
|
785
822
|
*/
|
|
786
823
|
setRequiredSigners(addresses: string[]): Transaction;
|
|
787
824
|
/**
|
|
788
|
-
*
|
|
825
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
826
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
827
|
+
*
|
|
828
|
+
* Set the time to live for the transaction.
|
|
789
829
|
*
|
|
790
830
|
* @param {string} slot The slot number to expire the transaction at.
|
|
791
831
|
* @returns {Transaction} The Transaction object.
|
|
@@ -793,7 +833,10 @@ declare class Transaction {
|
|
|
793
833
|
*/
|
|
794
834
|
setTimeToExpire(slot: string): Transaction;
|
|
795
835
|
/**
|
|
796
|
-
*
|
|
836
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
837
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
838
|
+
*
|
|
839
|
+
* Sets the start slot for the transaction.
|
|
797
840
|
*
|
|
798
841
|
* @param {string} slot The start slot for the transaction.
|
|
799
842
|
* @returns {Transaction} The Transaction object.
|
|
@@ -801,7 +844,10 @@ declare class Transaction {
|
|
|
801
844
|
*/
|
|
802
845
|
setTimeToStart(slot: string): Transaction;
|
|
803
846
|
/**
|
|
804
|
-
*
|
|
847
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
848
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
849
|
+
*
|
|
850
|
+
* Add a JSON metadata entry to the transaction.
|
|
805
851
|
*
|
|
806
852
|
* @param {number} label The label to use for the metadata entry.
|
|
807
853
|
* @param {unknown} metadata The value to use for the metadata entry.
|
|
@@ -809,11 +855,35 @@ declare class Transaction {
|
|
|
809
855
|
* @see {@link https://meshjs.dev/apis/transaction#setMetadata}
|
|
810
856
|
*/
|
|
811
857
|
setMetadata(label: number, metadata: Metadatum | object): Transaction;
|
|
858
|
+
/**
|
|
859
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
860
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
861
|
+
*/
|
|
812
862
|
withdrawRewards(rewardAddress: string, lovelace: string): Transaction;
|
|
863
|
+
/**
|
|
864
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
865
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
866
|
+
*/
|
|
813
867
|
delegateStake(rewardAddress: string, poolId: string): Transaction;
|
|
868
|
+
/**
|
|
869
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
870
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
871
|
+
*/
|
|
814
872
|
deregisterStake(rewardAddress: string): Transaction;
|
|
873
|
+
/**
|
|
874
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
875
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
876
|
+
*/
|
|
815
877
|
registerStake(rewardAddress: string): Transaction;
|
|
878
|
+
/**
|
|
879
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
880
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
881
|
+
*/
|
|
816
882
|
registerPool(params: PoolParams): Transaction;
|
|
883
|
+
/**
|
|
884
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
885
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
886
|
+
*/
|
|
817
887
|
retirePool(poolId: string, epochNo: number): Transaction;
|
|
818
888
|
build(balanced?: Boolean): Promise<string>;
|
|
819
889
|
protected mintPlutusScript(script: PlutusScript): MeshTxBuilder;
|
package/dist/index.d.ts
CHANGED
|
@@ -656,6 +656,9 @@ declare class ForgeScript {
|
|
|
656
656
|
interface TransactionOptions extends MeshTxBuilderOptions {
|
|
657
657
|
initiator: IInitiator;
|
|
658
658
|
}
|
|
659
|
+
/**
|
|
660
|
+
* Deprecated - Use `MeshTxBuilder` instead
|
|
661
|
+
*/
|
|
659
662
|
declare class Transaction {
|
|
660
663
|
txBuilder: MeshTxBuilder;
|
|
661
664
|
initiator: IInitiator;
|
|
@@ -667,7 +670,8 @@ declare class Transaction {
|
|
|
667
670
|
static readMetadata(cborTx: string): string;
|
|
668
671
|
static writeMetadata(cborTx: string, cborTxMetadata: string): string;
|
|
669
672
|
/**
|
|
670
|
-
*
|
|
673
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
674
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
671
675
|
*
|
|
672
676
|
* @param recipient The recipient of the output.
|
|
673
677
|
* @param assets The assets to send. Provide string for lovelace and Asset[] for tokens and/or lovelace.
|
|
@@ -676,7 +680,9 @@ declare class Transaction {
|
|
|
676
680
|
*/
|
|
677
681
|
sendAssets(recipient: Recipient, assets: Asset[] | string): Transaction;
|
|
678
682
|
/**
|
|
679
|
-
*
|
|
683
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
684
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
685
|
+
*
|
|
680
686
|
* Use sendAssets instead:
|
|
681
687
|
* ```ts
|
|
682
688
|
* this.sendAssets(recipient, lovelace);
|
|
@@ -691,7 +697,9 @@ declare class Transaction {
|
|
|
691
697
|
*/
|
|
692
698
|
sendLovelace(recipient: Recipient, lovelace: string): Transaction;
|
|
693
699
|
/**
|
|
694
|
-
*
|
|
700
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
701
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
702
|
+
*
|
|
695
703
|
* Please use sendAssets with helper function to obtain token unit instead:
|
|
696
704
|
* ```ts
|
|
697
705
|
* const assets = [{ unit: SUPPORTED_TOKENS.GIMBAL, quantity: "100" }]
|
|
@@ -708,8 +716,8 @@ declare class Transaction {
|
|
|
708
716
|
*/
|
|
709
717
|
sendToken(recipient: Recipient, ticker: Token, amount: string): Transaction;
|
|
710
718
|
/**
|
|
711
|
-
*
|
|
712
|
-
*
|
|
719
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
720
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
713
721
|
*
|
|
714
722
|
* ```ts
|
|
715
723
|
* const assets = value.output.amount;
|
|
@@ -723,26 +731,35 @@ declare class Transaction {
|
|
|
723
731
|
*/
|
|
724
732
|
sendValue(recipient: Recipient, value: UTxO): Transaction;
|
|
725
733
|
/**
|
|
726
|
-
*
|
|
734
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
735
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
727
736
|
*
|
|
728
737
|
* @param {UTxO[]} inputs The inputs to set.
|
|
729
738
|
* @returns {Transaction} The transaction.
|
|
730
739
|
*/
|
|
731
740
|
setTxInputs(inputs: UTxO[]): Transaction;
|
|
732
741
|
/**
|
|
733
|
-
*
|
|
742
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
743
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
734
744
|
*
|
|
735
745
|
* @param {UTxO[]} inputs The reference inputs to set.
|
|
736
746
|
* @returns {Transaction} The transaction.
|
|
737
747
|
*/
|
|
738
748
|
setTxRefInputs(inputs: UTxO[]): Transaction;
|
|
739
749
|
/**
|
|
750
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
751
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
752
|
+
*
|
|
740
753
|
* Sets the native script for the transaction.
|
|
741
754
|
* @param {NativeScript} script The native script to spend from.
|
|
742
755
|
* @param {UTxO} utxo The UTxO attached to the script.
|
|
743
756
|
* @returns {Transaction} The Transaction object.
|
|
744
757
|
*/
|
|
745
758
|
setNativeScriptInput(script: NativeScript$1, utxo: UTxO): Transaction;
|
|
759
|
+
/**
|
|
760
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
761
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
762
|
+
*/
|
|
746
763
|
redeemValue(options: {
|
|
747
764
|
value: UTxO;
|
|
748
765
|
script: PlutusScript | UTxO;
|
|
@@ -751,13 +768,24 @@ declare class Transaction {
|
|
|
751
768
|
};
|
|
752
769
|
datum?: Data | UTxO;
|
|
753
770
|
}): Transaction;
|
|
771
|
+
/**
|
|
772
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
773
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
774
|
+
*/
|
|
754
775
|
mintAsset(forgeScript: string | PlutusScript | UTxO, mint: Mint, redeemer?: Pick<Action, "data"> & {
|
|
755
776
|
budget?: Budget;
|
|
756
777
|
}): Transaction;
|
|
778
|
+
/**
|
|
779
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
780
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
781
|
+
*/
|
|
757
782
|
burnAsset(forgeScript: string | PlutusScript | UTxO, asset: Asset, redeemer?: Pick<Action, "data"> & {
|
|
758
783
|
budget?: Budget;
|
|
759
784
|
}): Transaction;
|
|
760
785
|
/**
|
|
786
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
787
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
788
|
+
*
|
|
761
789
|
* Sets the change address for the transaction.
|
|
762
790
|
*
|
|
763
791
|
* @param {string} changeAddress The change address.
|
|
@@ -765,6 +793,9 @@ declare class Transaction {
|
|
|
765
793
|
*/
|
|
766
794
|
setChangeAddress(changeAddress: string): Transaction;
|
|
767
795
|
/**
|
|
796
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
797
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
798
|
+
*
|
|
768
799
|
* Sets the collateral for the transaction.
|
|
769
800
|
*
|
|
770
801
|
* @param {UTxO[]} collateral - Set the UTxO for collateral.
|
|
@@ -772,12 +803,18 @@ declare class Transaction {
|
|
|
772
803
|
*/
|
|
773
804
|
setCollateral(collateral: UTxO[]): Transaction;
|
|
774
805
|
/**
|
|
806
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
807
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
808
|
+
*
|
|
775
809
|
* Sets the network to use, this is mainly to know the cost models to be used to calculate script integrity hash
|
|
776
810
|
* @param network The specific network this transaction is being built for ("testnet" | "preview" | "preprod" | "mainnet")
|
|
777
811
|
* @returns The Transaction object.
|
|
778
812
|
*/
|
|
779
813
|
setNetwork: (network: Network) => this;
|
|
780
814
|
/**
|
|
815
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
816
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
817
|
+
*
|
|
781
818
|
* Sets the required signers for the transaction.
|
|
782
819
|
*
|
|
783
820
|
* @param {string[]} addresses The addresses of the required signers.
|
|
@@ -785,7 +822,10 @@ declare class Transaction {
|
|
|
785
822
|
*/
|
|
786
823
|
setRequiredSigners(addresses: string[]): Transaction;
|
|
787
824
|
/**
|
|
788
|
-
*
|
|
825
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
826
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
827
|
+
*
|
|
828
|
+
* Set the time to live for the transaction.
|
|
789
829
|
*
|
|
790
830
|
* @param {string} slot The slot number to expire the transaction at.
|
|
791
831
|
* @returns {Transaction} The Transaction object.
|
|
@@ -793,7 +833,10 @@ declare class Transaction {
|
|
|
793
833
|
*/
|
|
794
834
|
setTimeToExpire(slot: string): Transaction;
|
|
795
835
|
/**
|
|
796
|
-
*
|
|
836
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
837
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
838
|
+
*
|
|
839
|
+
* Sets the start slot for the transaction.
|
|
797
840
|
*
|
|
798
841
|
* @param {string} slot The start slot for the transaction.
|
|
799
842
|
* @returns {Transaction} The Transaction object.
|
|
@@ -801,7 +844,10 @@ declare class Transaction {
|
|
|
801
844
|
*/
|
|
802
845
|
setTimeToStart(slot: string): Transaction;
|
|
803
846
|
/**
|
|
804
|
-
*
|
|
847
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
848
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
849
|
+
*
|
|
850
|
+
* Add a JSON metadata entry to the transaction.
|
|
805
851
|
*
|
|
806
852
|
* @param {number} label The label to use for the metadata entry.
|
|
807
853
|
* @param {unknown} metadata The value to use for the metadata entry.
|
|
@@ -809,11 +855,35 @@ declare class Transaction {
|
|
|
809
855
|
* @see {@link https://meshjs.dev/apis/transaction#setMetadata}
|
|
810
856
|
*/
|
|
811
857
|
setMetadata(label: number, metadata: Metadatum | object): Transaction;
|
|
858
|
+
/**
|
|
859
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
860
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
861
|
+
*/
|
|
812
862
|
withdrawRewards(rewardAddress: string, lovelace: string): Transaction;
|
|
863
|
+
/**
|
|
864
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
865
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
866
|
+
*/
|
|
813
867
|
delegateStake(rewardAddress: string, poolId: string): Transaction;
|
|
868
|
+
/**
|
|
869
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
870
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
871
|
+
*/
|
|
814
872
|
deregisterStake(rewardAddress: string): Transaction;
|
|
873
|
+
/**
|
|
874
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
875
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
876
|
+
*/
|
|
815
877
|
registerStake(rewardAddress: string): Transaction;
|
|
878
|
+
/**
|
|
879
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
880
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
881
|
+
*/
|
|
816
882
|
registerPool(params: PoolParams): Transaction;
|
|
883
|
+
/**
|
|
884
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
885
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
886
|
+
*/
|
|
817
887
|
retirePool(poolId: string, epochNo: number): Transaction;
|
|
818
888
|
build(balanced?: Boolean): Promise<string>;
|
|
819
889
|
protected mintPlutusScript(script: PlutusScript): MeshTxBuilder;
|
package/dist/index.js
CHANGED
|
@@ -38787,7 +38787,8 @@ var Transaction2 = class {
|
|
|
38787
38787
|
return new Tx(tx.body(), tx.witnessSet(), txAuxData).toCbor().toString();
|
|
38788
38788
|
}
|
|
38789
38789
|
/**
|
|
38790
|
-
*
|
|
38790
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38791
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38791
38792
|
*
|
|
38792
38793
|
* @param recipient The recipient of the output.
|
|
38793
38794
|
* @param assets The assets to send. Provide string for lovelace and Asset[] for tokens and/or lovelace.
|
|
@@ -38819,7 +38820,9 @@ var Transaction2 = class {
|
|
|
38819
38820
|
return this;
|
|
38820
38821
|
}
|
|
38821
38822
|
/**
|
|
38822
|
-
*
|
|
38823
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38824
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38825
|
+
*
|
|
38823
38826
|
* Use sendAssets instead:
|
|
38824
38827
|
* ```ts
|
|
38825
38828
|
* this.sendAssets(recipient, lovelace);
|
|
@@ -38836,7 +38839,9 @@ var Transaction2 = class {
|
|
|
38836
38839
|
return this.sendAssets(recipient, lovelace);
|
|
38837
38840
|
}
|
|
38838
38841
|
/**
|
|
38839
|
-
*
|
|
38842
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38843
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38844
|
+
*
|
|
38840
38845
|
* Please use sendAssets with helper function to obtain token unit instead:
|
|
38841
38846
|
* ```ts
|
|
38842
38847
|
* const assets = [{ unit: SUPPORTED_TOKENS.GIMBAL, quantity: "100" }]
|
|
@@ -38856,8 +38861,8 @@ var Transaction2 = class {
|
|
|
38856
38861
|
return this.sendAssets(recipient, assets);
|
|
38857
38862
|
}
|
|
38858
38863
|
/**
|
|
38859
|
-
*
|
|
38860
|
-
*
|
|
38864
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38865
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38861
38866
|
*
|
|
38862
38867
|
* ```ts
|
|
38863
38868
|
* const assets = value.output.amount;
|
|
@@ -38874,7 +38879,8 @@ var Transaction2 = class {
|
|
|
38874
38879
|
return this.sendAssets(recipient, assets);
|
|
38875
38880
|
}
|
|
38876
38881
|
/**
|
|
38877
|
-
*
|
|
38882
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38883
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38878
38884
|
*
|
|
38879
38885
|
* @param {UTxO[]} inputs The inputs to set.
|
|
38880
38886
|
* @returns {Transaction} The transaction.
|
|
@@ -38892,7 +38898,8 @@ var Transaction2 = class {
|
|
|
38892
38898
|
return this;
|
|
38893
38899
|
}
|
|
38894
38900
|
/**
|
|
38895
|
-
*
|
|
38901
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38902
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38896
38903
|
*
|
|
38897
38904
|
* @param {UTxO[]} inputs The reference inputs to set.
|
|
38898
38905
|
* @returns {Transaction} The transaction.
|
|
@@ -38907,6 +38914,9 @@ var Transaction2 = class {
|
|
|
38907
38914
|
return this;
|
|
38908
38915
|
}
|
|
38909
38916
|
/**
|
|
38917
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38918
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38919
|
+
*
|
|
38910
38920
|
* Sets the native script for the transaction.
|
|
38911
38921
|
* @param {NativeScript} script The native script to spend from.
|
|
38912
38922
|
* @param {UTxO} utxo The UTxO attached to the script.
|
|
@@ -38924,6 +38934,10 @@ var Transaction2 = class {
|
|
|
38924
38934
|
).txInScript(scriptCbor);
|
|
38925
38935
|
return this;
|
|
38926
38936
|
}
|
|
38937
|
+
/**
|
|
38938
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38939
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38940
|
+
*/
|
|
38927
38941
|
// TODO: nuke this probably as the input type is too confusing
|
|
38928
38942
|
redeemValue(options) {
|
|
38929
38943
|
const { value, script, datum, redeemer } = options;
|
|
@@ -38969,7 +38983,10 @@ var Transaction2 = class {
|
|
|
38969
38983
|
}
|
|
38970
38984
|
return this;
|
|
38971
38985
|
}
|
|
38972
|
-
|
|
38986
|
+
/**
|
|
38987
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
38988
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
38989
|
+
*/
|
|
38973
38990
|
mintAsset(forgeScript, mint, redeemer) {
|
|
38974
38991
|
const assetQuantity = mint.assetQuantity;
|
|
38975
38992
|
let assetNameHex = stringToHex(mint.assetName);
|
|
@@ -39081,8 +39098,10 @@ var Transaction2 = class {
|
|
|
39081
39098
|
}
|
|
39082
39099
|
return this;
|
|
39083
39100
|
}
|
|
39084
|
-
|
|
39085
|
-
|
|
39101
|
+
/**
|
|
39102
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39103
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39104
|
+
*/
|
|
39086
39105
|
burnAsset(forgeScript, asset, redeemer) {
|
|
39087
39106
|
const assetQuantity = "-" + asset.quantity;
|
|
39088
39107
|
const mint = {
|
|
@@ -39097,6 +39116,9 @@ var Transaction2 = class {
|
|
|
39097
39116
|
return this;
|
|
39098
39117
|
}
|
|
39099
39118
|
/**
|
|
39119
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39120
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39121
|
+
*
|
|
39100
39122
|
* Sets the change address for the transaction.
|
|
39101
39123
|
*
|
|
39102
39124
|
* @param {string} changeAddress The change address.
|
|
@@ -39107,6 +39129,9 @@ var Transaction2 = class {
|
|
|
39107
39129
|
return this;
|
|
39108
39130
|
}
|
|
39109
39131
|
/**
|
|
39132
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39133
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39134
|
+
*
|
|
39110
39135
|
* Sets the collateral for the transaction.
|
|
39111
39136
|
*
|
|
39112
39137
|
* @param {UTxO[]} collateral - Set the UTxO for collateral.
|
|
@@ -39124,6 +39149,9 @@ var Transaction2 = class {
|
|
|
39124
39149
|
return this;
|
|
39125
39150
|
}
|
|
39126
39151
|
/**
|
|
39152
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39153
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39154
|
+
*
|
|
39127
39155
|
* Sets the network to use, this is mainly to know the cost models to be used to calculate script integrity hash
|
|
39128
39156
|
* @param network The specific network this transaction is being built for ("testnet" | "preview" | "preprod" | "mainnet")
|
|
39129
39157
|
* @returns The Transaction object.
|
|
@@ -39133,6 +39161,9 @@ var Transaction2 = class {
|
|
|
39133
39161
|
return this;
|
|
39134
39162
|
};
|
|
39135
39163
|
/**
|
|
39164
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39165
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39166
|
+
*
|
|
39136
39167
|
* Sets the required signers for the transaction.
|
|
39137
39168
|
*
|
|
39138
39169
|
* @param {string[]} addresses The addresses of the required signers.
|
|
@@ -39146,7 +39177,10 @@ var Transaction2 = class {
|
|
|
39146
39177
|
return this;
|
|
39147
39178
|
}
|
|
39148
39179
|
/**
|
|
39149
|
-
*
|
|
39180
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39181
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39182
|
+
*
|
|
39183
|
+
* Set the time to live for the transaction.
|
|
39150
39184
|
*
|
|
39151
39185
|
* @param {string} slot The slot number to expire the transaction at.
|
|
39152
39186
|
* @returns {Transaction} The Transaction object.
|
|
@@ -39157,7 +39191,10 @@ var Transaction2 = class {
|
|
|
39157
39191
|
return this;
|
|
39158
39192
|
}
|
|
39159
39193
|
/**
|
|
39160
|
-
*
|
|
39194
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39195
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39196
|
+
*
|
|
39197
|
+
* Sets the start slot for the transaction.
|
|
39161
39198
|
*
|
|
39162
39199
|
* @param {string} slot The start slot for the transaction.
|
|
39163
39200
|
* @returns {Transaction} The Transaction object.
|
|
@@ -39168,7 +39205,10 @@ var Transaction2 = class {
|
|
|
39168
39205
|
return this;
|
|
39169
39206
|
}
|
|
39170
39207
|
/**
|
|
39171
|
-
*
|
|
39208
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39209
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39210
|
+
*
|
|
39211
|
+
* Add a JSON metadata entry to the transaction.
|
|
39172
39212
|
*
|
|
39173
39213
|
* @param {number} label The label to use for the metadata entry.
|
|
39174
39214
|
* @param {unknown} metadata The value to use for the metadata entry.
|
|
@@ -39179,10 +39219,18 @@ var Transaction2 = class {
|
|
|
39179
39219
|
this.txBuilder.metadataValue(label, metadata);
|
|
39180
39220
|
return this;
|
|
39181
39221
|
}
|
|
39222
|
+
/**
|
|
39223
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39224
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39225
|
+
*/
|
|
39182
39226
|
withdrawRewards(rewardAddress, lovelace) {
|
|
39183
39227
|
this.txBuilder.withdrawal(rewardAddress, lovelace);
|
|
39184
39228
|
return this;
|
|
39185
39229
|
}
|
|
39230
|
+
/**
|
|
39231
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39232
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39233
|
+
*/
|
|
39186
39234
|
delegateStake(rewardAddress, poolId) {
|
|
39187
39235
|
this.txBuilder.delegateStakeCertificate(
|
|
39188
39236
|
rewardAddress,
|
|
@@ -39190,20 +39238,34 @@ var Transaction2 = class {
|
|
|
39190
39238
|
);
|
|
39191
39239
|
return this;
|
|
39192
39240
|
}
|
|
39241
|
+
/**
|
|
39242
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39243
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39244
|
+
*/
|
|
39193
39245
|
deregisterStake(rewardAddress) {
|
|
39194
39246
|
this.txBuilder.deregisterStakeCertificate(rewardAddress);
|
|
39195
39247
|
return this;
|
|
39196
39248
|
}
|
|
39249
|
+
/**
|
|
39250
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39251
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39252
|
+
*/
|
|
39197
39253
|
registerStake(rewardAddress) {
|
|
39198
39254
|
this.txBuilder.registerStakeCertificate(rewardAddress);
|
|
39199
39255
|
return this;
|
|
39200
39256
|
}
|
|
39201
|
-
|
|
39257
|
+
/**
|
|
39258
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39259
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39260
|
+
*/
|
|
39202
39261
|
registerPool(params) {
|
|
39203
39262
|
this.txBuilder.registerPoolCertificate(params);
|
|
39204
39263
|
return this;
|
|
39205
39264
|
}
|
|
39206
|
-
|
|
39265
|
+
/**
|
|
39266
|
+
* [Deprecated] - `Transaction` class is on planning for V2.
|
|
39267
|
+
* Use `MeshTxBuilder` instead for tx-building for now.
|
|
39268
|
+
*/
|
|
39207
39269
|
retirePool(poolId, epochNo) {
|
|
39208
39270
|
this.txBuilder.retirePoolCertificate(poolId, epochNo);
|
|
39209
39271
|
return this;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshsdk/transaction",
|
|
3
|
-
"version": "1.9.0-beta.
|
|
3
|
+
"version": "1.9.0-beta.32",
|
|
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.
|
|
39
|
-
"@meshsdk/core-cst": "1.9.0-beta.
|
|
38
|
+
"@meshsdk/common": "1.9.0-beta.32",
|
|
39
|
+
"@meshsdk/core-cst": "1.9.0-beta.32",
|
|
40
40
|
"json-bigint": "^1.0.0"
|
|
41
41
|
},
|
|
42
42
|
"prettier": "@meshsdk/configs/prettier",
|