@meshsdk/core 1.5.11-beta.3 → 1.5.11-beta.5
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/core/CPS-009.d.ts +2 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +964 -820
- package/dist/transaction/meshTxBuilder/meshTxBuilder.service.d.ts +3 -0
- package/dist/transaction/meshTxBuilder/meshTxBuilderCore.d.ts +30 -21
- package/dist/transaction/meshTxBuilder/type.d.ts +8 -3
- package/package.json +3 -3
|
@@ -40,5 +40,8 @@ export declare class MeshTxBuilder extends MeshTxBuilderCore {
|
|
|
40
40
|
private getUTxOInfo;
|
|
41
41
|
private queryAllTxInfo;
|
|
42
42
|
private completeTxInformation;
|
|
43
|
+
private isInputComplete;
|
|
44
|
+
private isInputInfoComplete;
|
|
45
|
+
private isRefScriptInfoComplete;
|
|
43
46
|
}
|
|
44
47
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Action, Asset, Data, LanguageVersion, Protocol } from '@mesh/common/types';
|
|
1
|
+
import { Action, Asset, Data, LanguageVersion, Protocol, UTxO } from '@mesh/common/types';
|
|
2
2
|
import { csl } from '@mesh/core';
|
|
3
3
|
import { MintItem, TxIn, PubKeyTxIn, MeshTxBuilderBody, RefTxIn, BuilderData } from './type';
|
|
4
4
|
export declare class MeshTxBuilderCore {
|
|
@@ -59,11 +59,11 @@ export declare class MeshTxBuilderCore {
|
|
|
59
59
|
txInScript: (scriptCbor: string, version?: LanguageVersion) => this;
|
|
60
60
|
/**
|
|
61
61
|
* Set the input datum for transaction input
|
|
62
|
-
* @param datum The datum in Mesh Data type
|
|
63
|
-
* @param type The datum type, either Mesh Data type
|
|
62
|
+
* @param datum The datum in Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
63
|
+
* @param type The datum type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
64
64
|
* @returns The MeshTxBuilder instance
|
|
65
65
|
*/
|
|
66
|
-
txInDatumValue: (datum:
|
|
66
|
+
txInDatumValue: (datum: BuilderData['content'], type?: BuilderData['type']) => this;
|
|
67
67
|
/**
|
|
68
68
|
* Tell the transaction builder that the input UTxO has inlined datum
|
|
69
69
|
* @returns The MeshTxBuilder instance
|
|
@@ -71,15 +71,15 @@ export declare class MeshTxBuilderCore {
|
|
|
71
71
|
txInInlineDatumPresent: () => this;
|
|
72
72
|
/**
|
|
73
73
|
* Set the redeemer for the reference input to be spent in same transaction
|
|
74
|
-
* @param redeemer The redeemer in Mesh Data type
|
|
74
|
+
* @param redeemer The redeemer in Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
75
75
|
* @param exUnits The execution units budget for the redeemer
|
|
76
|
-
* @param type The redeemer data type, either Mesh Data type
|
|
76
|
+
* @param type The redeemer data type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
77
77
|
* @returns The MeshTxBuilder instance
|
|
78
78
|
*/
|
|
79
|
-
txInRedeemerValue: (redeemer:
|
|
79
|
+
txInRedeemerValue: (redeemer: BuilderData['content'], exUnits?: {
|
|
80
80
|
mem: number;
|
|
81
81
|
steps: number;
|
|
82
|
-
}, type?: '
|
|
82
|
+
}, type?: BuilderData['type']) => this;
|
|
83
83
|
/**
|
|
84
84
|
* Set the output for transaction
|
|
85
85
|
* @param {string} address The recipient of the output
|
|
@@ -89,18 +89,18 @@ export declare class MeshTxBuilderCore {
|
|
|
89
89
|
txOut: (address: string, amount: Asset[]) => this;
|
|
90
90
|
/**
|
|
91
91
|
* Set the output datum hash for transaction
|
|
92
|
-
* @param datum The datum in Mesh Data type
|
|
93
|
-
* @param type The datum type, either Mesh Data type
|
|
92
|
+
* @param datum The datum in Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
93
|
+
* @param type The datum type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
94
94
|
* @returns The MeshTxBuilder instance
|
|
95
95
|
*/
|
|
96
|
-
txOutDatumHashValue: (datum:
|
|
96
|
+
txOutDatumHashValue: (datum: BuilderData['content'], type?: BuilderData['type']) => this;
|
|
97
97
|
/**
|
|
98
98
|
* Set the output inline datum for transaction
|
|
99
|
-
* @param datum The datum in Mesh Data type
|
|
100
|
-
* @param type The datum type, either Mesh Data type
|
|
99
|
+
* @param datum The datum in Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
100
|
+
* @param type The datum type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
101
101
|
* @returns The MeshTxBuilder instance
|
|
102
102
|
*/
|
|
103
|
-
txOutInlineDatumValue: (datum:
|
|
103
|
+
txOutInlineDatumValue: (datum: BuilderData['content'], type?: BuilderData['type']) => this;
|
|
104
104
|
/**
|
|
105
105
|
* Set the reference script to be attached with the output
|
|
106
106
|
* @param scriptCbor The CBOR hex of the script to be attached to UTxO as reference script
|
|
@@ -172,25 +172,26 @@ export declare class MeshTxBuilderCore {
|
|
|
172
172
|
mintTxInReference: (txHash: string, txIndex: number, version?: LanguageVersion) => this;
|
|
173
173
|
/**
|
|
174
174
|
* Set the redeemer for minting
|
|
175
|
-
* @param redeemer The redeemer in Mesh Data type
|
|
175
|
+
* @param redeemer The redeemer in Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
176
176
|
* @param exUnits The execution units budget for the redeemer
|
|
177
|
-
* @param type The redeemer data type, either Mesh Data type
|
|
177
|
+
* @param type The redeemer data type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
178
178
|
* @returns The MeshTxBuilder instance
|
|
179
179
|
*/
|
|
180
|
-
mintReferenceTxInRedeemerValue: (redeemer:
|
|
180
|
+
mintReferenceTxInRedeemerValue: (redeemer: BuilderData['content'], exUnits?: {
|
|
181
181
|
mem: number;
|
|
182
182
|
steps: number;
|
|
183
|
-
}, type?: '
|
|
183
|
+
}, type?: BuilderData['type']) => this;
|
|
184
184
|
/**
|
|
185
185
|
* Set the redeemer for the reference input to be spent in same transaction
|
|
186
|
-
* @param redeemer The redeemer in
|
|
186
|
+
* @param redeemer The redeemer in Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
187
187
|
* @param exUnits The execution units budget for the redeemer
|
|
188
|
+
* @param type The redeemer data type, either Mesh Data type, JSON in raw constructor like format, or CBOR hex string
|
|
188
189
|
* @returns The MeshTxBuilder instance
|
|
189
190
|
*/
|
|
190
|
-
mintRedeemerValue: (redeemer:
|
|
191
|
+
mintRedeemerValue: (redeemer: BuilderData['content'], exUnits?: {
|
|
191
192
|
mem: number;
|
|
192
193
|
steps: number;
|
|
193
|
-
}, type?: '
|
|
194
|
+
}, type?: BuilderData['type']) => this;
|
|
194
195
|
/**
|
|
195
196
|
* Set the required signer of the transaction
|
|
196
197
|
* @param pubKeyHash The PubKeyHash of the required signer
|
|
@@ -243,11 +244,19 @@ export declare class MeshTxBuilderCore {
|
|
|
243
244
|
* @returns
|
|
244
245
|
*/
|
|
245
246
|
signingKey: (skeyHex: string) => this;
|
|
247
|
+
/**
|
|
248
|
+
* EXPERIMENTAL - Selects utxos to fill output value and puts them into inputs
|
|
249
|
+
* @param extraInputs The inputs already placed into the object will remain, these extra inputs will be used to fill the remaining value needed
|
|
250
|
+
* @param threshold Extra value needed to be selected for, usually for paying fees and min UTxO value of change output
|
|
251
|
+
*/
|
|
252
|
+
selectUtxosFrom: (extraInputs: UTxO[], threshold?: number) => this;
|
|
253
|
+
private addUtxosFrom;
|
|
246
254
|
private addAllSigningKeys;
|
|
247
255
|
private buildTx;
|
|
248
256
|
private queueInput;
|
|
249
257
|
private queueMint;
|
|
250
258
|
private makePlutusScriptSource;
|
|
259
|
+
protected removeDuplicateInputs: () => void;
|
|
251
260
|
private addAllInputs;
|
|
252
261
|
private addTxIn;
|
|
253
262
|
private addScriptTxIn;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { Asset, Budget, Data, LanguageVersion, PlutusScript } from '@mesh/common/types';
|
|
1
|
+
import { Asset, Budget, Data, LanguageVersion, PlutusScript, UTxO } from '@mesh/common/types';
|
|
2
2
|
export declare type MeshTxBuilderBody = {
|
|
3
3
|
inputs: TxIn[];
|
|
4
4
|
outputs: Output[];
|
|
5
|
+
extraInputs: UTxO[];
|
|
6
|
+
selectionThreshold: number;
|
|
5
7
|
collaterals: PubKeyTxIn[];
|
|
6
8
|
requiredSignatures: string[];
|
|
7
9
|
referenceInputs: RefTxIn[];
|
|
@@ -88,8 +90,11 @@ export declare type BuilderData = {
|
|
|
88
90
|
type: 'Mesh';
|
|
89
91
|
content: Data;
|
|
90
92
|
} | {
|
|
91
|
-
type: '
|
|
92
|
-
content: string
|
|
93
|
+
type: 'JSON';
|
|
94
|
+
content: string;
|
|
95
|
+
} | {
|
|
96
|
+
type: 'CBOR';
|
|
97
|
+
content: string;
|
|
93
98
|
};
|
|
94
99
|
export declare type Redeemer = {
|
|
95
100
|
data: BuilderData;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Rapidly build Web3 apps on the Cardano Blockchain.",
|
|
4
4
|
"homepage": "https://meshjs.dev",
|
|
5
5
|
"author": "MeshJS",
|
|
6
|
-
"version": "1.5.11-beta.
|
|
6
|
+
"version": "1.5.11-beta.5",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"repository": {
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"@emurgo/cardano-serialization-lib-browser": "11.5.0",
|
|
71
71
|
"@emurgo/cardano-serialization-lib-nodejs": "11.5.0",
|
|
72
72
|
"@emurgo/cip14-js": "3.0.1",
|
|
73
|
-
"axios": "
|
|
73
|
+
"axios": "1.6.3",
|
|
74
74
|
"bip39": "3.0.4",
|
|
75
75
|
"nanoid": "3.3.4",
|
|
76
|
-
"zod": "3.
|
|
76
|
+
"zod": "3.22.4"
|
|
77
77
|
}
|
|
78
78
|
}
|