UNPKG

dogecoin-gatewayd-plugin

Version:

Three unix processes designed to automate the integration between a ripple gateway using gatewayd and a dogecoind server.

26 lines (19 loc) 769 B
// Generated by CoffeeScript 1.7.1 var DogecoinAddressValidator, request; request = require("superagent"); DogecoinAddressValidator = (function() { function DogecoinAddressValidator(gatewayd) { this.gatewayd = gatewayd; } DogecoinAddressValidator.prototype.validate = function(address, callback) { return request.get("" + (this.gatewayd.config.get('dogecoinExpressDomain')) + "/v1/validateaddress/" + address).auth("admin", this.gatewayd.config.get("dogecoinExpressApiKey")).end(function(error, response) { if (error) { return callback(error, null); } else { return callback(null, response.body.validation.isvalid); } }); }; return DogecoinAddressValidator; })(); module.exports = DogecoinAddressValidator;