@emurgo/cardano-serialization-lib-browser-inlined-gc 15.0.1-beta.1 → 15.0.1
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_serialization_lib.d.ts +184 -184
- package/cardano_serialization_lib.js +1 -1
- package/cardano_serialization_lib.js.flow +210 -210
- package/cardano_serialization_lib_bg.js +288 -289
- package/package.json +1 -1
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* @param {Transaction} tx
|
|
5
|
-
* @param {LinearFee} linear_fee
|
|
6
|
-
* @returns {BigNum}
|
|
7
|
-
*/
|
|
8
|
-
export function min_fee(tx: Transaction, linear_fee: LinearFee): BigNum;
|
|
9
|
-
/**
|
|
10
|
-
* @param {ExUnits} ex_units
|
|
11
|
-
* @param {ExUnitPrices} ex_unit_prices
|
|
12
|
-
* @returns {BigNum}
|
|
13
|
-
*/
|
|
14
|
-
export function calculate_ex_units_ceil_cost(ex_units: ExUnits, ex_unit_prices: ExUnitPrices): BigNum;
|
|
15
|
-
/**
|
|
16
|
-
* @param {Transaction} tx
|
|
17
|
-
* @param {ExUnitPrices} ex_unit_prices
|
|
18
|
-
* @returns {BigNum}
|
|
19
|
-
*/
|
|
20
|
-
export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): BigNum;
|
|
21
|
-
/**
|
|
22
|
-
* @param {number} total_ref_scripts_size
|
|
23
|
-
* @param {UnitInterval} ref_script_coins_per_byte
|
|
24
|
-
* @returns {BigNum}
|
|
25
|
-
*/
|
|
26
|
-
export function min_ref_script_fee(total_ref_scripts_size: number, ref_script_coins_per_byte: UnitInterval): BigNum;
|
|
27
|
-
/**
|
|
28
4
|
* @param {TransactionHash} tx_body_hash
|
|
29
5
|
* @param {ByronAddress} addr
|
|
30
6
|
* @param {LegacyDaedalusPrivateKey} key
|
|
@@ -110,6 +86,20 @@ export function encode_json_str_to_native_script(json: string, self_xpub: string
|
|
|
110
86
|
*/
|
|
111
87
|
export function has_transaction_set_tag(tx_bytes: Uint8Array): TransactionSetsState;
|
|
112
88
|
/**
|
|
89
|
+
* @param {string} password
|
|
90
|
+
* @param {string} salt
|
|
91
|
+
* @param {string} nonce
|
|
92
|
+
* @param {string} data
|
|
93
|
+
* @returns {string}
|
|
94
|
+
*/
|
|
95
|
+
export function encrypt_with_password(password: string, salt: string, nonce: string, data: string): string;
|
|
96
|
+
/**
|
|
97
|
+
* @param {string} password
|
|
98
|
+
* @param {string} data
|
|
99
|
+
* @returns {string}
|
|
100
|
+
*/
|
|
101
|
+
export function decrypt_with_password(password: string, data: string): string;
|
|
102
|
+
/**
|
|
113
103
|
* @param {Address} address
|
|
114
104
|
* @param {TransactionUnspentOutputs} utxos
|
|
115
105
|
* @param {TransactionBuilderConfig} config
|
|
@@ -117,17 +107,29 @@ export function has_transaction_set_tag(tx_bytes: Uint8Array): TransactionSetsSt
|
|
|
117
107
|
*/
|
|
118
108
|
export function create_send_all(address: Address, utxos: TransactionUnspentOutputs, config: TransactionBuilderConfig): TransactionBatchList;
|
|
119
109
|
/**
|
|
120
|
-
* @param {
|
|
121
|
-
* @param {
|
|
122
|
-
* @returns {
|
|
110
|
+
* @param {Transaction} tx
|
|
111
|
+
* @param {LinearFee} linear_fee
|
|
112
|
+
* @returns {BigNum}
|
|
123
113
|
*/
|
|
124
|
-
export function
|
|
114
|
+
export function min_fee(tx: Transaction, linear_fee: LinearFee): BigNum;
|
|
125
115
|
/**
|
|
126
|
-
* @param {
|
|
127
|
-
* @param {
|
|
128
|
-
* @returns {
|
|
116
|
+
* @param {ExUnits} ex_units
|
|
117
|
+
* @param {ExUnitPrices} ex_unit_prices
|
|
118
|
+
* @returns {BigNum}
|
|
129
119
|
*/
|
|
130
|
-
export function
|
|
120
|
+
export function calculate_ex_units_ceil_cost(ex_units: ExUnits, ex_unit_prices: ExUnitPrices): BigNum;
|
|
121
|
+
/**
|
|
122
|
+
* @param {Transaction} tx
|
|
123
|
+
* @param {ExUnitPrices} ex_unit_prices
|
|
124
|
+
* @returns {BigNum}
|
|
125
|
+
*/
|
|
126
|
+
export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): BigNum;
|
|
127
|
+
/**
|
|
128
|
+
* @param {number} total_ref_scripts_size
|
|
129
|
+
* @param {UnitInterval} ref_script_coins_per_byte
|
|
130
|
+
* @returns {BigNum}
|
|
131
|
+
*/
|
|
132
|
+
export function min_ref_script_fee(total_ref_scripts_size: number, ref_script_coins_per_byte: UnitInterval): BigNum;
|
|
131
133
|
/**
|
|
132
134
|
* @param {Uint8Array} bytes
|
|
133
135
|
* @returns {TransactionMetadatum}
|
|
@@ -151,44 +153,108 @@ export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonS
|
|
|
151
153
|
*/
|
|
152
154
|
export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string;
|
|
153
155
|
/**
|
|
154
|
-
* @param {string}
|
|
155
|
-
* @param {
|
|
156
|
-
* @
|
|
157
|
-
* @param {string} data
|
|
158
|
-
* @returns {string}
|
|
156
|
+
* @param {string} json
|
|
157
|
+
* @param {PlutusDatumSchema} schema
|
|
158
|
+
* @returns {PlutusData}
|
|
159
159
|
*/
|
|
160
|
-
export function
|
|
160
|
+
export function encode_json_str_to_plutus_datum(json: string, schema: PlutusDatumSchema): PlutusData;
|
|
161
161
|
/**
|
|
162
|
-
* @param {
|
|
163
|
-
* @param {
|
|
162
|
+
* @param {PlutusData} datum
|
|
163
|
+
* @param {PlutusDatumSchema} schema
|
|
164
164
|
* @returns {string}
|
|
165
165
|
*/
|
|
166
|
-
export function
|
|
166
|
+
export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: PlutusDatumSchema): string;
|
|
167
167
|
/**
|
|
168
168
|
*/
|
|
169
|
-
export enum
|
|
169
|
+
export enum CertificateKind {
|
|
170
|
+
StakeRegistration = 0,
|
|
171
|
+
StakeDeregistration = 1,
|
|
172
|
+
StakeDelegation = 2,
|
|
173
|
+
PoolRegistration = 3,
|
|
174
|
+
PoolRetirement = 4,
|
|
175
|
+
GenesisKeyDelegation = 5,
|
|
176
|
+
MoveInstantaneousRewardsCert = 6,
|
|
177
|
+
CommitteeHotAuth = 7,
|
|
178
|
+
CommitteeColdResign = 8,
|
|
179
|
+
DRepDeregistration = 9,
|
|
180
|
+
DRepRegistration = 10,
|
|
181
|
+
DRepUpdate = 11,
|
|
182
|
+
StakeAndVoteDelegation = 12,
|
|
183
|
+
StakeRegistrationAndDelegation = 13,
|
|
184
|
+
StakeVoteRegistrationAndDelegation = 14,
|
|
185
|
+
VoteDelegation = 15,
|
|
186
|
+
VoteRegistrationAndDelegation = 16,
|
|
187
|
+
}
|
|
170
188
|
/**
|
|
171
|
-
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
172
189
|
*/
|
|
173
|
-
|
|
190
|
+
export enum ByronAddressType {
|
|
191
|
+
ATPubKey = 0,
|
|
192
|
+
ATScript = 1,
|
|
193
|
+
ATRedeem = 2,
|
|
194
|
+
}
|
|
174
195
|
/**
|
|
175
|
-
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
176
196
|
*/
|
|
177
|
-
|
|
197
|
+
export enum RedeemerTagKind {
|
|
198
|
+
Spend = 0,
|
|
199
|
+
Mint = 1,
|
|
200
|
+
Cert = 2,
|
|
201
|
+
Reward = 3,
|
|
202
|
+
Vote = 4,
|
|
203
|
+
VotingProposal = 5,
|
|
204
|
+
}
|
|
178
205
|
/**
|
|
179
|
-
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
180
206
|
*/
|
|
181
|
-
|
|
207
|
+
export enum RelayKind {
|
|
208
|
+
SingleHostAddr = 0,
|
|
209
|
+
SingleHostName = 1,
|
|
210
|
+
MultiHostName = 2,
|
|
211
|
+
}
|
|
182
212
|
/**
|
|
183
|
-
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
184
213
|
*/
|
|
185
|
-
|
|
214
|
+
export enum TransactionMetadatumKind {
|
|
215
|
+
MetadataMap = 0,
|
|
216
|
+
MetadataList = 1,
|
|
217
|
+
Int = 2,
|
|
218
|
+
Bytes = 3,
|
|
219
|
+
Text = 4,
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Each new language uses a different namespace for hashing its script
|
|
223
|
+
* This is because you could have a language where the same bytes have different semantics
|
|
224
|
+
* So this avoids scripts in different languages mapping to the same hash
|
|
225
|
+
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
226
|
+
*/
|
|
227
|
+
export enum ScriptHashNamespace {
|
|
228
|
+
NativeScript = 0,
|
|
229
|
+
PlutusScript = 1,
|
|
230
|
+
PlutusScriptV2 = 2,
|
|
231
|
+
PlutusScriptV3 = 3,
|
|
186
232
|
}
|
|
187
233
|
/**
|
|
188
234
|
*/
|
|
189
|
-
export enum
|
|
190
|
-
|
|
191
|
-
|
|
235
|
+
export enum PlutusDataKind {
|
|
236
|
+
ConstrPlutusData = 0,
|
|
237
|
+
Map = 1,
|
|
238
|
+
List = 2,
|
|
239
|
+
Integer = 3,
|
|
240
|
+
Bytes = 4,
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
*/
|
|
244
|
+
export enum GovernanceActionKind {
|
|
245
|
+
ParameterChangeAction = 0,
|
|
246
|
+
HardForkInitiationAction = 1,
|
|
247
|
+
TreasuryWithdrawalsAction = 2,
|
|
248
|
+
NoConfidenceAction = 3,
|
|
249
|
+
UpdateCommitteeAction = 4,
|
|
250
|
+
NewConstitutionAction = 5,
|
|
251
|
+
InfoAction = 6,
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
*/
|
|
255
|
+
export enum MIRKind {
|
|
256
|
+
ToOtherPot = 0,
|
|
257
|
+
ToStakeCredentials = 1,
|
|
192
258
|
}
|
|
193
259
|
/**
|
|
194
260
|
* JSON <-> PlutusData conversion schemas.
|
|
@@ -244,26 +310,29 @@ export enum PlutusDatumSchema {
|
|
|
244
310
|
}
|
|
245
311
|
/**
|
|
246
312
|
*/
|
|
247
|
-
export enum
|
|
248
|
-
NoConversions = 0,
|
|
249
|
-
BasicConversions = 1,
|
|
250
|
-
DetailedSchema = 2,
|
|
251
|
-
}
|
|
313
|
+
export enum CoinSelectionStrategyCIP2 {
|
|
252
314
|
/**
|
|
315
|
+
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
253
316
|
*/
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
317
|
+
LargestFirst = 0,
|
|
318
|
+
/**
|
|
319
|
+
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
320
|
+
*/
|
|
321
|
+
RandomImprove = 1,
|
|
322
|
+
/**
|
|
323
|
+
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
324
|
+
*/
|
|
325
|
+
LargestFirstMultiAsset = 2,
|
|
326
|
+
/**
|
|
327
|
+
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
328
|
+
*/
|
|
329
|
+
RandomImproveMultiAsset = 3,
|
|
258
330
|
}
|
|
259
331
|
/**
|
|
260
332
|
*/
|
|
261
|
-
export enum
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
DRepKeyHash = 2,
|
|
265
|
-
DRepScriptHash = 3,
|
|
266
|
-
StakingPoolKeyHash = 4,
|
|
333
|
+
export enum MIRPot {
|
|
334
|
+
Reserves = 0,
|
|
335
|
+
Treasury = 1,
|
|
267
336
|
}
|
|
268
337
|
/**
|
|
269
338
|
*/
|
|
@@ -275,36 +344,6 @@ export enum DRepKind {
|
|
|
275
344
|
}
|
|
276
345
|
/**
|
|
277
346
|
*/
|
|
278
|
-
export enum PlutusDataKind {
|
|
279
|
-
ConstrPlutusData = 0,
|
|
280
|
-
Map = 1,
|
|
281
|
-
List = 2,
|
|
282
|
-
Integer = 3,
|
|
283
|
-
Bytes = 4,
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
*/
|
|
287
|
-
export enum CertificateKind {
|
|
288
|
-
StakeRegistration = 0,
|
|
289
|
-
StakeDeregistration = 1,
|
|
290
|
-
StakeDelegation = 2,
|
|
291
|
-
PoolRegistration = 3,
|
|
292
|
-
PoolRetirement = 4,
|
|
293
|
-
GenesisKeyDelegation = 5,
|
|
294
|
-
MoveInstantaneousRewardsCert = 6,
|
|
295
|
-
CommitteeHotAuth = 7,
|
|
296
|
-
CommitteeColdResign = 8,
|
|
297
|
-
DRepDeregistration = 9,
|
|
298
|
-
DRepRegistration = 10,
|
|
299
|
-
DRepUpdate = 11,
|
|
300
|
-
StakeAndVoteDelegation = 12,
|
|
301
|
-
StakeRegistrationAndDelegation = 13,
|
|
302
|
-
StakeVoteRegistrationAndDelegation = 14,
|
|
303
|
-
VoteDelegation = 15,
|
|
304
|
-
VoteRegistrationAndDelegation = 16,
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
*/
|
|
308
347
|
export enum TransactionSetsState {
|
|
309
348
|
AllSetsHaveTag = 0,
|
|
310
349
|
AllSetsHaveNoTag = 1,
|
|
@@ -312,62 +351,39 @@ export enum TransactionSetsState {
|
|
|
312
351
|
}
|
|
313
352
|
/**
|
|
314
353
|
*/
|
|
315
|
-
export enum AddressKind {
|
|
316
|
-
Base = 0,
|
|
317
|
-
Pointer = 1,
|
|
318
|
-
Enterprise = 2,
|
|
319
|
-
Reward = 3,
|
|
320
|
-
Byron = 4,
|
|
321
|
-
Malformed = 5,
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
*/
|
|
325
|
-
export enum MIRKind {
|
|
326
|
-
ToOtherPot = 0,
|
|
327
|
-
ToStakeCredentials = 1,
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
*/
|
|
331
|
-
export enum NetworkIdKind {
|
|
332
|
-
Testnet = 0,
|
|
333
|
-
Mainnet = 1,
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
*/
|
|
337
|
-
export enum MIRPot {
|
|
338
|
-
Reserves = 0,
|
|
339
|
-
Treasury = 1,
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
*/
|
|
343
354
|
export enum CborContainerType {
|
|
344
355
|
Array = 0,
|
|
345
356
|
Map = 1,
|
|
346
357
|
}
|
|
347
358
|
/**
|
|
348
359
|
*/
|
|
349
|
-
export enum
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
Reward = 3,
|
|
354
|
-
Vote = 4,
|
|
355
|
-
VotingProposal = 5,
|
|
360
|
+
export enum VoteKind {
|
|
361
|
+
No = 0,
|
|
362
|
+
Yes = 1,
|
|
363
|
+
Abstain = 2,
|
|
356
364
|
}
|
|
357
365
|
/**
|
|
366
|
+
* Used to choosed the schema for a script JSON string
|
|
358
367
|
*/
|
|
359
|
-
export enum
|
|
360
|
-
|
|
361
|
-
|
|
368
|
+
export enum ScriptSchema {
|
|
369
|
+
Wallet = 0,
|
|
370
|
+
Node = 1,
|
|
362
371
|
}
|
|
363
372
|
/**
|
|
364
373
|
*/
|
|
365
|
-
export enum
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
374
|
+
export enum CredKind {
|
|
375
|
+
Key = 0,
|
|
376
|
+
Script = 1,
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
*/
|
|
380
|
+
export enum NativeScriptKind {
|
|
381
|
+
ScriptPubkey = 0,
|
|
382
|
+
ScriptAll = 1,
|
|
383
|
+
ScriptAny = 2,
|
|
384
|
+
ScriptNOfK = 3,
|
|
385
|
+
TimelockStart = 4,
|
|
386
|
+
TimelockExpiry = 5,
|
|
371
387
|
}
|
|
372
388
|
/**
|
|
373
389
|
*/
|
|
@@ -383,47 +399,26 @@ export enum BlockEra {
|
|
|
383
399
|
}
|
|
384
400
|
/**
|
|
385
401
|
*/
|
|
386
|
-
export enum
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
InfoAction = 6,
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
*/
|
|
397
|
-
export enum ByronAddressType {
|
|
398
|
-
ATPubKey = 0,
|
|
399
|
-
ATScript = 1,
|
|
400
|
-
ATRedeem = 2,
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* Each new language uses a different namespace for hashing its script
|
|
404
|
-
* This is because you could have a language where the same bytes have different semantics
|
|
405
|
-
* So this avoids scripts in different languages mapping to the same hash
|
|
406
|
-
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
407
|
-
*/
|
|
408
|
-
export enum ScriptHashNamespace {
|
|
409
|
-
NativeScript = 0,
|
|
410
|
-
PlutusScript = 1,
|
|
411
|
-
PlutusScriptV2 = 2,
|
|
412
|
-
PlutusScriptV3 = 3,
|
|
402
|
+
export enum AddressKind {
|
|
403
|
+
Base = 0,
|
|
404
|
+
Pointer = 1,
|
|
405
|
+
Enterprise = 2,
|
|
406
|
+
Reward = 3,
|
|
407
|
+
Byron = 4,
|
|
408
|
+
Malformed = 5,
|
|
413
409
|
}
|
|
414
410
|
/**
|
|
415
|
-
* Used to choosed the schema for a script JSON string
|
|
416
411
|
*/
|
|
417
|
-
export enum
|
|
418
|
-
|
|
419
|
-
|
|
412
|
+
export enum CborSetType {
|
|
413
|
+
Tagged = 0,
|
|
414
|
+
Untagged = 1,
|
|
420
415
|
}
|
|
421
416
|
/**
|
|
422
417
|
*/
|
|
423
|
-
export enum
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
418
|
+
export enum MetadataJsonSchema {
|
|
419
|
+
NoConversions = 0,
|
|
420
|
+
BasicConversions = 1,
|
|
421
|
+
DetailedSchema = 2,
|
|
427
422
|
}
|
|
428
423
|
/**
|
|
429
424
|
*/
|
|
@@ -434,13 +429,18 @@ export enum LanguageKind {
|
|
|
434
429
|
}
|
|
435
430
|
/**
|
|
436
431
|
*/
|
|
437
|
-
export enum
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
432
|
+
export enum NetworkIdKind {
|
|
433
|
+
Testnet = 0,
|
|
434
|
+
Mainnet = 1,
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
*/
|
|
438
|
+
export enum VoterKind {
|
|
439
|
+
ConstitutionalCommitteeHotKeyHash = 0,
|
|
440
|
+
ConstitutionalCommitteeHotScriptHash = 1,
|
|
441
|
+
DRepKeyHash = 2,
|
|
442
|
+
DRepScriptHash = 3,
|
|
443
|
+
StakingPoolKeyHash = 4,
|
|
444
444
|
}
|
|
445
445
|
/**
|
|
446
446
|
*/
|