https://github.com/requestnetwork/quickstart-node-js
Example scripts for using Request Network SDK
https://github.com/requestnetwork/quickstart-node-js
Last synced: 8 months ago
JSON representation
Example scripts for using Request Network SDK
- Host: GitHub
- URL: https://github.com/requestnetwork/quickstart-node-js
- Owner: RequestNetwork
- Created: 2023-08-22T01:39:11.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-28T16:59:19.000Z (10 months ago)
- Last Synced: 2025-06-07T10:48:47.318Z (8 months ago)
- Language: JavaScript
- Homepage: https://docs.request.network
- Size: 275 KB
- Stars: 1
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# quickstart-node.js
This repo will introduce the four primary operations provided by Request
Network’s SDK while using the `EthereumPrivateKeySignatureProvider` to sign
requests with a private key that is managed outside of a wallet.
This approach works well for Node.js environments without access to a web3 wallet.
## Setup
Make a .env file
```bash
cp .env.example .env
```
Add the environment variables:
```bash
# Must include 0x prefix
PAYEE_PRIVATE_KEY='0x4025da5692759add08f98f4b056c41c71916a671cedc7584a80d73adc7fb43c0'
PAYER_PRIVATE_KEY='0x4025da5692759add08f98f4b056c41c71916a671cedc7584a80d73adc7fb43c0'
# Infura, Alchemy, etc.
JSON_RPC_PROVIDER_URL='https://eth-sepolia.g.alchemy.com/v2/demo'
```
Install
```bash
npm install
```
## Run
Run the scripts
```bash
npm run retrieve
npm run create
npm run pay
npm run declare
npm run delegate
```