Skip to main content
Version: 0.1.0

Dev Kit

What is Dev Kit?​

Provides a toolset for calling Dev Protocol interfaces in JavaScript/TypeScript.



Install from npm.

npm i @devprotocol/dev-kit

Or, use yarn.

yarn add @devprotocol/dev-kit

Dev Kit depends on ethers.js. ethers.js is not installed automatically because it is specified in peer dependencies. Install ethers.js in your project.

npm i ethers

Or, use yarn.

yarn add ethers


Example of Retrieving and displaying information about sTokens​


import { ethers } from 'ethers'
import { contractFactory, addresses } from '@devprotocol/dev-kit'

// use main net
const registryContractAddress = addresses.eth.main.registry
const provider = new ethers.providers.JsonRpcProvider(
const contract = contractFactory(provider)
const lockupContractAddress = await contract

// the address of the target property
const propertyAddress = '0xac1AC9d00314aE7B4a7d6DbEE4860bECedF92309'

// get property's staking amount
const propertyStakingAmount = await contract
const stakingAmount = ethers.BigNumber.from(propertyStakingAmount).div(
new ethers.BigNumber.from(10).pow(18)
`${propertyAddress}'s staking amount is ${stakingAmount.toBigInt()} DEV`

// get property's rewards
const propertyRewards = await contract
const reward = ethers.BigNumber.from(propertyRewards[0]).div(
new ethers.BigNumber.from(10).pow(36)
console.log(`${propertyAddress}'s rewards is ${reward.toBigInt()} DEV`)


"name": "devkit-example",
"version": "0.0.1",
"type": "module",
"license": "MIT",
"scripts": {
"start": "node index.js"
"dependencies": {
"@devprotocol/dev-kit": "^5.8.1",
"ethers": "^5.5.2"

run example script (with local ethereum node. like this http://localhost:8545):

$ yarn start
yarn run v1.22.17
$ node index.js
0xac1AC9d00314aE7B4a7d6DbEE4860bECedF92309's staking amount is 27219 DEV
0xac1AC9d00314aE7B4a7d6DbEE4860bECedF92309's rewards is 15848 DEV
✨ Done in 0.60s.

run example script (with infura)

$ WEB3_PROVIDER_URL= yarn start

Other examples​

There are other example codes in the Dev Kit GitHub repository for your reference.