@emurgo/cardano-serialization-lib-browser-inlined-gc 15.0.0-beta.1 → 15.0.0
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 +157 -157
- package/cardano_serialization_lib.js +1 -1
- package/cardano_serialization_lib.js.flow +123 -123
- package/cardano_serialization_lib_bg.js +80 -80
- package/package.json +1 -1
|
@@ -172,36 +172,72 @@ export enum MIRKind {
|
|
|
172
172
|
}
|
|
173
173
|
/**
|
|
174
174
|
*/
|
|
175
|
-
export enum
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
PoolRegistration = 3,
|
|
180
|
-
PoolRetirement = 4,
|
|
181
|
-
GenesisKeyDelegation = 5,
|
|
182
|
-
MoveInstantaneousRewardsCert = 6,
|
|
183
|
-
CommitteeHotAuth = 7,
|
|
184
|
-
CommitteeColdResign = 8,
|
|
185
|
-
DRepDeregistration = 9,
|
|
186
|
-
DRepRegistration = 10,
|
|
187
|
-
DRepUpdate = 11,
|
|
188
|
-
StakeAndVoteDelegation = 12,
|
|
189
|
-
StakeRegistrationAndDelegation = 13,
|
|
190
|
-
StakeVoteRegistrationAndDelegation = 14,
|
|
191
|
-
VoteDelegation = 15,
|
|
192
|
-
VoteRegistrationAndDelegation = 16,
|
|
175
|
+
export enum LanguageKind {
|
|
176
|
+
PlutusV1 = 0,
|
|
177
|
+
PlutusV2 = 1,
|
|
178
|
+
PlutusV3 = 2,
|
|
193
179
|
}
|
|
194
180
|
/**
|
|
195
181
|
*/
|
|
196
|
-
export enum
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
182
|
+
export enum NativeScriptKind {
|
|
183
|
+
ScriptPubkey = 0,
|
|
184
|
+
ScriptAll = 1,
|
|
185
|
+
ScriptAny = 2,
|
|
186
|
+
ScriptNOfK = 3,
|
|
187
|
+
TimelockStart = 4,
|
|
188
|
+
TimelockExpiry = 5,
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* JSON <-> PlutusData conversion schemas.
|
|
192
|
+
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
193
|
+
* https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
|
|
194
|
+
*
|
|
195
|
+
* All methods here have the following restrictions due to limitations on dependencies:
|
|
196
|
+
* * JSON numbers above u64::MAX (positive) or below i64::MIN (negative) will throw errors
|
|
197
|
+
* * Hex strings for bytes don't accept odd-length (half-byte) strings.
|
|
198
|
+
* cardano-cli seems to support these however but it seems to be different than just 0-padding
|
|
199
|
+
* on either side when tested so proceed with caution
|
|
200
|
+
*/
|
|
201
|
+
export enum PlutusDatumSchema {
|
|
202
|
+
/**
|
|
203
|
+
* ScriptDataJsonNoSchema in cardano-node.
|
|
204
|
+
*
|
|
205
|
+
* This is the format used by --script-data-value in cardano-cli
|
|
206
|
+
* This tries to accept most JSON but does not support the full spectrum of Plutus datums.
|
|
207
|
+
* From JSON:
|
|
208
|
+
* * null/true/false/floats NOT supported
|
|
209
|
+
* * strings starting with 0x are treated as hex bytes. All other strings are encoded as their utf8 bytes.
|
|
210
|
+
* To JSON:
|
|
211
|
+
* * ConstrPlutusData not supported in ANY FORM (neither keys nor values)
|
|
212
|
+
* * Lists not supported in keys
|
|
213
|
+
* * Maps not supported in keys
|
|
214
|
+
*/
|
|
215
|
+
BasicConversions = 0,
|
|
216
|
+
/**
|
|
217
|
+
* ScriptDataJsonDetailedSchema in cardano-node.
|
|
218
|
+
*
|
|
219
|
+
* This is the format used by --script-data-file in cardano-cli
|
|
220
|
+
* This covers almost all (only minor exceptions) Plutus datums, but the JSON must conform to a strict schema.
|
|
221
|
+
* The schema specifies that ALL keys and ALL values must be contained in a JSON map with 2 cases:
|
|
222
|
+
* 1. For ConstrPlutusData there must be two fields "constructor" contianing a number and "fields" containing its fields
|
|
223
|
+
* e.g. { "constructor": 2, "fields": [{"int": 2}, {"list": [{"bytes": "CAFEF00D"}]}]}
|
|
224
|
+
* 2. For all other cases there must be only one field named "int", "bytes", "list" or "map"
|
|
225
|
+
* Integer's value is a JSON number e.g. {"int": 100}
|
|
226
|
+
* Bytes' value is a hex string representing the bytes WITHOUT any prefix e.g. {"bytes": "CAFEF00D"}
|
|
227
|
+
* Lists' value is a JSON list of its elements encoded via the same schema e.g. {"list": [{"bytes": "CAFEF00D"}]}
|
|
228
|
+
* Maps' value is a JSON list of objects, one for each key-value pair in the map, with keys "k" and "v"
|
|
229
|
+
* respectively with their values being the plutus datum encoded via this same schema
|
|
230
|
+
* e.g. {"map": [
|
|
231
|
+
* {"k": {"int": 2}, "v": {"int": 5}},
|
|
232
|
+
* {"k": {"map": [{"k": {"list": [{"int": 1}]}, "v": {"bytes": "FF03"}}]}, "v": {"list": []}}
|
|
233
|
+
* ]}
|
|
234
|
+
* From JSON:
|
|
235
|
+
* * null/true/false/floats NOT supported
|
|
236
|
+
* * the JSON must conform to a very specific schema
|
|
237
|
+
* To JSON:
|
|
238
|
+
* * all Plutus datums should be fully supported outside of the integer range limitations outlined above.
|
|
239
|
+
*/
|
|
240
|
+
DetailedSchema = 1,
|
|
205
241
|
}
|
|
206
242
|
/**
|
|
207
243
|
*/
|
|
@@ -214,30 +250,28 @@ export enum VoterKind {
|
|
|
214
250
|
}
|
|
215
251
|
/**
|
|
216
252
|
*/
|
|
217
|
-
export enum
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
*/
|
|
224
|
-
export enum NetworkIdKind {
|
|
225
|
-
Testnet = 0,
|
|
226
|
-
Mainnet = 1,
|
|
253
|
+
export enum RelayKind {
|
|
254
|
+
SingleHostAddr = 0,
|
|
255
|
+
SingleHostName = 1,
|
|
256
|
+
MultiHostName = 2,
|
|
227
257
|
}
|
|
228
258
|
/**
|
|
229
259
|
*/
|
|
230
|
-
export enum
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
260
|
+
export enum DRepKind {
|
|
261
|
+
KeyHash = 0,
|
|
262
|
+
ScriptHash = 1,
|
|
263
|
+
AlwaysAbstain = 2,
|
|
264
|
+
AlwaysNoConfidence = 3,
|
|
234
265
|
}
|
|
235
266
|
/**
|
|
236
267
|
*/
|
|
237
|
-
export enum
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
268
|
+
export enum AddressKind {
|
|
269
|
+
Base = 0,
|
|
270
|
+
Pointer = 1,
|
|
271
|
+
Enterprise = 2,
|
|
272
|
+
Reward = 3,
|
|
273
|
+
Byron = 4,
|
|
274
|
+
Malformed = 5,
|
|
241
275
|
}
|
|
242
276
|
/**
|
|
243
277
|
*/
|
|
@@ -247,6 +281,50 @@ export enum MIRPot {
|
|
|
247
281
|
}
|
|
248
282
|
/**
|
|
249
283
|
*/
|
|
284
|
+
export enum BlockEra {
|
|
285
|
+
Byron = 0,
|
|
286
|
+
Shelley = 1,
|
|
287
|
+
Allegra = 2,
|
|
288
|
+
Mary = 3,
|
|
289
|
+
Alonzo = 4,
|
|
290
|
+
Babbage = 5,
|
|
291
|
+
Conway = 6,
|
|
292
|
+
Unknown = 7,
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
*/
|
|
296
|
+
export enum CredKind {
|
|
297
|
+
Key = 0,
|
|
298
|
+
Script = 1,
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Each new language uses a different namespace for hashing its script
|
|
302
|
+
* This is because you could have a language where the same bytes have different semantics
|
|
303
|
+
* So this avoids scripts in different languages mapping to the same hash
|
|
304
|
+
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
305
|
+
*/
|
|
306
|
+
export enum ScriptHashNamespace {
|
|
307
|
+
NativeScript = 0,
|
|
308
|
+
PlutusScript = 1,
|
|
309
|
+
PlutusScriptV2 = 2,
|
|
310
|
+
PlutusScriptV3 = 3,
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
*/
|
|
314
|
+
export enum VoteKind {
|
|
315
|
+
No = 0,
|
|
316
|
+
Yes = 1,
|
|
317
|
+
Abstain = 2,
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Used to choosed the schema for a script JSON string
|
|
321
|
+
*/
|
|
322
|
+
export enum ScriptSchema {
|
|
323
|
+
Wallet = 0,
|
|
324
|
+
Node = 1,
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
*/
|
|
250
328
|
export enum GovernanceActionKind {
|
|
251
329
|
ParameterChangeAction = 0,
|
|
252
330
|
HardForkInitiationAction = 1,
|
|
@@ -277,26 +355,32 @@ export enum CoinSelectionStrategyCIP2 {
|
|
|
277
355
|
RandomImproveMultiAsset = 3,
|
|
278
356
|
}
|
|
279
357
|
/**
|
|
280
|
-
* Each new language uses a different namespace for hashing its script
|
|
281
|
-
* This is because you could have a language where the same bytes have different semantics
|
|
282
|
-
* So this avoids scripts in different languages mapping to the same hash
|
|
283
|
-
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
284
358
|
*/
|
|
285
|
-
export enum
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
PlutusScriptV3 = 3,
|
|
359
|
+
export enum TransactionSetsState {
|
|
360
|
+
AllSetsHaveTag = 0,
|
|
361
|
+
AllSetsHaveNoTag = 1,
|
|
362
|
+
MixedSets = 2,
|
|
290
363
|
}
|
|
291
364
|
/**
|
|
292
365
|
*/
|
|
293
|
-
export enum
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
366
|
+
export enum CertificateKind {
|
|
367
|
+
StakeRegistration = 0,
|
|
368
|
+
StakeDeregistration = 1,
|
|
369
|
+
StakeDelegation = 2,
|
|
370
|
+
PoolRegistration = 3,
|
|
371
|
+
PoolRetirement = 4,
|
|
372
|
+
GenesisKeyDelegation = 5,
|
|
373
|
+
MoveInstantaneousRewardsCert = 6,
|
|
374
|
+
CommitteeHotAuth = 7,
|
|
375
|
+
CommitteeColdResign = 8,
|
|
376
|
+
DRepDeregistration = 9,
|
|
377
|
+
DRepRegistration = 10,
|
|
378
|
+
DRepUpdate = 11,
|
|
379
|
+
StakeAndVoteDelegation = 12,
|
|
380
|
+
StakeRegistrationAndDelegation = 13,
|
|
381
|
+
StakeVoteRegistrationAndDelegation = 14,
|
|
382
|
+
VoteDelegation = 15,
|
|
383
|
+
VoteRegistrationAndDelegation = 16,
|
|
300
384
|
}
|
|
301
385
|
/**
|
|
302
386
|
*/
|
|
@@ -306,25 +390,9 @@ export enum CborSetType {
|
|
|
306
390
|
}
|
|
307
391
|
/**
|
|
308
392
|
*/
|
|
309
|
-
export enum
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
MultiHostName = 2,
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
*/
|
|
316
|
-
export enum CredKind {
|
|
317
|
-
Key = 0,
|
|
318
|
-
Script = 1,
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
*/
|
|
322
|
-
export enum TransactionMetadatumKind {
|
|
323
|
-
MetadataMap = 0,
|
|
324
|
-
MetadataList = 1,
|
|
325
|
-
Int = 2,
|
|
326
|
-
Bytes = 3,
|
|
327
|
-
Text = 4,
|
|
393
|
+
export enum NetworkIdKind {
|
|
394
|
+
Testnet = 0,
|
|
395
|
+
Mainnet = 1,
|
|
328
396
|
}
|
|
329
397
|
/**
|
|
330
398
|
*/
|
|
@@ -335,24 +403,6 @@ export enum MetadataJsonSchema {
|
|
|
335
403
|
}
|
|
336
404
|
/**
|
|
337
405
|
*/
|
|
338
|
-
export enum AddressKind {
|
|
339
|
-
Base = 0,
|
|
340
|
-
Pointer = 1,
|
|
341
|
-
Enterprise = 2,
|
|
342
|
-
Reward = 3,
|
|
343
|
-
Byron = 4,
|
|
344
|
-
Malformed = 5,
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
*/
|
|
348
|
-
export enum DRepKind {
|
|
349
|
-
KeyHash = 0,
|
|
350
|
-
ScriptHash = 1,
|
|
351
|
-
AlwaysAbstain = 2,
|
|
352
|
-
AlwaysNoConfidence = 3,
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
*/
|
|
356
406
|
export enum ByronAddressType {
|
|
357
407
|
ATPubKey = 0,
|
|
358
408
|
ATScript = 1,
|
|
@@ -369,9 +419,12 @@ export enum PlutusDataKind {
|
|
|
369
419
|
}
|
|
370
420
|
/**
|
|
371
421
|
*/
|
|
372
|
-
export enum
|
|
373
|
-
|
|
374
|
-
|
|
422
|
+
export enum TransactionMetadatumKind {
|
|
423
|
+
MetadataMap = 0,
|
|
424
|
+
MetadataList = 1,
|
|
425
|
+
Int = 2,
|
|
426
|
+
Bytes = 3,
|
|
427
|
+
Text = 4,
|
|
375
428
|
}
|
|
376
429
|
/**
|
|
377
430
|
*/
|
|
@@ -384,63 +437,10 @@ export enum RedeemerTagKind {
|
|
|
384
437
|
VotingProposal = 5,
|
|
385
438
|
}
|
|
386
439
|
/**
|
|
387
|
-
* Used to choosed the schema for a script JSON string
|
|
388
|
-
*/
|
|
389
|
-
export enum ScriptSchema {
|
|
390
|
-
Wallet = 0,
|
|
391
|
-
Node = 1,
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* JSON <-> PlutusData conversion schemas.
|
|
395
|
-
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
396
|
-
* https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
|
|
397
|
-
*
|
|
398
|
-
* All methods here have the following restrictions due to limitations on dependencies:
|
|
399
|
-
* * JSON numbers above u64::MAX (positive) or below i64::MIN (negative) will throw errors
|
|
400
|
-
* * Hex strings for bytes don't accept odd-length (half-byte) strings.
|
|
401
|
-
* cardano-cli seems to support these however but it seems to be different than just 0-padding
|
|
402
|
-
* on either side when tested so proceed with caution
|
|
403
|
-
*/
|
|
404
|
-
export enum PlutusDatumSchema {
|
|
405
|
-
/**
|
|
406
|
-
* ScriptDataJsonNoSchema in cardano-node.
|
|
407
|
-
*
|
|
408
|
-
* This is the format used by --script-data-value in cardano-cli
|
|
409
|
-
* This tries to accept most JSON but does not support the full spectrum of Plutus datums.
|
|
410
|
-
* From JSON:
|
|
411
|
-
* * null/true/false/floats NOT supported
|
|
412
|
-
* * strings starting with 0x are treated as hex bytes. All other strings are encoded as their utf8 bytes.
|
|
413
|
-
* To JSON:
|
|
414
|
-
* * ConstrPlutusData not supported in ANY FORM (neither keys nor values)
|
|
415
|
-
* * Lists not supported in keys
|
|
416
|
-
* * Maps not supported in keys
|
|
417
|
-
*/
|
|
418
|
-
BasicConversions = 0,
|
|
419
|
-
/**
|
|
420
|
-
* ScriptDataJsonDetailedSchema in cardano-node.
|
|
421
|
-
*
|
|
422
|
-
* This is the format used by --script-data-file in cardano-cli
|
|
423
|
-
* This covers almost all (only minor exceptions) Plutus datums, but the JSON must conform to a strict schema.
|
|
424
|
-
* The schema specifies that ALL keys and ALL values must be contained in a JSON map with 2 cases:
|
|
425
|
-
* 1. For ConstrPlutusData there must be two fields "constructor" contianing a number and "fields" containing its fields
|
|
426
|
-
* e.g. { "constructor": 2, "fields": [{"int": 2}, {"list": [{"bytes": "CAFEF00D"}]}]}
|
|
427
|
-
* 2. For all other cases there must be only one field named "int", "bytes", "list" or "map"
|
|
428
|
-
* Integer's value is a JSON number e.g. {"int": 100}
|
|
429
|
-
* Bytes' value is a hex string representing the bytes WITHOUT any prefix e.g. {"bytes": "CAFEF00D"}
|
|
430
|
-
* Lists' value is a JSON list of its elements encoded via the same schema e.g. {"list": [{"bytes": "CAFEF00D"}]}
|
|
431
|
-
* Maps' value is a JSON list of objects, one for each key-value pair in the map, with keys "k" and "v"
|
|
432
|
-
* respectively with their values being the plutus datum encoded via this same schema
|
|
433
|
-
* e.g. {"map": [
|
|
434
|
-
* {"k": {"int": 2}, "v": {"int": 5}},
|
|
435
|
-
* {"k": {"map": [{"k": {"list": [{"int": 1}]}, "v": {"bytes": "FF03"}}]}, "v": {"list": []}}
|
|
436
|
-
* ]}
|
|
437
|
-
* From JSON:
|
|
438
|
-
* * null/true/false/floats NOT supported
|
|
439
|
-
* * the JSON must conform to a very specific schema
|
|
440
|
-
* To JSON:
|
|
441
|
-
* * all Plutus datums should be fully supported outside of the integer range limitations outlined above.
|
|
442
440
|
*/
|
|
443
|
-
|
|
441
|
+
export enum CborContainerType {
|
|
442
|
+
Array = 0,
|
|
443
|
+
Map = 1,
|
|
444
444
|
}
|
|
445
445
|
/**
|
|
446
446
|
*/
|