2019-03-04 21:16:32 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
class Account {
|
|
|
|
constructor(keypair, id) {
|
|
|
|
this.keypair_ = keypair;
|
|
|
|
this.id_ = id;
|
|
|
|
this.amount_ = 0;
|
2019-03-13 13:47:58 +08:00
|
|
|
if (!this.keypair_) {
|
|
|
|
// load from file
|
|
|
|
}
|
|
|
|
if (!this.id_) {
|
|
|
|
// load from file
|
|
|
|
}
|
2019-03-04 21:16:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
get_id() { return this.id_; }
|
|
|
|
get_key() { return this.keypair_; }
|
|
|
|
get_amount() { return this.amount_; }
|
2019-03-13 13:47:58 +08:00
|
|
|
set_amount(amount) {this.amount_ = amount;}
|
2019-03-04 21:16:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Account;
|