@anastasia-labs/cardano-multiplatform-lib-nodejs 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.
- package/cardano_multiplatform_lib.d.ts +308 -308
- package/cardano_multiplatform_lib.js +4106 -4105
- package/cardano_multiplatform_lib_bg.wasm +0 -0
- package/package.json +1 -1
|
@@ -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 {
|
|
96
|
-
* @
|
|
97
|
-
|
|
98
|
-
|
|
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
|
|
86
|
+
export function get_implicit_input(txbody: TransactionBody, pool_deposit: bigint, key_deposit: bigint): Value;
|
|
111
87
|
/**
|
|
112
|
-
*
|
|
113
|
-
* @param {
|
|
114
|
-
* @
|
|
88
|
+
* @param {TransactionBody} txbody
|
|
89
|
+
* @param {bigint} pool_deposit
|
|
90
|
+
* @param {bigint} key_deposit
|
|
91
|
+
* @returns {bigint}
|
|
115
92
|
*/
|
|
116
|
-
export function
|
|
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,29 +183,66 @@ 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
|
|
187
|
+
export enum Language {
|
|
188
|
+
PlutusV1 = 0,
|
|
189
|
+
PlutusV2 = 1,
|
|
190
|
+
PlutusV3 = 2,
|
|
191
|
+
}
|
|
185
192
|
/**
|
|
193
|
+
* Which version of the CIP25 spec to use. See CIP25 for details.
|
|
194
|
+
* This will change how things are encoded but for the most part contains
|
|
195
|
+
* the same information.
|
|
186
196
|
*/
|
|
187
|
-
export enum
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
197
|
+
export enum CIP25Version {
|
|
198
|
+
/**
|
|
199
|
+
* Initial version of CIP25 with only string (utf8) asset names allowed.
|
|
200
|
+
*/
|
|
201
|
+
V1 = 0,
|
|
202
|
+
/**
|
|
203
|
+
* Second version of CIP25. Supports any type of asset names.
|
|
204
|
+
*/
|
|
205
|
+
V2 = 1,
|
|
193
206
|
}
|
|
194
207
|
/**
|
|
195
208
|
*/
|
|
196
|
-
export enum
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
209
|
+
export enum VoterKind {
|
|
210
|
+
ConstitutionalCommitteeHotKeyHash = 0,
|
|
211
|
+
ConstitutionalCommitteeHotScriptHash = 1,
|
|
212
|
+
DRepKeyHash = 2,
|
|
213
|
+
DRepScriptHash = 3,
|
|
214
|
+
StakingPoolKeyHash = 4,
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
*/
|
|
218
|
+
export enum ChangeSelectionAlgo {
|
|
219
|
+
Default = 0,
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
*/
|
|
223
|
+
export enum CoinSelectionStrategyCIP2 {
|
|
224
|
+
/**
|
|
225
|
+
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
226
|
+
*/
|
|
227
|
+
LargestFirst = 0,
|
|
228
|
+
/**
|
|
229
|
+
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
230
|
+
*/
|
|
231
|
+
RandomImprove = 1,
|
|
232
|
+
/**
|
|
233
|
+
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
234
|
+
*/
|
|
235
|
+
LargestFirstMultiAsset = 2,
|
|
236
|
+
/**
|
|
237
|
+
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
238
|
+
*/
|
|
239
|
+
RandomImproveMultiAsset = 3,
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
*/
|
|
243
|
+
export enum DelegationDistributionKind {
|
|
244
|
+
Weighted = 0,
|
|
245
|
+
Legacy = 1,
|
|
203
246
|
}
|
|
204
247
|
/**
|
|
205
248
|
* JSON <-> PlutusData conversion schemas.
|
|
@@ -255,30 +298,39 @@ export enum CardanoNodePlutusDatumSchema {
|
|
|
255
298
|
}
|
|
256
299
|
/**
|
|
257
300
|
*/
|
|
258
|
-
export enum
|
|
259
|
-
|
|
260
|
-
|
|
301
|
+
export enum RelayKind {
|
|
302
|
+
SingleHostAddr = 0,
|
|
303
|
+
SingleHostName = 1,
|
|
304
|
+
MultiHostName = 2,
|
|
261
305
|
}
|
|
262
306
|
/**
|
|
263
307
|
*/
|
|
264
|
-
export enum
|
|
265
|
-
|
|
266
|
-
|
|
308
|
+
export enum CertificateKind {
|
|
309
|
+
StakeRegistration = 0,
|
|
310
|
+
StakeDeregistration = 1,
|
|
311
|
+
StakeDelegation = 2,
|
|
312
|
+
PoolRegistration = 3,
|
|
313
|
+
PoolRetirement = 4,
|
|
314
|
+
RegCert = 5,
|
|
315
|
+
UnregCert = 6,
|
|
316
|
+
VoteDelegCert = 7,
|
|
317
|
+
StakeVoteDelegCert = 8,
|
|
318
|
+
StakeRegDelegCert = 9,
|
|
319
|
+
VoteRegDelegCert = 10,
|
|
320
|
+
StakeVoteRegDelegCert = 11,
|
|
321
|
+
AuthCommitteeHotCert = 12,
|
|
322
|
+
ResignCommitteeColdCert = 13,
|
|
323
|
+
RegDrepCert = 14,
|
|
324
|
+
UnregDrepCert = 15,
|
|
325
|
+
UpdateDrepCert = 16,
|
|
267
326
|
}
|
|
268
327
|
/**
|
|
269
|
-
* Which version of the CIP25 spec to use. See CIP25 for details.
|
|
270
|
-
* This will change how things are encoded but for the most part contains
|
|
271
|
-
* the same information.
|
|
272
328
|
*/
|
|
273
|
-
export enum
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Second version of CIP25. Supports any type of asset names.
|
|
280
|
-
*/
|
|
281
|
-
V2 = 1,
|
|
329
|
+
export enum ScriptKind {
|
|
330
|
+
Native = 0,
|
|
331
|
+
PlutusV1 = 1,
|
|
332
|
+
PlutusV2 = 2,
|
|
333
|
+
PlutusV3 = 3,
|
|
282
334
|
}
|
|
283
335
|
/**
|
|
284
336
|
*/
|
|
@@ -289,10 +341,13 @@ export enum Vote {
|
|
|
289
341
|
}
|
|
290
342
|
/**
|
|
291
343
|
*/
|
|
292
|
-
export enum
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
344
|
+
export enum NativeScriptKind {
|
|
345
|
+
ScriptPubkey = 0,
|
|
346
|
+
ScriptAll = 1,
|
|
347
|
+
ScriptAny = 2,
|
|
348
|
+
ScriptNOfK = 3,
|
|
349
|
+
ScriptInvalidBefore = 4,
|
|
350
|
+
ScriptInvalidHereafter = 5,
|
|
296
351
|
}
|
|
297
352
|
/**
|
|
298
353
|
*/
|
|
@@ -301,19 +356,6 @@ export enum CredentialKind {
|
|
|
301
356
|
Script = 1,
|
|
302
357
|
}
|
|
303
358
|
/**
|
|
304
|
-
*/
|
|
305
|
-
export enum TransactionOutputKind {
|
|
306
|
-
AlonzoFormatTxOut = 0,
|
|
307
|
-
ConwayFormatTxOut = 1,
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
*/
|
|
311
|
-
export enum RelayKind {
|
|
312
|
-
SingleHostAddr = 0,
|
|
313
|
-
SingleHostName = 1,
|
|
314
|
-
MultiHostName = 2,
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
359
|
* Careful: this enum doesn't include the network ID part of the header
|
|
318
360
|
* ex: base address isn't 0b0000_0000 but instead 0b0000
|
|
319
361
|
* Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
|
|
@@ -333,41 +375,22 @@ export enum AddressHeaderKind {
|
|
|
333
375
|
}
|
|
334
376
|
/**
|
|
335
377
|
*/
|
|
336
|
-
export enum
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
*/
|
|
343
|
-
export enum SpendingDataKind {
|
|
344
|
-
SpendingDataPubKey = 0,
|
|
345
|
-
SpendingDataScript = 1,
|
|
346
|
-
SpendingDataRedeem = 2,
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
*/
|
|
350
|
-
export enum RedeemerTag {
|
|
351
|
-
Spend = 0,
|
|
352
|
-
Mint = 1,
|
|
353
|
-
Cert = 2,
|
|
354
|
-
Reward = 3,
|
|
355
|
-
Voting = 4,
|
|
356
|
-
Proposing = 5,
|
|
378
|
+
export enum AuxiliaryDataKind {
|
|
379
|
+
Shelley = 0,
|
|
380
|
+
ShelleyMA = 1,
|
|
381
|
+
Conway = 2,
|
|
357
382
|
}
|
|
358
383
|
/**
|
|
359
384
|
*/
|
|
360
|
-
export enum
|
|
361
|
-
|
|
362
|
-
|
|
385
|
+
export enum RedeemersKind {
|
|
386
|
+
ArrLegacyRedeemer = 0,
|
|
387
|
+
MapRedeemerKeyToRedeemerVal = 1,
|
|
363
388
|
}
|
|
364
389
|
/**
|
|
365
390
|
*/
|
|
366
|
-
export enum
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
PlutusV2 = 2,
|
|
370
|
-
PlutusV3 = 3,
|
|
391
|
+
export enum TransactionOutputKind {
|
|
392
|
+
AlonzoFormatTxOut = 0,
|
|
393
|
+
ConwayFormatTxOut = 1,
|
|
371
394
|
}
|
|
372
395
|
/**
|
|
373
396
|
*/
|
|
@@ -377,140 +400,104 @@ export enum DatumOptionKind {
|
|
|
377
400
|
}
|
|
378
401
|
/**
|
|
379
402
|
*/
|
|
380
|
-
export enum
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
*/
|
|
388
|
-
export enum AddressKind {
|
|
389
|
-
Base = 0,
|
|
390
|
-
Ptr = 1,
|
|
391
|
-
Enterprise = 2,
|
|
392
|
-
Reward = 3,
|
|
393
|
-
Byron = 4,
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
*/
|
|
397
|
-
export enum GovActionKind {
|
|
398
|
-
ParameterChangeAction = 0,
|
|
399
|
-
HardForkInitiationAction = 1,
|
|
400
|
-
TreasuryWithdrawalsAction = 2,
|
|
401
|
-
NoConfidence = 3,
|
|
402
|
-
UpdateCommittee = 4,
|
|
403
|
-
NewConstitution = 5,
|
|
404
|
-
InfoAction = 6,
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
*/
|
|
408
|
-
export enum DelegationDistributionKind {
|
|
409
|
-
Weighted = 0,
|
|
410
|
-
Legacy = 1,
|
|
403
|
+
export enum PlutusDataKind {
|
|
404
|
+
ConstrPlutusData = 0,
|
|
405
|
+
Map = 1,
|
|
406
|
+
List = 2,
|
|
407
|
+
Integer = 3,
|
|
408
|
+
Bytes = 4,
|
|
411
409
|
}
|
|
412
410
|
/**
|
|
413
411
|
*/
|
|
414
|
-
export enum
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
PlutusV3 = 2,
|
|
412
|
+
export enum ChunkableStringKind {
|
|
413
|
+
Single = 0,
|
|
414
|
+
Chunked = 1,
|
|
418
415
|
}
|
|
419
416
|
/**
|
|
420
417
|
*/
|
|
421
|
-
export enum
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
PoolRegistration = 3,
|
|
426
|
-
PoolRetirement = 4,
|
|
427
|
-
RegCert = 5,
|
|
428
|
-
UnregCert = 6,
|
|
429
|
-
VoteDelegCert = 7,
|
|
430
|
-
StakeVoteDelegCert = 8,
|
|
431
|
-
StakeRegDelegCert = 9,
|
|
432
|
-
VoteRegDelegCert = 10,
|
|
433
|
-
StakeVoteRegDelegCert = 11,
|
|
434
|
-
AuthCommitteeHotCert = 12,
|
|
435
|
-
ResignCommitteeColdCert = 13,
|
|
436
|
-
RegDrepCert = 14,
|
|
437
|
-
UnregDrepCert = 15,
|
|
438
|
-
UpdateDrepCert = 16,
|
|
418
|
+
export enum SpendingDataKind {
|
|
419
|
+
SpendingDataPubKey = 0,
|
|
420
|
+
SpendingDataScript = 1,
|
|
421
|
+
SpendingDataRedeem = 2,
|
|
439
422
|
}
|
|
440
423
|
/**
|
|
441
424
|
*/
|
|
442
|
-
export enum
|
|
443
|
-
|
|
425
|
+
export enum DRepKind {
|
|
426
|
+
Key = 0,
|
|
427
|
+
Script = 1,
|
|
428
|
+
AlwaysAbstain = 2,
|
|
429
|
+
AlwaysNoConfidence = 3,
|
|
444
430
|
}
|
|
445
431
|
/**
|
|
446
432
|
*/
|
|
447
|
-
export enum
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
DRepScriptHash = 3,
|
|
452
|
-
StakingPoolKeyHash = 4,
|
|
433
|
+
export enum MetadataJsonSchema {
|
|
434
|
+
NoConversions = 0,
|
|
435
|
+
BasicConversions = 1,
|
|
436
|
+
DetailedSchema = 2,
|
|
453
437
|
}
|
|
454
438
|
/**
|
|
455
439
|
*/
|
|
456
|
-
export enum
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
440
|
+
export enum RedeemerTag {
|
|
441
|
+
Spend = 0,
|
|
442
|
+
Mint = 1,
|
|
443
|
+
Cert = 2,
|
|
444
|
+
Reward = 3,
|
|
445
|
+
Voting = 4,
|
|
446
|
+
Proposing = 5,
|
|
462
447
|
}
|
|
463
448
|
/**
|
|
464
449
|
*/
|
|
465
|
-
export enum
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
450
|
+
export enum ByronAddrType {
|
|
451
|
+
PublicKey = 0,
|
|
452
|
+
Script = 1,
|
|
453
|
+
Redeem = 2,
|
|
454
|
+
}
|
|
470
455
|
/**
|
|
471
|
-
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
472
456
|
*/
|
|
473
|
-
|
|
457
|
+
export enum StakeDistributionKind {
|
|
458
|
+
SingleKey = 0,
|
|
459
|
+
BootstrapEra = 1,
|
|
460
|
+
}
|
|
474
461
|
/**
|
|
475
|
-
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
476
462
|
*/
|
|
477
|
-
|
|
463
|
+
export enum NonceKind {
|
|
464
|
+
Identity = 0,
|
|
465
|
+
Hash = 1,
|
|
466
|
+
}
|
|
478
467
|
/**
|
|
479
|
-
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
480
468
|
*/
|
|
481
|
-
|
|
469
|
+
export enum TransactionMetadatumKind {
|
|
470
|
+
Map = 0,
|
|
471
|
+
List = 1,
|
|
472
|
+
Int = 2,
|
|
473
|
+
Bytes = 3,
|
|
474
|
+
Text = 4,
|
|
482
475
|
}
|
|
483
476
|
/**
|
|
484
477
|
*/
|
|
485
|
-
export enum
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
478
|
+
export enum GovActionKind {
|
|
479
|
+
ParameterChangeAction = 0,
|
|
480
|
+
HardForkInitiationAction = 1,
|
|
481
|
+
TreasuryWithdrawalsAction = 2,
|
|
482
|
+
NoConfidence = 3,
|
|
483
|
+
UpdateCommittee = 4,
|
|
484
|
+
NewConstitution = 5,
|
|
485
|
+
InfoAction = 6,
|
|
489
486
|
}
|
|
490
487
|
/**
|
|
491
488
|
*/
|
|
492
|
-
export enum
|
|
493
|
-
|
|
494
|
-
|
|
489
|
+
export enum AddressKind {
|
|
490
|
+
Base = 0,
|
|
491
|
+
Ptr = 1,
|
|
492
|
+
Enterprise = 2,
|
|
493
|
+
Reward = 3,
|
|
494
|
+
Byron = 4,
|
|
495
495
|
}
|
|
496
496
|
/**
|
|
497
497
|
*/
|
|
498
498
|
export class AddrAttributes {
|
|
499
499
|
free(): void;
|
|
500
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;
|
|
506
|
-
/**
|
|
507
|
-
* @param {Bip32PublicKey} pubk
|
|
508
|
-
* @param {HDAddressPayload | undefined} hdap
|
|
509
|
-
* @param {ProtocolMagic} protocol_magic
|
|
510
|
-
* @returns {AddrAttributes}
|
|
511
|
-
*/
|
|
512
|
-
static new_single_key(pubk: Bip32PublicKey, hdap: HDAddressPayload | undefined, protocol_magic: ProtocolMagic): AddrAttributes;
|
|
513
|
-
/**
|
|
514
501
|
*
|
|
515
502
|
* * Serialize this type to CBOR bytes.
|
|
516
503
|
* * This type does NOT support fine-tuned encoding options so this may or may not be
|
|
@@ -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
|
*/
|