|
|
@ -103,6 +103,10 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
function logDeprecated(req) { |
|
|
|
log.warn('DEPRECATED', req.method, req.url, '(' + req.header('x-client-version') + ')'); |
|
|
|
}; |
|
|
|
|
|
|
|
function getCredentials(req) { |
|
|
|
var identity = req.header('x-identity'); |
|
|
|
if (!identity) return; |
|
|
@ -146,6 +150,7 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
|
|
|
|
// DEPRECATED
|
|
|
|
router.post('/v1/wallets/', function(req, res) { |
|
|
|
logDeprecated(req); |
|
|
|
var server = getServer(req, res); |
|
|
|
req.body.supportBIP44AndP2PKH = false; |
|
|
|
server.createWallet(req.body, function(err, walletId) { |
|
|
@ -177,6 +182,7 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
|
|
|
|
// DEPRECATED
|
|
|
|
router.post('/v1/wallets/:id/copayers/', function(req, res) { |
|
|
|
logDeprecated(req); |
|
|
|
req.body.walletId = req.params['id']; |
|
|
|
req.body.supportBIP44AndP2PKH = false; |
|
|
|
var server = getServer(req, res); |
|
|
@ -199,6 +205,7 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
|
|
|
|
// DEPRECATED
|
|
|
|
router.get('/v1/wallets/', function(req, res) { |
|
|
|
logDeprecated(req); |
|
|
|
getServerWithAuth(req, res, function(server) { |
|
|
|
server.getStatus({ |
|
|
|
includeExtendedInfo: true |
|
|
@ -251,6 +258,7 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
|
|
|
|
|
|
|
|
router.post('/v1/txproposals/', function(req, res) { |
|
|
|
log.warn('DEPRECATED v1/txproposals'); |
|
|
|
getServerWithAuth(req, res, function(server) { |
|
|
|
server.createTxLegacy(req.body, function(err, txp) { |
|
|
|
if (err) return returnError(err, res, req); |
|
|
@ -270,6 +278,7 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
|
|
|
|
// DEPRECATED
|
|
|
|
router.post('/v1/addresses/', function(req, res) { |
|
|
|
logDeprecated(req); |
|
|
|
getServerWithAuth(req, res, function(server) { |
|
|
|
server.createAddress({ |
|
|
|
ignoreMaxGap: true |
|
|
@ -282,6 +291,7 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
|
|
|
|
// DEPRECATED
|
|
|
|
router.post('/v2/addresses/', function(req, res) { |
|
|
|
logDeprecated(req); |
|
|
|
getServerWithAuth(req, res, function(server) { |
|
|
|
server.createAddress({ |
|
|
|
ignoreMaxGap: true |
|
|
@ -327,6 +337,7 @@ ExpressApp.prototype.start = function(opts, cb) { |
|
|
|
|
|
|
|
// DEPRECATED
|
|
|
|
router.get('/v1/feelevels/', function(req, res) { |
|
|
|
logDeprecated(req); |
|
|
|
var opts = {}; |
|
|
|
if (req.query.network) opts.network = req.query.network; |
|
|
|
var server = getServer(req, res); |
|
|
|