Skip to content

Commit

Permalink
updated README and added run.js to src
Browse files Browse the repository at this point in the history
  • Loading branch information
developersteve committed May 17, 2024
1 parent 3f4fca4 commit 8fa2bae
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ An API endpoint that wraps using the Lilypad cli.

## Usage

Run `node src/index.js` to create a local endpoint using the js wrapper, then send a post request containing json with your funded `WEB3_PRIVATE_KEY` key set, see the quick start for more on [getting started](https://docs.lilypad.tech/lilypad/lilypad-milky-way-testnet/quick-start)
Run `node src/index.js` to create a local endpoint using the js wrapper with either `src/run.js` or `src/stream.js`, then send a post request containing json with your funded `WEB3_PRIVATE_KEY` key set, see the quick start for more on [getting started](https://docs.lilypad.tech/lilypad/lilypad-milky-way-testnet/quick-start)

The endpoint can then be tested using curl
```
Expand All @@ -14,8 +14,6 @@ curl -X POST http://localhost:3000 \
-d '{"pk": "'"$WEB3_PRIVATE_KEY"'", "module": "github.com/lilypad-tech/lilypad-module-lilysay:0.1.0", "inputs": "Message=test"}'
```

Alternatively run `node src/run.js` or `node src/stream.js` with one of the following scripts

```js
// run.js
const { run } = require("./")
Expand All @@ -29,7 +27,7 @@ run(
})
```

```
```js
// stream.js
const { stream } = require("./")

Expand All @@ -43,7 +41,7 @@ stream(
})
```

```
```js
// index.js
const fetch = require("node-fetch")
const fs = require("fs")
Expand Down

0 comments on commit 8fa2bae

Please sign in to comment.