From b2cd640b1006adadc51414815a40f1f59aab2703 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Tue, 8 Feb 2022 17:25:04 +0300 Subject: [PATCH] Made `get_total_input` function in tx-build public. Flowgen update. Version bump 10.0.2 --- package-lock.json | 2 +- package.json | 2 +- rust/Cargo.lock | 4 +++- rust/Cargo.toml | 2 +- rust/pkg/cardano_serialization_lib.js.flow | 6 ++++++ rust/src/tx_builder.rs | 3 ++- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 57ec686a..abdb2683 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cardano-serialization-lib", - "version": "10.0.1", + "version": "10.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2c40bdd0..ca958fc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cardano-serialization-lib", - "version": "10.0.1", + "version": "10.0.2", "description": "(De)serialization functions for the Cardano blockchain along with related utility functions", "scripts": { "rust:build-nodejs": "(rimraf ./rust/pkg && cd rust; wasm-pack build --target=nodejs; wasm-pack pack) && npm run js:flowgen", diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 3749125b..c6ec9e1a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "aho-corasick" version = "0.7.15" @@ -50,7 +52,7 @@ checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" [[package]] name = "cardano-serialization-lib" -version = "10.0.1" +version = "10.0.2" dependencies = [ "bech32", "cbor_event", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index d3641752..8b82001a 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cardano-serialization-lib" -version = "10.0.1" +version = "10.0.2" edition = "2018" authors = ["EMURGO"] license = "MIT" diff --git a/rust/pkg/cardano_serialization_lib.js.flow b/rust/pkg/cardano_serialization_lib.js.flow index 8a9fd09a..8c041255 100644 --- a/rust/pkg/cardano_serialization_lib.js.flow +++ b/rust/pkg/cardano_serialization_lib.js.flow @@ -5299,6 +5299,12 @@ declare export class TransactionBuilder { */ get_implicit_input(): Value; + /** + * Return explicit input plus implicit input plus mint minus burn + * @returns {Value} + */ + get_total_input(): Value; + /** * does not include fee * @returns {Value} diff --git a/rust/src/tx_builder.rs b/rust/src/tx_builder.rs index fec9c203..5db91a7d 100644 --- a/rust/src/tx_builder.rs +++ b/rust/src/tx_builder.rs @@ -949,7 +949,8 @@ impl TransactionBuilder { }).unwrap_or((Value::zero(), Value::zero())) } - fn get_total_input(&self) -> Result { + /// Return explicit input plus implicit input plus mint minus burn + pub fn get_total_input(&self) -> Result { let (mint_value, burn_value) = self.get_mint_as_values(); self.get_explicit_input()? .checked_add(&self.get_implicit_input()?)?