@anastasia-labs/cardano-multiplatform-lib-nodejs 6.0.2-2 → 6.0.2-3
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 +307 -307
- package/cardano_multiplatform_lib.js +498 -498
- package/cardano_multiplatform_lib_bg.wasm +0 -0
- package/package.json +1 -1
|
@@ -29,6 +29,52 @@ export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): Transact
|
|
|
29
29
|
*/
|
|
30
30
|
export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array | undefined;
|
|
31
31
|
/**
|
|
32
|
+
*
|
|
33
|
+
* * Min fee for JUST the script, NOT including ref inputs
|
|
34
|
+
*
|
|
35
|
+
* @param {Transaction} tx
|
|
36
|
+
* @param {ExUnitPrices} ex_unit_prices
|
|
37
|
+
* @returns {bigint}
|
|
38
|
+
*/
|
|
39
|
+
export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): bigint;
|
|
40
|
+
/**
|
|
41
|
+
* @param {Transaction} tx
|
|
42
|
+
* @param {LinearFee} linear_fee
|
|
43
|
+
* @returns {bigint}
|
|
44
|
+
*/
|
|
45
|
+
export function min_no_script_fee(tx: Transaction, linear_fee: LinearFee): bigint;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* * Calculates the cost of all ref scripts
|
|
49
|
+
* * * `total_ref_script_size` - Total size (original, not hashes) of all ref scripts. Duplicate scripts are counted as many times as they occur
|
|
50
|
+
*
|
|
51
|
+
* @param {Transaction} tx
|
|
52
|
+
* @param {LinearFee} linear_fee
|
|
53
|
+
* @param {ExUnitPrices} ex_unit_prices
|
|
54
|
+
* @param {bigint} total_ref_script_size
|
|
55
|
+
* @returns {bigint}
|
|
56
|
+
*/
|
|
57
|
+
export function min_fee(tx: Transaction, linear_fee: LinearFee, ex_unit_prices: ExUnitPrices, total_ref_script_size: bigint): bigint;
|
|
58
|
+
/**
|
|
59
|
+
* @param {TransactionHash} tx_body_hash
|
|
60
|
+
* @param {ByronAddress} addr
|
|
61
|
+
* @param {LegacyDaedalusPrivateKey} key
|
|
62
|
+
* @returns {BootstrapWitness}
|
|
63
|
+
*/
|
|
64
|
+
export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: LegacyDaedalusPrivateKey): BootstrapWitness;
|
|
65
|
+
/**
|
|
66
|
+
* @param {TransactionHash} tx_body_hash
|
|
67
|
+
* @param {ByronAddress} addr
|
|
68
|
+
* @param {Bip32PrivateKey} key
|
|
69
|
+
* @returns {BootstrapWitness}
|
|
70
|
+
*/
|
|
71
|
+
export function make_icarus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: Bip32PrivateKey): BootstrapWitness;
|
|
72
|
+
/**
|
|
73
|
+
* @param {Redeemers} redeemers
|
|
74
|
+
* @returns {ExUnits}
|
|
75
|
+
*/
|
|
76
|
+
export function compute_total_ex_units(redeemers: Redeemers): ExUnits;
|
|
77
|
+
/**
|
|
32
78
|
* @param {AuxiliaryData} auxiliary_data
|
|
33
79
|
* @returns {AuxiliaryDataHash}
|
|
34
80
|
*/
|
|
@@ -90,6 +136,12 @@ export function calc_script_data_hash(redeemers: Redeemers, datums: PlutusDataLi
|
|
|
90
136
|
*/
|
|
91
137
|
export function calc_script_data_hash_from_witness(witnesses: TransactionWitnessSet, cost_models: CostModels): ScriptDataHash | undefined;
|
|
92
138
|
/**
|
|
139
|
+
* @param {TransactionHash} tx_body_hash
|
|
140
|
+
* @param {PrivateKey} sk
|
|
141
|
+
* @returns {Vkeywitness}
|
|
142
|
+
*/
|
|
143
|
+
export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness;
|
|
144
|
+
/**
|
|
93
145
|
* @param {TransactionBody} txbody
|
|
94
146
|
* @param {bigint} pool_deposit
|
|
95
147
|
* @param {bigint} key_deposit
|
|
@@ -104,33 +156,6 @@ export function get_implicit_input(txbody: TransactionBody, pool_deposit: bigint
|
|
|
104
156
|
*/
|
|
105
157
|
export function get_deposit(txbody: TransactionBody, pool_deposit: bigint, key_deposit: bigint): bigint;
|
|
106
158
|
/**
|
|
107
|
-
*
|
|
108
|
-
* * Min fee for JUST the script, NOT including ref inputs
|
|
109
|
-
*
|
|
110
|
-
* @param {Transaction} tx
|
|
111
|
-
* @param {ExUnitPrices} ex_unit_prices
|
|
112
|
-
* @returns {bigint}
|
|
113
|
-
*/
|
|
114
|
-
export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): bigint;
|
|
115
|
-
/**
|
|
116
|
-
* @param {Transaction} tx
|
|
117
|
-
* @param {LinearFee} linear_fee
|
|
118
|
-
* @returns {bigint}
|
|
119
|
-
*/
|
|
120
|
-
export function min_no_script_fee(tx: Transaction, linear_fee: LinearFee): bigint;
|
|
121
|
-
/**
|
|
122
|
-
*
|
|
123
|
-
* * Calculates the cost of all ref scripts
|
|
124
|
-
* * * `total_ref_script_size` - Total size (original, not hashes) of all ref scripts. Duplicate scripts are counted as many times as they occur
|
|
125
|
-
*
|
|
126
|
-
* @param {Transaction} tx
|
|
127
|
-
* @param {LinearFee} linear_fee
|
|
128
|
-
* @param {ExUnitPrices} ex_unit_prices
|
|
129
|
-
* @param {bigint} total_ref_script_size
|
|
130
|
-
* @returns {bigint}
|
|
131
|
-
*/
|
|
132
|
-
export function min_fee(tx: Transaction, linear_fee: LinearFee, ex_unit_prices: ExUnitPrices, total_ref_script_size: bigint): bigint;
|
|
133
|
-
/**
|
|
134
159
|
* Converts JSON to Metadata according to MetadataJsonSchema
|
|
135
160
|
* @param {string} json
|
|
136
161
|
* @param {MetadataJsonSchema} schema
|
|
@@ -145,37 +170,6 @@ export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonS
|
|
|
145
170
|
*/
|
|
146
171
|
export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
|
|
147
172
|
/**
|
|
148
|
-
* @param {Redeemers} redeemers
|
|
149
|
-
* @returns {ExUnits}
|
|
150
|
-
*/
|
|
151
|
-
export function compute_total_ex_units(redeemers: Redeemers): ExUnits;
|
|
152
|
-
/**
|
|
153
|
-
* @param {TransactionHash} tx_body_hash
|
|
154
|
-
* @param {ByronAddress} addr
|
|
155
|
-
* @param {LegacyDaedalusPrivateKey} key
|
|
156
|
-
* @returns {BootstrapWitness}
|
|
157
|
-
*/
|
|
158
|
-
export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: LegacyDaedalusPrivateKey): BootstrapWitness;
|
|
159
|
-
/**
|
|
160
|
-
* @param {TransactionHash} tx_body_hash
|
|
161
|
-
* @param {ByronAddress} addr
|
|
162
|
-
* @param {Bip32PrivateKey} key
|
|
163
|
-
* @returns {BootstrapWitness}
|
|
164
|
-
*/
|
|
165
|
-
export function make_icarus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: Bip32PrivateKey): BootstrapWitness;
|
|
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
173
|
* @param {string} json
|
|
180
174
|
* @param {CardanoNodePlutusDatumSchema} schema
|
|
181
175
|
* @returns {PlutusData}
|
|
@@ -188,35 +182,11 @@ export function encode_json_str_to_plutus_datum(json: string, schema: CardanoNod
|
|
|
188
182
|
*/
|
|
189
183
|
export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: CardanoNodePlutusDatumSchema): string;
|
|
190
184
|
/**
|
|
185
|
+
* @param {TransactionOutput} output
|
|
186
|
+
* @param {bigint} coins_per_utxo_byte
|
|
187
|
+
* @returns {bigint}
|
|
191
188
|
*/
|
|
192
|
-
export
|
|
193
|
-
Base = 0,
|
|
194
|
-
Ptr = 1,
|
|
195
|
-
Enterprise = 2,
|
|
196
|
-
Reward = 3,
|
|
197
|
-
Byron = 4,
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
*/
|
|
201
|
-
export enum CertificateKind {
|
|
202
|
-
StakeRegistration = 0,
|
|
203
|
-
StakeDeregistration = 1,
|
|
204
|
-
StakeDelegation = 2,
|
|
205
|
-
PoolRegistration = 3,
|
|
206
|
-
PoolRetirement = 4,
|
|
207
|
-
RegCert = 5,
|
|
208
|
-
UnregCert = 6,
|
|
209
|
-
VoteDelegCert = 7,
|
|
210
|
-
StakeVoteDelegCert = 8,
|
|
211
|
-
StakeRegDelegCert = 9,
|
|
212
|
-
VoteRegDelegCert = 10,
|
|
213
|
-
StakeVoteRegDelegCert = 11,
|
|
214
|
-
AuthCommitteeHotCert = 12,
|
|
215
|
-
ResignCommitteeColdCert = 13,
|
|
216
|
-
RegDrepCert = 14,
|
|
217
|
-
UnregDrepCert = 15,
|
|
218
|
-
UpdateDrepCert = 16,
|
|
219
|
-
}
|
|
189
|
+
export function min_ada_required(output: TransactionOutput, coins_per_utxo_byte: bigint): bigint;
|
|
220
190
|
/**
|
|
221
191
|
* JSON <-> PlutusData conversion schemas.
|
|
222
192
|
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
@@ -271,10 +241,16 @@ export enum CardanoNodePlutusDatumSchema {
|
|
|
271
241
|
}
|
|
272
242
|
/**
|
|
273
243
|
*/
|
|
274
|
-
export enum
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
244
|
+
export enum Language {
|
|
245
|
+
PlutusV1 = 0,
|
|
246
|
+
PlutusV2 = 1,
|
|
247
|
+
PlutusV3 = 2,
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
*/
|
|
251
|
+
export enum DelegationDistributionKind {
|
|
252
|
+
Weighted = 0,
|
|
253
|
+
Legacy = 1,
|
|
278
254
|
}
|
|
279
255
|
/**
|
|
280
256
|
*/
|
|
@@ -287,41 +263,28 @@ export enum RedeemerTag {
|
|
|
287
263
|
Proposing = 5,
|
|
288
264
|
}
|
|
289
265
|
/**
|
|
290
|
-
* Careful: this enum doesn't include the network ID part of the header
|
|
291
|
-
* ex: base address isn't 0b0000_0000 but instead 0b0000
|
|
292
|
-
* Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
|
|
293
|
-
*/
|
|
294
|
-
export enum AddressHeaderKind {
|
|
295
|
-
BasePaymentKeyStakeKey = 0,
|
|
296
|
-
BasePaymentScriptStakeKey = 1,
|
|
297
|
-
BasePaymentKeyStakeScript = 2,
|
|
298
|
-
BasePaymentScriptStakeScript = 3,
|
|
299
|
-
PointerKey = 4,
|
|
300
|
-
PointerScript = 5,
|
|
301
|
-
EnterpriseKey = 6,
|
|
302
|
-
EnterpriseScript = 7,
|
|
303
|
-
Byron = 8,
|
|
304
|
-
RewardKey = 14,
|
|
305
|
-
RewardScript = 15,
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
266
|
*/
|
|
309
|
-
export enum
|
|
310
|
-
|
|
311
|
-
|
|
267
|
+
export enum ScriptKind {
|
|
268
|
+
Native = 0,
|
|
269
|
+
PlutusV1 = 1,
|
|
270
|
+
PlutusV2 = 2,
|
|
271
|
+
PlutusV3 = 3,
|
|
312
272
|
}
|
|
313
273
|
/**
|
|
314
274
|
*/
|
|
315
|
-
export enum
|
|
316
|
-
|
|
317
|
-
|
|
275
|
+
export enum TransactionMetadatumKind {
|
|
276
|
+
Map = 0,
|
|
277
|
+
List = 1,
|
|
278
|
+
Int = 2,
|
|
279
|
+
Bytes = 3,
|
|
280
|
+
Text = 4,
|
|
318
281
|
}
|
|
319
282
|
/**
|
|
320
283
|
*/
|
|
321
|
-
export enum
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
284
|
+
export enum AuxiliaryDataKind {
|
|
285
|
+
Shelley = 0,
|
|
286
|
+
ShelleyMA = 1,
|
|
287
|
+
Conway = 2,
|
|
325
288
|
}
|
|
326
289
|
/**
|
|
327
290
|
*/
|
|
@@ -331,13 +294,70 @@ export enum ChunkableStringKind {
|
|
|
331
294
|
}
|
|
332
295
|
/**
|
|
333
296
|
*/
|
|
334
|
-
export enum
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
297
|
+
export enum VoterKind {
|
|
298
|
+
ConstitutionalCommitteeHotKeyHash = 0,
|
|
299
|
+
ConstitutionalCommitteeHotScriptHash = 1,
|
|
300
|
+
DRepKeyHash = 2,
|
|
301
|
+
DRepScriptHash = 3,
|
|
302
|
+
StakingPoolKeyHash = 4,
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
*/
|
|
306
|
+
export enum CertificateKind {
|
|
307
|
+
StakeRegistration = 0,
|
|
308
|
+
StakeDeregistration = 1,
|
|
309
|
+
StakeDelegation = 2,
|
|
310
|
+
PoolRegistration = 3,
|
|
311
|
+
PoolRetirement = 4,
|
|
312
|
+
RegCert = 5,
|
|
313
|
+
UnregCert = 6,
|
|
314
|
+
VoteDelegCert = 7,
|
|
315
|
+
StakeVoteDelegCert = 8,
|
|
316
|
+
StakeRegDelegCert = 9,
|
|
317
|
+
VoteRegDelegCert = 10,
|
|
318
|
+
StakeVoteRegDelegCert = 11,
|
|
319
|
+
AuthCommitteeHotCert = 12,
|
|
320
|
+
ResignCommitteeColdCert = 13,
|
|
321
|
+
RegDrepCert = 14,
|
|
322
|
+
UnregDrepCert = 15,
|
|
323
|
+
UpdateDrepCert = 16,
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
*/
|
|
327
|
+
export enum ByronAddrType {
|
|
328
|
+
PublicKey = 0,
|
|
329
|
+
Script = 1,
|
|
330
|
+
Redeem = 2,
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
*/
|
|
334
|
+
export enum PlutusDataKind {
|
|
335
|
+
ConstrPlutusData = 0,
|
|
336
|
+
Map = 1,
|
|
337
|
+
List = 2,
|
|
338
|
+
Integer = 3,
|
|
339
|
+
Bytes = 4,
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
*/
|
|
343
|
+
export enum DRepKind {
|
|
344
|
+
Key = 0,
|
|
345
|
+
Script = 1,
|
|
346
|
+
AlwaysAbstain = 2,
|
|
347
|
+
AlwaysNoConfidence = 3,
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
*/
|
|
351
|
+
export enum MetadataJsonSchema {
|
|
352
|
+
NoConversions = 0,
|
|
353
|
+
BasicConversions = 1,
|
|
354
|
+
DetailedSchema = 2,
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
*/
|
|
358
|
+
export enum DatumOptionKind {
|
|
359
|
+
Hash = 0,
|
|
360
|
+
Datum = 1,
|
|
341
361
|
}
|
|
342
362
|
/**
|
|
343
363
|
*/
|
|
@@ -361,63 +381,96 @@ export enum CoinSelectionStrategyCIP2 {
|
|
|
361
381
|
}
|
|
362
382
|
/**
|
|
363
383
|
*/
|
|
384
|
+
export enum Vote {
|
|
385
|
+
No = 0,
|
|
386
|
+
Yes = 1,
|
|
387
|
+
Abstain = 2,
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
*/
|
|
391
|
+
export enum RelayKind {
|
|
392
|
+
SingleHostAddr = 0,
|
|
393
|
+
SingleHostName = 1,
|
|
394
|
+
MultiHostName = 2,
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
*/
|
|
364
398
|
export enum RedeemersKind {
|
|
365
399
|
ArrLegacyRedeemer = 0,
|
|
366
400
|
MapRedeemerKeyToRedeemerVal = 1,
|
|
367
401
|
}
|
|
368
402
|
/**
|
|
369
403
|
*/
|
|
370
|
-
export enum
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
PlutusV3 = 2,
|
|
404
|
+
export enum StakeDistributionKind {
|
|
405
|
+
SingleKey = 0,
|
|
406
|
+
BootstrapEra = 1,
|
|
374
407
|
}
|
|
375
408
|
/**
|
|
376
409
|
*/
|
|
377
|
-
export enum
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
410
|
+
export enum AddressKind {
|
|
411
|
+
Base = 0,
|
|
412
|
+
Ptr = 1,
|
|
413
|
+
Enterprise = 2,
|
|
414
|
+
Reward = 3,
|
|
415
|
+
Byron = 4,
|
|
381
416
|
}
|
|
382
417
|
/**
|
|
383
418
|
*/
|
|
384
|
-
export enum
|
|
385
|
-
|
|
386
|
-
|
|
419
|
+
export enum SpendingDataKind {
|
|
420
|
+
SpendingDataPubKey = 0,
|
|
421
|
+
SpendingDataScript = 1,
|
|
422
|
+
SpendingDataRedeem = 2,
|
|
387
423
|
}
|
|
388
424
|
/**
|
|
389
425
|
*/
|
|
390
|
-
export enum
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
TreasuryWithdrawalsAction = 2,
|
|
394
|
-
NoConfidence = 3,
|
|
395
|
-
UpdateCommittee = 4,
|
|
396
|
-
NewConstitution = 5,
|
|
397
|
-
InfoAction = 6,
|
|
426
|
+
export enum TransactionOutputKind {
|
|
427
|
+
AlonzoFormatTxOut = 0,
|
|
428
|
+
ConwayFormatTxOut = 1,
|
|
398
429
|
}
|
|
399
430
|
/**
|
|
400
431
|
*/
|
|
401
|
-
export enum
|
|
402
|
-
|
|
403
|
-
ConstitutionalCommitteeHotScriptHash = 1,
|
|
404
|
-
DRepKeyHash = 2,
|
|
405
|
-
DRepScriptHash = 3,
|
|
406
|
-
StakingPoolKeyHash = 4,
|
|
432
|
+
export enum ChangeSelectionAlgo {
|
|
433
|
+
Default = 0,
|
|
407
434
|
}
|
|
408
435
|
/**
|
|
409
436
|
*/
|
|
410
|
-
export enum
|
|
411
|
-
|
|
437
|
+
export enum NativeScriptKind {
|
|
438
|
+
ScriptPubkey = 0,
|
|
439
|
+
ScriptAll = 1,
|
|
440
|
+
ScriptAny = 2,
|
|
441
|
+
ScriptNOfK = 3,
|
|
442
|
+
ScriptInvalidBefore = 4,
|
|
443
|
+
ScriptInvalidHereafter = 5,
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
*/
|
|
447
|
+
export enum CredentialKind {
|
|
448
|
+
PubKey = 0,
|
|
412
449
|
Script = 1,
|
|
413
|
-
|
|
414
|
-
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Careful: this enum doesn't include the network ID part of the header
|
|
453
|
+
* ex: base address isn't 0b0000_0000 but instead 0b0000
|
|
454
|
+
* Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
|
|
455
|
+
*/
|
|
456
|
+
export enum AddressHeaderKind {
|
|
457
|
+
BasePaymentKeyStakeKey = 0,
|
|
458
|
+
BasePaymentScriptStakeKey = 1,
|
|
459
|
+
BasePaymentKeyStakeScript = 2,
|
|
460
|
+
BasePaymentScriptStakeScript = 3,
|
|
461
|
+
PointerKey = 4,
|
|
462
|
+
PointerScript = 5,
|
|
463
|
+
EnterpriseKey = 6,
|
|
464
|
+
EnterpriseScript = 7,
|
|
465
|
+
Byron = 8,
|
|
466
|
+
RewardKey = 14,
|
|
467
|
+
RewardScript = 15,
|
|
415
468
|
}
|
|
416
469
|
/**
|
|
417
470
|
*/
|
|
418
|
-
export enum
|
|
419
|
-
|
|
420
|
-
|
|
471
|
+
export enum NonceKind {
|
|
472
|
+
Identity = 0,
|
|
473
|
+
Hash = 1,
|
|
421
474
|
}
|
|
422
475
|
/**
|
|
423
476
|
* Which version of the CIP25 spec to use. See CIP25 for details.
|
|
@@ -436,72 +489,32 @@ export enum CIP25Version {
|
|
|
436
489
|
}
|
|
437
490
|
/**
|
|
438
491
|
*/
|
|
439
|
-
export enum
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
*/
|
|
448
|
-
export enum AuxiliaryDataKind {
|
|
449
|
-
Shelley = 0,
|
|
450
|
-
ShelleyMA = 1,
|
|
451
|
-
Conway = 2,
|
|
452
|
-
}
|
|
453
|
-
/**
|
|
454
|
-
*/
|
|
455
|
-
export enum DelegationDistributionKind {
|
|
456
|
-
Weighted = 0,
|
|
457
|
-
Legacy = 1,
|
|
458
|
-
}
|
|
459
|
-
/**
|
|
460
|
-
*/
|
|
461
|
-
export enum ChangeSelectionAlgo {
|
|
462
|
-
Default = 0,
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
*/
|
|
466
|
-
export enum TransactionOutputKind {
|
|
467
|
-
AlonzoFormatTxOut = 0,
|
|
468
|
-
ConwayFormatTxOut = 1,
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
*/
|
|
472
|
-
export enum TransactionMetadatumKind {
|
|
473
|
-
Map = 0,
|
|
474
|
-
List = 1,
|
|
475
|
-
Int = 2,
|
|
476
|
-
Bytes = 3,
|
|
477
|
-
Text = 4,
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
*/
|
|
481
|
-
export enum MetadataJsonSchema {
|
|
482
|
-
NoConversions = 0,
|
|
483
|
-
BasicConversions = 1,
|
|
484
|
-
DetailedSchema = 2,
|
|
492
|
+
export enum GovActionKind {
|
|
493
|
+
ParameterChangeAction = 0,
|
|
494
|
+
HardForkInitiationAction = 1,
|
|
495
|
+
TreasuryWithdrawalsAction = 2,
|
|
496
|
+
NoConfidence = 3,
|
|
497
|
+
UpdateCommittee = 4,
|
|
498
|
+
NewConstitution = 5,
|
|
499
|
+
InfoAction = 6,
|
|
485
500
|
}
|
|
486
501
|
/**
|
|
487
502
|
*/
|
|
488
|
-
export
|
|
489
|
-
|
|
490
|
-
Script = 1,
|
|
491
|
-
Redeem = 2,
|
|
492
|
-
}
|
|
503
|
+
export class AddrAttributes {
|
|
504
|
+
free(): void;
|
|
493
505
|
/**
|
|
506
|
+
* @param {HDAddressPayload | undefined} [hdap]
|
|
507
|
+
* @param {ProtocolMagic | undefined} [protocol_magic]
|
|
508
|
+
* @returns {AddrAttributes}
|
|
494
509
|
*/
|
|
495
|
-
|
|
496
|
-
Native = 0,
|
|
497
|
-
PlutusV1 = 1,
|
|
498
|
-
PlutusV2 = 2,
|
|
499
|
-
PlutusV3 = 3,
|
|
500
|
-
}
|
|
510
|
+
static new_bootstrap_era(hdap?: HDAddressPayload, protocol_magic?: ProtocolMagic): AddrAttributes;
|
|
501
511
|
/**
|
|
512
|
+
* @param {Bip32PublicKey} pubk
|
|
513
|
+
* @param {HDAddressPayload | undefined} hdap
|
|
514
|
+
* @param {ProtocolMagic} protocol_magic
|
|
515
|
+
* @returns {AddrAttributes}
|
|
502
516
|
*/
|
|
503
|
-
|
|
504
|
-
free(): void;
|
|
517
|
+
static new_single_key(pubk: Bip32PublicKey, hdap: HDAddressPayload | undefined, protocol_magic: ProtocolMagic): AddrAttributes;
|
|
505
518
|
/**
|
|
506
519
|
*
|
|
507
520
|
* * Serialize this type to CBOR bytes.
|
|
@@ -565,19 +578,6 @@ export class AddrAttributes {
|
|
|
565
578
|
* @returns {AddrAttributes}
|
|
566
579
|
*/
|
|
567
580
|
static new(): AddrAttributes;
|
|
568
|
-
/**
|
|
569
|
-
* @param {HDAddressPayload | undefined} [hdap]
|
|
570
|
-
* @param {ProtocolMagic | undefined} [protocol_magic]
|
|
571
|
-
* @returns {AddrAttributes}
|
|
572
|
-
*/
|
|
573
|
-
static new_bootstrap_era(hdap?: HDAddressPayload, protocol_magic?: ProtocolMagic): AddrAttributes;
|
|
574
|
-
/**
|
|
575
|
-
* @param {Bip32PublicKey} pubk
|
|
576
|
-
* @param {HDAddressPayload | undefined} hdap
|
|
577
|
-
* @param {ProtocolMagic} protocol_magic
|
|
578
|
-
* @returns {AddrAttributes}
|
|
579
|
-
*/
|
|
580
|
-
static new_single_key(pubk: Bip32PublicKey, hdap: HDAddressPayload | undefined, protocol_magic: ProtocolMagic): AddrAttributes;
|
|
581
581
|
}
|
|
582
582
|
/**
|
|
583
583
|
*/
|
|
@@ -699,6 +699,52 @@ export class Address {
|
|
|
699
699
|
export class AddressContent {
|
|
700
700
|
free(): void;
|
|
701
701
|
/**
|
|
702
|
+
* @param {ByronAddrType} addr_type
|
|
703
|
+
* @param {SpendingData} spending_data
|
|
704
|
+
* @param {AddrAttributes} attributes
|
|
705
|
+
* @returns {AddressContent}
|
|
706
|
+
*/
|
|
707
|
+
static hash_and_create(addr_type: ByronAddrType, spending_data: SpendingData, attributes: AddrAttributes): AddressContent;
|
|
708
|
+
/**
|
|
709
|
+
* @param {PublicKey} pubkey
|
|
710
|
+
* @param {ProtocolMagic | undefined} [protocol_magic]
|
|
711
|
+
* @returns {AddressContent}
|
|
712
|
+
*/
|
|
713
|
+
static new_redeem(pubkey: PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
|
|
714
|
+
/**
|
|
715
|
+
* @param {Bip32PublicKey} xpub
|
|
716
|
+
* @param {ProtocolMagic | undefined} [protocol_magic]
|
|
717
|
+
* @returns {AddressContent}
|
|
718
|
+
*/
|
|
719
|
+
static new_simple(xpub: Bip32PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
|
|
720
|
+
/**
|
|
721
|
+
* Do we want to remove this or keep it for people who were using old Byron code?
|
|
722
|
+
* @returns {ByronAddress}
|
|
723
|
+
*/
|
|
724
|
+
to_address(): ByronAddress;
|
|
725
|
+
/**
|
|
726
|
+
* returns the byron protocol magic embedded in the address, or mainnet id if none is present
|
|
727
|
+
* note: for bech32 addresses, you need to use network_id instead
|
|
728
|
+
* @returns {ProtocolMagic}
|
|
729
|
+
*/
|
|
730
|
+
byron_protocol_magic(): ProtocolMagic;
|
|
731
|
+
/**
|
|
732
|
+
* @returns {number}
|
|
733
|
+
*/
|
|
734
|
+
network_id(): number;
|
|
735
|
+
/**
|
|
736
|
+
* @param {Bip32PublicKey} key
|
|
737
|
+
* @param {ProtocolMagic} protocol_magic
|
|
738
|
+
* @returns {AddressContent}
|
|
739
|
+
*/
|
|
740
|
+
static icarus_from_key(key: Bip32PublicKey, protocol_magic: ProtocolMagic): AddressContent;
|
|
741
|
+
/**
|
|
742
|
+
* Check if the Addr can be reconstructed with a specific xpub
|
|
743
|
+
* @param {Bip32PublicKey} xpub
|
|
744
|
+
* @returns {boolean}
|
|
745
|
+
*/
|
|
746
|
+
identical_with_pubkey(xpub: Bip32PublicKey): boolean;
|
|
747
|
+
/**
|
|
702
748
|
*
|
|
703
749
|
* * Serialize this type to CBOR bytes.
|
|
704
750
|
* * This type does NOT support fine-tuned encoding options so this may or may not be
|
|
@@ -752,52 +798,6 @@ export class AddressContent {
|
|
|
752
798
|
* @returns {AddressContent}
|
|
753
799
|
*/
|
|
754
800
|
static new(address_id: AddressId, addr_attributes: AddrAttributes, addr_type: ByronAddrType): AddressContent;
|
|
755
|
-
/**
|
|
756
|
-
* @param {ByronAddrType} addr_type
|
|
757
|
-
* @param {SpendingData} spending_data
|
|
758
|
-
* @param {AddrAttributes} attributes
|
|
759
|
-
* @returns {AddressContent}
|
|
760
|
-
*/
|
|
761
|
-
static hash_and_create(addr_type: ByronAddrType, spending_data: SpendingData, attributes: AddrAttributes): AddressContent;
|
|
762
|
-
/**
|
|
763
|
-
* @param {PublicKey} pubkey
|
|
764
|
-
* @param {ProtocolMagic | undefined} [protocol_magic]
|
|
765
|
-
* @returns {AddressContent}
|
|
766
|
-
*/
|
|
767
|
-
static new_redeem(pubkey: PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
|
|
768
|
-
/**
|
|
769
|
-
* @param {Bip32PublicKey} xpub
|
|
770
|
-
* @param {ProtocolMagic | undefined} [protocol_magic]
|
|
771
|
-
* @returns {AddressContent}
|
|
772
|
-
*/
|
|
773
|
-
static new_simple(xpub: Bip32PublicKey, protocol_magic?: ProtocolMagic): AddressContent;
|
|
774
|
-
/**
|
|
775
|
-
* Do we want to remove this or keep it for people who were using old Byron code?
|
|
776
|
-
* @returns {ByronAddress}
|
|
777
|
-
*/
|
|
778
|
-
to_address(): ByronAddress;
|
|
779
|
-
/**
|
|
780
|
-
* returns the byron protocol magic embedded in the address, or mainnet id if none is present
|
|
781
|
-
* note: for bech32 addresses, you need to use network_id instead
|
|
782
|
-
* @returns {ProtocolMagic}
|
|
783
|
-
*/
|
|
784
|
-
byron_protocol_magic(): ProtocolMagic;
|
|
785
|
-
/**
|
|
786
|
-
* @returns {number}
|
|
787
|
-
*/
|
|
788
|
-
network_id(): number;
|
|
789
|
-
/**
|
|
790
|
-
* @param {Bip32PublicKey} key
|
|
791
|
-
* @param {ProtocolMagic} protocol_magic
|
|
792
|
-
* @returns {AddressContent}
|
|
793
|
-
*/
|
|
794
|
-
static icarus_from_key(key: Bip32PublicKey, protocol_magic: ProtocolMagic): AddressContent;
|
|
795
|
-
/**
|
|
796
|
-
* Check if the Addr can be reconstructed with a specific xpub
|
|
797
|
-
* @param {Bip32PublicKey} xpub
|
|
798
|
-
* @returns {boolean}
|
|
799
|
-
*/
|
|
800
|
-
identical_with_pubkey(xpub: Bip32PublicKey): boolean;
|
|
801
801
|
}
|
|
802
802
|
/**
|
|
803
803
|
*/
|
|
@@ -1935,10 +1935,6 @@ export class BlockHeaderHash {
|
|
|
1935
1935
|
export class BootstrapWitness {
|
|
1936
1936
|
free(): void;
|
|
1937
1937
|
/**
|
|
1938
|
-
* @returns {AddressContent}
|
|
1939
|
-
*/
|
|
1940
|
-
to_address(): AddressContent;
|
|
1941
|
-
/**
|
|
1942
1938
|
*
|
|
1943
1939
|
* * Serialize this type to CBOR bytes
|
|
1944
1940
|
* * This type type supports encoding preservation so this will preserve round-trip CBOR formats.
|
|
@@ -2024,6 +2020,10 @@ export class BootstrapWitness {
|
|
|
2024
2020
|
* @returns {BootstrapWitness}
|
|
2025
2021
|
*/
|
|
2026
2022
|
static new(public_key: PublicKey, signature: Ed25519Signature, chain_code: Uint8Array, attributes: AddrAttributes): BootstrapWitness;
|
|
2023
|
+
/**
|
|
2024
|
+
* @returns {AddressContent}
|
|
2025
|
+
*/
|
|
2026
|
+
to_address(): AddressContent;
|
|
2027
2027
|
}
|
|
2028
2028
|
/**
|
|
2029
2029
|
*/
|
|
@@ -2052,6 +2052,34 @@ export class BootstrapWitnessList {
|
|
|
2052
2052
|
export class ByronAddress {
|
|
2053
2053
|
free(): void;
|
|
2054
2054
|
/**
|
|
2055
|
+
* @returns {string}
|
|
2056
|
+
*/
|
|
2057
|
+
to_base58(): string;
|
|
2058
|
+
/**
|
|
2059
|
+
* @param {string} s
|
|
2060
|
+
* @returns {ByronAddress}
|
|
2061
|
+
*/
|
|
2062
|
+
static from_base58(s: string): ByronAddress;
|
|
2063
|
+
/**
|
|
2064
|
+
* @param {string} s
|
|
2065
|
+
* @returns {boolean}
|
|
2066
|
+
*/
|
|
2067
|
+
static is_valid(s: string): boolean;
|
|
2068
|
+
/**
|
|
2069
|
+
* @returns {Address}
|
|
2070
|
+
*/
|
|
2071
|
+
to_address(): Address;
|
|
2072
|
+
/**
|
|
2073
|
+
* @param {Address} addr
|
|
2074
|
+
* @returns {ByronAddress | undefined}
|
|
2075
|
+
*/
|
|
2076
|
+
static from_address(addr: Address): ByronAddress | undefined;
|
|
2077
|
+
/**
|
|
2078
|
+
* @param {AddressContent} address_content
|
|
2079
|
+
* @returns {ByronAddress}
|
|
2080
|
+
*/
|
|
2081
|
+
static from_address_content(address_content: AddressContent): ByronAddress;
|
|
2082
|
+
/**
|
|
2055
2083
|
*
|
|
2056
2084
|
* * Serialize this type to CBOR bytes.
|
|
2057
2085
|
* * This type does NOT support fine-tuned encoding options so this may or may not be
|
|
@@ -2100,34 +2128,6 @@ export class ByronAddress {
|
|
|
2100
2128
|
* @returns {ByronAddress}
|
|
2101
2129
|
*/
|
|
2102
2130
|
static new(content: AddressContent, crc: Crc32): ByronAddress;
|
|
2103
|
-
/**
|
|
2104
|
-
* @returns {string}
|
|
2105
|
-
*/
|
|
2106
|
-
to_base58(): string;
|
|
2107
|
-
/**
|
|
2108
|
-
* @param {string} s
|
|
2109
|
-
* @returns {ByronAddress}
|
|
2110
|
-
*/
|
|
2111
|
-
static from_base58(s: string): ByronAddress;
|
|
2112
|
-
/**
|
|
2113
|
-
* @param {string} s
|
|
2114
|
-
* @returns {boolean}
|
|
2115
|
-
*/
|
|
2116
|
-
static is_valid(s: string): boolean;
|
|
2117
|
-
/**
|
|
2118
|
-
* @returns {Address}
|
|
2119
|
-
*/
|
|
2120
|
-
to_address(): Address;
|
|
2121
|
-
/**
|
|
2122
|
-
* @param {Address} addr
|
|
2123
|
-
* @returns {ByronAddress | undefined}
|
|
2124
|
-
*/
|
|
2125
|
-
static from_address(addr: Address): ByronAddress | undefined;
|
|
2126
|
-
/**
|
|
2127
|
-
* @param {AddressContent} address_content
|
|
2128
|
-
* @returns {ByronAddress}
|
|
2129
|
-
*/
|
|
2130
|
-
static from_address_content(address_content: AddressContent): ByronAddress;
|
|
2131
2131
|
}
|
|
2132
2132
|
/**
|
|
2133
2133
|
*/
|