@anastasia-labs/cardano-multiplatform-lib-nodejs 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 +335 -335
- package/cardano_multiplatform_lib.js +4112 -4111
- 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,19 +183,131 @@ 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 GovActionKind {
|
|
188
|
+
ParameterChangeAction = 0,
|
|
189
|
+
HardForkInitiationAction = 1,
|
|
190
|
+
TreasuryWithdrawalsAction = 2,
|
|
191
|
+
NoConfidence = 3,
|
|
192
|
+
UpdateCommittee = 4,
|
|
193
|
+
NewConstitution = 5,
|
|
194
|
+
InfoAction = 6,
|
|
195
|
+
}
|
|
185
196
|
/**
|
|
186
197
|
*/
|
|
187
|
-
export enum
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
198
|
+
export enum ScriptKind {
|
|
199
|
+
Native = 0,
|
|
200
|
+
PlutusV1 = 1,
|
|
201
|
+
PlutusV2 = 2,
|
|
202
|
+
PlutusV3 = 3,
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
*/
|
|
206
|
+
export enum NonceKind {
|
|
207
|
+
Identity = 0,
|
|
208
|
+
Hash = 1,
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
*/
|
|
212
|
+
export enum ByronAddrType {
|
|
213
|
+
PublicKey = 0,
|
|
214
|
+
Script = 1,
|
|
215
|
+
Redeem = 2,
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
*/
|
|
219
|
+
export enum PlutusDataKind {
|
|
220
|
+
ConstrPlutusData = 0,
|
|
221
|
+
Map = 1,
|
|
222
|
+
List = 2,
|
|
223
|
+
Integer = 3,
|
|
224
|
+
Bytes = 4,
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Careful: this enum doesn't include the network ID part of the header
|
|
228
|
+
* ex: base address isn't 0b0000_0000 but instead 0b0000
|
|
229
|
+
* Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
|
|
230
|
+
*/
|
|
231
|
+
export enum AddressHeaderKind {
|
|
232
|
+
BasePaymentKeyStakeKey = 0,
|
|
233
|
+
BasePaymentScriptStakeKey = 1,
|
|
234
|
+
BasePaymentKeyStakeScript = 2,
|
|
235
|
+
BasePaymentScriptStakeScript = 3,
|
|
236
|
+
PointerKey = 4,
|
|
237
|
+
PointerScript = 5,
|
|
238
|
+
EnterpriseKey = 6,
|
|
239
|
+
EnterpriseScript = 7,
|
|
240
|
+
Byron = 8,
|
|
241
|
+
RewardKey = 14,
|
|
242
|
+
RewardScript = 15,
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
*/
|
|
246
|
+
export enum CredentialKind {
|
|
247
|
+
PubKey = 0,
|
|
248
|
+
Script = 1,
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
*/
|
|
252
|
+
export enum ChunkableStringKind {
|
|
253
|
+
Single = 0,
|
|
254
|
+
Chunked = 1,
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
*/
|
|
258
|
+
export enum DRepKind {
|
|
259
|
+
Key = 0,
|
|
260
|
+
Script = 1,
|
|
261
|
+
AlwaysAbstain = 2,
|
|
262
|
+
AlwaysNoConfidence = 3,
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
*/
|
|
266
|
+
export enum RedeemersKind {
|
|
267
|
+
ArrLegacyRedeemer = 0,
|
|
268
|
+
MapRedeemerKeyToRedeemerVal = 1,
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
*/
|
|
272
|
+
export enum AuxiliaryDataKind {
|
|
273
|
+
Shelley = 0,
|
|
274
|
+
ShelleyMA = 1,
|
|
275
|
+
Conway = 2,
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
*/
|
|
279
|
+
export enum CertificateKind {
|
|
280
|
+
StakeRegistration = 0,
|
|
281
|
+
StakeDeregistration = 1,
|
|
282
|
+
StakeDelegation = 2,
|
|
283
|
+
PoolRegistration = 3,
|
|
284
|
+
PoolRetirement = 4,
|
|
285
|
+
RegCert = 5,
|
|
286
|
+
UnregCert = 6,
|
|
287
|
+
VoteDelegCert = 7,
|
|
288
|
+
StakeVoteDelegCert = 8,
|
|
289
|
+
StakeRegDelegCert = 9,
|
|
290
|
+
VoteRegDelegCert = 10,
|
|
291
|
+
StakeVoteRegDelegCert = 11,
|
|
292
|
+
AuthCommitteeHotCert = 12,
|
|
293
|
+
ResignCommitteeColdCert = 13,
|
|
294
|
+
RegDrepCert = 14,
|
|
295
|
+
UnregDrepCert = 15,
|
|
296
|
+
UpdateDrepCert = 16,
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
*/
|
|
300
|
+
export enum SpendingDataKind {
|
|
301
|
+
SpendingDataPubKey = 0,
|
|
302
|
+
SpendingDataScript = 1,
|
|
303
|
+
SpendingDataRedeem = 2,
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
*/
|
|
307
|
+
export enum RelayKind {
|
|
308
|
+
SingleHostAddr = 0,
|
|
309
|
+
SingleHostName = 1,
|
|
310
|
+
MultiHostName = 2,
|
|
193
311
|
}
|
|
194
312
|
/**
|
|
195
313
|
*/
|
|
@@ -202,6 +320,15 @@ export enum NativeScriptKind {
|
|
|
202
320
|
ScriptInvalidHereafter = 5,
|
|
203
321
|
}
|
|
204
322
|
/**
|
|
323
|
+
*/
|
|
324
|
+
export enum TransactionMetadatumKind {
|
|
325
|
+
Map = 0,
|
|
326
|
+
List = 1,
|
|
327
|
+
Int = 2,
|
|
328
|
+
Bytes = 3,
|
|
329
|
+
Text = 4,
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
205
332
|
* JSON <-> PlutusData conversion schemas.
|
|
206
333
|
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
207
334
|
* https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
|
|
@@ -255,30 +382,9 @@ export enum CardanoNodePlutusDatumSchema {
|
|
|
255
382
|
}
|
|
256
383
|
/**
|
|
257
384
|
*/
|
|
258
|
-
export enum
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
*/
|
|
264
|
-
export enum RedeemersKind {
|
|
265
|
-
ArrLegacyRedeemer = 0,
|
|
266
|
-
MapRedeemerKeyToRedeemerVal = 1,
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
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
|
-
*/
|
|
273
|
-
export enum CIP25Version {
|
|
274
|
-
/**
|
|
275
|
-
* Initial version of CIP25 with only string (utf8) asset names allowed.
|
|
276
|
-
*/
|
|
277
|
-
V1 = 0,
|
|
278
|
-
/**
|
|
279
|
-
* Second version of CIP25. Supports any type of asset names.
|
|
280
|
-
*/
|
|
281
|
-
V2 = 1,
|
|
385
|
+
export enum DatumOptionKind {
|
|
386
|
+
Hash = 0,
|
|
387
|
+
Datum = 1,
|
|
282
388
|
}
|
|
283
389
|
/**
|
|
284
390
|
*/
|
|
@@ -289,61 +395,12 @@ export enum Vote {
|
|
|
289
395
|
}
|
|
290
396
|
/**
|
|
291
397
|
*/
|
|
292
|
-
export enum
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
*/
|
|
299
|
-
export enum CredentialKind {
|
|
300
|
-
PubKey = 0,
|
|
301
|
-
Script = 1,
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
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
|
-
* Careful: this enum doesn't include the network ID part of the header
|
|
318
|
-
* ex: base address isn't 0b0000_0000 but instead 0b0000
|
|
319
|
-
* Use `header_matches_kind` if you don't want to implement the bitwise operators yourself
|
|
320
|
-
*/
|
|
321
|
-
export enum AddressHeaderKind {
|
|
322
|
-
BasePaymentKeyStakeKey = 0,
|
|
323
|
-
BasePaymentScriptStakeKey = 1,
|
|
324
|
-
BasePaymentKeyStakeScript = 2,
|
|
325
|
-
BasePaymentScriptStakeScript = 3,
|
|
326
|
-
PointerKey = 4,
|
|
327
|
-
PointerScript = 5,
|
|
328
|
-
EnterpriseKey = 6,
|
|
329
|
-
EnterpriseScript = 7,
|
|
330
|
-
Byron = 8,
|
|
331
|
-
RewardKey = 14,
|
|
332
|
-
RewardScript = 15,
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
*/
|
|
336
|
-
export enum MetadataJsonSchema {
|
|
337
|
-
NoConversions = 0,
|
|
338
|
-
BasicConversions = 1,
|
|
339
|
-
DetailedSchema = 2,
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
*/
|
|
343
|
-
export enum SpendingDataKind {
|
|
344
|
-
SpendingDataPubKey = 0,
|
|
345
|
-
SpendingDataScript = 1,
|
|
346
|
-
SpendingDataRedeem = 2,
|
|
398
|
+
export enum VoterKind {
|
|
399
|
+
ConstitutionalCommitteeHotKeyHash = 0,
|
|
400
|
+
ConstitutionalCommitteeHotScriptHash = 1,
|
|
401
|
+
DRepKeyHash = 2,
|
|
402
|
+
DRepScriptHash = 3,
|
|
403
|
+
StakingPoolKeyHash = 4,
|
|
347
404
|
}
|
|
348
405
|
/**
|
|
349
406
|
*/
|
|
@@ -351,114 +408,37 @@ export enum RedeemerTag {
|
|
|
351
408
|
Spend = 0,
|
|
352
409
|
Mint = 1,
|
|
353
410
|
Cert = 2,
|
|
354
|
-
Reward = 3,
|
|
355
|
-
Voting = 4,
|
|
356
|
-
Proposing = 5,
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
*/
|
|
360
|
-
export enum StakeDistributionKind {
|
|
361
|
-
SingleKey = 0,
|
|
362
|
-
BootstrapEra = 1,
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
*/
|
|
366
|
-
export enum ScriptKind {
|
|
367
|
-
Native = 0,
|
|
368
|
-
PlutusV1 = 1,
|
|
369
|
-
PlutusV2 = 2,
|
|
370
|
-
PlutusV3 = 3,
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
*/
|
|
374
|
-
export enum DatumOptionKind {
|
|
375
|
-
Hash = 0,
|
|
376
|
-
Datum = 1,
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
*/
|
|
380
|
-
export enum DRepKind {
|
|
381
|
-
Key = 0,
|
|
382
|
-
Script = 1,
|
|
383
|
-
AlwaysAbstain = 2,
|
|
384
|
-
AlwaysNoConfidence = 3,
|
|
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,
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
*/
|
|
414
|
-
export enum Language {
|
|
415
|
-
PlutusV1 = 0,
|
|
416
|
-
PlutusV2 = 1,
|
|
417
|
-
PlutusV3 = 2,
|
|
418
|
-
}
|
|
419
|
-
/**
|
|
420
|
-
*/
|
|
421
|
-
export enum CertificateKind {
|
|
422
|
-
StakeRegistration = 0,
|
|
423
|
-
StakeDeregistration = 1,
|
|
424
|
-
StakeDelegation = 2,
|
|
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,
|
|
411
|
+
Reward = 3,
|
|
412
|
+
Voting = 4,
|
|
413
|
+
Proposing = 5,
|
|
439
414
|
}
|
|
440
415
|
/**
|
|
416
|
+
* Which version of the CIP25 spec to use. See CIP25 for details.
|
|
417
|
+
* This will change how things are encoded but for the most part contains
|
|
418
|
+
* the same information.
|
|
441
419
|
*/
|
|
442
|
-
export enum
|
|
443
|
-
|
|
420
|
+
export enum CIP25Version {
|
|
421
|
+
/**
|
|
422
|
+
* Initial version of CIP25 with only string (utf8) asset names allowed.
|
|
423
|
+
*/
|
|
424
|
+
V1 = 0,
|
|
425
|
+
/**
|
|
426
|
+
* Second version of CIP25. Supports any type of asset names.
|
|
427
|
+
*/
|
|
428
|
+
V2 = 1,
|
|
444
429
|
}
|
|
445
430
|
/**
|
|
446
431
|
*/
|
|
447
|
-
export enum
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
DRepKeyHash = 2,
|
|
451
|
-
DRepScriptHash = 3,
|
|
452
|
-
StakingPoolKeyHash = 4,
|
|
432
|
+
export enum StakeDistributionKind {
|
|
433
|
+
SingleKey = 0,
|
|
434
|
+
BootstrapEra = 1,
|
|
453
435
|
}
|
|
454
436
|
/**
|
|
455
437
|
*/
|
|
456
|
-
export enum
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
Integer = 3,
|
|
461
|
-
Bytes = 4,
|
|
438
|
+
export enum MetadataJsonSchema {
|
|
439
|
+
NoConversions = 0,
|
|
440
|
+
BasicConversions = 1,
|
|
441
|
+
DetailedSchema = 2,
|
|
462
442
|
}
|
|
463
443
|
/**
|
|
464
444
|
*/
|
|
@@ -482,34 +462,41 @@ export enum CoinSelectionStrategyCIP2 {
|
|
|
482
462
|
}
|
|
483
463
|
/**
|
|
484
464
|
*/
|
|
485
|
-
export enum
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
Conway = 2,
|
|
465
|
+
export enum TransactionOutputKind {
|
|
466
|
+
AlonzoFormatTxOut = 0,
|
|
467
|
+
ConwayFormatTxOut = 1,
|
|
489
468
|
}
|
|
490
469
|
/**
|
|
491
470
|
*/
|
|
492
|
-
export enum
|
|
493
|
-
|
|
494
|
-
|
|
471
|
+
export enum Language {
|
|
472
|
+
PlutusV1 = 0,
|
|
473
|
+
PlutusV2 = 1,
|
|
474
|
+
PlutusV3 = 2,
|
|
495
475
|
}
|
|
496
476
|
/**
|
|
497
477
|
*/
|
|
498
|
-
export
|
|
499
|
-
|
|
478
|
+
export enum DelegationDistributionKind {
|
|
479
|
+
Weighted = 0,
|
|
480
|
+
Legacy = 1,
|
|
481
|
+
}
|
|
500
482
|
/**
|
|
501
|
-
* @param {HDAddressPayload | undefined} [hdap]
|
|
502
|
-
* @param {ProtocolMagic | undefined} [protocol_magic]
|
|
503
|
-
* @returns {AddrAttributes}
|
|
504
483
|
*/
|
|
505
|
-
|
|
484
|
+
export enum ChangeSelectionAlgo {
|
|
485
|
+
Default = 0,
|
|
486
|
+
}
|
|
506
487
|
/**
|
|
507
|
-
* @param {Bip32PublicKey} pubk
|
|
508
|
-
* @param {HDAddressPayload | undefined} hdap
|
|
509
|
-
* @param {ProtocolMagic} protocol_magic
|
|
510
|
-
* @returns {AddrAttributes}
|
|
511
488
|
*/
|
|
512
|
-
|
|
489
|
+
export enum AddressKind {
|
|
490
|
+
Base = 0,
|
|
491
|
+
Ptr = 1,
|
|
492
|
+
Enterprise = 2,
|
|
493
|
+
Reward = 3,
|
|
494
|
+
Byron = 4,
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
*/
|
|
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
|
*/
|