@anastasia-labs/cardano-multiplatform-lib-browser 5.3.1-3 → 5.3.1-5
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 +301 -301
- package/cardano_multiplatform_lib.js +1 -0
- package/cardano_multiplatform_lib_bg.js +4092 -4092
- 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,77 +183,80 @@ 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 AuxiliaryDataKind {
|
|
188
|
+
Shelley = 0,
|
|
189
|
+
ShelleyMA = 1,
|
|
190
|
+
Conway = 2,
|
|
191
|
+
}
|
|
185
192
|
/**
|
|
186
193
|
*/
|
|
187
|
-
export enum
|
|
188
|
-
|
|
194
|
+
export enum StakeDistributionKind {
|
|
195
|
+
SingleKey = 0,
|
|
196
|
+
BootstrapEra = 1,
|
|
189
197
|
}
|
|
190
198
|
/**
|
|
191
199
|
*/
|
|
192
|
-
export enum
|
|
193
|
-
|
|
194
|
-
|
|
200
|
+
export enum TransactionMetadatumKind {
|
|
201
|
+
Map = 0,
|
|
202
|
+
List = 1,
|
|
203
|
+
Int = 2,
|
|
204
|
+
Bytes = 3,
|
|
205
|
+
Text = 4,
|
|
195
206
|
}
|
|
196
207
|
/**
|
|
197
208
|
*/
|
|
198
|
-
export enum
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
209
|
+
export enum NativeScriptKind {
|
|
210
|
+
ScriptPubkey = 0,
|
|
211
|
+
ScriptAll = 1,
|
|
212
|
+
ScriptAny = 2,
|
|
213
|
+
ScriptNOfK = 3,
|
|
214
|
+
ScriptInvalidBefore = 4,
|
|
215
|
+
ScriptInvalidHereafter = 5,
|
|
204
216
|
}
|
|
205
217
|
/**
|
|
206
218
|
*/
|
|
207
|
-
export enum
|
|
208
|
-
|
|
209
|
-
|
|
219
|
+
export enum ByronAddrType {
|
|
220
|
+
PublicKey = 0,
|
|
221
|
+
Script = 1,
|
|
222
|
+
Redeem = 2,
|
|
210
223
|
}
|
|
211
224
|
/**
|
|
212
225
|
*/
|
|
213
|
-
export enum
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
Conway = 2,
|
|
226
|
+
export enum ChunkableStringKind {
|
|
227
|
+
Single = 0,
|
|
228
|
+
Chunked = 1,
|
|
217
229
|
}
|
|
218
230
|
/**
|
|
219
231
|
*/
|
|
220
|
-
export enum
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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,
|
|
232
|
+
export enum SpendingDataKind {
|
|
233
|
+
SpendingDataPubKey = 0,
|
|
234
|
+
SpendingDataScript = 1,
|
|
235
|
+
SpendingDataRedeem = 2,
|
|
238
236
|
}
|
|
239
237
|
/**
|
|
238
|
+
* Careful: this enum doesn't include the network ID part of the header
|
|
239
|
+
* ex: base address isn't 0b0000_0000 but instead 0b0000
|
|
240
|
+
* Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
|
|
240
241
|
*/
|
|
241
|
-
export enum
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
export enum AddressHeaderKind {
|
|
243
|
+
BasePaymentKeyStakeKey = 0,
|
|
244
|
+
BasePaymentScriptStakeKey = 1,
|
|
245
|
+
BasePaymentKeyStakeScript = 2,
|
|
246
|
+
BasePaymentScriptStakeScript = 3,
|
|
247
|
+
PointerKey = 4,
|
|
248
|
+
PointerScript = 5,
|
|
249
|
+
EnterpriseKey = 6,
|
|
250
|
+
EnterpriseScript = 7,
|
|
251
|
+
Byron = 8,
|
|
252
|
+
RewardKey = 14,
|
|
253
|
+
RewardScript = 15,
|
|
245
254
|
}
|
|
246
255
|
/**
|
|
247
256
|
*/
|
|
248
|
-
export enum
|
|
249
|
-
|
|
250
|
-
|
|
257
|
+
export enum NonceKind {
|
|
258
|
+
Identity = 0,
|
|
259
|
+
Hash = 1,
|
|
251
260
|
}
|
|
252
261
|
/**
|
|
253
262
|
*/
|
|
@@ -259,12 +268,6 @@ export enum DRepKind {
|
|
|
259
268
|
}
|
|
260
269
|
/**
|
|
261
270
|
*/
|
|
262
|
-
export enum DelegationDistributionKind {
|
|
263
|
-
Weighted = 0,
|
|
264
|
-
Legacy = 1,
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
*/
|
|
268
271
|
export enum ScriptKind {
|
|
269
272
|
Native = 0,
|
|
270
273
|
PlutusV1 = 1,
|
|
@@ -272,11 +275,40 @@ export enum ScriptKind {
|
|
|
272
275
|
PlutusV3 = 3,
|
|
273
276
|
}
|
|
274
277
|
/**
|
|
278
|
+
* Which version of the CIP25 spec to use. See CIP25 for details.
|
|
279
|
+
* This will change how things are encoded but for the most part contains
|
|
280
|
+
* the same information.
|
|
281
|
+
*/
|
|
282
|
+
export enum CIP25Version {
|
|
283
|
+
/**
|
|
284
|
+
* Initial version of CIP25 with only string (utf8) asset names allowed.
|
|
275
285
|
*/
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
286
|
+
V1 = 0,
|
|
287
|
+
/**
|
|
288
|
+
* Second version of CIP25. Supports any type of asset names.
|
|
289
|
+
*/
|
|
290
|
+
V2 = 1,
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
*/
|
|
294
|
+
export enum ChangeSelectionAlgo {
|
|
295
|
+
Default = 0,
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
*/
|
|
299
|
+
export enum VoterKind {
|
|
300
|
+
ConstitutionalCommitteeHotKeyHash = 0,
|
|
301
|
+
ConstitutionalCommitteeHotScriptHash = 1,
|
|
302
|
+
DRepKeyHash = 2,
|
|
303
|
+
DRepScriptHash = 3,
|
|
304
|
+
StakingPoolKeyHash = 4,
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
*/
|
|
308
|
+
export enum Language {
|
|
309
|
+
PlutusV1 = 0,
|
|
310
|
+
PlutusV2 = 1,
|
|
311
|
+
PlutusV3 = 2,
|
|
280
312
|
}
|
|
281
313
|
/**
|
|
282
314
|
*/
|
|
@@ -287,21 +319,26 @@ export enum RelayKind {
|
|
|
287
319
|
}
|
|
288
320
|
/**
|
|
289
321
|
*/
|
|
290
|
-
export enum
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
322
|
+
export enum RedeemerTag {
|
|
323
|
+
Spend = 0,
|
|
324
|
+
Mint = 1,
|
|
325
|
+
Cert = 2,
|
|
294
326
|
Reward = 3,
|
|
295
|
-
|
|
327
|
+
Voting = 4,
|
|
328
|
+
Proposing = 5,
|
|
296
329
|
}
|
|
297
330
|
/**
|
|
298
331
|
*/
|
|
299
|
-
export enum
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
332
|
+
export enum DelegationDistributionKind {
|
|
333
|
+
Weighted = 0,
|
|
334
|
+
Legacy = 1,
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
*/
|
|
338
|
+
export enum MetadataJsonSchema {
|
|
339
|
+
NoConversions = 0,
|
|
340
|
+
BasicConversions = 1,
|
|
341
|
+
DetailedSchema = 2,
|
|
305
342
|
}
|
|
306
343
|
/**
|
|
307
344
|
* JSON <-> PlutusData conversion schemas.
|
|
@@ -357,61 +394,12 @@ export enum CardanoNodePlutusDatumSchema {
|
|
|
357
394
|
}
|
|
358
395
|
/**
|
|
359
396
|
*/
|
|
360
|
-
export enum
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
Proposing = 5,
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
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
|
-
*/
|
|
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,
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
*/
|
|
388
|
-
export enum TransactionOutputKind {
|
|
389
|
-
AlonzoFormatTxOut = 0,
|
|
390
|
-
ConwayFormatTxOut = 1,
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
*/
|
|
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,
|
|
402
|
-
}
|
|
403
|
-
/**
|
|
404
|
-
*/
|
|
405
|
-
export enum MetadataJsonSchema {
|
|
406
|
-
NoConversions = 0,
|
|
407
|
-
BasicConversions = 1,
|
|
408
|
-
DetailedSchema = 2,
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
*/
|
|
412
|
-
export enum StakeDistributionKind {
|
|
413
|
-
SingleKey = 0,
|
|
414
|
-
BootstrapEra = 1,
|
|
397
|
+
export enum PlutusDataKind {
|
|
398
|
+
ConstrPlutusData = 0,
|
|
399
|
+
Map = 1,
|
|
400
|
+
List = 2,
|
|
401
|
+
Integer = 3,
|
|
402
|
+
Bytes = 4,
|
|
415
403
|
}
|
|
416
404
|
/**
|
|
417
405
|
*/
|
|
@@ -435,10 +423,20 @@ export enum CoinSelectionStrategyCIP2 {
|
|
|
435
423
|
}
|
|
436
424
|
/**
|
|
437
425
|
*/
|
|
438
|
-
export enum
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
426
|
+
export enum GovActionKind {
|
|
427
|
+
ParameterChangeAction = 0,
|
|
428
|
+
HardForkInitiationAction = 1,
|
|
429
|
+
TreasuryWithdrawalsAction = 2,
|
|
430
|
+
NoConfidence = 3,
|
|
431
|
+
UpdateCommittee = 4,
|
|
432
|
+
NewConstitution = 5,
|
|
433
|
+
InfoAction = 6,
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
*/
|
|
437
|
+
export enum TransactionOutputKind {
|
|
438
|
+
AlonzoFormatTxOut = 0,
|
|
439
|
+
ConwayFormatTxOut = 1,
|
|
442
440
|
}
|
|
443
441
|
/**
|
|
444
442
|
*/
|
|
@@ -448,69 +446,58 @@ export enum RedeemersKind {
|
|
|
448
446
|
}
|
|
449
447
|
/**
|
|
450
448
|
*/
|
|
451
|
-
export enum
|
|
452
|
-
|
|
453
|
-
|
|
449
|
+
export enum DatumOptionKind {
|
|
450
|
+
Hash = 0,
|
|
451
|
+
Datum = 1,
|
|
454
452
|
}
|
|
455
453
|
/**
|
|
456
454
|
*/
|
|
457
|
-
export enum
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
455
|
+
export enum AddressKind {
|
|
456
|
+
Base = 0,
|
|
457
|
+
Ptr = 1,
|
|
458
|
+
Enterprise = 2,
|
|
459
|
+
Reward = 3,
|
|
460
|
+
Byron = 4,
|
|
463
461
|
}
|
|
464
462
|
/**
|
|
465
463
|
*/
|
|
466
|
-
export enum
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
464
|
+
export enum CertificateKind {
|
|
465
|
+
StakeRegistration = 0,
|
|
466
|
+
StakeDeregistration = 1,
|
|
467
|
+
StakeDelegation = 2,
|
|
468
|
+
PoolRegistration = 3,
|
|
469
|
+
PoolRetirement = 4,
|
|
470
|
+
RegCert = 5,
|
|
471
|
+
UnregCert = 6,
|
|
472
|
+
VoteDelegCert = 7,
|
|
473
|
+
StakeVoteDelegCert = 8,
|
|
474
|
+
StakeRegDelegCert = 9,
|
|
475
|
+
VoteRegDelegCert = 10,
|
|
476
|
+
StakeVoteRegDelegCert = 11,
|
|
477
|
+
AuthCommitteeHotCert = 12,
|
|
478
|
+
ResignCommitteeColdCert = 13,
|
|
479
|
+
RegDrepCert = 14,
|
|
480
|
+
UnregDrepCert = 15,
|
|
481
|
+
UpdateDrepCert = 16,
|
|
470
482
|
}
|
|
471
483
|
/**
|
|
472
484
|
*/
|
|
473
|
-
export enum
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
ScriptNOfK = 3,
|
|
478
|
-
ScriptInvalidBefore = 4,
|
|
479
|
-
ScriptInvalidHereafter = 5,
|
|
485
|
+
export enum Vote {
|
|
486
|
+
No = 0,
|
|
487
|
+
Yes = 1,
|
|
488
|
+
Abstain = 2,
|
|
480
489
|
}
|
|
481
490
|
/**
|
|
482
|
-
* Which version of the CIP25 spec to use. See CIP25 for details.
|
|
483
|
-
* This will change how things are encoded but for the most part contains
|
|
484
|
-
* the same information.
|
|
485
|
-
*/
|
|
486
|
-
export enum CIP25Version {
|
|
487
|
-
/**
|
|
488
|
-
* Initial version of CIP25 with only string (utf8) asset names allowed.
|
|
489
|
-
*/
|
|
490
|
-
V1 = 0,
|
|
491
|
-
/**
|
|
492
|
-
* Second version of CIP25. Supports any type of asset names.
|
|
493
491
|
*/
|
|
494
|
-
|
|
492
|
+
export enum CredentialKind {
|
|
493
|
+
PubKey = 0,
|
|
494
|
+
Script = 1,
|
|
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
|
*/
|