From 07c8c153f98f8ed9becec1f2205ca31549f530ce Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Wed, 28 Jan 2015 12:19:02 -0300 Subject: [PATCH] add Transaction#lockUntil stub --- lib/transaction/transaction.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/transaction/transaction.js b/lib/transaction/transaction.js index 73b945e..74e06fb 100644 --- a/lib/transaction/transaction.js +++ b/lib/transaction/transaction.js @@ -279,6 +279,16 @@ Transaction.prototype.fromObject = function(transaction) { this.version = transaction.version; }; +/** + * sets nLockTime so that transaction is not valid until + * the desired date or block height + * @param {Date | Number} time + */ +Transaction.prototype.lockUntil = function(time) { + $.checkArgument(time); + this.nLockTime = DEFAULT_NLOCKTIME; +}; + Transaction.prototype.toJSON = function toJSON() { return JSON.stringify(this.toObject()); };