Skip to content

Commit

Permalink
Made get_total_input function in tx-build public. Flowgen update. V…
Browse files Browse the repository at this point in the history
…ersion bump 10.0.2
  • Loading branch information
vsubhuman committed Feb 8, 2022
1 parent 6e87b17 commit b2cd640
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 3 additions & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cardano-serialization-lib"
version = "10.0.1"
version = "10.0.2"
edition = "2018"
authors = ["EMURGO"]
license = "MIT"
Expand Down
6 changes: 6 additions & 0 deletions rust/pkg/cardano_serialization_lib.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 2 additions & 1 deletion rust/src/tx_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,8 @@ impl TransactionBuilder {
}).unwrap_or((Value::zero(), Value::zero()))
}

fn get_total_input(&self) -> Result<Value, JsError> {
/// Return explicit input plus implicit input plus mint minus burn
pub fn get_total_input(&self) -> Result<Value, JsError> {
let (mint_value, burn_value) = self.get_mint_as_values();
self.get_explicit_input()?
.checked_add(&self.get_implicit_input()?)?
Expand Down

0 comments on commit b2cd640

Please sign in to comment.