|
@ -279,6 +279,16 @@ Transaction.prototype.fromObject = function(transaction) { |
|
|
this.version = transaction.version; |
|
|
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() { |
|
|
Transaction.prototype.toJSON = function toJSON() { |
|
|
return JSON.stringify(this.toObject()); |
|
|
return JSON.stringify(this.toObject()); |
|
|
}; |
|
|
}; |
|
|