Merge pull request #344 from isocolsky/bip44
Restrict support for BIP44 to 1-of-1 wallets
This commit is contained in:
commit
cf59b73023
|
@ -132,6 +132,18 @@ ExpressApp.prototype.start = function(opts, cb) {
|
|||
|
||||
router.post('/v1/wallets/', function(req, res) {
|
||||
var server = getServer(req, res);
|
||||
req.body.supportBIP44 = false;
|
||||
server.createWallet(req.body, function(err, walletId) {
|
||||
if (err) return returnError(err, res, req);
|
||||
res.json({
|
||||
walletId: walletId,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
router.post('/v2/wallets/', function(req, res) {
|
||||
var server = getServer(req, res);
|
||||
req.body.supportBIP44 = true;
|
||||
server.createWallet(req.body, function(err, walletId) {
|
||||
if (err) return returnError(err, res, req);
|
||||
res.json({
|
||||
|
|
|
@ -203,7 +203,7 @@ WalletService.prototype._runLocked = function(cb, task) {
|
|||
* @param {number} opts.n - Total copayers.
|
||||
* @param {string} opts.pubKey - Public key to verify copayers joining have access to the wallet secret.
|
||||
* @param {string} [opts.network = 'livenet'] - The Bitcoin network for this wallet.
|
||||
* @param {string} [opts.derivationStrategy = 'BIP45'] - Strategy used for address derivation (BIP44, BIP45).
|
||||
* @param {string} [opts.supportBIP44 = false] - Client supports BIP44 paths for 1-of-1 wallets.
|
||||
*/
|
||||
WalletService.prototype.createWallet = function(opts, cb) {
|
||||
var self = this,
|
||||
|
@ -220,9 +220,8 @@ WalletService.prototype.createWallet = function(opts, cb) {
|
|||
if (!_.contains(['livenet', 'testnet'], opts.network))
|
||||
return cb(new ClientError('Invalid network'));
|
||||
|
||||
opts.derivationStrategy = opts.derivationStrategy || WalletUtils.DERIVATION_STRATEGIES.BIP45;
|
||||
if (!_.contains(_.values(WalletUtils.DERIVATION_STRATEGIES), opts.derivationStrategy))
|
||||
return cb(new ClientError('Invalid address derivation strategy'));
|
||||
var derivationStrategy = (opts.n == 1 && opts.supportBIP44) ?
|
||||
WalletUtils.DERIVATION_STRATEGIES.BIP44 : WalletUtils.DERIVATION_STRATEGIES.BIP45;
|
||||
|
||||
try {
|
||||
pubKey = new PublicKey.fromString(opts.pubKey);
|
||||
|
@ -250,7 +249,7 @@ WalletService.prototype.createWallet = function(opts, cb) {
|
|||
n: opts.n,
|
||||
network: opts.network,
|
||||
pubKey: pubKey.toString(),
|
||||
derivationStrategy: opts.derivationStrategy,
|
||||
derivationStrategy: derivationStrategy,
|
||||
});
|
||||
self.storage.storeWallet(wallet, function(err) {
|
||||
log.debug('Wallet created', wallet.id, opts.network);
|
||||
|
@ -417,7 +416,7 @@ WalletService.prototype._addCopayerToWallet = function(wallet, opts, cb) {
|
|||
requestPubKey: opts.requestPubKey,
|
||||
signature: opts.copayerSignature,
|
||||
customData: opts.customData,
|
||||
derivationStrategy: opts.derivationStrategy,
|
||||
derivationStrategy: wallet.derivationStrategy,
|
||||
});
|
||||
self.storage.fetchCopayerLookup(copayer.id, function(err, res) {
|
||||
if (err) return cb(err);
|
||||
|
@ -563,7 +562,6 @@ WalletService.prototype._clientSupportsTXPv2 = function() {
|
|||
* @param {string} opts.requestPubKey - Public Key used to check requests from this copayer.
|
||||
* @param {string} opts.copayerSignature - S(name|xPubKey|requestPubKey). Used by other copayers to verify that the copayer joining knows the wallet secret.
|
||||
* @param {string} opts.customData - (optional) Custom data for this copayer.
|
||||
* @param {string} [opts.derivationStrategy = 'BIP45'] - Strategy used for address derivation (BIP44, BIP45).
|
||||
*/
|
||||
WalletService.prototype.joinWallet = function(opts, cb) {
|
||||
var self = this;
|
||||
|
@ -574,21 +572,11 @@ WalletService.prototype.joinWallet = function(opts, cb) {
|
|||
if (_.isEmpty(opts.name))
|
||||
return cb(new ClientError('Invalid copayer name'));
|
||||
|
||||
opts.derivationStrategy = opts.derivationStrategy || WalletUtils.DERIVATION_STRATEGIES.BIP45;
|
||||
if (!_.contains(_.values(WalletUtils.DERIVATION_STRATEGIES), opts.derivationStrategy))
|
||||
return cb(new ClientError('Invalid address derivation strategy'));
|
||||
|
||||
self.walletId = opts.walletId;
|
||||
self._runLocked(cb, function(cb) {
|
||||
self.storage.fetchWallet(opts.walletId, function(err, wallet) {
|
||||
if (err) return cb(err);
|
||||
if (!wallet) return cb(Errors.WALLET_NOT_FOUND);
|
||||
if (wallet.addressManager.derivationStrategy != opts.derivationStrategy) {
|
||||
if (!self._clientSupportsBIP44()) {
|
||||
return cb(new ClientError(Errors.codes.UPGRADE_NEEDED, 'To join this wallet, you need to upgrade your client app.'));
|
||||
}
|
||||
return cb(new ClientError('Incompatible address derivation strategy'));
|
||||
}
|
||||
|
||||
var hash = WalletUtils.getCopayerHash(opts.name, opts.xPubKey, opts.requestPubKey);
|
||||
if (!self._verifySignature(hash, opts.copayerSignature, wallet.pubKey)) {
|
||||
|
@ -1222,7 +1210,7 @@ WalletService.prototype.createTx = function(opts, cb) {
|
|||
requiredRejections: Math.min(wallet.m, wallet.n - wallet.m + 1),
|
||||
walletN: wallet.n,
|
||||
excludeUnconfirmedUtxos: !!opts.excludeUnconfirmedUtxos,
|
||||
derivationStrategy: wallet.addressManager.derivationStrategy,
|
||||
derivationStrategy: wallet.derivationStrategy,
|
||||
customData: opts.customData
|
||||
};
|
||||
|
||||
|
|
|
@ -96,27 +96,27 @@ helpers.createAndJoinWallet = function(m, n, opts, cb) {
|
|||
var copayerIds = [];
|
||||
var offset = opts.offset || 0;
|
||||
|
||||
var supportBIP44 = _.isBoolean(opts.supportBIP44) ? opts.supportBIP44 : true
|
||||
var walletOpts = {
|
||||
name: 'a wallet',
|
||||
m: m,
|
||||
n: n,
|
||||
pubKey: TestData.keyPair.pub,
|
||||
derivationStrategy: opts.derivationStrategy || 'BIP44',
|
||||
supportBIP44: supportBIP44,
|
||||
};
|
||||
server.createWallet(walletOpts, function(err, walletId) {
|
||||
if (err) return cb(err);
|
||||
|
||||
async.each(_.range(n), function(i, cb) {
|
||||
var copayerData = TestData.copayers[i + offset];
|
||||
var bip = opts.derivationStrategy || 'BIP44';
|
||||
var copayerOpts = helpers.getSignedCopayerOpts({
|
||||
walletId: walletId,
|
||||
name: 'copayer ' + (i + 1),
|
||||
xPubKey: bip == 'BIP44' ? copayerData.xPubKey_44H_0H_0H : copayerData.xPubKey_45H,
|
||||
xPubKey: (n == 1 && supportBIP44) ? copayerData.xPubKey_44H_0H_0H : copayerData.xPubKey_45H,
|
||||
requestPubKey: copayerData.pubKey_1H_0,
|
||||
customData: 'custom data ' + (i + 1),
|
||||
derivationStrategy: bip,
|
||||
});
|
||||
|
||||
server.joinWallet(copayerOpts, function(err, result) {
|
||||
should.not.exist(err);
|
||||
copayerIds.push(result.copayerId);
|
||||
|
@ -495,7 +495,7 @@ describe('Wallet service', function() {
|
|||
txpId = txp.id;
|
||||
async.eachSeries(_.range(2), function(i, next) {
|
||||
var copayer = TestData.copayers[i];
|
||||
helpers.getAuthServer(copayer.id44, function(server) {
|
||||
helpers.getAuthServer(copayer.id45, function(server) {
|
||||
var signatures = helpers.clientSign(txp, copayer.xPrivKey);
|
||||
server.signTx({
|
||||
txProposalId: txp.id,
|
||||
|
@ -553,7 +553,7 @@ describe('Wallet service', function() {
|
|||
txpId = txp.id;
|
||||
async.eachSeries(_.range(1, 3), function(i, next) {
|
||||
var copayer = TestData.copayers[i];
|
||||
helpers.getAuthServer(copayer.id44, function(server) {
|
||||
helpers.getAuthServer(copayer.id45, function(server) {
|
||||
server.rejectTx({
|
||||
txProposalId: txp.id,
|
||||
}, next);
|
||||
|
@ -1012,9 +1012,8 @@ describe('Wallet service', function() {
|
|||
var copayerOpts = helpers.getSignedCopayerOpts({
|
||||
walletId: wallet.id,
|
||||
name: 'me',
|
||||
xPubKey: TestData.copayers[1].xPubKey_45H,
|
||||
xPubKey: TestData.copayers[1].xPubKey_44H_0H_0H,
|
||||
requestPubKey: TestData.copayers[1].pubKey_1H_0,
|
||||
derivationStrategy: 'BIP44',
|
||||
});
|
||||
server.joinWallet(copayerOpts, function(err) {
|
||||
should.exist(err);
|
||||
|
@ -1155,84 +1154,53 @@ describe('Wallet service', function() {
|
|||
describe('Address derivation strategy', function() {
|
||||
var server;
|
||||
beforeEach(function() {
|
||||
server = WalletService.getInstance({
|
||||
clientVersion: 'bwc-0.2.0',
|
||||
server = WalletService.getInstance();
|
||||
});
|
||||
});
|
||||
it('should fail to join BIP45 wallet with BIP44 copayer opts', function(done) {
|
||||
it('should use BIP44 for 1-of-1 wallet if supported', function(done) {
|
||||
var walletOpts = {
|
||||
name: 'my wallet',
|
||||
m: 2,
|
||||
n: 3,
|
||||
m: 1,
|
||||
n: 1,
|
||||
pubKey: TestData.keyPair.pub,
|
||||
derivationStrategy: 'BIP45',
|
||||
supportBIP44: true,
|
||||
};
|
||||
server.createWallet(walletOpts, function(err, wid) {
|
||||
should.not.exist(err);
|
||||
var copayerOpts = helpers.getSignedCopayerOpts({
|
||||
walletId: wid,
|
||||
name: 'me',
|
||||
xPubKey: TestData.copayers[0].xPubKey_44H_0H_0H,
|
||||
requestPubKey: TestData.copayers[0].pubKey_1H_0,
|
||||
customData: 'dummy custom data',
|
||||
derivationStrategy: 'BIP44',
|
||||
});
|
||||
server.joinWallet(copayerOpts, function(err, result) {
|
||||
should.exist(err);
|
||||
err.message.toLowerCase().should.contain('address derivation strategy');
|
||||
server.storage.fetchWallet(wid, function(err, wallet) {
|
||||
should.not.exist(err);
|
||||
wallet.derivationStrategy.should.equal('BIP44');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
it('should fail to join BIP44 wallet with BIP45 copayer opts', function(done) {
|
||||
it('should use BIP45 for 1-of-1 wallet if BIP44 not supported', function(done) {
|
||||
var walletOpts = {
|
||||
name: 'my wallet',
|
||||
m: 2,
|
||||
n: 3,
|
||||
m: 1,
|
||||
n: 1,
|
||||
pubKey: TestData.keyPair.pub,
|
||||
derivationStrategy: 'BIP44',
|
||||
};
|
||||
server.createWallet(walletOpts, function(err, wid) {
|
||||
should.not.exist(err);
|
||||
var copayerOpts = helpers.getSignedCopayerOpts({
|
||||
walletId: wid,
|
||||
name: 'me',
|
||||
xPubKey: TestData.copayers[0].xPubKey_45H,
|
||||
requestPubKey: TestData.copayers[0].pubKey_1H_0,
|
||||
customData: 'dummy custom data',
|
||||
derivationStrategy: 'BIP45',
|
||||
});
|
||||
server.joinWallet(copayerOpts, function(err, result) {
|
||||
should.exist(err);
|
||||
err.message.toLowerCase().should.contain('address derivation strategy');
|
||||
server.storage.fetchWallet(wid, function(err, wallet) {
|
||||
should.not.exist(err);
|
||||
wallet.derivationStrategy.should.equal('BIP45');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
it('should require upgrade when joining BIP44 wallet with BIP45 copayer opts from old client app', function(done) {
|
||||
it('should always use BIP45 for shared wallets', function(done) {
|
||||
var walletOpts = {
|
||||
name: 'my wallet',
|
||||
m: 2,
|
||||
n: 3,
|
||||
pubKey: TestData.keyPair.pub,
|
||||
derivationStrategy: 'BIP44',
|
||||
};
|
||||
server.createWallet(walletOpts, function(err, wid) {
|
||||
should.not.exist(err);
|
||||
var copayerOpts = helpers.getSignedCopayerOpts({
|
||||
walletId: wid,
|
||||
name: 'me',
|
||||
xPubKey: TestData.copayers[0].xPubKey_45H,
|
||||
requestPubKey: TestData.copayers[0].pubKey_1H_0,
|
||||
customData: 'dummy custom data',
|
||||
derivationStrategy: 'BIP45',
|
||||
});
|
||||
server = WalletService.getInstance({
|
||||
clientVersion: 'bwc-0.1.4',
|
||||
});
|
||||
server.joinWallet(copayerOpts, function(err, result) {
|
||||
should.exist(err);
|
||||
err.code.should.equal('UPGRADE_NEEDED');
|
||||
server.storage.fetchWallet(wid, function(err, wallet) {
|
||||
should.not.exist(err);
|
||||
wallet.derivationStrategy.should.equal('BIP45');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@ -1242,9 +1210,7 @@ describe('Wallet service', function() {
|
|||
describe('#getStatus', function() {
|
||||
var server, wallet;
|
||||
beforeEach(function(done) {
|
||||
helpers.createAndJoinWallet(1, 1, {
|
||||
derivationStrategy: 'BIP45'
|
||||
}, function(s, w) {
|
||||
helpers.createAndJoinWallet(1, 2, function(s, w) {
|
||||
server = s;
|
||||
wallet = w;
|
||||
done();
|
||||
|
@ -1258,7 +1224,7 @@ describe('Wallet service', function() {
|
|||
should.exist(status.wallet);
|
||||
status.wallet.name.should.equal(wallet.name);
|
||||
should.exist(status.wallet.copayers);
|
||||
status.wallet.copayers.length.should.equal(1);
|
||||
status.wallet.copayers.length.should.equal(2);
|
||||
should.exist(status.balance);
|
||||
status.balance.totalAmount.should.equal(0);
|
||||
should.exist(status.preferences);
|
||||
|
@ -1364,6 +1330,8 @@ describe('Wallet service', function() {
|
|||
|
||||
describe('#createAddress', function() {
|
||||
var server, wallet;
|
||||
|
||||
describe('shared wallets (BIP45)', function() {
|
||||
beforeEach(function(done) {
|
||||
helpers.createAndJoinWallet(2, 2, function(s, w) {
|
||||
server = s;
|
||||
|
@ -1378,16 +1346,16 @@ describe('Wallet service', function() {
|
|||
should.exist(address);
|
||||
address.walletId.should.equal(wallet.id);
|
||||
address.network.should.equal('livenet');
|
||||
address.address.should.equal('36q2G5FMGvJbPgAVEaiyAsFGmpkhPKwk2r');
|
||||
address.address.should.equal('3BVJZ4CYzeTtawDtgwHvWV5jbvnXtYe97i');
|
||||
address.isChange.should.be.false;
|
||||
address.path.should.equal('m/0/0');
|
||||
address.path.should.equal('m/2147483647/0/0');
|
||||
server.getNotifications({}, function(err, notifications) {
|
||||
should.not.exist(err);
|
||||
var notif = _.find(notifications, {
|
||||
type: 'NewAddress'
|
||||
});
|
||||
should.exist(notif);
|
||||
notif.data.address.should.equal('36q2G5FMGvJbPgAVEaiyAsFGmpkhPKwk2r');
|
||||
notif.data.address.should.equal(address.address);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@ -1400,7 +1368,7 @@ describe('Wallet service', function() {
|
|||
}, function(err, addresses) {
|
||||
addresses.length.should.equal(N);
|
||||
_.each(_.range(N), function(i) {
|
||||
addresses[i].path.should.equal('m/0/' + i);
|
||||
addresses[i].path.should.equal('m/2147483647/0/' + i);
|
||||
});
|
||||
// No two identical addresses
|
||||
_.uniq(_.pluck(addresses, 'address')).length.should.equal(N);
|
||||
|
@ -1426,14 +1394,14 @@ describe('Wallet service', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('BIP45', function() {
|
||||
describe('1-of-1 (BIP44)', function() {
|
||||
beforeEach(function(done) {
|
||||
helpers.createAndJoinWallet(2, 2, {
|
||||
derivationStrategy: 'BIP45'
|
||||
}, function(s, w) {
|
||||
helpers.createAndJoinWallet(1, 1, function(s, w) {
|
||||
server = s;
|
||||
wallet = w;
|
||||
w.copayers[0].id.should.equal(TestData.copayers[0].id44);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@ -1444,16 +1412,16 @@ describe('Wallet service', function() {
|
|||
should.exist(address);
|
||||
address.walletId.should.equal(wallet.id);
|
||||
address.network.should.equal('livenet');
|
||||
address.address.should.equal('3BVJZ4CYzeTtawDtgwHvWV5jbvnXtYe97i');
|
||||
address.address.should.equal('3J4J9nkFpzQjUGDh5hLKMKztFSPWMKejKE');
|
||||
address.isChange.should.be.false;
|
||||
address.path.should.equal('m/2147483647/0/0');
|
||||
address.path.should.equal('m/0/0');
|
||||
server.getNotifications({}, function(err, notifications) {
|
||||
should.not.exist(err);
|
||||
var notif = _.find(notifications, {
|
||||
type: 'NewAddress'
|
||||
});
|
||||
should.exist(notif);
|
||||
notif.data.address.should.equal('3BVJZ4CYzeTtawDtgwHvWV5jbvnXtYe97i');
|
||||
notif.data.address.should.equal(address.address);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@ -1466,7 +1434,7 @@ describe('Wallet service', function() {
|
|||
}, function(err, addresses) {
|
||||
addresses.length.should.equal(N);
|
||||
_.each(_.range(N), function(i) {
|
||||
addresses[i].path.should.equal('m/2147483647/0/' + i);
|
||||
addresses[i].path.should.equal('m/0/' + i);
|
||||
});
|
||||
// No two identical addresses
|
||||
_.uniq(_.pluck(addresses, 'address')).length.should.equal(N);
|
||||
|
@ -1679,10 +1647,10 @@ describe('Wallet service', function() {
|
|||
reqPrivKey = new Bitcore.PrivateKey();
|
||||
var requestPubKey = reqPrivKey.toPublicKey();
|
||||
|
||||
var xPrivKey = TestData.copayers[0].xPrivKey_44H_0H_0H;
|
||||
var xPrivKey = TestData.copayers[0].xPrivKey_45H;
|
||||
var sig = WalletUtils.signRequestPubKey(requestPubKey, xPrivKey);
|
||||
|
||||
var copayerId = WalletUtils.xPubToCopayerId(TestData.copayers[0].xPubKey_44H_0H_0H);
|
||||
var copayerId = WalletUtils.xPubToCopayerId(TestData.copayers[0].xPubKey_45H);
|
||||
opts = {
|
||||
copayerId: copayerId,
|
||||
requestPubKey: requestPubKey,
|
||||
|
@ -1693,7 +1661,9 @@ describe('Wallet service', function() {
|
|||
|
||||
describe('#addAccess 1-1', function() {
|
||||
beforeEach(function(done) {
|
||||
helpers.createAndJoinWallet(1, 1, function(s, w) {
|
||||
helpers.createAndJoinWallet(1, 1, {
|
||||
supportBIP44: false
|
||||
}, function(s, w) {
|
||||
server = s;
|
||||
wallet = w;
|
||||
|
||||
|
@ -4387,12 +4357,14 @@ describe('Wallet service', function() {
|
|||
describe('#scan', function() {
|
||||
var server, wallet;
|
||||
var scanConfigOld = WalletService.SCAN_CONFIG;
|
||||
|
||||
describe('1-of-1 wallet (BIP44)', function() {
|
||||
beforeEach(function(done) {
|
||||
this.timeout(5000);
|
||||
WalletService.SCAN_CONFIG.scanWindow = 2;
|
||||
WalletService.SCAN_CONFIG.derivationDelay = 0;
|
||||
|
||||
helpers.createAndJoinWallet(1, 2, function(s, w) {
|
||||
helpers.createAndJoinWallet(1, 1, function(s, w) {
|
||||
server = s;
|
||||
wallet = w;
|
||||
done();
|
||||
|
@ -4404,9 +4376,9 @@ describe('Wallet service', function() {
|
|||
|
||||
it('should scan main addresses', function(done) {
|
||||
helpers.stubAddressActivity(
|
||||
['3Jc2hcN13vGBCdWR4SMNRoL9EUiBHuf4LT', // m/0/0
|
||||
'3Pk2Cn3TW6JLhGEnHg8iM2qtmx2T1uHyZM', // m/0/2
|
||||
'3GqrwYwyLt1czKMvvqFwYj2ZeooiHtbgbc', // m/1/0
|
||||
['3J4J9nkFpzQjUGDh5hLKMKztFSPWMKejKE', // m/0/0
|
||||
'384JHSf9kVBs3yXsPwCzEScRs395u8hwxj', // m/0/2
|
||||
'3NgXBiMQvwcRU8khVoPFJ6gsbGg9ZYrRzH', // m/1/0
|
||||
]);
|
||||
var expectedPaths = [
|
||||
'm/0/0',
|
||||
|
@ -4455,7 +4427,7 @@ describe('Wallet service', function() {
|
|||
},
|
||||
function(next) {
|
||||
// NOTE: this works because it creates the exact same wallet!
|
||||
helpers.createAndJoinWallet(1, 2, function(server, wallet) {
|
||||
helpers.createAndJoinWallet(1, 1, function(server, wallet) {
|
||||
server.getBalance({}, function(err, balance) {
|
||||
balance.totalAmount.should.equal(0);
|
||||
next(null, server, wallet);
|
||||
|
@ -4494,17 +4466,16 @@ describe('Wallet service', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('BIP45', function() {
|
||||
describe('shared wallet (BIP45)', function() {
|
||||
|
||||
beforeEach(function(done) {
|
||||
this.timeout(5000);
|
||||
WalletService.SCAN_CONFIG.scanWindow = 2;
|
||||
WalletService.SCAN_CONFIG.derivationDelay = 0;
|
||||
|
||||
helpers.createAndJoinWallet(1, 2, {
|
||||
derivationStrategy: 'BIP45'
|
||||
}, function(s, w) {
|
||||
helpers.createAndJoinWallet(1, 2, function(s, w) {
|
||||
server = s;
|
||||
wallet = w;
|
||||
done();
|
||||
|
@ -4591,7 +4562,7 @@ describe('Wallet service', function() {
|
|||
WalletService.SCAN_CONFIG.scanWindow = 2;
|
||||
WalletService.SCAN_CONFIG.derivationDelay = 0;
|
||||
|
||||
helpers.createAndJoinWallet(1, 2, function(s, w) {
|
||||
helpers.createAndJoinWallet(1, 1, function(s, w) {
|
||||
server = s;
|
||||
wallet = w;
|
||||
done();
|
||||
|
@ -4604,9 +4575,9 @@ describe('Wallet service', function() {
|
|||
|
||||
it('should start an asynchronous scan', function(done) {
|
||||
helpers.stubAddressActivity(
|
||||
['3Jc2hcN13vGBCdWR4SMNRoL9EUiBHuf4LT', // m/0/0
|
||||
'3Pk2Cn3TW6JLhGEnHg8iM2qtmx2T1uHyZM', // m/0/2
|
||||
'3GqrwYwyLt1czKMvvqFwYj2ZeooiHtbgbc', // m/1/0
|
||||
['3J4J9nkFpzQjUGDh5hLKMKztFSPWMKejKE', // m/0/0
|
||||
'384JHSf9kVBs3yXsPwCzEScRs395u8hwxj', // m/0/2
|
||||
'3NgXBiMQvwcRU8khVoPFJ6gsbGg9ZYrRzH', // m/1/0
|
||||
]);
|
||||
var expectedPaths = [
|
||||
'm/0/0',
|
||||
|
|
Loading…
Reference in New Issue