@meshsdk/contract 1.7.2 → 1.7.4
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 +355 -54
- package/dist/index.d.cts +7 -159
- package/dist/index.d.ts +7 -159
- package/dist/index.js +356 -52
- package/package.json +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _meshsdk_common from '@meshsdk/common';
|
|
2
2
|
import { ConStr0, PubKeyAddress, Value, ConStr1, Integer as Integer$1, CurrencySymbol, TokenName, Asset as Asset$1, UTxO as UTxO$1, BuiltinByteString as BuiltinByteString$1 } from '@meshsdk/common';
|
|
3
|
-
import { MeshTxBuilder, IFetcher, BrowserWallet, MeshWallet, UTxO, Asset, ConStr0 as ConStr0$1, Integer, BuiltinByteString } from '@meshsdk/core';
|
|
3
|
+
import { MeshTxBuilder, IFetcher, BrowserWallet, MeshWallet, LanguageVersion, UTxO, Asset, ConStr0 as ConStr0$1, Integer, BuiltinByteString } from '@meshsdk/core';
|
|
4
4
|
|
|
5
5
|
type MeshTxInitiatorInput = {
|
|
6
6
|
mesh: MeshTxBuilder;
|
|
@@ -8,6 +8,7 @@ type MeshTxInitiatorInput = {
|
|
|
8
8
|
wallet?: BrowserWallet | MeshWallet;
|
|
9
9
|
networkId?: number;
|
|
10
10
|
stakeCredential?: string;
|
|
11
|
+
version?: number;
|
|
11
12
|
};
|
|
12
13
|
declare class MeshTxInitiator {
|
|
13
14
|
mesh: MeshTxBuilder;
|
|
@@ -15,7 +16,9 @@ declare class MeshTxInitiator {
|
|
|
15
16
|
wallet?: BrowserWallet | MeshWallet;
|
|
16
17
|
stakeCredential?: string;
|
|
17
18
|
networkId: number;
|
|
18
|
-
|
|
19
|
+
version: number;
|
|
20
|
+
languageVersion: LanguageVersion;
|
|
21
|
+
constructor({ mesh, fetcher, wallet, networkId, stakeCredential, version, }: MeshTxInitiatorInput);
|
|
19
22
|
protected signSubmitReset: () => Promise<string | undefined>;
|
|
20
23
|
protected queryUtxos: (walletAddress: string) => Promise<UTxO[]>;
|
|
21
24
|
protected getWalletDappAddress: () => Promise<string | undefined>;
|
|
@@ -190,106 +193,6 @@ declare class MeshEscrowContract extends MeshTxInitiator {
|
|
|
190
193
|
getUtxoByTxHash: (txHash: string) => Promise<UTxO | undefined>;
|
|
191
194
|
}
|
|
192
195
|
|
|
193
|
-
declare const MeshGiftCardBlueprint: {
|
|
194
|
-
preamble: {
|
|
195
|
-
title: string;
|
|
196
|
-
description: string;
|
|
197
|
-
version: string;
|
|
198
|
-
plutusVersion: string;
|
|
199
|
-
compiler: {
|
|
200
|
-
name: string;
|
|
201
|
-
version: string;
|
|
202
|
-
};
|
|
203
|
-
license: string;
|
|
204
|
-
};
|
|
205
|
-
validators: ({
|
|
206
|
-
title: string;
|
|
207
|
-
redeemer: {
|
|
208
|
-
title: string;
|
|
209
|
-
schema: {
|
|
210
|
-
$ref: string;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
parameters: {
|
|
214
|
-
title: string;
|
|
215
|
-
schema: {
|
|
216
|
-
$ref: string;
|
|
217
|
-
};
|
|
218
|
-
}[];
|
|
219
|
-
compiledCode: string;
|
|
220
|
-
hash: string;
|
|
221
|
-
datum?: undefined;
|
|
222
|
-
} | {
|
|
223
|
-
title: string;
|
|
224
|
-
datum: {
|
|
225
|
-
title: string;
|
|
226
|
-
schema: {
|
|
227
|
-
$ref: string;
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
redeemer: {
|
|
231
|
-
title: string;
|
|
232
|
-
schema: {
|
|
233
|
-
$ref: string;
|
|
234
|
-
};
|
|
235
|
-
};
|
|
236
|
-
parameters: {
|
|
237
|
-
title: string;
|
|
238
|
-
schema: {
|
|
239
|
-
$ref: string;
|
|
240
|
-
};
|
|
241
|
-
}[];
|
|
242
|
-
compiledCode: string;
|
|
243
|
-
hash: string;
|
|
244
|
-
})[];
|
|
245
|
-
definitions: {
|
|
246
|
-
ByteArray: {
|
|
247
|
-
dataType: string;
|
|
248
|
-
};
|
|
249
|
-
Data: {
|
|
250
|
-
title: string;
|
|
251
|
-
description: string;
|
|
252
|
-
};
|
|
253
|
-
Int: {
|
|
254
|
-
dataType: string;
|
|
255
|
-
};
|
|
256
|
-
"aiken/transaction/OutputReference": {
|
|
257
|
-
title: string;
|
|
258
|
-
description: string;
|
|
259
|
-
anyOf: {
|
|
260
|
-
title: string;
|
|
261
|
-
dataType: string;
|
|
262
|
-
index: number;
|
|
263
|
-
fields: {
|
|
264
|
-
title: string;
|
|
265
|
-
$ref: string;
|
|
266
|
-
}[];
|
|
267
|
-
}[];
|
|
268
|
-
};
|
|
269
|
-
"aiken/transaction/TransactionId": {
|
|
270
|
-
title: string;
|
|
271
|
-
description: string;
|
|
272
|
-
anyOf: {
|
|
273
|
-
title: string;
|
|
274
|
-
dataType: string;
|
|
275
|
-
index: number;
|
|
276
|
-
fields: {
|
|
277
|
-
title: string;
|
|
278
|
-
$ref: string;
|
|
279
|
-
}[];
|
|
280
|
-
}[];
|
|
281
|
-
};
|
|
282
|
-
"oneshot/Action": {
|
|
283
|
-
title: string;
|
|
284
|
-
anyOf: {
|
|
285
|
-
title: string;
|
|
286
|
-
dataType: string;
|
|
287
|
-
index: number;
|
|
288
|
-
fields: never[];
|
|
289
|
-
}[];
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
};
|
|
293
196
|
declare class MeshGiftCardContract extends MeshTxInitiator {
|
|
294
197
|
tokenNameHex: string;
|
|
295
198
|
paramUtxo: UTxO["input"];
|
|
@@ -742,72 +645,17 @@ declare class MeshSwapContract extends MeshTxInitiator {
|
|
|
742
645
|
getUtxoByTxHash: (txHash: string) => Promise<UTxO$1 | undefined>;
|
|
743
646
|
}
|
|
744
647
|
|
|
745
|
-
declare const MeshVestingBlueprint: {
|
|
746
|
-
preamble: {
|
|
747
|
-
title: string;
|
|
748
|
-
description: string;
|
|
749
|
-
version: string;
|
|
750
|
-
plutusVersion: string;
|
|
751
|
-
compiler: {
|
|
752
|
-
name: string;
|
|
753
|
-
version: string;
|
|
754
|
-
};
|
|
755
|
-
license: string;
|
|
756
|
-
};
|
|
757
|
-
validators: {
|
|
758
|
-
title: string;
|
|
759
|
-
datum: {
|
|
760
|
-
title: string;
|
|
761
|
-
schema: {
|
|
762
|
-
$ref: string;
|
|
763
|
-
};
|
|
764
|
-
};
|
|
765
|
-
redeemer: {
|
|
766
|
-
title: string;
|
|
767
|
-
schema: {
|
|
768
|
-
$ref: string;
|
|
769
|
-
};
|
|
770
|
-
};
|
|
771
|
-
compiledCode: string;
|
|
772
|
-
hash: string;
|
|
773
|
-
}[];
|
|
774
|
-
definitions: {
|
|
775
|
-
ByteArray: {
|
|
776
|
-
dataType: string;
|
|
777
|
-
};
|
|
778
|
-
Data: {
|
|
779
|
-
title: string;
|
|
780
|
-
description: string;
|
|
781
|
-
};
|
|
782
|
-
Int: {
|
|
783
|
-
dataType: string;
|
|
784
|
-
};
|
|
785
|
-
"vesting/types/VestingDatum": {
|
|
786
|
-
title: string;
|
|
787
|
-
anyOf: {
|
|
788
|
-
title: string;
|
|
789
|
-
dataType: string;
|
|
790
|
-
index: number;
|
|
791
|
-
fields: {
|
|
792
|
-
title: string;
|
|
793
|
-
description: string;
|
|
794
|
-
$ref: string;
|
|
795
|
-
}[];
|
|
796
|
-
}[];
|
|
797
|
-
};
|
|
798
|
-
};
|
|
799
|
-
};
|
|
800
648
|
type VestingDatum = ConStr0<[
|
|
801
649
|
Integer$1,
|
|
802
650
|
BuiltinByteString$1,
|
|
803
651
|
BuiltinByteString$1
|
|
804
652
|
]>;
|
|
805
653
|
declare class MeshVestingContract extends MeshTxInitiator {
|
|
806
|
-
scriptCbor: string;
|
|
807
654
|
constructor(inputs: MeshTxInitiatorInput);
|
|
655
|
+
getScriptCbor: () => string;
|
|
808
656
|
depositFund: (amount: Asset[], lockUntilTimeStampMs: number, beneficiary: string) => Promise<string>;
|
|
809
657
|
withdrawFund: (vestingUtxo: UTxO) => Promise<string>;
|
|
810
658
|
getUtxoByTxHash: (txHash: string) => Promise<UTxO | undefined>;
|
|
811
659
|
}
|
|
812
660
|
|
|
813
|
-
export { type ActiveEscrowDatum, type HelloWorldDatum, type InitiationDatum, type MarketplaceDatum, MeshEscrowBlueprint, MeshEscrowContract,
|
|
661
|
+
export { type ActiveEscrowDatum, type HelloWorldDatum, type InitiationDatum, type MarketplaceDatum, MeshEscrowBlueprint, MeshEscrowContract, MeshGiftCardContract, MeshHelloWorldBlueprint, MeshHelloWorldContract, MeshMarketplaceBlueprint, MeshMarketplaceContract, MeshPaymentSplitterBlueprint, MeshPaymentSplitterContract, MeshSwapBlueprint, MeshSwapContract, MeshVestingContract, type RecipientDepositRedeemer, type SwapDatum, type VestingDatum, activeEscrowDatum, initiateEscrowDatum, marketplaceDatum, recipientDepositRedeemer };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _meshsdk_common from '@meshsdk/common';
|
|
2
2
|
import { ConStr0, PubKeyAddress, Value, ConStr1, Integer as Integer$1, CurrencySymbol, TokenName, Asset as Asset$1, UTxO as UTxO$1, BuiltinByteString as BuiltinByteString$1 } from '@meshsdk/common';
|
|
3
|
-
import { MeshTxBuilder, IFetcher, BrowserWallet, MeshWallet, UTxO, Asset, ConStr0 as ConStr0$1, Integer, BuiltinByteString } from '@meshsdk/core';
|
|
3
|
+
import { MeshTxBuilder, IFetcher, BrowserWallet, MeshWallet, LanguageVersion, UTxO, Asset, ConStr0 as ConStr0$1, Integer, BuiltinByteString } from '@meshsdk/core';
|
|
4
4
|
|
|
5
5
|
type MeshTxInitiatorInput = {
|
|
6
6
|
mesh: MeshTxBuilder;
|
|
@@ -8,6 +8,7 @@ type MeshTxInitiatorInput = {
|
|
|
8
8
|
wallet?: BrowserWallet | MeshWallet;
|
|
9
9
|
networkId?: number;
|
|
10
10
|
stakeCredential?: string;
|
|
11
|
+
version?: number;
|
|
11
12
|
};
|
|
12
13
|
declare class MeshTxInitiator {
|
|
13
14
|
mesh: MeshTxBuilder;
|
|
@@ -15,7 +16,9 @@ declare class MeshTxInitiator {
|
|
|
15
16
|
wallet?: BrowserWallet | MeshWallet;
|
|
16
17
|
stakeCredential?: string;
|
|
17
18
|
networkId: number;
|
|
18
|
-
|
|
19
|
+
version: number;
|
|
20
|
+
languageVersion: LanguageVersion;
|
|
21
|
+
constructor({ mesh, fetcher, wallet, networkId, stakeCredential, version, }: MeshTxInitiatorInput);
|
|
19
22
|
protected signSubmitReset: () => Promise<string | undefined>;
|
|
20
23
|
protected queryUtxos: (walletAddress: string) => Promise<UTxO[]>;
|
|
21
24
|
protected getWalletDappAddress: () => Promise<string | undefined>;
|
|
@@ -190,106 +193,6 @@ declare class MeshEscrowContract extends MeshTxInitiator {
|
|
|
190
193
|
getUtxoByTxHash: (txHash: string) => Promise<UTxO | undefined>;
|
|
191
194
|
}
|
|
192
195
|
|
|
193
|
-
declare const MeshGiftCardBlueprint: {
|
|
194
|
-
preamble: {
|
|
195
|
-
title: string;
|
|
196
|
-
description: string;
|
|
197
|
-
version: string;
|
|
198
|
-
plutusVersion: string;
|
|
199
|
-
compiler: {
|
|
200
|
-
name: string;
|
|
201
|
-
version: string;
|
|
202
|
-
};
|
|
203
|
-
license: string;
|
|
204
|
-
};
|
|
205
|
-
validators: ({
|
|
206
|
-
title: string;
|
|
207
|
-
redeemer: {
|
|
208
|
-
title: string;
|
|
209
|
-
schema: {
|
|
210
|
-
$ref: string;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
parameters: {
|
|
214
|
-
title: string;
|
|
215
|
-
schema: {
|
|
216
|
-
$ref: string;
|
|
217
|
-
};
|
|
218
|
-
}[];
|
|
219
|
-
compiledCode: string;
|
|
220
|
-
hash: string;
|
|
221
|
-
datum?: undefined;
|
|
222
|
-
} | {
|
|
223
|
-
title: string;
|
|
224
|
-
datum: {
|
|
225
|
-
title: string;
|
|
226
|
-
schema: {
|
|
227
|
-
$ref: string;
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
redeemer: {
|
|
231
|
-
title: string;
|
|
232
|
-
schema: {
|
|
233
|
-
$ref: string;
|
|
234
|
-
};
|
|
235
|
-
};
|
|
236
|
-
parameters: {
|
|
237
|
-
title: string;
|
|
238
|
-
schema: {
|
|
239
|
-
$ref: string;
|
|
240
|
-
};
|
|
241
|
-
}[];
|
|
242
|
-
compiledCode: string;
|
|
243
|
-
hash: string;
|
|
244
|
-
})[];
|
|
245
|
-
definitions: {
|
|
246
|
-
ByteArray: {
|
|
247
|
-
dataType: string;
|
|
248
|
-
};
|
|
249
|
-
Data: {
|
|
250
|
-
title: string;
|
|
251
|
-
description: string;
|
|
252
|
-
};
|
|
253
|
-
Int: {
|
|
254
|
-
dataType: string;
|
|
255
|
-
};
|
|
256
|
-
"aiken/transaction/OutputReference": {
|
|
257
|
-
title: string;
|
|
258
|
-
description: string;
|
|
259
|
-
anyOf: {
|
|
260
|
-
title: string;
|
|
261
|
-
dataType: string;
|
|
262
|
-
index: number;
|
|
263
|
-
fields: {
|
|
264
|
-
title: string;
|
|
265
|
-
$ref: string;
|
|
266
|
-
}[];
|
|
267
|
-
}[];
|
|
268
|
-
};
|
|
269
|
-
"aiken/transaction/TransactionId": {
|
|
270
|
-
title: string;
|
|
271
|
-
description: string;
|
|
272
|
-
anyOf: {
|
|
273
|
-
title: string;
|
|
274
|
-
dataType: string;
|
|
275
|
-
index: number;
|
|
276
|
-
fields: {
|
|
277
|
-
title: string;
|
|
278
|
-
$ref: string;
|
|
279
|
-
}[];
|
|
280
|
-
}[];
|
|
281
|
-
};
|
|
282
|
-
"oneshot/Action": {
|
|
283
|
-
title: string;
|
|
284
|
-
anyOf: {
|
|
285
|
-
title: string;
|
|
286
|
-
dataType: string;
|
|
287
|
-
index: number;
|
|
288
|
-
fields: never[];
|
|
289
|
-
}[];
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
};
|
|
293
196
|
declare class MeshGiftCardContract extends MeshTxInitiator {
|
|
294
197
|
tokenNameHex: string;
|
|
295
198
|
paramUtxo: UTxO["input"];
|
|
@@ -742,72 +645,17 @@ declare class MeshSwapContract extends MeshTxInitiator {
|
|
|
742
645
|
getUtxoByTxHash: (txHash: string) => Promise<UTxO$1 | undefined>;
|
|
743
646
|
}
|
|
744
647
|
|
|
745
|
-
declare const MeshVestingBlueprint: {
|
|
746
|
-
preamble: {
|
|
747
|
-
title: string;
|
|
748
|
-
description: string;
|
|
749
|
-
version: string;
|
|
750
|
-
plutusVersion: string;
|
|
751
|
-
compiler: {
|
|
752
|
-
name: string;
|
|
753
|
-
version: string;
|
|
754
|
-
};
|
|
755
|
-
license: string;
|
|
756
|
-
};
|
|
757
|
-
validators: {
|
|
758
|
-
title: string;
|
|
759
|
-
datum: {
|
|
760
|
-
title: string;
|
|
761
|
-
schema: {
|
|
762
|
-
$ref: string;
|
|
763
|
-
};
|
|
764
|
-
};
|
|
765
|
-
redeemer: {
|
|
766
|
-
title: string;
|
|
767
|
-
schema: {
|
|
768
|
-
$ref: string;
|
|
769
|
-
};
|
|
770
|
-
};
|
|
771
|
-
compiledCode: string;
|
|
772
|
-
hash: string;
|
|
773
|
-
}[];
|
|
774
|
-
definitions: {
|
|
775
|
-
ByteArray: {
|
|
776
|
-
dataType: string;
|
|
777
|
-
};
|
|
778
|
-
Data: {
|
|
779
|
-
title: string;
|
|
780
|
-
description: string;
|
|
781
|
-
};
|
|
782
|
-
Int: {
|
|
783
|
-
dataType: string;
|
|
784
|
-
};
|
|
785
|
-
"vesting/types/VestingDatum": {
|
|
786
|
-
title: string;
|
|
787
|
-
anyOf: {
|
|
788
|
-
title: string;
|
|
789
|
-
dataType: string;
|
|
790
|
-
index: number;
|
|
791
|
-
fields: {
|
|
792
|
-
title: string;
|
|
793
|
-
description: string;
|
|
794
|
-
$ref: string;
|
|
795
|
-
}[];
|
|
796
|
-
}[];
|
|
797
|
-
};
|
|
798
|
-
};
|
|
799
|
-
};
|
|
800
648
|
type VestingDatum = ConStr0<[
|
|
801
649
|
Integer$1,
|
|
802
650
|
BuiltinByteString$1,
|
|
803
651
|
BuiltinByteString$1
|
|
804
652
|
]>;
|
|
805
653
|
declare class MeshVestingContract extends MeshTxInitiator {
|
|
806
|
-
scriptCbor: string;
|
|
807
654
|
constructor(inputs: MeshTxInitiatorInput);
|
|
655
|
+
getScriptCbor: () => string;
|
|
808
656
|
depositFund: (amount: Asset[], lockUntilTimeStampMs: number, beneficiary: string) => Promise<string>;
|
|
809
657
|
withdrawFund: (vestingUtxo: UTxO) => Promise<string>;
|
|
810
658
|
getUtxoByTxHash: (txHash: string) => Promise<UTxO | undefined>;
|
|
811
659
|
}
|
|
812
660
|
|
|
813
|
-
export { type ActiveEscrowDatum, type HelloWorldDatum, type InitiationDatum, type MarketplaceDatum, MeshEscrowBlueprint, MeshEscrowContract,
|
|
661
|
+
export { type ActiveEscrowDatum, type HelloWorldDatum, type InitiationDatum, type MarketplaceDatum, MeshEscrowBlueprint, MeshEscrowContract, MeshGiftCardContract, MeshHelloWorldBlueprint, MeshHelloWorldContract, MeshMarketplaceBlueprint, MeshMarketplaceContract, MeshPaymentSplitterBlueprint, MeshPaymentSplitterContract, MeshSwapBlueprint, MeshSwapContract, MeshVestingContract, type RecipientDepositRedeemer, type SwapDatum, type VestingDatum, activeEscrowDatum, initiateEscrowDatum, marketplaceDatum, recipientDepositRedeemer };
|