@anastasia-labs/cardano-multiplatform-lib-browser 5.3.1-3 → 5.3.1-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,20 +17,6 @@ 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
- * @param {TransactionHash} tx_body_hash
21
- * @param {ByronAddress} addr
22
- * @param {LegacyDaedalusPrivateKey} key
23
- * @returns {BootstrapWitness}
24
- */
25
- export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: LegacyDaedalusPrivateKey): BootstrapWitness;
26
- /**
27
- * @param {TransactionHash} tx_body_hash
28
- * @param {ByronAddress} addr
29
- * @param {Bip32PrivateKey} key
30
- * @returns {BootstrapWitness}
31
- */
32
- export function make_icarus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: Bip32PrivateKey): BootstrapWitness;
33
- /**
34
20
  * @param {AuxiliaryData} auxiliary_data
35
21
  * @returns {AuxiliaryDataHash}
36
22
  */
@@ -92,28 +78,19 @@ export function calc_script_data_hash(redeemers: Redeemers, datums: PlutusDataLi
92
78
  */
93
79
  export function calc_script_data_hash_from_witness(witnesses: TransactionWitnessSet, cost_models: CostModels): ScriptDataHash | undefined;
94
80
  /**
95
- * @param {Redeemers} redeemers
96
- * @returns {ExUnits}
97
- */
98
- export function compute_total_ex_units(redeemers: Redeemers): ExUnits;
99
- /**
100
- * @param {TransactionHash} tx_body_hash
101
- * @param {PrivateKey} sk
102
- * @returns {Vkeywitness}
103
- */
104
- export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
105
- /**
106
- * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
107
- * @param {Uint8Array} bytes
108
- * @returns {TransactionMetadatum}
81
+ * @param {TransactionBody} txbody
82
+ * @param {bigint} pool_deposit
83
+ * @param {bigint} key_deposit
84
+ * @returns {Value}
109
85
  */
110
- export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
86
+ export function get_implicit_input(txbody: TransactionBody, pool_deposit: bigint, key_deposit: bigint): Value;
111
87
  /**
112
- * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
113
- * @param {TransactionMetadatum} metadata
114
- * @returns {Uint8Array | undefined}
88
+ * @param {TransactionBody} txbody
89
+ * @param {bigint} pool_deposit
90
+ * @param {bigint} key_deposit
91
+ * @returns {bigint}
115
92
  */
116
- export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array | undefined;
93
+ export function get_deposit(txbody: TransactionBody, pool_deposit: bigint, key_deposit: bigint): bigint;
117
94
  /**
118
95
  *
119
96
  * * Min fee for JUST the script
@@ -137,20 +114,6 @@ export function min_no_script_fee(tx: Transaction, linear_fee: LinearFee): bigin
137
114
  */
138
115
  export function min_fee(tx: Transaction, linear_fee: LinearFee, ex_unit_prices: ExUnitPrices): bigint;
139
116
  /**
140
- * @param {TransactionBody} txbody
141
- * @param {bigint} pool_deposit
142
- * @param {bigint} key_deposit
143
- * @returns {Value}
144
- */
145
- export function get_implicit_input(txbody: TransactionBody, pool_deposit: bigint, key_deposit: bigint): Value;
146
- /**
147
- * @param {TransactionBody} txbody
148
- * @param {bigint} pool_deposit
149
- * @param {bigint} key_deposit
150
- * @returns {bigint}
151
- */
152
- export function get_deposit(txbody: TransactionBody, pool_deposit: bigint, key_deposit: bigint): bigint;
153
- /**
154
117
  * Converts JSON to Metadata according to MetadataJsonSchema
155
118
  * @param {string} json
156
119
  * @param {MetadataJsonSchema} schema
@@ -165,6 +128,49 @@ export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonS
165
128
  */
166
129
  export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
167
130
  /**
131
+ * @param {Redeemers} redeemers
132
+ * @returns {ExUnits}
133
+ */
134
+ export function compute_total_ex_units(redeemers: Redeemers): ExUnits;
135
+ /**
136
+ * @param {TransactionHash} tx_body_hash
137
+ * @param {ByronAddress} addr
138
+ * @param {LegacyDaedalusPrivateKey} key
139
+ * @returns {BootstrapWitness}
140
+ */
141
+ export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: LegacyDaedalusPrivateKey): BootstrapWitness;
142
+ /**
143
+ * @param {TransactionHash} tx_body_hash
144
+ * @param {ByronAddress} addr
145
+ * @param {Bip32PrivateKey} key
146
+ * @returns {BootstrapWitness}
147
+ */
148
+ export function make_icarus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: Bip32PrivateKey): BootstrapWitness;
149
+ /**
150
+ * @param {TransactionHash} tx_body_hash
151
+ * @param {PrivateKey} sk
152
+ * @returns {Vkeywitness}
153
+ */
154
+ export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
155
+ /**
156
+ * @param {TransactionOutput} output
157
+ * @param {bigint} coins_per_utxo_byte
158
+ * @returns {bigint}
159
+ */
160
+ export function min_ada_required(output: TransactionOutput, coins_per_utxo_byte: bigint): bigint;
161
+ /**
162
+ * encodes arbitrary bytes into chunks of 64 bytes (the limit for bytes) as a list to be valid Metadata
163
+ * @param {Uint8Array} bytes
164
+ * @returns {TransactionMetadatum}
165
+ */
166
+ export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum;
167
+ /**
168
+ * decodes from chunks of bytes in a list to a byte vector if that is the metadata format, otherwise returns None
169
+ * @param {TransactionMetadatum} metadata
170
+ * @returns {Uint8Array | undefined}
171
+ */
172
+ export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array | undefined;
173
+ /**
168
174
  * @param {string} json
169
175
  * @param {CardanoNodePlutusDatumSchema} schema
170
176
  * @returns {PlutusData}
@@ -177,21 +183,19 @@ export function encode_json_str_to_plutus_datum(json: string, schema: CardanoNod
177
183
  */
178
184
  export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: CardanoNodePlutusDatumSchema): string;
179
185
  /**
180
- * @param {TransactionOutput} output
181
- * @param {bigint} coins_per_utxo_byte
182
- * @returns {bigint}
183
186
  */
184
- export function min_ada_required(output: TransactionOutput, coins_per_utxo_byte: bigint): bigint;
185
- /**
186
- */
187
- export enum ChangeSelectionAlgo {
188
- Default = 0,
187
+ export enum AddressKind {
188
+ Base = 0,
189
+ Ptr = 1,
190
+ Enterprise = 2,
191
+ Reward = 3,
192
+ Byron = 4,
189
193
  }
190
194
  /**
191
195
  */
192
- export enum DatumOptionKind {
193
- Hash = 0,
194
- Datum = 1,
196
+ export enum NonceKind {
197
+ Identity = 0,
198
+ Hash = 1,
195
199
  }
196
200
  /**
197
201
  */
@@ -204,50 +208,15 @@ export enum VoterKind {
204
208
  }
205
209
  /**
206
210
  */
207
- export enum NonceKind {
208
- Identity = 0,
209
- Hash = 1,
210
- }
211
- /**
212
- */
213
- export enum AuxiliaryDataKind {
214
- Shelley = 0,
215
- ShelleyMA = 1,
216
- Conway = 2,
217
- }
218
- /**
219
- */
220
- export enum CertificateKind {
221
- StakeRegistration = 0,
222
- StakeDeregistration = 1,
223
- StakeDelegation = 2,
224
- PoolRegistration = 3,
225
- PoolRetirement = 4,
226
- RegCert = 5,
227
- UnregCert = 6,
228
- VoteDelegCert = 7,
229
- StakeVoteDelegCert = 8,
230
- StakeRegDelegCert = 9,
231
- VoteRegDelegCert = 10,
232
- StakeVoteRegDelegCert = 11,
233
- AuthCommitteeHotCert = 12,
234
- ResignCommitteeColdCert = 13,
235
- RegDrepCert = 14,
236
- UnregDrepCert = 15,
237
- UpdateDrepCert = 16,
238
- }
239
- /**
240
- */
241
- export enum Language {
242
- PlutusV1 = 0,
243
- PlutusV2 = 1,
244
- PlutusV3 = 2,
211
+ export enum DatumOptionKind {
212
+ Hash = 0,
213
+ Datum = 1,
245
214
  }
246
215
  /**
247
216
  */
248
- export enum ChunkableStringKind {
249
- Single = 0,
250
- Chunked = 1,
217
+ export enum DelegationDistributionKind {
218
+ Weighted = 0,
219
+ Legacy = 1,
251
220
  }
252
221
  /**
253
222
  */
@@ -259,49 +228,23 @@ export enum DRepKind {
259
228
  }
260
229
  /**
261
230
  */
262
- export enum DelegationDistributionKind {
263
- Weighted = 0,
264
- Legacy = 1,
265
- }
266
- /**
267
- */
268
- export enum ScriptKind {
269
- Native = 0,
270
- PlutusV1 = 1,
271
- PlutusV2 = 2,
272
- PlutusV3 = 3,
273
- }
231
+ export enum CoinSelectionStrategyCIP2 {
274
232
  /**
233
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
275
234
  */
276
- export enum Vote {
277
- No = 0,
278
- Yes = 1,
279
- Abstain = 2,
280
- }
235
+ LargestFirst = 0,
281
236
  /**
237
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
282
238
  */
283
- export enum RelayKind {
284
- SingleHostAddr = 0,
285
- SingleHostName = 1,
286
- MultiHostName = 2,
287
- }
239
+ RandomImprove = 1,
288
240
  /**
241
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
289
242
  */
290
- export enum AddressKind {
291
- Base = 0,
292
- Ptr = 1,
293
- Enterprise = 2,
294
- Reward = 3,
295
- Byron = 4,
296
- }
243
+ LargestFirstMultiAsset = 2,
297
244
  /**
245
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
298
246
  */
299
- export enum TransactionMetadatumKind {
300
- Map = 0,
301
- List = 1,
302
- Int = 2,
303
- Bytes = 3,
304
- Text = 4,
247
+ RandomImproveMultiAsset = 3,
305
248
  }
306
249
  /**
307
250
  * JSON <-> PlutusData conversion schemas.
@@ -357,55 +300,84 @@ export enum CardanoNodePlutusDatumSchema {
357
300
  }
358
301
  /**
359
302
  */
360
- export enum RedeemerTag {
361
- Spend = 0,
362
- Mint = 1,
363
- Cert = 2,
364
- Reward = 3,
365
- Voting = 4,
366
- Proposing = 5,
303
+ export enum TransactionMetadatumKind {
304
+ Map = 0,
305
+ List = 1,
306
+ Int = 2,
307
+ Bytes = 3,
308
+ Text = 4,
367
309
  }
368
310
  /**
369
- * Careful: this enum doesn't include the network ID part of the header
370
- * ex: base address isn't 0b0000_0000 but instead 0b0000
371
- * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
372
311
  */
373
- export enum AddressHeaderKind {
374
- BasePaymentKeyStakeKey = 0,
375
- BasePaymentScriptStakeKey = 1,
376
- BasePaymentKeyStakeScript = 2,
377
- BasePaymentScriptStakeScript = 3,
378
- PointerKey = 4,
379
- PointerScript = 5,
380
- EnterpriseKey = 6,
381
- EnterpriseScript = 7,
382
- Byron = 8,
383
- RewardKey = 14,
384
- RewardScript = 15,
312
+ export enum CertificateKind {
313
+ StakeRegistration = 0,
314
+ StakeDeregistration = 1,
315
+ StakeDelegation = 2,
316
+ PoolRegistration = 3,
317
+ PoolRetirement = 4,
318
+ RegCert = 5,
319
+ UnregCert = 6,
320
+ VoteDelegCert = 7,
321
+ StakeVoteDelegCert = 8,
322
+ StakeRegDelegCert = 9,
323
+ VoteRegDelegCert = 10,
324
+ StakeVoteRegDelegCert = 11,
325
+ AuthCommitteeHotCert = 12,
326
+ ResignCommitteeColdCert = 13,
327
+ RegDrepCert = 14,
328
+ UnregDrepCert = 15,
329
+ UpdateDrepCert = 16,
385
330
  }
386
331
  /**
387
332
  */
388
- export enum TransactionOutputKind {
389
- AlonzoFormatTxOut = 0,
390
- ConwayFormatTxOut = 1,
333
+ export enum ScriptKind {
334
+ Native = 0,
335
+ PlutusV1 = 1,
336
+ PlutusV2 = 2,
337
+ PlutusV3 = 3,
391
338
  }
392
339
  /**
393
340
  */
394
- export enum GovActionKind {
395
- ParameterChangeAction = 0,
396
- HardForkInitiationAction = 1,
397
- TreasuryWithdrawalsAction = 2,
398
- NoConfidence = 3,
399
- UpdateCommittee = 4,
400
- NewConstitution = 5,
401
- InfoAction = 6,
341
+ export enum RelayKind {
342
+ SingleHostAddr = 0,
343
+ SingleHostName = 1,
344
+ MultiHostName = 2,
402
345
  }
403
346
  /**
404
347
  */
405
- export enum MetadataJsonSchema {
406
- NoConversions = 0,
407
- BasicConversions = 1,
408
- DetailedSchema = 2,
348
+ export enum AuxiliaryDataKind {
349
+ Shelley = 0,
350
+ ShelleyMA = 1,
351
+ Conway = 2,
352
+ }
353
+ /**
354
+ */
355
+ export enum Vote {
356
+ No = 0,
357
+ Yes = 1,
358
+ Abstain = 2,
359
+ }
360
+ /**
361
+ */
362
+ export enum NativeScriptKind {
363
+ ScriptPubkey = 0,
364
+ ScriptAll = 1,
365
+ ScriptAny = 2,
366
+ ScriptNOfK = 3,
367
+ ScriptInvalidBefore = 4,
368
+ ScriptInvalidHereafter = 5,
369
+ }
370
+ /**
371
+ */
372
+ export enum TransactionOutputKind {
373
+ AlonzoFormatTxOut = 0,
374
+ ConwayFormatTxOut = 1,
375
+ }
376
+ /**
377
+ */
378
+ export enum CredentialKind {
379
+ PubKey = 0,
380
+ Script = 1,
409
381
  }
410
382
  /**
411
383
  */
@@ -415,42 +387,56 @@ export enum StakeDistributionKind {
415
387
  }
416
388
  /**
417
389
  */
418
- export enum CoinSelectionStrategyCIP2 {
419
- /**
420
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
421
- */
422
- LargestFirst = 0,
390
+ export enum ByronAddrType {
391
+ PublicKey = 0,
392
+ Script = 1,
393
+ Redeem = 2,
394
+ }
423
395
  /**
424
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
425
396
  */
426
- RandomImprove = 1,
397
+ export enum RedeemersKind {
398
+ ArrLegacyRedeemer = 0,
399
+ MapRedeemerKeyToRedeemerVal = 1,
400
+ }
427
401
  /**
428
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
429
402
  */
430
- LargestFirstMultiAsset = 2,
403
+ export enum RedeemerTag {
404
+ Spend = 0,
405
+ Mint = 1,
406
+ Cert = 2,
407
+ Reward = 3,
408
+ Voting = 4,
409
+ Proposing = 5,
410
+ }
431
411
  /**
432
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
433
412
  */
434
- RandomImproveMultiAsset = 3,
413
+ export enum Language {
414
+ PlutusV1 = 0,
415
+ PlutusV2 = 1,
416
+ PlutusV3 = 2,
435
417
  }
436
418
  /**
437
419
  */
438
- export enum SpendingDataKind {
439
- SpendingDataPubKey = 0,
440
- SpendingDataScript = 1,
441
- SpendingDataRedeem = 2,
420
+ export enum MetadataJsonSchema {
421
+ NoConversions = 0,
422
+ BasicConversions = 1,
423
+ DetailedSchema = 2,
442
424
  }
443
425
  /**
444
426
  */
445
- export enum RedeemersKind {
446
- ArrLegacyRedeemer = 0,
447
- MapRedeemerKeyToRedeemerVal = 1,
427
+ export enum ChangeSelectionAlgo {
428
+ Default = 0,
448
429
  }
449
430
  /**
450
431
  */
451
- export enum CredentialKind {
452
- PubKey = 0,
453
- Script = 1,
432
+ export enum GovActionKind {
433
+ ParameterChangeAction = 0,
434
+ HardForkInitiationAction = 1,
435
+ TreasuryWithdrawalsAction = 2,
436
+ NoConfidence = 3,
437
+ UpdateCommittee = 4,
438
+ NewConstitution = 5,
439
+ InfoAction = 6,
454
440
  }
455
441
  /**
456
442
  */
@@ -463,20 +449,28 @@ export enum PlutusDataKind {
463
449
  }
464
450
  /**
465
451
  */
466
- export enum ByronAddrType {
467
- PublicKey = 0,
468
- Script = 1,
469
- Redeem = 2,
452
+ export enum SpendingDataKind {
453
+ SpendingDataPubKey = 0,
454
+ SpendingDataScript = 1,
455
+ SpendingDataRedeem = 2,
470
456
  }
471
457
  /**
458
+ * Careful: this enum doesn't include the network ID part of the header
459
+ * ex: base address isn't 0b0000_0000 but instead 0b0000
460
+ * Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
472
461
  */
473
- export enum NativeScriptKind {
474
- ScriptPubkey = 0,
475
- ScriptAll = 1,
476
- ScriptAny = 2,
477
- ScriptNOfK = 3,
478
- ScriptInvalidBefore = 4,
479
- ScriptInvalidHereafter = 5,
462
+ export enum AddressHeaderKind {
463
+ BasePaymentKeyStakeKey = 0,
464
+ BasePaymentScriptStakeKey = 1,
465
+ BasePaymentKeyStakeScript = 2,
466
+ BasePaymentScriptStakeScript = 3,
467
+ PointerKey = 4,
468
+ PointerScript = 5,
469
+ EnterpriseKey = 6,
470
+ EnterpriseScript = 7,
471
+ Byron = 8,
472
+ RewardKey = 14,
473
+ RewardScript = 15,
480
474
  }
481
475
  /**
482
476
  * Which version of the CIP25 spec to use. See CIP25 for details.
@@ -495,21 +489,14 @@ export enum CIP25Version {
495
489
  }
496
490
  /**
497
491
  */
498
- export class AddrAttributes {
499
- free(): void;
500
- /**
501
- * @param {HDAddressPayload | undefined} [hdap]
502
- * @param {ProtocolMagic | undefined} [protocol_magic]
503
- * @returns {AddrAttributes}
504
- */
505
- static new_bootstrap_era(hdap?: HDAddressPayload, protocol_magic?: ProtocolMagic): AddrAttributes;
492
+ export enum ChunkableStringKind {
493
+ Single = 0,
494
+ Chunked = 1,
495
+ }
506
496
  /**
507
- * @param {Bip32PublicKey} pubk
508
- * @param {HDAddressPayload | undefined} hdap
509
- * @param {ProtocolMagic} protocol_magic
510
- * @returns {AddrAttributes}
511
497
  */
512
- static new_single_key(pubk: Bip32PublicKey, hdap: HDAddressPayload | undefined, protocol_magic: ProtocolMagic): AddrAttributes;
498
+ export class AddrAttributes {
499
+ free(): void;
513
500
  /**
514
501
  *
515
502
  * * Serialize this type to CBOR bytes.
@@ -573,6 +560,19 @@ export class AddrAttributes {
573
560
  * @returns {AddrAttributes}
574
561
  */
575
562
  static new(): AddrAttributes;
563
+ /**
564
+ * @param {HDAddressPayload | undefined} [hdap]
565
+ * @param {ProtocolMagic | undefined} [protocol_magic]
566
+ * @returns {AddrAttributes}
567
+ */
568
+ static new_bootstrap_era(hdap?: HDAddressPayload, protocol_magic?: ProtocolMagic): AddrAttributes;
569
+ /**
570
+ * @param {Bip32PublicKey} pubk
571
+ * @param {HDAddressPayload | undefined} hdap
572
+ * @param {ProtocolMagic} protocol_magic
573
+ * @returns {AddrAttributes}
574
+ */
575
+ static new_single_key(pubk: Bip32PublicKey, hdap: HDAddressPayload | undefined, protocol_magic: ProtocolMagic): AddrAttributes;
576
576
  }
577
577
  /**
578
578
  */
@@ -694,52 +694,6 @@ export class Address {
694
694
  export class AddressContent {
695
695
  free(): void;
696
696
  /**
697
- * @param {ByronAddrType} addr_type
698
- * @param {SpendingData} spending_data
699
- * @param {AddrAttributes} attributes
700
- * @returns {AddressContent}
701
- */
702
- static hash_and_create(addr_type: ByronAddrType, spending_data: SpendingData, attributes: AddrAttributes): AddressContent;
703
- /**
704
- * @param {PublicKey} pubkey
705
- * @param {ProtocolMagic | undefined} [protocol_magic]
706
- * @returns {AddressContent}
707
- */
708
- static new_redeem(pubkey: PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
709
- /**
710
- * @param {Bip32PublicKey} xpub
711
- * @param {ProtocolMagic | undefined} [protocol_magic]
712
- * @returns {AddressContent}
713
- */
714
- static new_simple(xpub: Bip32PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
715
- /**
716
- * Do we want to remove this or keep it for people who were using old Byron code?
717
- * @returns {ByronAddress}
718
- */
719
- to_address(): ByronAddress;
720
- /**
721
- * returns the byron protocol magic embedded in the address, or mainnet id if none is present
722
- * note: for bech32 addresses, you need to use network_id instead
723
- * @returns {ProtocolMagic}
724
- */
725
- byron_protocol_magic(): ProtocolMagic;
726
- /**
727
- * @returns {number}
728
- */
729
- network_id(): number;
730
- /**
731
- * @param {Bip32PublicKey} key
732
- * @param {ProtocolMagic} protocol_magic
733
- * @returns {AddressContent}
734
- */
735
- static icarus_from_key(key: Bip32PublicKey, protocol_magic: ProtocolMagic): AddressContent;
736
- /**
737
- * Check if the Addr can be reconstructed with a specific xpub
738
- * @param {Bip32PublicKey} xpub
739
- * @returns {boolean}
740
- */
741
- identical_with_pubkey(xpub: Bip32PublicKey): boolean;
742
- /**
743
697
  *
744
698
  * * Serialize this type to CBOR bytes.
745
699
  * * This type does NOT support fine-tuned encoding options so this may or may not be
@@ -793,6 +747,52 @@ export class AddressContent {
793
747
  * @returns {AddressContent}
794
748
  */
795
749
  static new(address_id: AddressId, addr_attributes: AddrAttributes, addr_type: ByronAddrType): AddressContent;
750
+ /**
751
+ * @param {ByronAddrType} addr_type
752
+ * @param {SpendingData} spending_data
753
+ * @param {AddrAttributes} attributes
754
+ * @returns {AddressContent}
755
+ */
756
+ static hash_and_create(addr_type: ByronAddrType, spending_data: SpendingData, attributes: AddrAttributes): AddressContent;
757
+ /**
758
+ * @param {PublicKey} pubkey
759
+ * @param {ProtocolMagic | undefined} [protocol_magic]
760
+ * @returns {AddressContent}
761
+ */
762
+ static new_redeem(pubkey: PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
763
+ /**
764
+ * @param {Bip32PublicKey} xpub
765
+ * @param {ProtocolMagic | undefined} [protocol_magic]
766
+ * @returns {AddressContent}
767
+ */
768
+ static new_simple(xpub: Bip32PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
769
+ /**
770
+ * Do we want to remove this or keep it for people who were using old Byron code?
771
+ * @returns {ByronAddress}
772
+ */
773
+ to_address(): ByronAddress;
774
+ /**
775
+ * returns the byron protocol magic embedded in the address, or mainnet id if none is present
776
+ * note: for bech32 addresses, you need to use network_id instead
777
+ * @returns {ProtocolMagic}
778
+ */
779
+ byron_protocol_magic(): ProtocolMagic;
780
+ /**
781
+ * @returns {number}
782
+ */
783
+ network_id(): number;
784
+ /**
785
+ * @param {Bip32PublicKey} key
786
+ * @param {ProtocolMagic} protocol_magic
787
+ * @returns {AddressContent}
788
+ */
789
+ static icarus_from_key(key: Bip32PublicKey, protocol_magic: ProtocolMagic): AddressContent;
790
+ /**
791
+ * Check if the Addr can be reconstructed with a specific xpub
792
+ * @param {Bip32PublicKey} xpub
793
+ * @returns {boolean}
794
+ */
795
+ identical_with_pubkey(xpub: Bip32PublicKey): boolean;
796
796
  }
797
797
  /**
798
798
  */
@@ -1935,34 +1935,6 @@ export class BootstrapWitnessList {
1935
1935
  export class ByronAddress {
1936
1936
  free(): void;
1937
1937
  /**
1938
- * @returns {string}
1939
- */
1940
- to_base58(): string;
1941
- /**
1942
- * @param {string} s
1943
- * @returns {ByronAddress}
1944
- */
1945
- static from_base58(s: string): ByronAddress;
1946
- /**
1947
- * @param {string} s
1948
- * @returns {boolean}
1949
- */
1950
- static is_valid(s: string): boolean;
1951
- /**
1952
- * @returns {Address}
1953
- */
1954
- to_address(): Address;
1955
- /**
1956
- * @param {Address} addr
1957
- * @returns {ByronAddress | undefined}
1958
- */
1959
- static from_address(addr: Address): ByronAddress | undefined;
1960
- /**
1961
- * @param {AddressContent} address_content
1962
- * @returns {ByronAddress}
1963
- */
1964
- static from_address_content(address_content: AddressContent): ByronAddress;
1965
- /**
1966
1938
  *
1967
1939
  * * Serialize this type to CBOR bytes.
1968
1940
  * * This type does NOT support fine-tuned encoding options so this may or may not be
@@ -2011,6 +1983,34 @@ export class ByronAddress {
2011
1983
  * @returns {ByronAddress}
2012
1984
  */
2013
1985
  static new(content: AddressContent, crc: Crc32): ByronAddress;
1986
+ /**
1987
+ * @returns {string}
1988
+ */
1989
+ to_base58(): string;
1990
+ /**
1991
+ * @param {string} s
1992
+ * @returns {ByronAddress}
1993
+ */
1994
+ static from_base58(s: string): ByronAddress;
1995
+ /**
1996
+ * @param {string} s
1997
+ * @returns {boolean}
1998
+ */
1999
+ static is_valid(s: string): boolean;
2000
+ /**
2001
+ * @returns {Address}
2002
+ */
2003
+ to_address(): Address;
2004
+ /**
2005
+ * @param {Address} addr
2006
+ * @returns {ByronAddress | undefined}
2007
+ */
2008
+ static from_address(addr: Address): ByronAddress | undefined;
2009
+ /**
2010
+ * @param {AddressContent} address_content
2011
+ * @returns {ByronAddress}
2012
+ */
2013
+ static from_address_content(address_content: AddressContent): ByronAddress;
2014
2014
  }
2015
2015
  /**
2016
2016
  */
@@ -9436,6 +9436,14 @@ export class RewardAddress {
9436
9436
  export class Script {
9437
9437
  free(): void;
9438
9438
  /**
9439
+ * @returns {ScriptHash}
9440
+ */
9441
+ hash(): ScriptHash;
9442
+ /**
9443
+ * @returns {Language | undefined}
9444
+ */
9445
+ language(): Language | undefined;
9446
+ /**
9439
9447
  *
9440
9448
  * * Serialize this type to CBOR bytes
9441
9449
  * * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
@@ -9523,14 +9531,6 @@ export class Script {
9523
9531
  * @returns {PlutusV3Script | undefined}
9524
9532
  */
9525
9533
  as_plutus_v3(): PlutusV3Script | undefined;
9526
- /**
9527
- * @returns {ScriptHash}
9528
- */
9529
- hash(): ScriptHash;
9530
- /**
9531
- * @returns {Language | undefined}
9532
- */
9533
- language(): Language | undefined;
9534
9534
  }
9535
9535
  /**
9536
9536
  */