Gatewayd (pronounced "gateway-dee"), provides a framework you can extend to build a gateway on the Ripple Network. The system includes a core database that manages accounting for deposits and withdrawals of assets, linking the network with your holdings in the outside world. Gatewayd provides a standard interface for issuing any currency on the Ripple network and exchange, with the goal of completely abstracting interaction with Ripple.
Gatewayd's features include:
- deposits and withdrawals
- issuing currency
- robust Ripple payment sending
- incoming Ripple payment monitoring
- gateway administration
- support for custom plugins
The Ripple Dev Portal contains detailed information on Gatewayd and its APIs.
- The express web module is used to serve HTTP/JSON endpoints
- A Basic Auth strategy is used for authentication of users, admin.
- Several NPM modules must be globally installed: db-migrate, pg, forever, and mocha
- The easiest way to get started with Postgres is by launching a free database hosted by Heroku
- For local development on Mac the simplest installation is via the Postgres App by Heroku.
- On Linux, you can generally install Postgres from your distro's package manager. See instructions for:
- The Ripple REST API provides a simplified HTTP/JSON interface to all the Ripple protocol network operations, such as payments and other transactions.
- git is required for installation and updating. It is not used during general operation.
The update process for gatewayd may change in the future, but for now, updating to a new version follows this process:
- Use git to pull the
masterbranch from Github. (This assumes you created it by using
git cloneon the repository first.)
- Install any new npm modules needed by the new version
sudo npm install --global
- Disable the current gateway processes. (This starts downtime)
- Apply schema changes to the database, if the new version includes any.
- Restart the gatewayd processes. (This ends downtime)
Before you can run gatewayd, you need to set up the appropriate accounts that will be used to store and send funds in the Ripple network. You also need to define which currencies your gateway issues. Beyond that, there are some options you can set if they fit your needs.
The defaults for all of gatewayd's settings are found in the file
config/environment.js. You can override any of those settings with your own values by editing them in the file
config/config.json, or by using the API methods for setting the configuration. (The API methods result in editing the
config/config.json file anyway.) Don't edit the
config/environment.js file, since that only contains the defaults, and gets overridden in a software update.
After installation, start the gateway processes by running the command:
Command Line Interface
In addition to the REST interface, many pieces of Gatewayd can be controlled directly through the commandline. This is done by running the
gateway script (
bin/gateway from the project's top level directory) with the relevant commands.
You can get usage information for the commandline as follows: