bitcore-wallet-service/lib/model/address.js

21 lines
345 B
JavaScript
Raw Normal View History

2015-01-27 05:18:45 -08:00
'use strict';
function Address(opts) {
opts = opts || {};
2015-01-28 05:36:49 -08:00
this.createdOn = Math.floor(Date.now() / 1000);
2015-01-27 05:18:45 -08:00
this.address = opts.address;
this.path = opts.path;
};
Address.fromObj = function (obj) {
var x = new Address();
2015-01-28 05:36:49 -08:00
x.createdOn = obj.createdOn;
2015-01-27 05:18:45 -08:00
x.address = obj.address;
x.path = obj.path;
return x;
};
module.exports = Address;