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

21 lines
354 B
JavaScript
Raw Normal View History

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