TxBuilder: add setVersion

This commit is contained in:
Daniel Cousens 2016-06-22 14:57:11 +10:00
parent 0d0f7c9f00
commit 6faeae397f
2 changed files with 9 additions and 8 deletions

View file

@ -163,6 +163,13 @@ TransactionBuilder.prototype.setLockTime = function (locktime) {
this.tx.locktime = locktime
}
TransactionBuilder.prototype.setVersion = function (version) {
typeforce(types.UInt32, version)
// XXX: this might eventually become more complex depending on what the versions represent
this.tx.version = version
}
TransactionBuilder.fromTransaction = function (transaction, network) {
var txb = new TransactionBuilder(network)