Commit 106ba3bf authored by Cédric Moreau's avatar Cédric Moreau

Implemented method keychain/parameters

parent 93a06c6b
...@@ -73,6 +73,17 @@ function KeychainBinding (wotServer) { ...@@ -73,6 +73,17 @@ function KeychainBinding (wotServer) {
.pipe(res); .pipe(res);
} }
this.parameters = function (req, res) {
res.send(200, JSON.stringify({
"sigDelay": conf.sigDelay,
"sigValidity": conf.sigValidity,
"sigQty": conf.sigQty,
"stepMax": 3, // uCoin only handles 3 step currencies for now
"powZeroMin": conf.powZeroMin,
"powPeriod": conf.powPeriod
}, null, " "));
};
this.promoted = function (req, res) { this.promoted = function (req, res) {
async.waterfall([ async.waterfall([
function (next){ function (next){
......
...@@ -60,6 +60,7 @@ Data is made accessible through an HTTP API mainly inspired from [OpenUDC_exchan ...@@ -60,6 +60,7 @@ Data is made accessible through an HTTP API mainly inspired from [OpenUDC_exchan
| | `-- [NUMBER] | | `-- [NUMBER]
| `-- current | `-- current
|-- network/ |-- network/
| |-- parameters
| |-- pubkey | |-- pubkey
| |-- peering | |-- peering
| | |-- forward | | |-- forward
......
...@@ -73,6 +73,7 @@ function WOTServer (dbConf, overrideConf, interceptors, onInit) { ...@@ -73,6 +73,7 @@ function WOTServer (dbConf, overrideConf, interceptors, onInit) {
this.listenWOT = function (app) { this.listenWOT = function (app) {
var keychain = require('./app/controllers/keychain')(that); var keychain = require('./app/controllers/keychain')(that);
app.get( '/keychain/parameters', keychain.parameters);
app.post( '/keychain/membership', keychain.parseMembership); app.post( '/keychain/membership', keychain.parseMembership);
app.post( '/keychain/keyblock', keychain.parseKeyblock); app.post( '/keychain/keyblock', keychain.parseKeyblock);
app.get( '/keychain/keyblock/:number', keychain.promoted); app.get( '/keychain/keyblock/:number', keychain.promoted);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment