Installing peaq SDK
The quickest way to start building on peaq is to use peaq’s JavaScript SDK. This package enables you to quickly leverage such Modular DePIN Functions as peaq ID, peaq access (RBAC), and peaq store.
Javascript SDK quickstart
Prerequisite:
- Node.js version at least 16.x, recommended to use the latest one.
Installation:
Create a new JavaScript project and follow the steps below to set up a new instance of the peaq sdk.
Create a Node.js project
Run commandnpm init -y
to create a Node.js project.
Install the SDK
Enable ES Modules
In the package.json
file, add "type": "module"
to enable ES Modules.
Create a JavaScript file
Create a new .js
file.
Write your code
Write the JavaScript code that interacts with the SDK.
Execute your code
Run command: node file_name.js
to execute.
By completing these steps, you have successfully installed peaq SDK at your local Javascript Project. For more information about its capabilities, check out the SDK Reference.