@meshsdk/common 1.8.13 → 1.9.0-beta-38
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 +618 -1063
- package/dist/index.d.cts +194 -36
- package/dist/index.d.ts +194 -36
- package/dist/index.js +605 -1085
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -112,6 +112,10 @@ type DataSignature = {
|
|
|
112
112
|
|
|
113
113
|
type Era = "ALONZO" | "BABBAGE";
|
|
114
114
|
|
|
115
|
+
type Extension = {
|
|
116
|
+
cip: number;
|
|
117
|
+
};
|
|
118
|
+
|
|
115
119
|
type Message = {
|
|
116
120
|
payload: string;
|
|
117
121
|
externalAAD?: string;
|
|
@@ -216,6 +220,23 @@ declare const castProtocol: (data: Partial<Record<keyof Protocol, any>>) => Prot
|
|
|
216
220
|
|
|
217
221
|
type Token = keyof typeof SUPPORTED_TOKENS;
|
|
218
222
|
|
|
223
|
+
type TxOutput = {
|
|
224
|
+
address: string;
|
|
225
|
+
amount: Asset[];
|
|
226
|
+
dataHash?: string;
|
|
227
|
+
plutusData?: string;
|
|
228
|
+
scriptRef?: string;
|
|
229
|
+
scriptHash?: string;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
type UTxO = {
|
|
233
|
+
input: {
|
|
234
|
+
outputIndex: number;
|
|
235
|
+
txHash: string;
|
|
236
|
+
};
|
|
237
|
+
output: TxOutput;
|
|
238
|
+
};
|
|
239
|
+
|
|
219
240
|
type TransactionInfo = {
|
|
220
241
|
index: number;
|
|
221
242
|
block: string;
|
|
@@ -226,21 +247,10 @@ type TransactionInfo = {
|
|
|
226
247
|
deposit: string;
|
|
227
248
|
invalidBefore: string;
|
|
228
249
|
invalidAfter: string;
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
outputIndex: number;
|
|
234
|
-
txHash: string;
|
|
235
|
-
};
|
|
236
|
-
output: {
|
|
237
|
-
address: string;
|
|
238
|
-
amount: Asset[];
|
|
239
|
-
dataHash?: string;
|
|
240
|
-
plutusData?: string;
|
|
241
|
-
scriptRef?: string;
|
|
242
|
-
scriptHash?: string;
|
|
243
|
-
};
|
|
250
|
+
inputs: UTxO[];
|
|
251
|
+
outputs: UTxO[];
|
|
252
|
+
blockHeight?: number;
|
|
253
|
+
blockTime?: number;
|
|
244
254
|
};
|
|
245
255
|
|
|
246
256
|
type Wallet = {
|
|
@@ -416,6 +426,16 @@ type Anchor = {
|
|
|
416
426
|
anchorDataHash: string;
|
|
417
427
|
};
|
|
418
428
|
|
|
429
|
+
type MintParam = {
|
|
430
|
+
type: "Plutus" | "Native";
|
|
431
|
+
policyId: string;
|
|
432
|
+
mintValue: {
|
|
433
|
+
assetName: string;
|
|
434
|
+
amount: string;
|
|
435
|
+
}[];
|
|
436
|
+
redeemer?: Redeemer;
|
|
437
|
+
scriptSource?: ScriptSource | SimpleScriptSourceInfo;
|
|
438
|
+
};
|
|
419
439
|
type MintItem = {
|
|
420
440
|
type: "Plutus" | "Native";
|
|
421
441
|
policyId: string;
|
|
@@ -470,8 +490,9 @@ type ScriptTxIn = {
|
|
|
470
490
|
txIn: TxInParameter;
|
|
471
491
|
scriptTxIn: ScriptTxInParameter;
|
|
472
492
|
};
|
|
493
|
+
declare const txInToUtxo: (txIn: TxInParameter) => UTxO;
|
|
473
494
|
|
|
474
|
-
type Credential = {
|
|
495
|
+
type Credential$1 = {
|
|
475
496
|
type: "ScriptHash";
|
|
476
497
|
scriptHash: string;
|
|
477
498
|
} | {
|
|
@@ -502,7 +523,7 @@ type VoteType = {
|
|
|
502
523
|
};
|
|
503
524
|
type Voter = {
|
|
504
525
|
type: "ConstitutionalCommittee";
|
|
505
|
-
hotCred: Credential;
|
|
526
|
+
hotCred: Credential$1;
|
|
506
527
|
} | {
|
|
507
528
|
type: "DRep";
|
|
508
529
|
drepId: string;
|
|
@@ -539,10 +560,11 @@ type SimpleScriptWithdrawal = {
|
|
|
539
560
|
type MeshTxBuilderBody = {
|
|
540
561
|
inputs: TxIn[];
|
|
541
562
|
outputs: Output[];
|
|
563
|
+
fee: Quantity;
|
|
542
564
|
collaterals: PubKeyTxIn[];
|
|
543
565
|
requiredSignatures: string[];
|
|
544
566
|
referenceInputs: RefTxIn[];
|
|
545
|
-
mints:
|
|
567
|
+
mints: MintParam[];
|
|
546
568
|
changeAddress: string;
|
|
547
569
|
metadata: TxMetadata;
|
|
548
570
|
validityRange: ValidityRange;
|
|
@@ -556,10 +578,14 @@ type MeshTxBuilderBody = {
|
|
|
556
578
|
strategy: UtxoSelectionStrategy;
|
|
557
579
|
includeTxFees: boolean;
|
|
558
580
|
};
|
|
559
|
-
|
|
581
|
+
chainedTxs: string[];
|
|
582
|
+
inputsForEvaluation: Record<string, UTxO>;
|
|
560
583
|
network: Network | number[][];
|
|
584
|
+
expectedNumberKeyWitnesses: number;
|
|
585
|
+
expectedByronAddressWitnesses: string[];
|
|
561
586
|
};
|
|
562
587
|
declare const emptyTxBuilderBody: () => MeshTxBuilderBody;
|
|
588
|
+
declare function cloneTxBuilderBody(body: MeshTxBuilderBody): MeshTxBuilderBody;
|
|
563
589
|
type ValidityRange = {
|
|
564
590
|
invalidBefore?: number;
|
|
565
591
|
invalidHereafter?: number;
|
|
@@ -724,18 +750,42 @@ declare const mSome: <T extends Data>(value: T) => MSome<T>;
|
|
|
724
750
|
*/
|
|
725
751
|
declare const mNone: () => MNone;
|
|
726
752
|
|
|
753
|
+
/**
|
|
754
|
+
* The Mesh Data verification key
|
|
755
|
+
*/
|
|
756
|
+
type MVerificationKey = MConStr0<[string]>;
|
|
757
|
+
/**
|
|
758
|
+
* The Mesh Data script key
|
|
759
|
+
*/
|
|
760
|
+
type MScript = MConStr1<[string]>;
|
|
727
761
|
/**
|
|
728
762
|
* The Mesh Data staking credential
|
|
729
763
|
*/
|
|
730
|
-
type MMaybeStakingHash = MConStr1<[]> | MConStr0<[MConStr0<[
|
|
764
|
+
type MMaybeStakingHash = MConStr1<[]> | MConStr0<[MConStr0<[MVerificationKey]>]> | MConStr0<[MConStr0<[MScript]>]>;
|
|
731
765
|
/**
|
|
732
766
|
* The Mesh Data public key address
|
|
733
767
|
*/
|
|
734
|
-
type MPubKeyAddress = MConStr0<[
|
|
768
|
+
type MPubKeyAddress = MConStr0<[MVerificationKey, MMaybeStakingHash]>;
|
|
735
769
|
/**
|
|
736
770
|
* The Mesh Data script address
|
|
737
771
|
*/
|
|
738
|
-
type MScriptAddress = MConStr0<[
|
|
772
|
+
type MScriptAddress = MConStr0<[MScript, MMaybeStakingHash]>;
|
|
773
|
+
/**
|
|
774
|
+
* The Mesh Data credential
|
|
775
|
+
*/
|
|
776
|
+
type MCredential = MVerificationKey | MScript;
|
|
777
|
+
/**
|
|
778
|
+
* The utility function to create a Mesh Data verification key
|
|
779
|
+
* @param bytes The public key hash in hex
|
|
780
|
+
* @returns The Mesh Data verification key object
|
|
781
|
+
*/
|
|
782
|
+
declare const mVerificationKey: (bytes: string) => MVerificationKey;
|
|
783
|
+
/**
|
|
784
|
+
* The utility function to create a Mesh Data script key
|
|
785
|
+
* @param bytes The script hash in hex
|
|
786
|
+
* @returns The Mesh Data script key object
|
|
787
|
+
*/
|
|
788
|
+
declare const mScript: (bytes: string) => MScript;
|
|
739
789
|
/**
|
|
740
790
|
* The utility function to create a Mesh Data staking hash
|
|
741
791
|
* @param stakeCredential The staking credential in hex
|
|
@@ -759,6 +809,13 @@ declare const mPubKeyAddress: (bytes: string, stakeCredential?: string, isStakeS
|
|
|
759
809
|
* @returns The Mesh Data script address object
|
|
760
810
|
*/
|
|
761
811
|
declare const mScriptAddress: (bytes: string, stakeCredential?: string, isStakeScriptCredential?: boolean) => MScriptAddress;
|
|
812
|
+
/**
|
|
813
|
+
* The utility function to create a Mesh Data credential
|
|
814
|
+
* @param hash The pub key hash or script hash
|
|
815
|
+
* @param isScriptCredential Indicate if the credential is script hash (false for pub key hash)
|
|
816
|
+
* @returns Mesh Data credential object
|
|
817
|
+
*/
|
|
818
|
+
declare const mCredential: (hash: string, isScriptCredential?: boolean) => MCredential;
|
|
762
819
|
|
|
763
820
|
/**
|
|
764
821
|
* The Mesh Data boolean
|
|
@@ -875,11 +932,27 @@ type AssocMapItem<K, V> = {
|
|
|
875
932
|
v: V;
|
|
876
933
|
};
|
|
877
934
|
/**
|
|
935
|
+
* PlutusTx alias
|
|
878
936
|
* The Plutus Data association map in JSON
|
|
879
937
|
*/
|
|
880
938
|
type AssocMap<K = any, V = any> = {
|
|
881
939
|
map: AssocMapItem<K, V>[];
|
|
882
940
|
};
|
|
941
|
+
/**
|
|
942
|
+
* Aiken alias
|
|
943
|
+
* The Plutus Data association map item in JSON
|
|
944
|
+
*/
|
|
945
|
+
type Pair<K, V> = {
|
|
946
|
+
k: K;
|
|
947
|
+
v: V;
|
|
948
|
+
};
|
|
949
|
+
/**
|
|
950
|
+
* Aiken alias
|
|
951
|
+
* The Plutus Data association map in JSON
|
|
952
|
+
*/
|
|
953
|
+
type Pairs<K = any, V = any> = {
|
|
954
|
+
map: Pair<K, V>[];
|
|
955
|
+
};
|
|
883
956
|
/**
|
|
884
957
|
* The utility function to create a Plutus Data boolean in JSON
|
|
885
958
|
* @param b boolean value
|
|
@@ -930,6 +1003,13 @@ declare const plutusBSArrayToString: (bsArray: List<ByteString>) => string;
|
|
|
930
1003
|
* @returns The Plutus Data association map object
|
|
931
1004
|
*/
|
|
932
1005
|
declare const assocMap: <K, V>(mapItems: [K, V][], validation?: boolean) => AssocMap<K, V>;
|
|
1006
|
+
/**
|
|
1007
|
+
* The utility function to create a Plutus Data Pairs in JSON
|
|
1008
|
+
* @param mapItems The items map in array
|
|
1009
|
+
* @param validation Default true - If current data construction would perform validation (introducing this flag due to possible performance issue in loop validation)
|
|
1010
|
+
* @returns The Plutus Data Pairs object
|
|
1011
|
+
*/
|
|
1012
|
+
declare const pairs: <K, V>(mapItems: [K, V][], validation?: boolean) => Pairs<K, V>;
|
|
933
1013
|
|
|
934
1014
|
/**
|
|
935
1015
|
* All the type aliases here represent the type name used in smart contracts from PlutusTx or Aiken.
|
|
@@ -1038,7 +1118,7 @@ declare const scriptHash: (bytes: string) => ScriptHash;
|
|
|
1038
1118
|
* @param bytes The script hash in hex
|
|
1039
1119
|
* @returns The Plutus Data script hash object
|
|
1040
1120
|
*/
|
|
1041
|
-
declare const pubKeyHash: (bytes: string) =>
|
|
1121
|
+
declare const pubKeyHash: (bytes: string) => PubKeyHash;
|
|
1042
1122
|
/**
|
|
1043
1123
|
* The utility function to create a Plutus Data policy id in JSON
|
|
1044
1124
|
* @param bytes The policy id in hex
|
|
@@ -1123,18 +1203,42 @@ declare const some: <T>(value: T) => Some<T>;
|
|
|
1123
1203
|
*/
|
|
1124
1204
|
declare const none: () => None;
|
|
1125
1205
|
|
|
1206
|
+
/**
|
|
1207
|
+
* The Plutus Data verification key in JSON
|
|
1208
|
+
*/
|
|
1209
|
+
type VerificationKey = ConStr0<[PubKeyHash]>;
|
|
1210
|
+
/**
|
|
1211
|
+
* The Plutus Data Script key in JSON
|
|
1212
|
+
*/
|
|
1213
|
+
type Script = ConStr1<[ScriptHash]>;
|
|
1126
1214
|
/**
|
|
1127
1215
|
* The Plutus Data staking credential in JSON
|
|
1128
1216
|
*/
|
|
1129
|
-
type MaybeStakingHash = ConStr1<[]> | ConStr0<[ConStr0<[
|
|
1217
|
+
type MaybeStakingHash = ConStr1<[]> | ConStr0<[ConStr0<[VerificationKey]>]> | ConStr0<[ConStr0<[Script]>]>;
|
|
1130
1218
|
/**
|
|
1131
1219
|
* The Plutus Data public key address in JSON
|
|
1132
1220
|
*/
|
|
1133
|
-
type PubKeyAddress = ConStr0<[
|
|
1221
|
+
type PubKeyAddress = ConStr0<[VerificationKey, MaybeStakingHash]>;
|
|
1134
1222
|
/**
|
|
1135
1223
|
* The Plutus Data script address in JSON
|
|
1136
1224
|
*/
|
|
1137
|
-
type ScriptAddress = ConStr0<[
|
|
1225
|
+
type ScriptAddress = ConStr0<[Script, MaybeStakingHash]>;
|
|
1226
|
+
/**
|
|
1227
|
+
* The Plutus Data credential in JSON
|
|
1228
|
+
*/
|
|
1229
|
+
type Credential = VerificationKey | Script;
|
|
1230
|
+
/**
|
|
1231
|
+
* The utility function to create a Plutus Data verification key in JSON
|
|
1232
|
+
* @param bytes The public key hash in hex
|
|
1233
|
+
* @returns The Plutus Data verification key object
|
|
1234
|
+
*/
|
|
1235
|
+
declare const verificationKey: (bytes: string) => VerificationKey;
|
|
1236
|
+
/**
|
|
1237
|
+
* The utility function to create a Plutus Data script key in JSON
|
|
1238
|
+
* @param bytes The script hash in hex
|
|
1239
|
+
* @returns The Plutus Data script key object
|
|
1240
|
+
* */
|
|
1241
|
+
declare const script: (bytes: string) => Script;
|
|
1138
1242
|
/**
|
|
1139
1243
|
* The utility function to create a Plutus Data staking hash in JSON
|
|
1140
1244
|
* @param stakeCredential The staking credential in hex
|
|
@@ -1158,8 +1262,41 @@ declare const pubKeyAddress: (bytes: string, stakeCredential?: string, isStakeSc
|
|
|
1158
1262
|
* @returns The Plutus Data script address object
|
|
1159
1263
|
*/
|
|
1160
1264
|
declare const scriptAddress: (bytes: string, stakeCredential?: string, isStakeScriptCredential?: boolean) => ScriptAddress;
|
|
1265
|
+
/**
|
|
1266
|
+
* The utility function to create a Plutus Data credential in JSON
|
|
1267
|
+
* @param hash The pub key hash or script hash
|
|
1268
|
+
* @param isScriptCredential Indicate if the credential is script hash (false for pub key hash)
|
|
1269
|
+
* @returns Plutus Data credential object
|
|
1270
|
+
*/
|
|
1271
|
+
declare const credential: (hash: string, isScriptCredential?: boolean) => Credential;
|
|
1272
|
+
|
|
1273
|
+
type ProofStep = ProofStepBranch | ProofStepFork | ProofStepLeaf;
|
|
1274
|
+
type ProofStepBranch = ConStr0<[
|
|
1275
|
+
Integer,
|
|
1276
|
+
ByteString
|
|
1277
|
+
]>;
|
|
1278
|
+
type ProofStepFork = ConStr1<[
|
|
1279
|
+
Integer,
|
|
1280
|
+
ForkNeighbor
|
|
1281
|
+
]>;
|
|
1282
|
+
type ProofStepLeaf = ConStr2<[
|
|
1283
|
+
Integer,
|
|
1284
|
+
ByteString,
|
|
1285
|
+
ByteString
|
|
1286
|
+
]>;
|
|
1287
|
+
type ForkNeighbor = ConStr0<[
|
|
1288
|
+
Integer,
|
|
1289
|
+
ByteString,
|
|
1290
|
+
ByteString
|
|
1291
|
+
]>;
|
|
1292
|
+
/**
|
|
1293
|
+
* The utility function to transform a JSON proof from Aiken TS offchain library to Mesh JSON Data type
|
|
1294
|
+
* @param proof The proof object from Aiken TS offchain library
|
|
1295
|
+
* @returns The proof object in Mesh JSON Data type
|
|
1296
|
+
*/
|
|
1297
|
+
declare const jsonProofToPlutusData: (proof: object) => ProofStep[];
|
|
1161
1298
|
|
|
1162
|
-
type PlutusData = ConStr | Bool | ByteString | Integer | List | AssocMap | MaybeStakingHash | PubKeyAddress | ScriptAddress | AssetClass | OutputReference | PubKeyHash | POSIXTime | Dict<any> | Tuple<any, any>;
|
|
1299
|
+
type PlutusData = ConStr | Bool | ByteString | Integer | List | AssocMap | Pairs | MaybeStakingHash | PubKeyAddress | ScriptAddress | AssetClass | OutputReference | PubKeyHash | POSIXTime | Dict<any> | Tuple<any, any>;
|
|
1163
1300
|
|
|
1164
1301
|
/**
|
|
1165
1302
|
* Converting bytes to hex string
|
|
@@ -1354,6 +1491,19 @@ declare class MeshValue {
|
|
|
1354
1491
|
* @returns boolean
|
|
1355
1492
|
*/
|
|
1356
1493
|
leqUnit: (unit: string, other: MeshValue) => boolean;
|
|
1494
|
+
/**
|
|
1495
|
+
* Check if the value is equal to another value
|
|
1496
|
+
* @param other - The value to compare against
|
|
1497
|
+
* @returns boolean
|
|
1498
|
+
*/
|
|
1499
|
+
eq: (other: MeshValue) => boolean;
|
|
1500
|
+
/**
|
|
1501
|
+
* Check if the specific unit of value is equal to that unit of another value
|
|
1502
|
+
* @param unit - The unit to compare
|
|
1503
|
+
* @param other - The value to compare against
|
|
1504
|
+
* @returns boolean
|
|
1505
|
+
*/
|
|
1506
|
+
eqUnit: (unit: string, other: MeshValue) => boolean;
|
|
1357
1507
|
/**
|
|
1358
1508
|
* Check if the value is empty
|
|
1359
1509
|
* @returns boolean
|
|
@@ -1409,7 +1559,6 @@ interface IWithdrawalBlueprint {
|
|
|
1409
1559
|
cbor: string;
|
|
1410
1560
|
hash: string;
|
|
1411
1561
|
address: string;
|
|
1412
|
-
isStakeScriptCredential: boolean;
|
|
1413
1562
|
paramScript(compiledCode: string, params: string[], paramsType: PlutusDataType): this;
|
|
1414
1563
|
noParamScript(compiledCode: string): this;
|
|
1415
1564
|
}
|
|
@@ -1437,6 +1586,7 @@ declare const SUPPORTED_WALLETS: string[];
|
|
|
1437
1586
|
|
|
1438
1587
|
declare const DEFAULT_V1_COST_MODEL_LIST: number[];
|
|
1439
1588
|
declare const DEFAULT_V2_COST_MODEL_LIST: number[];
|
|
1589
|
+
declare const DEFAULT_V3_COST_MODEL_LIST: number[];
|
|
1440
1590
|
|
|
1441
1591
|
declare const SUPPORTED_LANGUAGE_VIEWS: Record<Era, Partial<Record<keyof typeof LANGUAGE_VERSIONS, string>>>;
|
|
1442
1592
|
declare const resolveLanguageView: (era: Era, version: LanguageVersion) => string | undefined;
|
|
@@ -1500,12 +1650,19 @@ declare const CIP68_100: (tokenNameHex: string) => string;
|
|
|
1500
1650
|
*/
|
|
1501
1651
|
declare const CIP68_222: (tokenNameHex: string) => string;
|
|
1502
1652
|
|
|
1653
|
+
type IFetcherOptions = {
|
|
1654
|
+
maxPage?: number;
|
|
1655
|
+
order?: "asc" | "desc";
|
|
1656
|
+
[key: string]: any;
|
|
1657
|
+
};
|
|
1658
|
+
declare const DEFAULT_FETCHER_OPTIONS: IFetcherOptions;
|
|
1503
1659
|
/**
|
|
1504
1660
|
* Fetcher interface defines end points to query blockchain data.
|
|
1505
1661
|
*/
|
|
1506
1662
|
interface IFetcher {
|
|
1507
1663
|
fetchAccountInfo(address: string): Promise<AccountInfo>;
|
|
1508
1664
|
fetchAddressUTxOs(address: string, asset?: string): Promise<UTxO[]>;
|
|
1665
|
+
fetchAddressTxs(address: string, options?: IFetcherOptions): Promise<TransactionInfo[]>;
|
|
1509
1666
|
fetchAssetAddresses(asset: string): Promise<{
|
|
1510
1667
|
address: string;
|
|
1511
1668
|
quantity: string;
|
|
@@ -1524,11 +1681,10 @@ interface IFetcher {
|
|
|
1524
1681
|
}
|
|
1525
1682
|
|
|
1526
1683
|
interface IInitiator {
|
|
1527
|
-
getChangeAddress():
|
|
1528
|
-
getCollateral():
|
|
1529
|
-
getUtxos():
|
|
1684
|
+
getChangeAddress(): Promise<string>;
|
|
1685
|
+
getCollateral(): Promise<UTxO[]>;
|
|
1686
|
+
getUtxos(): Promise<UTxO[]>;
|
|
1530
1687
|
}
|
|
1531
|
-
type SometimesPromise<T> = Promise<T> | T;
|
|
1532
1688
|
|
|
1533
1689
|
interface IListener {
|
|
1534
1690
|
onTxConfirmed(txHash: string, callback: () => void, limit?: number): void;
|
|
@@ -1539,8 +1695,8 @@ interface ISubmitter {
|
|
|
1539
1695
|
}
|
|
1540
1696
|
|
|
1541
1697
|
interface IMeshTxSerializer {
|
|
1542
|
-
verbose: boolean;
|
|
1543
1698
|
serializeTxBody(txBuilderBody: MeshTxBuilderBody, protocolParams: Protocol): string;
|
|
1699
|
+
serializeTxBodyWithMockSignatures(txBuilderBody: MeshTxBuilderBody, protocolParams: Protocol): string;
|
|
1544
1700
|
addSigningKeys(txHex: string, signingKeys: string[]): string;
|
|
1545
1701
|
resolver: IResolver;
|
|
1546
1702
|
deserializer: IDeserializer;
|
|
@@ -1548,6 +1704,8 @@ interface IMeshTxSerializer {
|
|
|
1548
1704
|
serializeAddress(address: DeserializedAddress, networkId?: 0 | 1): string;
|
|
1549
1705
|
serializePoolId(hash: string): string;
|
|
1550
1706
|
serializeRewardAddress(stakeKeyHash: string, isScriptHash?: boolean, network_id?: 0 | 1): string;
|
|
1707
|
+
serializeOutput(output: Output): string;
|
|
1708
|
+
serializeValue(value: Asset[]): string;
|
|
1551
1709
|
}
|
|
1552
1710
|
interface IResolver {
|
|
1553
1711
|
keys: {
|
|
@@ -1560,7 +1718,7 @@ interface IResolver {
|
|
|
1560
1718
|
resolveTxHash(txHex: string): string;
|
|
1561
1719
|
};
|
|
1562
1720
|
data: {
|
|
1563
|
-
resolveDataHash(
|
|
1721
|
+
resolveDataHash(rawData: BuilderData["content"], type?: PlutusDataType): string;
|
|
1564
1722
|
};
|
|
1565
1723
|
script: {
|
|
1566
1724
|
resolveScriptRef(script: NativeScript | PlutusScript): string;
|
|
@@ -1586,7 +1744,7 @@ interface ISigner {
|
|
|
1586
1744
|
}
|
|
1587
1745
|
|
|
1588
1746
|
interface IEvaluator {
|
|
1589
|
-
evaluateTx(tx: string): Promise<Omit<Action, "data">[]>;
|
|
1747
|
+
evaluateTx(tx: string, additionalUtxos?: UTxO[], additionalTxs?: string[]): Promise<Omit<Action, "data">[]>;
|
|
1590
1748
|
}
|
|
1591
1749
|
|
|
1592
1750
|
interface IWallet extends IInitiator, ISigner, ISubmitter {
|
|
@@ -1646,4 +1804,4 @@ declare const hashDrepAnchor: (jsonLD: object) => string;
|
|
|
1646
1804
|
|
|
1647
1805
|
declare function getFile(url: string): string;
|
|
1648
1806
|
|
|
1649
|
-
export { type AccountInfo, type Action, type Anchor, type Asset, type AssetClass, type AssetExtended, AssetFingerprint, type AssetMetadata, type AssetName, type AssocMap, type AssocMapItem, type BasicVote, BigNum, type BlockInfo, type Bool, type Budget, type BuilderData, type BuiltinByteString, type ByteString, CIP68_100, CIP68_222, type Certificate, type CertificateType, type ConStr, type ConStr0, type ConStr1, type ConStr2, type ConStr3, type CurrencySymbol, DEFAULT_PROTOCOL_PARAMETERS, DEFAULT_REDEEMER_BUDGET, DEFAULT_V1_COST_MODEL_LIST, DEFAULT_V2_COST_MODEL_LIST, DREP_DEPOSIT, type DRep, type Data, type DataSignature, type DatumSource, type DeserializedAddress, type DeserializedScript, type Dict, type DictItem, type Era, type Files, type FungibleAssetMetadata, type GovernanceProposalInfo, HARDENED_KEY_START, type IDeserializer, type IEvaluator, type IFetcher, type IInitiator, type IListener, type IMeshTxSerializer, type IMintingBlueprint, type IResolver, type ISigner, type ISpendingBlueprint, type ISubmitter, type IWallet, type IWithdrawalBlueprint, type ImageAssetMetadata, type Integer, LANGUAGE_VERSIONS, type LanguageVersion, type List, type MAssetClass, type MBool, type MConStr, type MConStr0, type MConStr1, type MConStr2, type MConStr3, type MMaybeStakingHash, type MNone, type MOption, type MOutputReference, type MPubKeyAddress, type MScriptAddress, type MSome, type MTuple, type MTxOutRef, type MValue, type MaybeStakingHash, type MeshTxBuilderBody, MeshValue, type Message, type Metadata, type Metadatum, type MetadatumMap, type Mint, type MintItem, type NativeScript, type Network, type NonFungibleAssetMetadata, type None, type Option, type Output, type OutputReference, POLICY_ID_LENGTH, type POSIXTime, type PlutusData, type PlutusDataType, type PlutusScript, type PolicyId, type PoolMetadata, type PoolParams, type Protocol, type PubKeyAddress, type PubKeyHash, type PubKeyTxIn, type PubKeyWithdrawal, type Quantity, type Recipient, type Redeemer, type RedeemerTagType, type RefTxIn, type Relay, type RequiredWith, type RoyaltiesStandard, SLOT_CONFIG_NETWORK, SUPPORTED_CLOCKS, SUPPORTED_HANDLES, SUPPORTED_LANGUAGE_VIEWS, SUPPORTED_OGMIOS_LINKS, SUPPORTED_TOKENS, SUPPORTED_WALLETS, type ScriptAddress, type ScriptHash, type ScriptSource, type ScriptTxIn, type ScriptTxInParameter, type ScriptVote, type ScriptWithdrawal, type SimpleScriptSourceInfo, type SimpleScriptTxIn, type SimpleScriptTxInParameter, type SimpleScriptVote, type SimpleScriptWithdrawal, type SlotConfig, type Some, type Token, type TokenName, type TransactionInfo, type Tuple, type TxIn, type TxInParameter, type TxMetadata, type TxOutRef, type UTxO, type Unit, UtxoSelection, type UtxoSelectionStrategy, type ValidityRange, type Value, type Vote, type VoteKind, type VoteType, type Voter, type VotingProcedure, type Wallet, type Withdrawal, assetClass, assetName, assocMap, bool, builtinByteString, byteString, bytesToHex, castProtocol, conStr, conStr0, conStr1, conStr2, conStr3, currencySymbol, dict, emptyTxBuilderBody, experimentalSelectUtxos, fromUTF8, fungibleAssetKeys, getFile, hashByteString, hashDrepAnchor, hexToBytes, hexToString, integer, isNetwork, keepRelevant, largestFirst, largestFirstMultiAsset, list, mAssetClass, mBool, mConStr, mConStr0, mConStr1, mConStr2, mConStr3, mMaybeStakingHash, mNone, mOption, mOutputReference, mPlutusBSArrayToString, mPubKeyAddress, mScriptAddress, mSome, mStringToPlutusBSArray, mTuple, mTxOutRef, mValue, maybeStakingHash, mergeAssets, metadataStandardKeys, metadataToCip68, none, option, outputReference, parseAssetUnit, plutusBSArrayToString, policyId, posixTime, pubKeyAddress, pubKeyHash, resolveEpochNo, resolveFingerprint, resolveLanguageView, resolveSlotNo, resolveTxFees, royaltiesStandardKeys, scriptAddress, scriptHash, slotToBeginUnixTime, some, stringToBSArray, stringToHex, toBytes, toUTF8, tokenName, tuple, txOutRef, unixTimeToEnclosingSlot, validityRangeToObj, value };
|
|
1807
|
+
export { type AccountInfo, type Action, type Anchor, type Asset, type AssetClass, type AssetExtended, AssetFingerprint, type AssetMetadata, type AssetName, type AssocMap, type AssocMapItem, type BasicVote, BigNum, type BlockInfo, type Bool, type Budget, type BuilderData, type BuiltinByteString, type ByteString, CIP68_100, CIP68_222, type Certificate, type CertificateType, type ConStr, type ConStr0, type ConStr1, type ConStr2, type ConStr3, type Credential, type CurrencySymbol, DEFAULT_FETCHER_OPTIONS, DEFAULT_PROTOCOL_PARAMETERS, DEFAULT_REDEEMER_BUDGET, DEFAULT_V1_COST_MODEL_LIST, DEFAULT_V2_COST_MODEL_LIST, DEFAULT_V3_COST_MODEL_LIST, DREP_DEPOSIT, type DRep, type Data, type DataSignature, type DatumSource, type DeserializedAddress, type DeserializedScript, type Dict, type DictItem, type Era, type Extension, type Files, type ForkNeighbor, type FungibleAssetMetadata, type GovernanceProposalInfo, HARDENED_KEY_START, type IDeserializer, type IEvaluator, type IFetcher, type IFetcherOptions, type IInitiator, type IListener, type IMeshTxSerializer, type IMintingBlueprint, type IResolver, type ISigner, type ISpendingBlueprint, type ISubmitter, type IWallet, type IWithdrawalBlueprint, type ImageAssetMetadata, type Integer, LANGUAGE_VERSIONS, type LanguageVersion, type List, type MAssetClass, type MBool, type MConStr, type MConStr0, type MConStr1, type MConStr2, type MConStr3, type MCredential, type MMaybeStakingHash, type MNone, type MOption, type MOutputReference, type MPubKeyAddress, type MScript, type MScriptAddress, type MSome, type MTuple, type MTxOutRef, type MValue, type MVerificationKey, type MaybeStakingHash, type MeshTxBuilderBody, MeshValue, type Message, type Metadata, type Metadatum, type MetadatumMap, type Mint, type MintItem, type MintParam, type NativeScript, type Network, type NonFungibleAssetMetadata, type None, type Option, type Output, type OutputReference, POLICY_ID_LENGTH, type POSIXTime, type Pair, type Pairs, type PlutusData, type PlutusDataType, type PlutusScript, type PolicyId, type PoolMetadata, type PoolParams, type ProofStep, type ProofStepBranch, type ProofStepFork, type ProofStepLeaf, type Protocol, type PubKeyAddress, type PubKeyHash, type PubKeyTxIn, type PubKeyWithdrawal, type Quantity, type Recipient, type Redeemer, type RedeemerTagType, type RefTxIn, type Relay, type RequiredWith, type RoyaltiesStandard, SLOT_CONFIG_NETWORK, SUPPORTED_CLOCKS, SUPPORTED_HANDLES, SUPPORTED_LANGUAGE_VIEWS, SUPPORTED_OGMIOS_LINKS, SUPPORTED_TOKENS, SUPPORTED_WALLETS, type Script, type ScriptAddress, type ScriptHash, type ScriptSource, type ScriptTxIn, type ScriptTxInParameter, type ScriptVote, type ScriptWithdrawal, type SimpleScriptSourceInfo, type SimpleScriptTxIn, type SimpleScriptTxInParameter, type SimpleScriptVote, type SimpleScriptWithdrawal, type SlotConfig, type Some, type Token, type TokenName, type TransactionInfo, type Tuple, type TxIn, type TxInParameter, type TxMetadata, type TxOutRef, type TxOutput, type UTxO, type Unit, UtxoSelection, type UtxoSelectionStrategy, type ValidityRange, type Value, type VerificationKey, type Vote, type VoteKind, type VoteType, type Voter, type VotingProcedure, type Wallet, type Withdrawal, assetClass, assetName, assocMap, bool, builtinByteString, byteString, bytesToHex, castProtocol, cloneTxBuilderBody, conStr, conStr0, conStr1, conStr2, conStr3, credential, currencySymbol, dict, emptyTxBuilderBody, experimentalSelectUtxos, fromUTF8, fungibleAssetKeys, getFile, hashByteString, hashDrepAnchor, hexToBytes, hexToString, integer, isNetwork, jsonProofToPlutusData, keepRelevant, largestFirst, largestFirstMultiAsset, list, mAssetClass, mBool, mConStr, mConStr0, mConStr1, mConStr2, mConStr3, mCredential, mMaybeStakingHash, mNone, mOption, mOutputReference, mPlutusBSArrayToString, mPubKeyAddress, mScript, mScriptAddress, mSome, mStringToPlutusBSArray, mTuple, mTxOutRef, mValue, mVerificationKey, maybeStakingHash, mergeAssets, metadataStandardKeys, metadataToCip68, none, option, outputReference, pairs, parseAssetUnit, plutusBSArrayToString, policyId, posixTime, pubKeyAddress, pubKeyHash, resolveEpochNo, resolveFingerprint, resolveLanguageView, resolveSlotNo, resolveTxFees, royaltiesStandardKeys, script, scriptAddress, scriptHash, slotToBeginUnixTime, some, stringToBSArray, stringToHex, toBytes, toUTF8, tokenName, tuple, txInToUtxo, txOutRef, unixTimeToEnclosingSlot, validityRangeToObj, value, verificationKey };
|