From 27521d45b37bb545889f6053f2c07f9d2bce8513 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Sat, 5 Sep 2015 00:56:37 -0300 Subject: [PATCH] add POST v2/wallets endpoint --- lib/expressapp.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/expressapp.js b/lib/expressapp.js index 6a5fab2..8eae3b4 100644 --- a/lib/expressapp.js +++ b/lib/expressapp.js @@ -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({