LogoLogo
WalletsEcosystemStart BuildingJoin the Community
  • Welcome to IoTeX 2.0
    • 💡Why IoTeX
    • 🪙Tokenomics
      • IOTX Utility in IoTeX 2.0
      • IOTX Emission, Deflation, and Re-Staking
    • 📖Whitepaper
    • ⚡Get Started
  • DePIN Infra Modules (DIM)
    • DIMs Overview
    • [IoTeX L1] DePIN Blockchain
      • Core Concepts
        • Consensus Mechanism
        • Voters and Delegates
        • Ethereum Virtual Machine
        • Accounts & Identities
        • Blockchain Actions
        • ERC20 and NFT Tokens
        • Smart Contracts
        • Interoperability
        • Governance
      • The IOTX Token
        • IOTX Token Exchange Support
        • Different Formats of the IOTX Token
        • IOTX Token Contracts
      • Wallets
        • Supported Wallet Apps
          • ioPay Mobile
          • IoTeX Web Wallet
          • OKX Wallet
          • Rabby Wallet
          • Metamask Desktop
          • Ledger Nano S & X
            • Use Ledger with Metamask
            • Use Ledger with Rabby Walet
            • Use Ledger with IoTeX Hub Portal
            • Migrate to the Ethereum Ledger App
          • IoTeX Desktop Wallet
          • 👩‍💻IoTeX HD Derivation Path
        • Buy IOTX Tokens
        • Execute Transactions
          • Transfer IOTX Tokens
          • Transfer ERC20 Tokens
          • Interact with Dapps
          • Explore transactions
        • Migrate Assets to a different wallet
      • Staking & Governance
        • About IoTeX Staking
        • IoTeX Staking Guide
          • Native staking
          • Staking as NFT
        • Join the Governance
          • Marshall DAO
          • Improvement Proposals
      • Exchange Integration
      • 👨‍💻Deploy Dapps on IoTeX
    • [ioID] DePIN Identities
      • ioID Specification
      • Overview of ioID
      • Registering Identities
      • 👩‍💻Integration Guide
        • Register a DePIN Project
        • Bind your Device NFT
        • Reserve Device ioIDs
        • Query Project Status
        • Register a Device
        • ioID Smart contracts quick reference
    • [W3bstream] DePIN Verification
      • Overview of W3bstream
      • Multi-Prover Architecture
      • 👨‍💻Build with W3bstream
        • Get Started
          • Sequencer Options
        • Build the Prover Code
          • Risc Zero
          • Halo2
          • zkWASM
        • Deploy to W3bstream
          • Create the Project File
          • W3bstream Outputs
          • Deploying Projects
          • Interacting with Projects
        • On-chain integration
          • Verify Risc0 Proofs
          • Verify Halo2 Proofs
          • Verify zkWASM profs
        • Sending Messages
      • 👩‍💻Node Operators
        • Configure a ZK Prover Node
        • Register your Node
    • [ioID-SDK] Hardware SDK
      • ioID-SDK Overview
      • Layered Architecture
      • Compatibility
      • Current Development Status
    • [MSP] Modular Security Pool
    • Third-Party DIMs
      • Data Sequencer Infras
      • Data Availability Infras
      • 👨‍💻W3bstream Tasks
  • Ecosystem
    • Assets on IoTeX
      • Mainstream Assets
      • IOTX and Derivatives
      • DePIN Tokens
      • MEME Coins
    • iotube Bridge
    • iotexscan Explorer
    • Ecosystem Apps
      • DePINScan
      • mimo DEX
      • ecosystem.iotex.io
    • "Powered by IoTeX" Devices
      • Pebble Tracker
        • Quick Start
        • Device Registration
        • Online Firmware Update
        • USB Firmware Update
        • Migrating to Pebble v2.0
          • 1.0 Device Registration
        • Tech Specs
        • Network Selection
        • Pebble Configuration
        • Query Pebble Data
        • Troubleshooting
        • Firmware Development
          • Hardware Setup
          • Build the Firmware
          • Flash the firmware
      • SenseCAP Indicator
      • UCam Home Camera
  • Builders
    • IoTeX Developer Portal
    • Dev Chat on Discord
    • Web3 Development
      • RPC Endpoints
      • Set up your Environment
      • Get Testnet IOTX Tokens
      • ioctl CLI
        • Installation
        • Create Accounts
        • Blockchain interaction
          • ioctl command reference
      • Chain Indexing
        • The Graph
        • SubQuery
        • IoTeX Analytics API
      • IoTeXscan API
      • Deterministic Deployment
      • Account Abstraction
        • Components of AA
        • 👩‍💻Creating new Accounts
        • 👨‍💻P256Account Example
      • Blob Transactions (EIP-4844)
      • Multicall3
      • EVM Precompiled Contracts
    • Building DePINs
      • ioID Step by Step Tutorial
        • Integrate ioID in the Device Firmware
        • Integrate ioID in your cloud
      • Decentralized WiFi Connectivity (DeWi)
        • Project Specification
        • The choice of Hardware
        • The Data API Service
        • DePIN Incentives Contract
    • Building DeFi
      • Deploy Tokens
        • Deploy an ERC20 Token
        • Deploy an NFT Token
      • Price Oracles
        • Chainlink Relayer
        • SupraOracles
      • Integrate IoTeX Staking
      • Liquid staking Dapps
    • Launch Dapps on IoTeX
      • Submit Tokens to the IoTeX Ecosystem
      • Submit tokens to the iotube bridge
      • Verify Smart Contracts
      • Audit your Contracts
      • Submit your Dapp to Portals
      • Useful tools
    • Node Operators
      • Fastblocks (Node as a Service)
      • Setup an IoTeX RPC Node
      • Run a Delegate Node
      • Rosetta API
    • Reference Docs
      • ioctl client
        • Accounts
        • HD Wallets
        • Aliases
        • Actions
        • Queries
        • Smart Contracts
        • Staking & Voting
        • Tokens
        • ioID Identities
        • W3bstream
        • Decentralized Identifiers (DID)
        • JWT Auth Tokens
      • Native IoTeX Development
        • IoTeX gRPC API
        • Account Cryptography
        • Address Conversion
        • Create Accounts
        • Estimate Gas Price
        • Make IOTX Transfers
        • Manage ERC20 Tokens
        • Smart Contract Interactions
        • ioPay Desktop
        • DID JWT Tokens
        • Calling any RPC method
      • Embedded Blockchain Clients
        • Arduino IDE
        • Linux Systems
        • PlatformIO
        • Examples
        • Tutorials
  • Participate
    • Crypto's Got Talent (CGT)
      • IoTeX x Polygon DePIN Grant
    • Governance
      • IoTeX Improvement Proposals
      • The Marshall DAO
    • Join the Community
    • Get in Touch
Powered by GitBook
LogoLogo

This documentation portal is currently undergoing updates to align with the IoTeX 2.0 Whitepaper release. Information provided here may be incomplete, or out-of-date. Please use this portal for preliminary reference only, and check out the official IoTeX 2.0 Whitepaper for updated information.

  • .

2025 | IoTeX

On this page
  • 1. Register your DePIN Project on IoTeX
  • Create and fund the Project Owner account
  • Register your project on IoTeX
  • Clone the ioID contracts repository
  • Deploy and link the Device NFT Contract
  • 2. Device registration

Was this helpful?

Export as PDF
  1. Builders
  2. Building DePINs

ioID Step by Step Tutorial

PreviousBuilding DePINsNextIntegrate ioID in the Device Firmware

Last updated 4 months ago

Was this helpful?

This tutorial demonstrates how to integrate ioID into your DePIN project and is divided into two parts:

1. Project Registration on the IoTeX blockchain, explained in this page.

2. Device Registration, which varies based on the scenario and may involve integrating ioID either directly on the device or in the project's cloud. Both cases are described in the next pages.

IoID Web Tools

IoID Web Tools are designed to streamline experimentation and development for integrating IoID into DePIN projects. These tools, currently under development by the IoTeX Foundation, aim to provide a seamless and interactive user experience for creating and managing IoID-based projects.

While this page explains how to register your project in IoID using the ioctl command line, you can achieve the same using the where you can list, and manage all your projects interactively, including deploying a default Device NFT contract.

Prerequisites

Before you begin working with the IoTeX blockchain and related tools, follow these preliminary steps to set up your development environment.

Tools

Ensure you have the following tools installed:

  • : For interacting with the IoTeX blockchain.

  • : For sending messages to the API node.

  • : Optional, to format JSON output.

Create and fund a Developer wallet

Start by creating an IoTeX developer wallet and funding it with test tokens.

ioctl account createadd devaccount

Note the 0x wallet address provided.

Set ioctl on the IoTeX testnet:

ioctl config set endpoint api.testnet.iotex.one:443

Claim test IOTX

You can claim test IOTX tokens on the IoTeX Developer portal at .

Configure Metamask: if you need to configure Metamask with IoTeX for convenience, you can do so on the

Check the balance of your wallet with:

ioctl account balance devaccount

If needed, export the private key with:

ioctl account export devaccount

1. Register your DePIN Project on IoTeX

In this step, you will register your project on the IoTeX blockchain. This process generates a unique Project ID, which serves as an on-chain identifier for your project, enabling the verification of devices associated with it.

Use a dedicated wallet account as the owner of your on-chain project profile. Whenever possible, consider using a hardware wallet for enhanced security on mainnet.

Create and fund the Project Owner account

Ensure your ioctl is up to date with

ioctl update

Start by creating an IoTeX wallet and funding it with test tokens.

ioctl account createadd projectaccount

Let's export the private key:

ioctl account export devaccount
# Copy the exported private key and export it to the system environment
export PRIVATE_KEY=0x...

Let's also make this the default account on ioctl so that we don't need to indicate it as the signer in every command:

ioctl config set defaultacc projectaccount

Register your project on IoTeX

ioctl ioid register "MY_DEPIN_PROJECT_NAME"

Take note of your Project ID and set it as an environment variable:

export PROJECT_ID=YOUR_PROJECT_ID

Bind the Device NFT to your Project ID

ioctl ioid device $DEVICE_NFT -p $PROJECT_ID

Reserve a few ioID for your project (10 in the example command below):

ioctl ioid apply -p $PROJECT_ID -a 10

Clone the ioID contracts repository

To begin, clone the ioID contracts repository from GitHub. This repository contains the ioID smart contract code you will interact with, as well as related resources, including example contracts:

git clone https://github.com/iotexproject/ioID-contracts && cd ioID-contracts

npm install

Deploy and link the Device NFT Contract

To finalize the integration with ioID on the blockchain side, your project must include an ERC721 NFT contract. This contract can be fully custom and allows you to pre-register devices on-chain, providing flexibility to manage and customize the binding process before linking devices to owner accounts.

Once you have the address for your NFT contract, you can link it to your Project ID with:

export DEVICE_NFT=0x...
ioctl ioid device $DEVICE_NFT -p $PROJECT_ID

Deploy with Hardhat

npx hardhat run scripts/deploy-example.ts --network testnet

Deploy from the IoTeX Hub

  • Create a new project using the Create Project button if you haven't registered one already

  • Identify your project id on the IoTeX Hub

  • Select Set Device Contract → Deploy Device Contract from the Project's actions menu

2. Device registration

Depending on the development stage of a DePIN project, there are multiple ways it can integrate ioID to allow decentralized device identity registration. In the next pages, we share different flows tailored to various use cases.

Note the 0x wallet address provided. You can claim test IOTX tokens on the Developer portal at or ask on our .

If you don’t already have an NFT contract for your devices, you can deploy the repository. The example script below will perform the whole process of deploying the example Device NFT Contract, registering a project ID, linking the NFT contract to the project and finally reserving some ioID for the project

The same process can be performed using the on the IoTeX Hub Portal:

IoID Web Tools
ioctl
curl
jq
https://developers.iotex.io/faucet
https://developers.iotex.io/faucet
developers channel on Discord
example provided in the ioID contracts
ioID Web Tools
Integrate ioID in the device firmware (a fully decentralized approach)
►
Integrate ioID in your cloud (a "proxy contract" approach) ►