Monitors the Stellar network and publishes events to webhooks
-
Clone this project
$ git clone https://github.com/zulucrypto/stellar-event-publisher.git $ cd stellar-event-publisher
-
Install dependencies
$ composer install
Accept the defaults for all options
-
Set up a webhook to receive events. https://requestb.in/ provides a quick and free way to test webhooks
-
Create a config file that will send all ledgers to the webhook:
var/config/send-ledgers.json
[ { "source": "ledgers", "destination": "https://requestb.in/YOUR_BIN_HERE" } ]
-
Initialize the database
$ bin/console doctrine:schema:create
-
Start the supervisor process which launches the watcher and webhook publisher
$ bin/console sep:supervisor
-
Within 30 seconds ledger events should start being delivered to your webhook endpoint
To run this project without checking out the source code, use the docker image
-
Set up a webhook to receive events. https://requestb.in/ provides a quick and free way to test webhooks
-
Create a directory to contain config files
$ mkdir /tmp/sep-config-test
-
Create a config file that will send all ledgers to the webhook:
/tmp/sep-config-test/send-ledgers.json
[ { "source": "ledgers", "destination": "https://requestb.in/YOUR_BIN_HERE" } ]
-
Use docker to run a stellar event publisher container that reads from the config directory
$ docker run -v /tmp/sep-config-test:/project/var/config zulucrypto/stellar-event-publisher