Emurgo / yoroi-frontend

Yoroi Wallet - Cardano ADA Wallet - Your gateway to the financial world (extension frontend)
https://yoroi-wallet.com/
MIT License
334 stars 97 forks source link

Bump @emurgo/cardano-serialization-lib-nodejs from 12.0.0-alpha.26 to 12.0.0-alpha.31 in /packages/yoroi-extension #3532

Closed dependabot[bot] closed 1 month ago

dependabot[bot] commented 1 month ago

Bumps @emurgo/cardano-serialization-lib-nodejs from 12.0.0-alpha.26 to 12.0.0-alpha.31.

Release notes

Sourced from @​emurgo/cardano-serialization-lib-nodejs's releases.

10.2.0 ".set_collateral"

Release PR: Emurgo/cardano-serialization-lib#447

Transaction Builder API changes

⚠️ ExUnitPrices (new optional config field)!

TransactionBuilderConfigBuilder now has a new setter function .ex_unit_prices(ExUnitPrices). This property is optional and only required to calculate the fees correctly in case you are using Plutus inputs. The property is NOT required by default for backward compatibility and in case you are not using Plutus inputs at all or in case you are not calculating the fee and change automatically - it will not be required at all.

NOTE: in case you DON'T specify this parameter and you use Plutus inputs with redeemers - calling .add_inputs_from, .fee_for_input, .fee_for_output, .add_change_if_needed, or .min_fee will fail with an error.

Handling collateral inputs with .set_inputs and .set_collateral

All functions related to adding inputs are extracted into a new type TxInputsBuilder, specifically:

  1. .add_input
  2. .add_key_input
  3. .add_script_input
  4. .add_native_script_input
  5. .add_plutus_script_input
  6. .add_bootstrap_input
  7. .count_missing_input_scripts
  8. .add_required_native_input_scripts
  9. .add_required_plutus_input_scripts
  10. .get_native_input_scripts
  11. .get_plutus_input_scripts

The TransactionBuilder still has all these functions for backward compatibility in relation to regular inputs, but they are deprecated now and will be removed in one of the next major versions.

Instead, there are two new function in the TransactionBuilder:

  1. .set_inputs(TxInputsBuilder)
  2. .set_collateral(TxInputsBuilder)

So instead of

txBuilder.add_input(address, input, value);

The proper way of doing it from now on is:

let inputBuilder = TxInputsBuilder.new();
inputBuilder.add_input(address, input, value);

txBuilder.set_inputs(inputBuilder);

Collateral inputs

For collateral inputs there are no functions on the transaction-builder itself, they must be entirely handled though a TxInputsBuilder instance and then added to the transaction-builder using .set_collateral

NOTE: a copy of the inputs is taken when .set_inputs or .set_collateral is called, so changing the TxInputsBuilder instance after that will not affect the transaction-builder itself in any way.

... (truncated)

Commits


Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 1 month ago

Superseded by #3546.