@anastasia-labs/cardano-multiplatform-lib-nodejs 6.0.0 → 6.0.1-1
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/cardano_multiplatform_lib.d.ts +321 -321
- package/cardano_multiplatform_lib.js +493 -491
- package/cardano_multiplatform_lib_bg.wasm +0 -0
- package/package.json +1 -1
|
@@ -17,10 +17,17 @@ export function emip3_encrypt_with_password(password: string, salt: string, nonc
|
|
|
17
17
|
*/
|
|
18
18
|
export function emip3_decrypt_with_password(password: string, data: string): string;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @
|
|
20
|
+
* encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
|
|
21
|
+
* @param {Uint8Array} bytes
|
|
22
|
+
* @returns {TransactionMetadatum}
|
|
22
23
|
*/
|
|
23
|
-
export function
|
|
24
|
+
export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
|
|
25
|
+
/**
|
|
26
|
+
* decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
|
|
27
|
+
* @param {TransactionMetadatum} metadata
|
|
28
|
+
* @returns {Uint8Array | undefined}
|
|
29
|
+
*/
|
|
30
|
+
export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array | undefined;
|
|
24
31
|
/**
|
|
25
32
|
* @param {AuxiliaryData} auxiliary_data
|
|
26
33
|
* @returns {AuxiliaryDataHash}
|
|
@@ -124,30 +131,6 @@ export function min_no_script_fee(tx: Transaction, linear_fee: LinearFee): bigin
|
|
|
124
131
|
*/
|
|
125
132
|
export function min_fee(tx: Transaction, linear_fee: LinearFee, ex_unit_prices: ExUnitPrices, total_ref_script_size: bigint): bigint;
|
|
126
133
|
/**
|
|
127
|
-
* @param {TransactionOutput} output
|
|
128
|
-
* @param {bigint} coins_per_utxo_byte
|
|
129
|
-
* @returns {bigint}
|
|
130
|
-
*/
|
|
131
|
-
export function min_ada_required(output: TransactionOutput, coins_per_utxo_byte: bigint): bigint;
|
|
132
|
-
/**
|
|
133
|
-
* encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
|
|
134
|
-
* @param {Uint8Array} bytes
|
|
135
|
-
* @returns {TransactionMetadatum}
|
|
136
|
-
*/
|
|
137
|
-
export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
|
|
138
|
-
/**
|
|
139
|
-
* decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
|
|
140
|
-
* @param {TransactionMetadatum} metadata
|
|
141
|
-
* @returns {Uint8Array | undefined}
|
|
142
|
-
*/
|
|
143
|
-
export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array | undefined;
|
|
144
|
-
/**
|
|
145
|
-
* @param {TransactionHash} tx_body_hash
|
|
146
|
-
* @param {PrivateKey} sk
|
|
147
|
-
* @returns {Vkeywitness}
|
|
148
|
-
*/
|
|
149
|
-
export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
|
|
150
|
-
/**
|
|
151
134
|
* Converts JSON to Metadata according to MetadataJsonSchema
|
|
152
135
|
* @param {string} json
|
|
153
136
|
* @param {MetadataJsonSchema} schema
|
|
@@ -162,6 +145,11 @@ export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonS
|
|
|
162
145
|
*/
|
|
163
146
|
export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
|
|
164
147
|
/**
|
|
148
|
+
* @param {Redeemers} redeemers
|
|
149
|
+
* @returns {ExUnits}
|
|
150
|
+
*/
|
|
151
|
+
export function compute_total_ex_units(redeemers: Redeemers): ExUnits;
|
|
152
|
+
/**
|
|
165
153
|
* @param {TransactionHash} tx_body_hash
|
|
166
154
|
* @param {ByronAddress} addr
|
|
167
155
|
* @param {LegacyDaedalusPrivateKey} key
|
|
@@ -176,6 +164,18 @@ export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, a
|
|
|
176
164
|
*/
|
|
177
165
|
export function make_icarus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: Bip32PrivateKey): BootstrapWitness;
|
|
178
166
|
/**
|
|
167
|
+
* @param {TransactionHash} tx_body_hash
|
|
168
|
+
* @param {PrivateKey} sk
|
|
169
|
+
* @returns {Vkeywitness}
|
|
170
|
+
*/
|
|
171
|
+
export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
|
|
172
|
+
/**
|
|
173
|
+
* @param {TransactionOutput} output
|
|
174
|
+
* @param {bigint} coins_per_utxo_byte
|
|
175
|
+
* @returns {bigint}
|
|
176
|
+
*/
|
|
177
|
+
export function min_ada_required(output: TransactionOutput, coins_per_utxo_byte: bigint): bigint;
|
|
178
|
+
/**
|
|
179
179
|
* @param {string} json
|
|
180
180
|
* @param {CardanoNodePlutusDatumSchema} schema
|
|
181
181
|
* @returns {PlutusData}
|
|
@@ -189,43 +189,23 @@ export function encode_json_str_to_plutus_datum(json: string, schema: CardanoNod
|
|
|
189
189
|
export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: CardanoNodePlutusDatumSchema): string;
|
|
190
190
|
/**
|
|
191
191
|
*/
|
|
192
|
-
export enum AuxiliaryDataKind {
|
|
193
|
-
Shelley = 0,
|
|
194
|
-
ShelleyMA = 1,
|
|
195
|
-
Conway = 2,
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
*/
|
|
199
192
|
export enum RedeemersKind {
|
|
200
193
|
ArrLegacyRedeemer = 0,
|
|
201
194
|
MapRedeemerKeyToRedeemerVal = 1,
|
|
202
195
|
}
|
|
203
196
|
/**
|
|
204
197
|
*/
|
|
205
|
-
export enum
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
198
|
+
export enum Language {
|
|
199
|
+
PlutusV1 = 0,
|
|
200
|
+
PlutusV2 = 1,
|
|
201
|
+
PlutusV3 = 2,
|
|
209
202
|
}
|
|
210
203
|
/**
|
|
211
204
|
*/
|
|
212
|
-
export enum
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
LargestFirst = 0,
|
|
217
|
-
/**
|
|
218
|
-
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
219
|
-
*/
|
|
220
|
-
RandomImprove = 1,
|
|
221
|
-
/**
|
|
222
|
-
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
223
|
-
*/
|
|
224
|
-
LargestFirstMultiAsset = 2,
|
|
225
|
-
/**
|
|
226
|
-
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
227
|
-
*/
|
|
228
|
-
RandomImproveMultiAsset = 3,
|
|
205
|
+
export enum AuxiliaryDataKind {
|
|
206
|
+
Shelley = 0,
|
|
207
|
+
ShelleyMA = 1,
|
|
208
|
+
Conway = 2,
|
|
229
209
|
}
|
|
230
210
|
/**
|
|
231
211
|
*/
|
|
@@ -236,28 +216,11 @@ export enum MetadataJsonSchema {
|
|
|
236
216
|
}
|
|
237
217
|
/**
|
|
238
218
|
*/
|
|
239
|
-
export enum
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
Bytes = 4,
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
*/
|
|
248
|
-
export enum NativeScriptKind {
|
|
249
|
-
ScriptPubkey = 0,
|
|
250
|
-
ScriptAll = 1,
|
|
251
|
-
ScriptAny = 2,
|
|
252
|
-
ScriptNOfK = 3,
|
|
253
|
-
ScriptInvalidBefore = 4,
|
|
254
|
-
ScriptInvalidHereafter = 5,
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
*/
|
|
258
|
-
export enum DelegationDistributionKind {
|
|
259
|
-
Weighted = 0,
|
|
260
|
-
Legacy = 1,
|
|
219
|
+
export enum ScriptKind {
|
|
220
|
+
Native = 0,
|
|
221
|
+
PlutusV1 = 1,
|
|
222
|
+
PlutusV2 = 2,
|
|
223
|
+
PlutusV3 = 3,
|
|
261
224
|
}
|
|
262
225
|
/**
|
|
263
226
|
* Careful: this enum doesn't include the network ID part of the header
|
|
@@ -279,19 +242,64 @@ export enum AddressHeaderKind {
|
|
|
279
242
|
}
|
|
280
243
|
/**
|
|
281
244
|
*/
|
|
282
|
-
export enum
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
245
|
+
export enum RedeemerTag {
|
|
246
|
+
Spend = 0,
|
|
247
|
+
Mint = 1,
|
|
248
|
+
Cert = 2,
|
|
249
|
+
Reward = 3,
|
|
250
|
+
Voting = 4,
|
|
251
|
+
Proposing = 5,
|
|
287
252
|
}
|
|
288
253
|
/**
|
|
289
254
|
*/
|
|
290
|
-
export enum
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
255
|
+
export enum StakeDistributionKind {
|
|
256
|
+
SingleKey = 0,
|
|
257
|
+
BootstrapEra = 1,
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
*/
|
|
261
|
+
export enum Vote {
|
|
262
|
+
No = 0,
|
|
263
|
+
Yes = 1,
|
|
264
|
+
Abstain = 2,
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
*/
|
|
268
|
+
export enum CoinSelectionStrategyCIP2 {
|
|
269
|
+
/**
|
|
270
|
+
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
271
|
+
*/
|
|
272
|
+
LargestFirst = 0,
|
|
273
|
+
/**
|
|
274
|
+
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
275
|
+
*/
|
|
276
|
+
RandomImprove = 1,
|
|
277
|
+
/**
|
|
278
|
+
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
279
|
+
*/
|
|
280
|
+
LargestFirstMultiAsset = 2,
|
|
281
|
+
/**
|
|
282
|
+
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
283
|
+
*/
|
|
284
|
+
RandomImproveMultiAsset = 3,
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
*/
|
|
288
|
+
export enum AddressKind {
|
|
289
|
+
Base = 0,
|
|
290
|
+
Ptr = 1,
|
|
291
|
+
Enterprise = 2,
|
|
292
|
+
Reward = 3,
|
|
293
|
+
Byron = 4,
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
*/
|
|
297
|
+
export enum TransactionMetadatumKind {
|
|
298
|
+
Map = 0,
|
|
299
|
+
List = 1,
|
|
300
|
+
Int = 2,
|
|
301
|
+
Bytes = 3,
|
|
302
|
+
Text = 4,
|
|
295
303
|
}
|
|
296
304
|
/**
|
|
297
305
|
* JSON <-> PlutusData conversion schemas.
|
|
@@ -347,28 +355,13 @@ export enum CardanoNodePlutusDatumSchema {
|
|
|
347
355
|
}
|
|
348
356
|
/**
|
|
349
357
|
*/
|
|
350
|
-
export enum
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
*/
|
|
360
|
-
export enum TransactionOutputKind {
|
|
361
|
-
AlonzoFormatTxOut = 0,
|
|
362
|
-
ConwayFormatTxOut = 1,
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
*/
|
|
366
|
-
export enum TransactionMetadatumKind {
|
|
367
|
-
Map = 0,
|
|
368
|
-
List = 1,
|
|
369
|
-
Int = 2,
|
|
370
|
-
Bytes = 3,
|
|
371
|
-
Text = 4,
|
|
358
|
+
export enum NativeScriptKind {
|
|
359
|
+
ScriptPubkey = 0,
|
|
360
|
+
ScriptAll = 1,
|
|
361
|
+
ScriptAny = 2,
|
|
362
|
+
ScriptNOfK = 3,
|
|
363
|
+
ScriptInvalidBefore = 4,
|
|
364
|
+
ScriptInvalidHereafter = 5,
|
|
372
365
|
}
|
|
373
366
|
/**
|
|
374
367
|
*/
|
|
@@ -378,12 +371,20 @@ export enum ChunkableStringKind {
|
|
|
378
371
|
}
|
|
379
372
|
/**
|
|
380
373
|
*/
|
|
381
|
-
export enum
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
374
|
+
export enum DRepKind {
|
|
375
|
+
Key = 0,
|
|
376
|
+
Script = 1,
|
|
377
|
+
AlwaysAbstain = 2,
|
|
378
|
+
AlwaysNoConfidence = 3,
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
*/
|
|
382
|
+
export enum PlutusDataKind {
|
|
383
|
+
ConstrPlutusData = 0,
|
|
384
|
+
Map = 1,
|
|
385
|
+
List = 2,
|
|
386
|
+
Integer = 3,
|
|
387
|
+
Bytes = 4,
|
|
387
388
|
}
|
|
388
389
|
/**
|
|
389
390
|
*/
|
|
@@ -415,20 +416,55 @@ export enum CertificateKind {
|
|
|
415
416
|
}
|
|
416
417
|
/**
|
|
417
418
|
*/
|
|
419
|
+
export enum VoterKind {
|
|
420
|
+
ConstitutionalCommitteeHotKeyHash = 0,
|
|
421
|
+
ConstitutionalCommitteeHotScriptHash = 1,
|
|
422
|
+
DRepKeyHash = 2,
|
|
423
|
+
DRepScriptHash = 3,
|
|
424
|
+
StakingPoolKeyHash = 4,
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
*/
|
|
428
|
+
export enum DelegationDistributionKind {
|
|
429
|
+
Weighted = 0,
|
|
430
|
+
Legacy = 1,
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
*/
|
|
434
|
+
export enum RelayKind {
|
|
435
|
+
SingleHostAddr = 0,
|
|
436
|
+
SingleHostName = 1,
|
|
437
|
+
MultiHostName = 2,
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
*/
|
|
418
441
|
export enum CredentialKind {
|
|
419
442
|
PubKey = 0,
|
|
420
443
|
Script = 1,
|
|
421
444
|
}
|
|
422
445
|
/**
|
|
423
446
|
*/
|
|
424
|
-
export enum
|
|
425
|
-
|
|
426
|
-
BootstrapEra = 1,
|
|
447
|
+
export enum ChangeSelectionAlgo {
|
|
448
|
+
Default = 0,
|
|
427
449
|
}
|
|
428
450
|
/**
|
|
429
451
|
*/
|
|
430
|
-
export enum
|
|
431
|
-
|
|
452
|
+
export enum SpendingDataKind {
|
|
453
|
+
SpendingDataPubKey = 0,
|
|
454
|
+
SpendingDataScript = 1,
|
|
455
|
+
SpendingDataRedeem = 2,
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
*/
|
|
459
|
+
export enum TransactionOutputKind {
|
|
460
|
+
AlonzoFormatTxOut = 0,
|
|
461
|
+
ConwayFormatTxOut = 1,
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
*/
|
|
465
|
+
export enum NonceKind {
|
|
466
|
+
Identity = 0,
|
|
467
|
+
Hash = 1,
|
|
432
468
|
}
|
|
433
469
|
/**
|
|
434
470
|
* Which version of the CIP25 spec to use. See CIP25 for details.
|
|
@@ -447,19 +483,6 @@ export enum CIP25Version {
|
|
|
447
483
|
}
|
|
448
484
|
/**
|
|
449
485
|
*/
|
|
450
|
-
export enum RelayKind {
|
|
451
|
-
SingleHostAddr = 0,
|
|
452
|
-
SingleHostName = 1,
|
|
453
|
-
MultiHostName = 2,
|
|
454
|
-
}
|
|
455
|
-
/**
|
|
456
|
-
*/
|
|
457
|
-
export enum NonceKind {
|
|
458
|
-
Identity = 0,
|
|
459
|
-
Hash = 1,
|
|
460
|
-
}
|
|
461
|
-
/**
|
|
462
|
-
*/
|
|
463
486
|
export enum GovActionKind {
|
|
464
487
|
ParameterChangeAction = 0,
|
|
465
488
|
HardForkInitiationAction = 1,
|
|
@@ -477,29 +500,6 @@ export enum DatumOptionKind {
|
|
|
477
500
|
}
|
|
478
501
|
/**
|
|
479
502
|
*/
|
|
480
|
-
export enum Language {
|
|
481
|
-
PlutusV1 = 0,
|
|
482
|
-
PlutusV2 = 1,
|
|
483
|
-
PlutusV3 = 2,
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
*/
|
|
487
|
-
export enum VoterKind {
|
|
488
|
-
ConstitutionalCommitteeHotKeyHash = 0,
|
|
489
|
-
ConstitutionalCommitteeHotScriptHash = 1,
|
|
490
|
-
DRepKeyHash = 2,
|
|
491
|
-
DRepScriptHash = 3,
|
|
492
|
-
StakingPoolKeyHash = 4,
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
*/
|
|
496
|
-
export enum SpendingDataKind {
|
|
497
|
-
SpendingDataPubKey = 0,
|
|
498
|
-
SpendingDataScript = 1,
|
|
499
|
-
SpendingDataRedeem = 2,
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
*/
|
|
503
503
|
export class AddrAttributes {
|
|
504
504
|
free(): void;
|
|
505
505
|
/**
|
|
@@ -1072,111 +1072,111 @@ export class AssetName {
|
|
|
1072
1072
|
free(): void;
|
|
1073
1073
|
/**
|
|
1074
1074
|
*
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
1077
|
-
*
|
|
1078
|
-
*
|
|
1079
|
-
|
|
1080
|
-
static from_str(utf8_str: string): AssetName;
|
|
1081
|
-
/**
|
|
1082
|
-
*
|
|
1083
|
-
* * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
|
|
1084
|
-
*
|
|
1085
|
-
* @returns {string}
|
|
1075
|
+
* * Serialize this type to CBOR bytes
|
|
1076
|
+
* * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
|
|
1077
|
+
* * If created from scratch the CBOR will be canonical.
|
|
1078
|
+
*
|
|
1079
|
+
* @returns {Uint8Array}
|
|
1086
1080
|
*/
|
|
1087
|
-
|
|
1081
|
+
to_cbor_bytes(): Uint8Array;
|
|
1088
1082
|
/**
|
|
1089
1083
|
*
|
|
1090
|
-
* *
|
|
1084
|
+
* * Serialize this type to CBOR bytes using canonical CBOR encodings
|
|
1091
1085
|
*
|
|
1092
1086
|
* @returns {Uint8Array}
|
|
1093
1087
|
*/
|
|
1094
|
-
|
|
1088
|
+
to_canonical_cbor_bytes(): Uint8Array;
|
|
1095
1089
|
/**
|
|
1096
1090
|
*
|
|
1097
|
-
* *
|
|
1091
|
+
* * Create this type from CBOR bytes
|
|
1098
1092
|
*
|
|
1099
|
-
* @param {Uint8Array}
|
|
1093
|
+
* @param {Uint8Array} cbor_bytes
|
|
1100
1094
|
* @returns {AssetName}
|
|
1101
1095
|
*/
|
|
1102
|
-
static
|
|
1096
|
+
static from_cbor_bytes(cbor_bytes: Uint8Array): AssetName;
|
|
1103
1097
|
/**
|
|
1104
1098
|
*
|
|
1105
|
-
* *
|
|
1099
|
+
* * Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
|
|
1100
|
+
* * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
|
|
1101
|
+
* * If created from scratch the CBOR will be canonical.
|
|
1106
1102
|
*
|
|
1107
1103
|
* @returns {string}
|
|
1108
1104
|
*/
|
|
1109
|
-
|
|
1105
|
+
to_cbor_hex(): string;
|
|
1110
1106
|
/**
|
|
1111
1107
|
*
|
|
1112
|
-
* *
|
|
1108
|
+
* * Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
|
|
1113
1109
|
*
|
|
1114
|
-
* @
|
|
1115
|
-
* @returns {AssetName}
|
|
1110
|
+
* @returns {string}
|
|
1116
1111
|
*/
|
|
1117
|
-
|
|
1112
|
+
to_canonical_cbor_hex(): string;
|
|
1118
1113
|
/**
|
|
1119
1114
|
*
|
|
1120
|
-
* *
|
|
1121
|
-
* * This
|
|
1122
|
-
* * If created from scratch the CBOR will be canonical.
|
|
1115
|
+
* * Create this type from the CBOR bytes encoded as a hex string.
|
|
1116
|
+
* * This is useful for interfacing with CIP30
|
|
1123
1117
|
*
|
|
1124
|
-
* @
|
|
1118
|
+
* @param {string} cbor_bytes
|
|
1119
|
+
* @returns {AssetName}
|
|
1125
1120
|
*/
|
|
1126
|
-
|
|
1121
|
+
static from_cbor_hex(cbor_bytes: string): AssetName;
|
|
1127
1122
|
/**
|
|
1128
|
-
*
|
|
1129
|
-
* * Serialize this type to CBOR bytes using canonical CBOR encodings
|
|
1130
|
-
*
|
|
1131
|
-
* @returns {Uint8Array}
|
|
1123
|
+
* @returns {string}
|
|
1132
1124
|
*/
|
|
1133
|
-
|
|
1125
|
+
to_json(): string;
|
|
1126
|
+
/**
|
|
1127
|
+
* @returns {any}
|
|
1128
|
+
*/
|
|
1129
|
+
to_js_value(): any;
|
|
1130
|
+
/**
|
|
1131
|
+
* @param {string} json
|
|
1132
|
+
* @returns {AssetName}
|
|
1133
|
+
*/
|
|
1134
|
+
static from_json(json: string): AssetName;
|
|
1134
1135
|
/**
|
|
1135
1136
|
*
|
|
1136
|
-
*
|
|
1137
|
-
*
|
|
1138
|
-
* @param {
|
|
1137
|
+
* * Create an AssetName from utf8 string. 64 byte (not char!) maximum.
|
|
1138
|
+
*
|
|
1139
|
+
* @param {string} utf8_str
|
|
1139
1140
|
* @returns {AssetName}
|
|
1140
1141
|
*/
|
|
1141
|
-
static
|
|
1142
|
+
static from_str(utf8_str: string): AssetName;
|
|
1142
1143
|
/**
|
|
1143
1144
|
*
|
|
1144
|
-
*
|
|
1145
|
-
*
|
|
1146
|
-
* * If created from scratch the CBOR will be canonical.
|
|
1147
|
-
*
|
|
1145
|
+
* * AssetName as a utf8 string if it's possible. Will error if the asset is not utf8
|
|
1146
|
+
*
|
|
1148
1147
|
* @returns {string}
|
|
1149
1148
|
*/
|
|
1150
|
-
|
|
1149
|
+
to_str(): string;
|
|
1151
1150
|
/**
|
|
1152
1151
|
*
|
|
1153
|
-
* *
|
|
1152
|
+
* * Direct raw bytes without any CBOR structure
|
|
1154
1153
|
*
|
|
1155
|
-
* @returns {
|
|
1154
|
+
* @returns {Uint8Array}
|
|
1156
1155
|
*/
|
|
1157
|
-
|
|
1156
|
+
to_raw_bytes(): Uint8Array;
|
|
1158
1157
|
/**
|
|
1159
1158
|
*
|
|
1160
|
-
* *
|
|
1161
|
-
* * This is useful for interfacing with CIP30
|
|
1159
|
+
* * Parse from the direct raw bytes, without any CBOR structure
|
|
1162
1160
|
*
|
|
1163
|
-
* @param {
|
|
1161
|
+
* @param {Uint8Array} bytes
|
|
1164
1162
|
* @returns {AssetName}
|
|
1165
1163
|
*/
|
|
1166
|
-
static
|
|
1164
|
+
static from_raw_bytes(bytes: Uint8Array): AssetName;
|
|
1167
1165
|
/**
|
|
1166
|
+
*
|
|
1167
|
+
* * Direct raw bytes without any CBOR structure, as a hex-encoded string
|
|
1168
|
+
*
|
|
1168
1169
|
* @returns {string}
|
|
1169
1170
|
*/
|
|
1170
|
-
|
|
1171
|
-
/**
|
|
1172
|
-
* @returns {any}
|
|
1173
|
-
*/
|
|
1174
|
-
to_js_value(): any;
|
|
1171
|
+
to_hex(): string;
|
|
1175
1172
|
/**
|
|
1176
|
-
*
|
|
1173
|
+
*
|
|
1174
|
+
* * Parse from a hex string of the direct raw bytes, without any CBOR structure
|
|
1175
|
+
*
|
|
1176
|
+
* @param {string} input
|
|
1177
1177
|
* @returns {AssetName}
|
|
1178
1178
|
*/
|
|
1179
|
-
static
|
|
1179
|
+
static from_hex(input: string): AssetName;
|
|
1180
1180
|
}
|
|
1181
1181
|
/**
|
|
1182
1182
|
*/
|
|
@@ -1286,6 +1286,54 @@ export class AuthCommitteeHotCert {
|
|
|
1286
1286
|
export class AuxiliaryData {
|
|
1287
1287
|
free(): void;
|
|
1288
1288
|
/**
|
|
1289
|
+
* @returns {AuxiliaryData}
|
|
1290
|
+
*/
|
|
1291
|
+
static new(): AuxiliaryData;
|
|
1292
|
+
/**
|
|
1293
|
+
* @returns {Metadata | undefined}
|
|
1294
|
+
*/
|
|
1295
|
+
metadata(): Metadata | undefined;
|
|
1296
|
+
/**
|
|
1297
|
+
* @returns {NativeScriptList | undefined}
|
|
1298
|
+
*/
|
|
1299
|
+
native_scripts(): NativeScriptList | undefined;
|
|
1300
|
+
/**
|
|
1301
|
+
* @returns {PlutusV1ScriptList | undefined}
|
|
1302
|
+
*/
|
|
1303
|
+
plutus_v1_scripts(): PlutusV1ScriptList | undefined;
|
|
1304
|
+
/**
|
|
1305
|
+
* @returns {PlutusV2ScriptList | undefined}
|
|
1306
|
+
*/
|
|
1307
|
+
plutus_v2_scripts(): PlutusV2ScriptList | undefined;
|
|
1308
|
+
/**
|
|
1309
|
+
* Warning: overwrites any conflicting metadatum labels present
|
|
1310
|
+
* @param {Metadata} other
|
|
1311
|
+
*/
|
|
1312
|
+
add_metadata(other: Metadata): void;
|
|
1313
|
+
/**
|
|
1314
|
+
* Warning: does not check for duplicates and may migrate eras
|
|
1315
|
+
* @param {NativeScriptList} scripts
|
|
1316
|
+
*/
|
|
1317
|
+
add_native_scripts(scripts: NativeScriptList): void;
|
|
1318
|
+
/**
|
|
1319
|
+
* Warning: does not check for duplicates and may migrate eras
|
|
1320
|
+
* @param {PlutusV1ScriptList} scripts
|
|
1321
|
+
*/
|
|
1322
|
+
add_plutus_v1_scripts(scripts: PlutusV1ScriptList): void;
|
|
1323
|
+
/**
|
|
1324
|
+
* Warning: does not check for duplicates and may migrate eras
|
|
1325
|
+
* @param {PlutusV2ScriptList} scripts
|
|
1326
|
+
*/
|
|
1327
|
+
add_plutus_v2_scripts(scripts: PlutusV2ScriptList): void;
|
|
1328
|
+
/**
|
|
1329
|
+
* Adds everything present in other to self
|
|
1330
|
+
* May change the era the aux data is in if necessary
|
|
1331
|
+
* Warning: overwrites any metadatum labels present
|
|
1332
|
+
* also does not check for duplicates in scripts
|
|
1333
|
+
* @param {AuxiliaryData} other
|
|
1334
|
+
*/
|
|
1335
|
+
add(other: AuxiliaryData): void;
|
|
1336
|
+
/**
|
|
1289
1337
|
*
|
|
1290
1338
|
* * Serialize this type to CBOR bytes
|
|
1291
1339
|
* * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
|
|
@@ -1378,54 +1426,6 @@ export class AuxiliaryData {
|
|
|
1378
1426
|
* @returns {ConwayFormatAuxData | undefined}
|
|
1379
1427
|
*/
|
|
1380
1428
|
as_conway(): ConwayFormatAuxData | undefined;
|
|
1381
|
-
/**
|
|
1382
|
-
* @returns {AuxiliaryData}
|
|
1383
|
-
*/
|
|
1384
|
-
static new(): AuxiliaryData;
|
|
1385
|
-
/**
|
|
1386
|
-
* @returns {Metadata | undefined}
|
|
1387
|
-
*/
|
|
1388
|
-
metadata(): Metadata | undefined;
|
|
1389
|
-
/**
|
|
1390
|
-
* @returns {NativeScriptList | undefined}
|
|
1391
|
-
*/
|
|
1392
|
-
native_scripts(): NativeScriptList | undefined;
|
|
1393
|
-
/**
|
|
1394
|
-
* @returns {PlutusV1ScriptList | undefined}
|
|
1395
|
-
*/
|
|
1396
|
-
plutus_v1_scripts(): PlutusV1ScriptList | undefined;
|
|
1397
|
-
/**
|
|
1398
|
-
* @returns {PlutusV2ScriptList | undefined}
|
|
1399
|
-
*/
|
|
1400
|
-
plutus_v2_scripts(): PlutusV2ScriptList | undefined;
|
|
1401
|
-
/**
|
|
1402
|
-
* Warning: overwrites any conflicting metadatum labels present
|
|
1403
|
-
* @param {Metadata} other
|
|
1404
|
-
*/
|
|
1405
|
-
add_metadata(other: Metadata): void;
|
|
1406
|
-
/**
|
|
1407
|
-
* Warning: does not check for duplicates and may migrate eras
|
|
1408
|
-
* @param {NativeScriptList} scripts
|
|
1409
|
-
*/
|
|
1410
|
-
add_native_scripts(scripts: NativeScriptList): void;
|
|
1411
|
-
/**
|
|
1412
|
-
* Warning: does not check for duplicates and may migrate eras
|
|
1413
|
-
* @param {PlutusV1ScriptList} scripts
|
|
1414
|
-
*/
|
|
1415
|
-
add_plutus_v1_scripts(scripts: PlutusV1ScriptList): void;
|
|
1416
|
-
/**
|
|
1417
|
-
* Warning: does not check for duplicates and may migrate eras
|
|
1418
|
-
* @param {PlutusV2ScriptList} scripts
|
|
1419
|
-
*/
|
|
1420
|
-
add_plutus_v2_scripts(scripts: PlutusV2ScriptList): void;
|
|
1421
|
-
/**
|
|
1422
|
-
* Adds everything present in other to self
|
|
1423
|
-
* May change the era the aux data is in if necessary
|
|
1424
|
-
* Warning: overwrites any metadatum labels present
|
|
1425
|
-
* also does not check for duplicates in scripts
|
|
1426
|
-
* @param {AuxiliaryData} other
|
|
1427
|
-
*/
|
|
1428
|
-
add(other: AuxiliaryData): void;
|
|
1429
1429
|
}
|
|
1430
1430
|
/**
|
|
1431
1431
|
*/
|
|
@@ -6796,6 +6796,24 @@ export class MultiHostName {
|
|
|
6796
6796
|
export class NativeScript {
|
|
6797
6797
|
free(): void;
|
|
6798
6798
|
/**
|
|
6799
|
+
* Returns an array of unique Ed25519KeyHashes
|
|
6800
|
+
* contained within this script recursively on any depth level.
|
|
6801
|
+
* The order of the keys in the result is not determined in any way.
|
|
6802
|
+
* @returns {Ed25519KeyHashList}
|
|
6803
|
+
*/
|
|
6804
|
+
get_required_signers(): Ed25519KeyHashList;
|
|
6805
|
+
/**
|
|
6806
|
+
* @returns {ScriptHash}
|
|
6807
|
+
*/
|
|
6808
|
+
hash(): ScriptHash;
|
|
6809
|
+
/**
|
|
6810
|
+
* @param {bigint | undefined} lower_bound
|
|
6811
|
+
* @param {bigint | undefined} upper_bound
|
|
6812
|
+
* @param {Ed25519KeyHashList} key_hashes
|
|
6813
|
+
* @returns {boolean}
|
|
6814
|
+
*/
|
|
6815
|
+
verify(lower_bound: bigint | undefined, upper_bound: bigint | undefined, key_hashes: Ed25519KeyHashList): boolean;
|
|
6816
|
+
/**
|
|
6799
6817
|
*
|
|
6800
6818
|
* * Serialize this type to CBOR bytes
|
|
6801
6819
|
* * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
|
|
@@ -6918,24 +6936,6 @@ export class NativeScript {
|
|
|
6918
6936
|
* @returns {ScriptInvalidHereafter | undefined}
|
|
6919
6937
|
*/
|
|
6920
6938
|
as_script_invalid_hereafter(): ScriptInvalidHereafter | undefined;
|
|
6921
|
-
/**
|
|
6922
|
-
* Returns an array of unique Ed25519KeyHashes
|
|
6923
|
-
* contained within this script recursively on any depth level.
|
|
6924
|
-
* The order of the keys in the result is not determined in any way.
|
|
6925
|
-
* @returns {Ed25519KeyHashList}
|
|
6926
|
-
*/
|
|
6927
|
-
get_required_signers(): Ed25519KeyHashList;
|
|
6928
|
-
/**
|
|
6929
|
-
* @returns {ScriptHash}
|
|
6930
|
-
*/
|
|
6931
|
-
hash(): ScriptHash;
|
|
6932
|
-
/**
|
|
6933
|
-
* @param {bigint | undefined} lower_bound
|
|
6934
|
-
* @param {bigint | undefined} upper_bound
|
|
6935
|
-
* @param {Ed25519KeyHashList} key_hashes
|
|
6936
|
-
* @returns {boolean}
|
|
6937
|
-
*/
|
|
6938
|
-
verify(lower_bound: bigint | undefined, upper_bound: bigint | undefined, key_hashes: Ed25519KeyHashList): boolean;
|
|
6939
6939
|
}
|
|
6940
6940
|
/**
|
|
6941
6941
|
*/
|
|
@@ -13062,6 +13062,41 @@ export class TransactionMetadatumList {
|
|
|
13062
13062
|
export class TransactionOutput {
|
|
13063
13063
|
free(): void;
|
|
13064
13064
|
/**
|
|
13065
|
+
* @param {Address} address
|
|
13066
|
+
* @param {Value} amount
|
|
13067
|
+
* @param {DatumOption | undefined} [datum_option]
|
|
13068
|
+
* @param {Script | undefined} [script_reference]
|
|
13069
|
+
* @returns {TransactionOutput}
|
|
13070
|
+
*/
|
|
13071
|
+
static new(address: Address, amount: Value, datum_option?: DatumOption, script_reference?: Script): TransactionOutput;
|
|
13072
|
+
/**
|
|
13073
|
+
* @returns {Address}
|
|
13074
|
+
*/
|
|
13075
|
+
address(): Address;
|
|
13076
|
+
/**
|
|
13077
|
+
* @returns {Value}
|
|
13078
|
+
*/
|
|
13079
|
+
amount(): Value;
|
|
13080
|
+
/**
|
|
13081
|
+
* @param {Value} amount
|
|
13082
|
+
*/
|
|
13083
|
+
set_amount(amount: Value): void;
|
|
13084
|
+
/**
|
|
13085
|
+
* @returns {DatumOption | undefined}
|
|
13086
|
+
*/
|
|
13087
|
+
datum(): DatumOption | undefined;
|
|
13088
|
+
/**
|
|
13089
|
+
* Get the datum hash from a tx output if present as a hash.
|
|
13090
|
+
* Returns None if there is no datum, or the datum is inlined.
|
|
13091
|
+
* Use TransactionOutput::datum() for inlined datums.
|
|
13092
|
+
* @returns {DatumHash | undefined}
|
|
13093
|
+
*/
|
|
13094
|
+
datum_hash(): DatumHash | undefined;
|
|
13095
|
+
/**
|
|
13096
|
+
* @returns {Script | undefined}
|
|
13097
|
+
*/
|
|
13098
|
+
script_ref(): Script | undefined;
|
|
13099
|
+
/**
|
|
13065
13100
|
*
|
|
13066
13101
|
* * Serialize this type to CBOR bytes
|
|
13067
13102
|
* * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
|
|
@@ -13145,41 +13180,6 @@ export class TransactionOutput {
|
|
|
13145
13180
|
* @returns {ConwayFormatTxOut | undefined}
|
|
13146
13181
|
*/
|
|
13147
13182
|
as_conway_format_tx_out(): ConwayFormatTxOut | undefined;
|
|
13148
|
-
/**
|
|
13149
|
-
* @param {Address} address
|
|
13150
|
-
* @param {Value} amount
|
|
13151
|
-
* @param {DatumOption | undefined} [datum_option]
|
|
13152
|
-
* @param {Script | undefined} [script_reference]
|
|
13153
|
-
* @returns {TransactionOutput}
|
|
13154
|
-
*/
|
|
13155
|
-
static new(address: Address, amount: Value, datum_option?: DatumOption, script_reference?: Script): TransactionOutput;
|
|
13156
|
-
/**
|
|
13157
|
-
* @returns {Address}
|
|
13158
|
-
*/
|
|
13159
|
-
address(): Address;
|
|
13160
|
-
/**
|
|
13161
|
-
* @returns {Value}
|
|
13162
|
-
*/
|
|
13163
|
-
amount(): Value;
|
|
13164
|
-
/**
|
|
13165
|
-
* @param {Value} amount
|
|
13166
|
-
*/
|
|
13167
|
-
set_amount(amount: Value): void;
|
|
13168
|
-
/**
|
|
13169
|
-
* @returns {DatumOption | undefined}
|
|
13170
|
-
*/
|
|
13171
|
-
datum(): DatumOption | undefined;
|
|
13172
|
-
/**
|
|
13173
|
-
* Get the datum hash from a tx output if present as a hash.
|
|
13174
|
-
* Returns None if there is no datum, or the datum is inlined.
|
|
13175
|
-
* Use TransactionOutput::datum() for inlined datums.
|
|
13176
|
-
* @returns {DatumHash | undefined}
|
|
13177
|
-
*/
|
|
13178
|
-
datum_hash(): DatumHash | undefined;
|
|
13179
|
-
/**
|
|
13180
|
-
* @returns {Script | undefined}
|
|
13181
|
-
*/
|
|
13182
|
-
script_ref(): Script | undefined;
|
|
13183
13183
|
}
|
|
13184
13184
|
/**
|
|
13185
13185
|
*/
|
|
@@ -13322,6 +13322,14 @@ export class TransactionUnspentOutput {
|
|
|
13322
13322
|
export class TransactionWitnessSet {
|
|
13323
13323
|
free(): void;
|
|
13324
13324
|
/**
|
|
13325
|
+
* @param {TransactionWitnessSet} other
|
|
13326
|
+
*/
|
|
13327
|
+
add_all_witnesses(other: TransactionWitnessSet): void;
|
|
13328
|
+
/**
|
|
13329
|
+
* @returns {LanguageList}
|
|
13330
|
+
*/
|
|
13331
|
+
languages(): LanguageList;
|
|
13332
|
+
/**
|
|
13325
13333
|
*
|
|
13326
13334
|
* * Serialize this type to CBOR bytes
|
|
13327
13335
|
* * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
|
|
@@ -13451,14 +13459,6 @@ export class TransactionWitnessSet {
|
|
|
13451
13459
|
* @returns {TransactionWitnessSet}
|
|
13452
13460
|
*/
|
|
13453
13461
|
static new(): TransactionWitnessSet;
|
|
13454
|
-
/**
|
|
13455
|
-
* @param {TransactionWitnessSet} other
|
|
13456
|
-
*/
|
|
13457
|
-
add_all_witnesses(other: TransactionWitnessSet): void;
|
|
13458
|
-
/**
|
|
13459
|
-
* @returns {LanguageList}
|
|
13460
|
-
*/
|
|
13461
|
-
languages(): LanguageList;
|
|
13462
13462
|
}
|
|
13463
13463
|
/**
|
|
13464
13464
|
* Builder de-duplicates witnesses as they are added
|