Purpose: To discover the interface for Gateway Services Protocol to be extended per a given use case
gatewayd.protocol.external.outbound.extend({
quote: function(address, amount, currency) {
if (gatewayd.validator.isEmail(address)) {
if (currency === 'BTC') {
if (amount <= 0.1) {
this.resolve({
destination: destination,
amount: amount,
currency: currency
});
} else {
this.reject(new Error('amount must be less than 0.1'));
}
} else {
this.reject(new Error('currency must be BTC'));
}
} else {
this.reject(new Error('address must be email'));
}
}
})