Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kleros/event-service
API that sends webhooks for contract events
https://github.com/kleros/event-service
backend kleros-v1 notifications platform
Last synced: about 1 month ago
JSON representation
API that sends webhooks for contract events
- Host: GitHub
- URL: https://github.com/kleros/event-service
- Owner: kleros
- Created: 2018-12-20T22:36:34.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T23:24:15.000Z (almost 2 years ago)
- Last Synced: 2023-02-26T18:16:08.791Z (almost 2 years ago)
- Topics: backend, kleros-v1, notifications, platform
- Language: JavaScript
- Homepage:
- Size: 588 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Event Notification Service
This service is hosted at:
- `https://kovan-events.kleros.io` to subscribe to events on the `Kovan` testnet
- `https://events.kleros.io` to subscribe to events on the Ethereum mainnet## Basic Usage
### Routes
#### `https://events.kleros.io/contracts/:address/listeners/:eventName/callbacks`
`POST`
Create a new subscription.
```
body = {
callbackURI: 'https://my-callback-uri.com',
contractABI: [...]
}
```Params:
- `address`: The smart contracts address
- `eventName`: The name of the event that will trigger the callback
- `callbackURI`: The URI of your webhook. When a matching event is consumed a POST request will be sent to this URI whose body is an Ethereum event log. For structure of event log see `https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#contract-events`
- `contractABI`: The contract ABI. This only needs to be included if the contract has not been registered before.`DELETE`
Remove a subscription callback.
```
body = {
callbackURI: 'https://my-callback-uri.com',
}
```Params:
- `address`: The smart contracts address.
- `eventName`: The name of the event.
- `callbackURI`: The URI of your webhook to remove.