You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
10 years ago
|
'use strict';
|
||
|
|
||
|
var _ = require('lodash');
|
||
|
var $ = require('preconditions').singleton();
|
||
|
var util = require('util');
|
||
|
var async = require('async');
|
||
|
var log = require('npmlog');
|
||
|
var events = require('events');
|
||
|
log.debug = log.verbose;
|
||
|
var Bitcore = require('bitcore')
|
||
|
|
||
|
var Credentials = require('./credentials');
|
||
|
var WalletUtils = require('../walletutils');
|
||
|
var Verifier = require('./verifier');
|
||
|
var ServerCompromisedError = require('./servercompromisederror');
|
||
|
var ClientError = require('../clienterror');
|
||
|
|
||
|
function AirGapped(opts) {
|
||
|
this.verbose = !!opts.verbose;
|
||
|
if (this.verbose) {
|
||
|
log.level = 'debug';
|
||
|
} else {
|
||
|
log.level = 'info';
|
||
|
}
|
||
|
this.credentials = Credentials.create(opts.network || 'livenet');
|
||
|
};
|
||
|
|
||
|
util.inherits(AirGapped, events.EventEmitter);
|
||
|
|
||
|
AirGapped.prototype.getSeed = function() {
|
||
|
var cred = this.credentials;
|
||
|
|
||
|
return {
|
||
|
network: cred.network,
|
||
|
xPubKey: cred.xPubKey,
|
||
|
requestPrivKey: cred.requestPrivKey,
|
||
|
};
|
||
|
};
|
||
|
|
||
|
AirGapped.prototype.signTxProposals = function(txps, cb) {
|
||
|
return cb(null, _.map(txps, function(txp) {
|
||
|
return {};
|
||
|
}));
|
||
|
};
|
||
|
|
||
|
module.exports = AirGapped;
|