@anastasia-labs/cardano-multiplatform-lib-browser 6.0.0 → 6.0.1-2
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 +323 -323
- package/cardano_multiplatform_lib_bg.js +679 -677
- 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,73 @@ 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
|
-
Conway = 2,
|
|
192
|
+
export enum ChunkableStringKind {
|
|
193
|
+
Single = 0,
|
|
194
|
+
Chunked = 1,
|
|
196
195
|
}
|
|
197
196
|
/**
|
|
198
197
|
*/
|
|
199
|
-
export enum
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
198
|
+
export enum NativeScriptKind {
|
|
199
|
+
ScriptPubkey = 0,
|
|
200
|
+
ScriptAll = 1,
|
|
201
|
+
ScriptAny = 2,
|
|
202
|
+
ScriptNOfK = 3,
|
|
203
|
+
ScriptInvalidBefore = 4,
|
|
204
|
+
ScriptInvalidHereafter = 5,
|
|
205
205
|
}
|
|
206
206
|
/**
|
|
207
207
|
*/
|
|
208
|
-
export enum
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
export enum NonceKind {
|
|
209
|
+
Identity = 0,
|
|
210
|
+
Hash = 1,
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
213
213
|
*/
|
|
214
|
-
export enum
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
export enum DRepKind {
|
|
215
|
+
Key = 0,
|
|
216
|
+
Script = 1,
|
|
217
|
+
AlwaysAbstain = 2,
|
|
218
|
+
AlwaysNoConfidence = 3,
|
|
217
219
|
}
|
|
218
220
|
/**
|
|
219
221
|
*/
|
|
220
|
-
export enum
|
|
221
|
-
|
|
222
|
-
|
|
222
|
+
export enum GovActionKind {
|
|
223
|
+
ParameterChangeAction = 0,
|
|
224
|
+
HardForkInitiationAction = 1,
|
|
225
|
+
TreasuryWithdrawalsAction = 2,
|
|
226
|
+
NoConfidence = 3,
|
|
227
|
+
UpdateCommittee = 4,
|
|
228
|
+
NewConstitution = 5,
|
|
229
|
+
InfoAction = 6,
|
|
223
230
|
}
|
|
224
231
|
/**
|
|
225
232
|
*/
|
|
226
|
-
export enum
|
|
227
|
-
|
|
228
|
-
|
|
233
|
+
export enum AddressKind {
|
|
234
|
+
Base = 0,
|
|
235
|
+
Ptr = 1,
|
|
236
|
+
Enterprise = 2,
|
|
237
|
+
Reward = 3,
|
|
238
|
+
Byron = 4,
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
*/
|
|
242
|
+
export enum ChangeSelectionAlgo {
|
|
243
|
+
Default = 0,
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
*/
|
|
247
|
+
export enum ScriptKind {
|
|
248
|
+
Native = 0,
|
|
249
|
+
PlutusV1 = 1,
|
|
250
|
+
PlutusV2 = 2,
|
|
251
|
+
PlutusV3 = 3,
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
*/
|
|
255
|
+
export enum Language {
|
|
256
|
+
PlutusV1 = 0,
|
|
257
|
+
PlutusV2 = 1,
|
|
258
|
+
PlutusV3 = 2,
|
|
229
259
|
}
|
|
230
260
|
/**
|
|
231
261
|
* Which version of the CIP25 spec to use. See CIP25 for details.
|
|
@@ -243,6 +273,33 @@ export enum CIP25Version {
|
|
|
243
273
|
V2 = 1,
|
|
244
274
|
}
|
|
245
275
|
/**
|
|
276
|
+
* Careful: this enum doesn't include the network ID part of the header
|
|
277
|
+
* ex: base address isn't 0b0000_0000 but instead 0b0000
|
|
278
|
+
* Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
|
|
279
|
+
*/
|
|
280
|
+
export enum AddressHeaderKind {
|
|
281
|
+
BasePaymentKeyStakeKey = 0,
|
|
282
|
+
BasePaymentScriptStakeKey = 1,
|
|
283
|
+
BasePaymentKeyStakeScript = 2,
|
|
284
|
+
BasePaymentScriptStakeScript = 3,
|
|
285
|
+
PointerKey = 4,
|
|
286
|
+
PointerScript = 5,
|
|
287
|
+
EnterpriseKey = 6,
|
|
288
|
+
EnterpriseScript = 7,
|
|
289
|
+
Byron = 8,
|
|
290
|
+
RewardKey = 14,
|
|
291
|
+
RewardScript = 15,
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
*/
|
|
295
|
+
export enum VoterKind {
|
|
296
|
+
ConstitutionalCommitteeHotKeyHash = 0,
|
|
297
|
+
ConstitutionalCommitteeHotScriptHash = 1,
|
|
298
|
+
DRepKeyHash = 2,
|
|
299
|
+
DRepScriptHash = 3,
|
|
300
|
+
StakingPoolKeyHash = 4,
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
246
303
|
*/
|
|
247
304
|
export enum ByronAddrType {
|
|
248
305
|
PublicKey = 0,
|
|
@@ -272,54 +329,12 @@ export enum CertificateKind {
|
|
|
272
329
|
}
|
|
273
330
|
/**
|
|
274
331
|
*/
|
|
275
|
-
export enum TransactionOutputKind {
|
|
276
|
-
AlonzoFormatTxOut = 0,
|
|
277
|
-
ConwayFormatTxOut = 1,
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Careful: this enum doesn't include the network ID part of the header
|
|
281
|
-
* ex: base address isn't 0b0000_0000 but instead 0b0000
|
|
282
|
-
* Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
|
|
283
|
-
*/
|
|
284
|
-
export enum AddressHeaderKind {
|
|
285
|
-
BasePaymentKeyStakeKey = 0,
|
|
286
|
-
BasePaymentScriptStakeKey = 1,
|
|
287
|
-
BasePaymentKeyStakeScript = 2,
|
|
288
|
-
BasePaymentScriptStakeScript = 3,
|
|
289
|
-
PointerKey = 4,
|
|
290
|
-
PointerScript = 5,
|
|
291
|
-
EnterpriseKey = 6,
|
|
292
|
-
EnterpriseScript = 7,
|
|
293
|
-
Byron = 8,
|
|
294
|
-
RewardKey = 14,
|
|
295
|
-
RewardScript = 15,
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
*/
|
|
299
332
|
export enum StakeDistributionKind {
|
|
300
333
|
SingleKey = 0,
|
|
301
334
|
BootstrapEra = 1,
|
|
302
335
|
}
|
|
303
336
|
/**
|
|
304
337
|
*/
|
|
305
|
-
export enum DRepKind {
|
|
306
|
-
Key = 0,
|
|
307
|
-
Script = 1,
|
|
308
|
-
AlwaysAbstain = 2,
|
|
309
|
-
AlwaysNoConfidence = 3,
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
*/
|
|
313
|
-
export enum NativeScriptKind {
|
|
314
|
-
ScriptPubkey = 0,
|
|
315
|
-
ScriptAll = 1,
|
|
316
|
-
ScriptAny = 2,
|
|
317
|
-
ScriptNOfK = 3,
|
|
318
|
-
ScriptInvalidBefore = 4,
|
|
319
|
-
ScriptInvalidHereafter = 5,
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
*/
|
|
323
338
|
export enum CoinSelectionStrategyCIP2 {
|
|
324
339
|
/**
|
|
325
340
|
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
@@ -340,45 +355,15 @@ export enum CoinSelectionStrategyCIP2 {
|
|
|
340
355
|
}
|
|
341
356
|
/**
|
|
342
357
|
*/
|
|
343
|
-
export enum
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
Int = 2,
|
|
347
|
-
Bytes = 3,
|
|
348
|
-
Text = 4,
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
*/
|
|
352
|
-
export enum RedeemerTag {
|
|
353
|
-
Spend = 0,
|
|
354
|
-
Mint = 1,
|
|
355
|
-
Cert = 2,
|
|
356
|
-
Reward = 3,
|
|
357
|
-
Voting = 4,
|
|
358
|
-
Proposing = 5,
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
*/
|
|
362
|
-
export enum AddressKind {
|
|
363
|
-
Base = 0,
|
|
364
|
-
Ptr = 1,
|
|
365
|
-
Enterprise = 2,
|
|
366
|
-
Reward = 3,
|
|
367
|
-
Byron = 4,
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
*/
|
|
371
|
-
export enum Vote {
|
|
372
|
-
No = 0,
|
|
373
|
-
Yes = 1,
|
|
374
|
-
Abstain = 2,
|
|
358
|
+
export enum DelegationDistributionKind {
|
|
359
|
+
Weighted = 0,
|
|
360
|
+
Legacy = 1,
|
|
375
361
|
}
|
|
376
362
|
/**
|
|
377
363
|
*/
|
|
378
|
-
export enum
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
DetailedSchema = 2,
|
|
364
|
+
export enum CredentialKind {
|
|
365
|
+
PubKey = 0,
|
|
366
|
+
Script = 1,
|
|
382
367
|
}
|
|
383
368
|
/**
|
|
384
369
|
*/
|
|
@@ -388,6 +373,12 @@ export enum RelayKind {
|
|
|
388
373
|
MultiHostName = 2,
|
|
389
374
|
}
|
|
390
375
|
/**
|
|
376
|
+
*/
|
|
377
|
+
export enum DatumOptionKind {
|
|
378
|
+
Hash = 0,
|
|
379
|
+
Datum = 1,
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
391
382
|
* JSON <-> PlutusData conversion schemas.
|
|
392
383
|
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
393
384
|
* https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
|
|
@@ -441,6 +432,25 @@ export enum CardanoNodePlutusDatumSchema {
|
|
|
441
432
|
}
|
|
442
433
|
/**
|
|
443
434
|
*/
|
|
435
|
+
export enum TransactionOutputKind {
|
|
436
|
+
AlonzoFormatTxOut = 0,
|
|
437
|
+
ConwayFormatTxOut = 1,
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
*/
|
|
441
|
+
export enum RedeemersKind {
|
|
442
|
+
ArrLegacyRedeemer = 0,
|
|
443
|
+
MapRedeemerKeyToRedeemerVal = 1,
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
*/
|
|
447
|
+
export enum MetadataJsonSchema {
|
|
448
|
+
NoConversions = 0,
|
|
449
|
+
BasicConversions = 1,
|
|
450
|
+
DetailedSchema = 2,
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
*/
|
|
444
454
|
export enum SpendingDataKind {
|
|
445
455
|
SpendingDataPubKey = 0,
|
|
446
456
|
SpendingDataScript = 1,
|
|
@@ -448,22 +458,17 @@ export enum SpendingDataKind {
|
|
|
448
458
|
}
|
|
449
459
|
/**
|
|
450
460
|
*/
|
|
451
|
-
export enum
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
PlutusV3 = 3,
|
|
461
|
+
export enum Vote {
|
|
462
|
+
No = 0,
|
|
463
|
+
Yes = 1,
|
|
464
|
+
Abstain = 2,
|
|
456
465
|
}
|
|
457
466
|
/**
|
|
458
467
|
*/
|
|
459
|
-
export enum
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
NoConfidence = 3,
|
|
464
|
-
UpdateCommittee = 4,
|
|
465
|
-
NewConstitution = 5,
|
|
466
|
-
InfoAction = 6,
|
|
468
|
+
export enum AuxiliaryDataKind {
|
|
469
|
+
Shelley = 0,
|
|
470
|
+
ShelleyMA = 1,
|
|
471
|
+
Conway = 2,
|
|
467
472
|
}
|
|
468
473
|
/**
|
|
469
474
|
*/
|
|
@@ -476,27 +481,22 @@ export enum PlutusDataKind {
|
|
|
476
481
|
}
|
|
477
482
|
/**
|
|
478
483
|
*/
|
|
479
|
-
export enum
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
export enum CredentialKind {
|
|
486
|
-
PubKey = 0,
|
|
487
|
-
Script = 1,
|
|
488
|
-
}
|
|
489
|
-
/**
|
|
490
|
-
*/
|
|
491
|
-
export enum ChangeSelectionAlgo {
|
|
492
|
-
Default = 0,
|
|
484
|
+
export enum TransactionMetadatumKind {
|
|
485
|
+
Map = 0,
|
|
486
|
+
List = 1,
|
|
487
|
+
Int = 2,
|
|
488
|
+
Bytes = 3,
|
|
489
|
+
Text = 4,
|
|
493
490
|
}
|
|
494
491
|
/**
|
|
495
492
|
*/
|
|
496
|
-
export enum
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
493
|
+
export enum RedeemerTag {
|
|
494
|
+
Spend = 0,
|
|
495
|
+
Mint = 1,
|
|
496
|
+
Cert = 2,
|
|
497
|
+
Reward = 3,
|
|
498
|
+
Voting = 4,
|
|
499
|
+
Proposing = 5,
|
|
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
|