Releases: Emurgo/cardano-serialization-lib
15.0.1 My dog ate the pointer
Changes
- Fixed memory management for
TransactionBuilder.set_validity_start_interval_bignum - Added fallback for a pointer address deserialization with numbers bigger than u64::MAX. If a pointer component is bigger than u64::MAX we implicitly set it as u64::MAX. It's okay, since such big numbers has no sense on mainnet and pointer addresses are deprecated since Conway. Before the fix such pointer addresses were considered as malformed in the CSL. But if affects your application we appreciate any PR and contribution to the library
Published
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/15.0.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/15.0.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/15.0.1
https://crates.io/crates/cardano-serialization-lib/15.0.0
Experimental packages with gc support
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/15.0.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/15.0.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/15.0.1
Full Changelog: 15.0.0...15.0.1
15.0.0 You didn't ask but we did it
Breaking changes
to_js_valuenow serializes maps as JavaScript objects instead of ESMapfor better compatibility across different environments.
Other changes
-
Switched from
RctoArcto improve compatibility with multithreaded Rust applications. This change does not affect the JS/WASM API. -
Added a new Rust feature flag
dont-expose-wasmfor cases where you want to build your Rust library into WASM but do not want to implicitly expose the CSL API to WASM. -
Introduced a new CSL package (yes, again 🙃) with inlined WASM. This is useful if you’re stuck without a bundler or web server and don’t want to spend time figuring out a custom solution:
@emurgo/cardano-serialization-lib-browser-inlined@emurgo/cardano-serialization-lib-browser-inlined-gc
Published
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/15.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/15.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/15.0.0
https://crates.io/crates/cardano-serialization-lib/15.0.0
Experimental packages with gc support
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/15.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/15.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/15.0.0
Full Changelog: 14.1.2...15.0.0
14.1.2 Unordered order
Changes:
-
Credential definition
Change script hash and key hash definition order in credential enum to respect cardano ledger behavior -
CBOR parsing
- Swapped
assert!(len==2)for a properErr(CustomError)on invalid array length
- Swapped
-
Transaction builders
with_asset_and_min_required_coin_by_utxo_costrefactored to:- take into account an output address
- compute required ADA in one pass
-
Withdrawals
- Swapped
LinkedHashMap→BTreeMapfor deterministic ordering - Updated sort logic so script-withdrawals come before key-withdrawals in accordance with ledger implementation
- Swapped
-
Static assertions
- Removed obsolete
static_assert!inlegacy_address/cbor.rs
- Removed obsolete
-
Tests
- correct withdrawal sorting order
Published
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/14.1.2
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/14.1.2
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/14.1.2
https://crates.io/crates/cardano-serialization-lib/14.1.2
Experimental packages with gc support
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/14.1.2
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/14.1.2
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/14.1.2
Full Changelog: 14.1.1...14.1.2
14.1.1 Guest from the past
Updates
- Fixed Address deserialization to support addresses with extra bytes
Published
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/14.1.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/14.1.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/14.1.1
https://crates.io/crates/cardano-serialization-lib/14.1.1
Experimental packages with gc support
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/14.1.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/14.1.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/14.1.1
Full Changelog: 14.1.0...14.1.1
14.1.0 Flashback
Updates
- Added
byron_address_kind()method forByronAddressto retrieve type of Byron address.
Published
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/14.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/14.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/14.1.0
https://crates.io/crates/cardano-serialization-lib/14.1.0
Experimental packages with gc support
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/14.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/14.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/14.1.0
Full Changelog: 14.0.0...14.1.0
14.0.0 Tower of CIP-129
Breaking Changes
- Removed
TxBuilderConstantsfrom the public API. Usecardano-cli,cardano-db-sync, or third-party APIs to retrieve the latest cost models and protocol parameters. - The
to_bech32()method for DRep now requires a boolean flag to specify the new CIP-129 format. Additionally, the function's output has been updated to align with the latest CIP-0005 specifications.
Updates
- The
from_bech32()method for DRep now supports CIP-129 and both versions of CIP-0005. - The
TxInputsBuildernow includes a new set of functions:add_regular_utxo,add_plutus_script_utxo, andadd_native_script_utxo. We recommend using these functions instead of theadd_***_inputmethods, as the new ones handle referenced input fees automatically. - A new
do_not_burn_extra_changeflag has been added to theTransactionBuilderConfigBuilder. This flag prevents burning extra ADA when it is not possible to create a new change output. By default, this flag is unset, and you need to enable it manually if needed. - Fixed the equality function for
MultiAssetwhen the assets list is empty.
Published
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/14.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/14.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/14.0.0
https://crates.io/crates/cardano-serialization-lib/14.0.0
Experimental packages with gc support
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/14.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/14.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/14.0.0
Full Changelog: 13.2.1...14.0.0
13.2.1 Tag game
Fixes
Updated FixedTransaction type to keep tag/non-tag structures for vkey and bootstrap witnesses in accordance with the original transaction state if vkey or bootstrap was empty before.
Published
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/13.2.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/13.2.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/13.2.1
https://crates.io/crates/cardano-serialization-lib/13.2.1
Experimental packages with gc support
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/13.2.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/13.2.1
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/13.2.1
Full Changelog: 13.2.0...13.2.1
13.2.0 Errors and Taxes
API Changes:
Transaction Fee Calculation Updates
set_fee()now sets a static fee that remains unchanged during change calculationTransactionBuilder.build_tx()will emit an error if minimal possible fee exceeds specified fee
- New
set_min_fee()method added- Sets minimum fee threshold
- If minimal possible fee is lower, uses the specified minimum fee value
Additional Validation
- Added balance validation in
build_tx() - Added collateral balance check in
set_total_collateral_and_return()
Published
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/13.2.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/13.2.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/13.2.0
https://crates.io/crates/cardano-serialization-lib/13.2.0
Experimental packages with gc support
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/13.2.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/13.2.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/13.2.0
Full Changelog: 13.1.0...13.2.0
13.1.0 I have no words. NEW VERSION AGAIN
API Changes:
- Added
.as_address()forPlutusDatatype PlutusData.from_address()return error for a reward address, because otherwise it might lead misinterpretation of an address.
Bugfix
- Fixed json schema generator.
.flowandd.tsfiles have type definitions for json object again.
Published
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/13.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/13.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/13.1.0
https://crates.io/crates/cardano-serialization-lib/13.1.0
Experimental packages with gc support
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/13.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/13.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/13.1.0
Full Changelog: 13.0.0...13.1.0
13.0.0 Set theory
Serialization Changes:
-
Set Type Serialization: All set types are now serialized with a tag "258", which will become mandatory after the next hard fork (HF). There is no way to force serialization without the tag. The period between the current and the next era serves as a transition between the old CBOR format and the new CBOR format for sets.
-
Preservation of Original Transaction Bytes: Only the
FixedTransactiontype can preserve original transaction bytes. This is crucial when signing a transaction from a third party, as there is no guarantee that all CBOR types will be in a specific format. -
Redeemers Collection Serialization: The redeemers collection is now serialized as a map by default. After the next HF, redeemers will only be allowed as a map.
API Changes:
-
New Function
has_transaction_set_tag: We've added thehas_transaction_set_tagfunction to help you check if all sets in a transaction have the tag. It returnsTransactionSetsStatebased on the transaction's content. This is useful for determining whether a transaction can be signed by a hardware wallet. In the case ofMixedSets, it might be impossible to sign a transaction with a hardware wallet. Once the tag "258" becomes mandatory, we will remove thehas_transaction_set_tagfunction.enum TransactionSetsState { AllSetsHaveTag = 0, AllSetsHaveNoTag = 1, MixedSets = 2, }
-
Removal of
hash_transaction: Thehash_transactionfunction has been removed because it cannot guarantee the correctness of a transaction hash for a transaction from a third-party tool. Instead, you should use theFixedTransactiontype.WARNING: If you need to sign a transaction from a third party, use the
FixedTransactiontype. Do not use theTransactiontype, as it is not serialization round-trip safe and the transaction hash might be incorrect.
Examples:
-
Getting a Transaction Hash from a Third-Party Transaction:
let transaction = FixedTransaction::from_hex("tx_hex")?; // Or use from_bytes if you have a byte array. let tx_hash = transaction.transaction_hash();
-
Getting a Transaction Hash from a Transaction from a Transaction Builder:
let tx = tx_builder.build_tx()?; let transaction = FixedTransaction::from_bytes(tx.to_bytes())?; let tx_hash = transaction.transaction_hash();
-
Getting a Transaction Hash from a Transaction Body from a Transaction Builder:
let tx_body = tx_builder.build()?; let transaction = FixedTransaction::new_from_body_bytes(tx_body.to_bytes())?; let tx_hash = transaction.transaction_hash();
-
Signing a Transaction or Adding a Signature:
let mut transaction = FixedTransaction:: new_from_body_bytes(tx_body.to_bytes())?; transaction.add_vkey_witness(get_vkey_witness()); // To add an existing signature. transaction.sign_and_add_vkey_signature(get_private_key()); // To sign and add a signature with a private key. // You can also use: // .add_bootstrap_witness // .sign_and_add_icarus_bootstrap_signature // .sign_and_add_daedalus_bootstrap_signature
Published
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/13.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/13.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/13.0.0
https://crates.io/crates/cardano-serialization-lib/13.0.0
Experimental packages with gc support
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/13.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/13.0.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/13.0.0
Full Changelog: 12.1.1...13.0.0