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.

1

Create a Node.js project

Run commandnpm init -y to create a Node.js project.

2

Install the SDK

npm i @peaq-network/sdk
3

Enable ES Modules

In the package.jsonfile, add "type": "module" to enable ES Modules.

4

Create a JavaScript file

Create a new .js file.

5

Write your code

Write the JavaScript code that interacts with the SDK.

6

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.