@meshsdk/core 1.5.21 → 1.5.23

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.
@@ -293,6 +293,7 @@ export declare class MeshTxBuilderCore {
293
293
  protected removeDuplicateInputs: () => void;
294
294
  private addAllInputs;
295
295
  private addTxIn;
296
+ private addNativeScriptTxIn;
296
297
  private addScriptTxIn;
297
298
  private addAllOutputs;
298
299
  private addOutput;
@@ -14,7 +14,7 @@ export declare type MeshTxBuilderBody = {
14
14
  certificates: Certificate[];
15
15
  signingKey: string[];
16
16
  };
17
- export declare type TxIn = PubKeyTxIn | ScriptTxIn;
17
+ export declare type TxIn = PubKeyTxIn | SimpleScriptTxIn | ScriptTxIn;
18
18
  export declare type PubKeyTxIn = {
19
19
  type: 'PubKey';
20
20
  txIn: TxInParameter;
@@ -25,6 +25,24 @@ export declare type TxInParameter = {
25
25
  amount?: Asset[];
26
26
  address?: string;
27
27
  };
28
+ export declare type SimpleScriptTxIn = {
29
+ type: 'SimpleScript';
30
+ txIn: TxInParameter;
31
+ simpleScriptTxIn: SimpleScriptTxInParameter;
32
+ };
33
+ export declare type SimpleScriptTxInParameter = {
34
+ scriptSource?: {
35
+ type: 'Provided';
36
+ script: string;
37
+ } | {
38
+ type: 'Inline';
39
+ txInInfo: SimpleScriptSourceInfo;
40
+ };
41
+ };
42
+ export declare type SimpleScriptSourceInfo = {
43
+ txHash: string;
44
+ txIndex: number;
45
+ };
28
46
  export declare type ScriptTxIn = {
29
47
  type: 'Script';
30
48
  txIn: TxInParameter;
@@ -1,5 +1,5 @@
1
1
  import { IInitiator } from '@mesh/common/contracts';
2
- import type { Action, Asset, Data, Era, Mint, Protocol, PlutusScript, PoolParams, Recipient, Token, UTxO } from '@mesh/common/types';
2
+ import type { Action, Asset, Data, Era, Mint, Protocol, NativeScript, PlutusScript, PoolParams, Recipient, Token, UTxO } from '@mesh/common/types';
3
3
  export declare class Transaction {
4
4
  private _changeAddress?;
5
5
  private _txOutputs;
@@ -100,6 +100,13 @@ export declare class Transaction {
100
100
  * @returns {Transaction} The Transaction object.
101
101
  */
102
102
  setRequiredSigners(addresses: string[]): Transaction;
103
+ /**
104
+ * Sets the native script for the transaction.
105
+ * @param {NativeScript} script The native script to spend from.
106
+ * @param {UTxO} utxo The UTxO attached to the script.
107
+ * @returns {Transaction} The Transaction object.
108
+ */
109
+ setNativeScriptInput(script: NativeScript, utxo: UTxO): Transaction;
103
110
  /**
104
111
  * Sets the start slot for the transaction.
105
112
  *
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.21",
6
+ "version": "1.5.23",
7
7
  "license": "Apache-2.0",
8
8
  "type": "module",
9
9
  "repository": {