Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #11

Merged
merged 1 commit into from
May 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,20 @@ To launch the LightNode, run the command below:
```
yarn start
```
### Advanced Usage Guide

### Advanced Usage
On the express server created by the LightNode there is a path `/sync/create`.
The LightNode's express server provides a `/sync/create` endpoint, which allows you to add new contracts for backfilling and upkeep. To utilize this feature, you need to send a POST request with the required query parameters:

This path can be used to add new contracts to be backfilled and upkept by the LightNode by sending the following query parameters in a post request:
"type=TABLE_NAME" | "sales" OR "asks"
- `type=TABLE_NAME`
- `contract=CONTRACT_ID`

"contract=CONTRACT_ID" | Valid contract for the chain you initially started the Node on.
In the `type` parameter, specify either "asks" or "sales" based on your requirements. For the `contract` parameter, provide a valid contract ID corresponding to the blockchain your LightNode is operating on.

The full request might look similiar to this:
An example of a complete POST request is shown below:

```
```cURL
curl --location --request POST 'http://your-server.com/sync/create?type=ask&contract=0xed5af388653567af2f388e6224dc7c4b3241c544'
```

This request will add the specified contract to the LightNode for backfilling and upkeeping.