Skip to main content

krest (Canary Network)

krest is peaq's canary network — the world's first and only DePIN simulation network. krest is your home for socio-economic, technical, community, and governance innovation and experimentation within the peaq ecosystem.

Network Endpoints

You can connect to krest network via WSS or RPC endpoints.

wss://wss-krest.peaq.network
wss://krest.unitedbloc.com/

Quickstart

Web3.js library

First, copy the public network endpoint from above (you can also use your own endpoint). Next, create a Web3 instance with your endpoint using Web3.js library and configure the provider to connect to krest (both RPC and WSS protocols supported):

const Web3 = require('web3'); // Import Web3 library
.
// Create a local Web3 instance and set peaq as the provider
const web3 = new Web3("RPC-API-ENDPOINT-HERE"); // Replace with your RPC URL

Ethers.js library

Similar to Web.js instruction above you'll need an endpoint. For the Ethers.js library, define the provider by using ethers.JsonRpcProvider(providerURL) and setting the provider URL to krest:

const ethers = require('ethers'); // Import Ethers.js library

// Define the provider using ethers.JsonRpcProvider(providerURL, {object}) and set the provider URL to peaq
const provider = new ethers.JsonRpcProvider("RPC-API-ENDPOINT-HERE"); // Replace with your RPC URL

Chain ID

krest chain ID is 2241, or 0x8c1 in hex.