Browse Source

add POST v2/wallets endpoint

activeAddress
Ivan Socolsky 10 years ago
parent
commit
27521d45b3
  1. 12
      lib/expressapp.js

12
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({

Loading…
Cancel
Save