@anastasia-labs/cardano-multiplatform-lib-nodejs 6.0.0-1 → 6.0.0-10
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/LICENSE +1 -1
- package/README.md +4 -4
- package/cardano_multiplatform_lib.d.ts +364 -364
- package/cardano_multiplatform_lib.js +889 -887
- package/cardano_multiplatform_lib_bg.wasm +0 -0
- package/package.json +3 -3
|
@@ -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,67 +189,46 @@ 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
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
MultiHostName = 2,
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
*/
|
|
199
|
-
export enum ScriptKind {
|
|
200
|
-
Native = 0,
|
|
201
|
-
PlutusV1 = 1,
|
|
202
|
-
PlutusV2 = 2,
|
|
203
|
-
PlutusV3 = 3,
|
|
192
|
+
export enum CredentialKind {
|
|
193
|
+
PubKey = 0,
|
|
194
|
+
Script = 1,
|
|
204
195
|
}
|
|
205
196
|
/**
|
|
206
197
|
*/
|
|
207
|
-
export enum
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
TreasuryWithdrawalsAction = 2,
|
|
211
|
-
NoConfidence = 3,
|
|
212
|
-
UpdateCommittee = 4,
|
|
213
|
-
NewConstitution = 5,
|
|
214
|
-
InfoAction = 6,
|
|
198
|
+
export enum TransactionOutputKind {
|
|
199
|
+
AlonzoFormatTxOut = 0,
|
|
200
|
+
ConwayFormatTxOut = 1,
|
|
215
201
|
}
|
|
216
202
|
/**
|
|
217
203
|
*/
|
|
218
|
-
export enum
|
|
219
|
-
PlutusV1 = 0,
|
|
220
|
-
PlutusV2 = 1,
|
|
221
|
-
PlutusV3 = 2,
|
|
222
|
-
}
|
|
204
|
+
export enum CoinSelectionStrategyCIP2 {
|
|
223
205
|
/**
|
|
206
|
+
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
224
207
|
*/
|
|
225
|
-
|
|
226
|
-
Base = 0,
|
|
227
|
-
Ptr = 1,
|
|
228
|
-
Enterprise = 2,
|
|
229
|
-
Reward = 3,
|
|
230
|
-
Byron = 4,
|
|
231
|
-
}
|
|
208
|
+
LargestFirst = 0,
|
|
232
209
|
/**
|
|
233
|
-
*
|
|
234
|
-
* This will change how things are encoded but for the most part contains
|
|
235
|
-
* the same information.
|
|
210
|
+
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
236
211
|
*/
|
|
237
|
-
|
|
212
|
+
RandomImprove = 1,
|
|
238
213
|
/**
|
|
239
|
-
*
|
|
214
|
+
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
240
215
|
*/
|
|
241
|
-
|
|
216
|
+
LargestFirstMultiAsset = 2,
|
|
242
217
|
/**
|
|
243
|
-
*
|
|
218
|
+
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
244
219
|
*/
|
|
245
|
-
|
|
220
|
+
RandomImproveMultiAsset = 3,
|
|
246
221
|
}
|
|
247
222
|
/**
|
|
248
223
|
*/
|
|
249
|
-
export enum
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
224
|
+
export enum GovActionKind {
|
|
225
|
+
ParameterChangeAction = 0,
|
|
226
|
+
HardForkInitiationAction = 1,
|
|
227
|
+
TreasuryWithdrawalsAction = 2,
|
|
228
|
+
NoConfidence = 3,
|
|
229
|
+
UpdateCommittee = 4,
|
|
230
|
+
NewConstitution = 5,
|
|
231
|
+
InfoAction = 6,
|
|
253
232
|
}
|
|
254
233
|
/**
|
|
255
234
|
*/
|
|
@@ -263,40 +242,26 @@ export enum RedeemerTag {
|
|
|
263
242
|
}
|
|
264
243
|
/**
|
|
265
244
|
*/
|
|
266
|
-
export enum
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
PoolRegistration = 3,
|
|
271
|
-
PoolRetirement = 4,
|
|
272
|
-
RegCert = 5,
|
|
273
|
-
UnregCert = 6,
|
|
274
|
-
VoteDelegCert = 7,
|
|
275
|
-
StakeVoteDelegCert = 8,
|
|
276
|
-
StakeRegDelegCert = 9,
|
|
277
|
-
VoteRegDelegCert = 10,
|
|
278
|
-
StakeVoteRegDelegCert = 11,
|
|
279
|
-
AuthCommitteeHotCert = 12,
|
|
280
|
-
ResignCommitteeColdCert = 13,
|
|
281
|
-
RegDrepCert = 14,
|
|
282
|
-
UnregDrepCert = 15,
|
|
283
|
-
UpdateDrepCert = 16,
|
|
245
|
+
export enum ByronAddrType {
|
|
246
|
+
PublicKey = 0,
|
|
247
|
+
Script = 1,
|
|
248
|
+
Redeem = 2,
|
|
284
249
|
}
|
|
285
250
|
/**
|
|
286
251
|
*/
|
|
287
|
-
export enum
|
|
288
|
-
|
|
289
|
-
|
|
252
|
+
export enum VoterKind {
|
|
253
|
+
ConstitutionalCommitteeHotKeyHash = 0,
|
|
254
|
+
ConstitutionalCommitteeHotScriptHash = 1,
|
|
255
|
+
DRepKeyHash = 2,
|
|
256
|
+
DRepScriptHash = 3,
|
|
257
|
+
StakingPoolKeyHash = 4,
|
|
290
258
|
}
|
|
291
259
|
/**
|
|
292
260
|
*/
|
|
293
|
-
export enum
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
ScriptNOfK = 3,
|
|
298
|
-
ScriptInvalidBefore = 4,
|
|
299
|
-
ScriptInvalidHereafter = 5,
|
|
261
|
+
export enum Vote {
|
|
262
|
+
No = 0,
|
|
263
|
+
Yes = 1,
|
|
264
|
+
Abstain = 2,
|
|
300
265
|
}
|
|
301
266
|
/**
|
|
302
267
|
* Careful: this enum doesn't include the network ID part of the header
|
|
@@ -318,64 +283,9 @@ export enum AddressHeaderKind {
|
|
|
318
283
|
}
|
|
319
284
|
/**
|
|
320
285
|
*/
|
|
321
|
-
export enum
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
*/
|
|
327
|
-
export enum AuxiliaryDataKind {
|
|
328
|
-
Shelley = 0,
|
|
329
|
-
ShelleyMA = 1,
|
|
330
|
-
Conway = 2,
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
*/
|
|
334
|
-
export enum ChunkableStringKind {
|
|
335
|
-
Single = 0,
|
|
336
|
-
Chunked = 1,
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
*/
|
|
340
|
-
export enum VoterKind {
|
|
341
|
-
ConstitutionalCommitteeHotKeyHash = 0,
|
|
342
|
-
ConstitutionalCommitteeHotScriptHash = 1,
|
|
343
|
-
DRepKeyHash = 2,
|
|
344
|
-
DRepScriptHash = 3,
|
|
345
|
-
StakingPoolKeyHash = 4,
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
*/
|
|
349
|
-
export enum Vote {
|
|
350
|
-
No = 0,
|
|
351
|
-
Yes = 1,
|
|
352
|
-
Abstain = 2,
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
*/
|
|
356
|
-
export enum NonceKind {
|
|
357
|
-
Identity = 0,
|
|
358
|
-
Hash = 1,
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
*/
|
|
362
|
-
export enum CoinSelectionStrategyCIP2 {
|
|
363
|
-
/**
|
|
364
|
-
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
365
|
-
*/
|
|
366
|
-
LargestFirst = 0,
|
|
367
|
-
/**
|
|
368
|
-
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
369
|
-
*/
|
|
370
|
-
RandomImprove = 1,
|
|
371
|
-
/**
|
|
372
|
-
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
373
|
-
*/
|
|
374
|
-
LargestFirstMultiAsset = 2,
|
|
375
|
-
/**
|
|
376
|
-
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
377
|
-
*/
|
|
378
|
-
RandomImproveMultiAsset = 3,
|
|
286
|
+
export enum DatumOptionKind {
|
|
287
|
+
Hash = 0,
|
|
288
|
+
Datum = 1,
|
|
379
289
|
}
|
|
380
290
|
/**
|
|
381
291
|
*/
|
|
@@ -385,42 +295,18 @@ export enum RedeemersKind {
|
|
|
385
295
|
}
|
|
386
296
|
/**
|
|
387
297
|
*/
|
|
388
|
-
export enum
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
*/
|
|
397
|
-
export enum PlutusDataKind {
|
|
398
|
-
ConstrPlutusData = 0,
|
|
399
|
-
Map = 1,
|
|
400
|
-
List = 2,
|
|
401
|
-
Integer = 3,
|
|
402
|
-
Bytes = 4,
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
*/
|
|
406
|
-
export enum CredentialKind {
|
|
407
|
-
PubKey = 0,
|
|
408
|
-
Script = 1,
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
*/
|
|
412
|
-
export enum DRepKind {
|
|
413
|
-
Key = 0,
|
|
414
|
-
Script = 1,
|
|
415
|
-
AlwaysAbstain = 2,
|
|
416
|
-
AlwaysNoConfidence = 3,
|
|
298
|
+
export enum AddressKind {
|
|
299
|
+
Base = 0,
|
|
300
|
+
Ptr = 1,
|
|
301
|
+
Enterprise = 2,
|
|
302
|
+
Reward = 3,
|
|
303
|
+
Byron = 4,
|
|
417
304
|
}
|
|
418
305
|
/**
|
|
419
306
|
*/
|
|
420
|
-
export enum
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
DetailedSchema = 2,
|
|
307
|
+
export enum ChunkableStringKind {
|
|
308
|
+
Single = 0,
|
|
309
|
+
Chunked = 1,
|
|
424
310
|
}
|
|
425
311
|
/**
|
|
426
312
|
* JSON <-> PlutusData conversion schemas.
|
|
@@ -476,27 +362,141 @@ export enum CardanoNodePlutusDatumSchema {
|
|
|
476
362
|
}
|
|
477
363
|
/**
|
|
478
364
|
*/
|
|
365
|
+
export enum StakeDistributionKind {
|
|
366
|
+
SingleKey = 0,
|
|
367
|
+
BootstrapEra = 1,
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
*/
|
|
479
371
|
export enum ChangeSelectionAlgo {
|
|
480
372
|
Default = 0,
|
|
481
373
|
}
|
|
482
374
|
/**
|
|
483
375
|
*/
|
|
484
|
-
export enum
|
|
485
|
-
|
|
486
|
-
|
|
376
|
+
export enum Language {
|
|
377
|
+
PlutusV1 = 0,
|
|
378
|
+
PlutusV2 = 1,
|
|
379
|
+
PlutusV3 = 2,
|
|
487
380
|
}
|
|
488
381
|
/**
|
|
489
382
|
*/
|
|
490
|
-
export enum
|
|
491
|
-
|
|
383
|
+
export enum RelayKind {
|
|
384
|
+
SingleHostAddr = 0,
|
|
385
|
+
SingleHostName = 1,
|
|
386
|
+
MultiHostName = 2,
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
*/
|
|
390
|
+
export enum PlutusDataKind {
|
|
391
|
+
ConstrPlutusData = 0,
|
|
392
|
+
Map = 1,
|
|
393
|
+
List = 2,
|
|
394
|
+
Integer = 3,
|
|
395
|
+
Bytes = 4,
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
*/
|
|
399
|
+
export enum MetadataJsonSchema {
|
|
400
|
+
NoConversions = 0,
|
|
401
|
+
BasicConversions = 1,
|
|
402
|
+
DetailedSchema = 2,
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
*/
|
|
406
|
+
export enum NativeScriptKind {
|
|
407
|
+
ScriptPubkey = 0,
|
|
408
|
+
ScriptAll = 1,
|
|
409
|
+
ScriptAny = 2,
|
|
410
|
+
ScriptNOfK = 3,
|
|
411
|
+
ScriptInvalidBefore = 4,
|
|
412
|
+
ScriptInvalidHereafter = 5,
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
*/
|
|
416
|
+
export enum ScriptKind {
|
|
417
|
+
Native = 0,
|
|
418
|
+
PlutusV1 = 1,
|
|
419
|
+
PlutusV2 = 2,
|
|
420
|
+
PlutusV3 = 3,
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
*/
|
|
424
|
+
export enum NonceKind {
|
|
425
|
+
Identity = 0,
|
|
426
|
+
Hash = 1,
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
*/
|
|
430
|
+
export enum SpendingDataKind {
|
|
431
|
+
SpendingDataPubKey = 0,
|
|
432
|
+
SpendingDataScript = 1,
|
|
433
|
+
SpendingDataRedeem = 2,
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
*/
|
|
437
|
+
export enum TransactionMetadatumKind {
|
|
438
|
+
Map = 0,
|
|
439
|
+
List = 1,
|
|
440
|
+
Int = 2,
|
|
441
|
+
Bytes = 3,
|
|
442
|
+
Text = 4,
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
*/
|
|
446
|
+
export enum AuxiliaryDataKind {
|
|
447
|
+
Shelley = 0,
|
|
448
|
+
ShelleyMA = 1,
|
|
449
|
+
Conway = 2,
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
*/
|
|
453
|
+
export enum DRepKind {
|
|
454
|
+
Key = 0,
|
|
492
455
|
Script = 1,
|
|
493
|
-
|
|
456
|
+
AlwaysAbstain = 2,
|
|
457
|
+
AlwaysNoConfidence = 3,
|
|
494
458
|
}
|
|
495
459
|
/**
|
|
496
460
|
*/
|
|
497
|
-
export enum
|
|
498
|
-
|
|
499
|
-
|
|
461
|
+
export enum CertificateKind {
|
|
462
|
+
StakeRegistration = 0,
|
|
463
|
+
StakeDeregistration = 1,
|
|
464
|
+
StakeDelegation = 2,
|
|
465
|
+
PoolRegistration = 3,
|
|
466
|
+
PoolRetirement = 4,
|
|
467
|
+
RegCert = 5,
|
|
468
|
+
UnregCert = 6,
|
|
469
|
+
VoteDelegCert = 7,
|
|
470
|
+
StakeVoteDelegCert = 8,
|
|
471
|
+
StakeRegDelegCert = 9,
|
|
472
|
+
VoteRegDelegCert = 10,
|
|
473
|
+
StakeVoteRegDelegCert = 11,
|
|
474
|
+
AuthCommitteeHotCert = 12,
|
|
475
|
+
ResignCommitteeColdCert = 13,
|
|
476
|
+
RegDrepCert = 14,
|
|
477
|
+
UnregDrepCert = 15,
|
|
478
|
+
UpdateDrepCert = 16,
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
*/
|
|
482
|
+
export enum DelegationDistributionKind {
|
|
483
|
+
Weighted = 0,
|
|
484
|
+
Legacy = 1,
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Which version of the CIP25 spec to use. See CIP25 for details.
|
|
488
|
+
* This will change how things are encoded but for the most part contains
|
|
489
|
+
* the same information.
|
|
490
|
+
*/
|
|
491
|
+
export enum CIP25Version {
|
|
492
|
+
/**
|
|
493
|
+
* Initial version of CIP25 with only string (utf8) asset names allowed.
|
|
494
|
+
*/
|
|
495
|
+
V1 = 0,
|
|
496
|
+
/**
|
|
497
|
+
* Second version of CIP25. Supports any type of asset names.
|
|
498
|
+
*/
|
|
499
|
+
V2 = 1,
|
|
500
500
|
}
|
|
501
501
|
/**
|
|
502
502
|
*/
|
|
@@ -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
|