Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
you21979 committed Jan 24, 2017
1 parent 8f9fdd9 commit de6230f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,13 @@ TxFees.tx_calc_fee = function(byte, byte_per_satoshi){
return (byte * byte_per_satoshi)
}

TxFees.p2pkh_tx_calc_fee = function(input_num, output_num){
return TxFees.tx_calc_fee( TxFees.tx_calc_byte(TxFees.p2pkh_calc_input_byte(), input_num, output_num), TxFees.get_base_byte_per_satoshi() )
}

TxFees.p2sh_tx_calc_create = function(m, n){
var input_byte = TxFees.p2sh_calc_input_byte(m, n)
return function(input_num, output_num){
return TxFees.tx_calc_fee( TxFees.tx_calc_byte(input_byte, input_num, output_num), TxFees.get_base_byte_per_satoshi() )
}
}

0 comments on commit de6230f

Please sign in to comment.