cryptocoinjs / btc-transaction

Create, parse, serialize Bitcoin transactions.
11 stars 8 forks source link

TransactionOut should also accept number #6

Open sidazhang opened 10 years ago

sidazhang commented 10 years ago

When we use new TransactionOut(), it only accepts value as a string like this: 20000 but not as a number. https://github.com/cryptocoinjs/btc-transaction/blob/master/lib/transaction.js#L436

However, Transaction.addOutput() does accept as a number as value. We should keep them consistent and add similar functionality to new TrasactionOut() https://github.com/cryptocoinjs/btc-transaction/blob/master/lib/transaction.js#L128