|
@ -132,6 +132,18 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
|
|
|
|
|
router.post('/v1/wallets/', function(req, res) { |
|
|
router.post('/v1/wallets/', function(req, res) { |
|
|
var server = getServer(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) { |
|
|
server.createWallet(req.body, function(err, walletId) { |
|
|
if (err) return returnError(err, res, req); |
|
|
if (err) return returnError(err, res, req); |
|
|
res.json({ |
|
|
res.json({ |
|
|