Skip to content

Releases: Emurgo/cardano-serialization-lib

14.1.1 Guest from the past

14.1.0 Flashback

14.0.0 Tower of CIP-129

28 Jan 10:40
Compare
Choose a tag to compare

Breaking Changes

  • Removed TxBuilderConstants from the public API. Use cardano-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 TxInputsBuilder now includes a new set of functions: add_regular_utxo, add_plutus_script_utxo, and add_native_script_utxo. We recommend using these functions instead of the add_***_input methods, as the new ones handle referenced input fees automatically.
  • A new do_not_burn_extra_change flag has been added to the TransactionBuilderConfigBuilder. 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 MultiAsset when 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

09 Jan 08:10
Compare
Choose a tag to compare

13.2.0 Errors and Taxes

14 Nov 15:39
Compare
Choose a tag to compare

API Changes:

Transaction Fee Calculation Updates

  • set_fee() now sets a static fee that remains unchanged during change calculation
    • TransactionBuilder.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

16 Oct 08:18
Compare
Choose a tag to compare

13.0.0 Set theory

09 Oct 09:50
Compare
Choose a tag to compare

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 FixedTransaction type 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 the has_transaction_set_tag function to help you check if all sets in a transaction have the tag. It returns TransactionSetsState based on the transaction's content. This is useful for determining whether a transaction can be signed by a hardware wallet. In the case of MixedSets, it might be impossible to sign a transaction with a hardware wallet. Once the tag "258" becomes mandatory, we will remove the has_transaction_set_tag function.

    enum TransactionSetsState {
        AllSetsHaveTag = 0,
        AllSetsHaveNoTag = 1,
        MixedSets = 2,
    }
  • Removal of hash_transaction: The hash_transaction function 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 the FixedTransaction type.

    WARNING: If you need to sign a transaction from a third party, use the FixedTransaction type. Do not use the Transaction type, 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(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

12.1.1 Banana Banana

12.1.0 Effect of butter and fly.

10 Sep 13:45
Compare
Choose a tag to compare

Release Notes

  • fixed script integrity hash calculation for the Conway era.

  • set_witness_set method of FixedTransaction is now deprecated. We do not recommend using this function as it may lead to script integrity hash issues. Its sole purpose was to sign transactions from third-party sources. Instead, use the following FixedTransaction methods:

    • .sign_and_add_vkey_signature()
    • .sign_and_add_icarus_bootstrap_signature()
    • .sign_and_add_daedalus_bootstrap_signature()
    • .add_vkey_witness()
    • .add_bootstrap_witness()
  • Added "arbitrary-precision-json" feature (enabled by default)

    • Enables arbitrary precision for serde_json
    • If you encounter build conflicts with other crates using serde_json, disable this feature in your Cargo.toml file

Published

https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser/v/12.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs/v/12.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs/v/12.1.0
https://crates.io/crates/cardano-serialization-lib/12.1.0

Experimental packages with gc support

https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-nodejs-gc/v/12.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-browser-gc/v/12.1.0
https://www.npmjs.com/package/@emurgo/cardano-serialization-lib-asmjs-gc/v/12.1.0

Full Changelog: 12.0.1...12.1.0

12.0.1 Yeah we know... It hasn’t even been a year

29 Aug 13:10
Compare
Choose a tag to compare