Set up TS ENV
1. New Project
2. Install packages
3. Add a TypeScript config
4. Update scripts in package.json.
The src/index.ts is the executable file.
5. Create source file
Set up JS ENV
1. Initialize node env
2. Install packages
3. Create source file
Execute
For both TS/JS environments your next steps are:Create .env file
The examples read secrets from a.env file. Create it together with a .gitignore so you do not commit keys:
.env as:
HTTPS_BASE_URL is the EVM RPC for the chain you pass as chainId. The examples use agung; for Chain.PEAQ use a peaq mainnet RPC such as https://quicknode1.peaq.xyz.
Add to .gitignore:
TS Execution
Copy one of the examples with the proper authority intosrc/index.ts for execution and run with:
JS Execution
Copy one of the examples with the proper authority intosrc/index.js for execution and run with:
new RWA(opts)
Initialize the peaq RWA SDK for a specific chain. The instance wires module addresses for that chain and exposes module entry points. A Provider is required at initialization and is used for read operations; write operations require an explicit Signer.
Parameters
Usage
TypeScript
JavaScript (ESM)
JavaScript (CommonJS)
Optional setup to use cjs. Remove"type": "module", from your package.json.

