The quickest way to get started building on peaq is to use one of our prebuilt SDKs. They offer robust capabilities in DID, RBAC, and Storage - all communicated via the peaq blockchain. Please checkout the official SDK Reference for more detailed information.

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.

After completing these steps the peaq sdk will have been successfully installed at your local Javascript Project. For more information about the capabilities it offers checkout the JavaScript SDK Reference.

Python SDK Quickstart

Prerequisite:

  • Python Version 3.8+ installed on your system.

Installation:

1

Setup Virtual Environment

Mac/Linux:

npm
python -m venv peaq
source peaq/bin/activate

Windows:

npm
python -m venv peaq
peaq\Scripts\activate
2

Install the SDK

pip install peaq-sdk
3

Setup Requirements.txt

mkdir requirements.txt

Add python-dotenv==1.1.0 to this file to enable environment variables. Install with pip install -r requirements.txt.

4

Create a Python file

Create a new .py file.

5

Write your code

Write Python code that interacts with the SDK.

6

Execute your code

Run command: python file_name.py to execute.

For more information about the Python SDK, take a look at the Python SDK Reference.