JavaScript client example for registering an ioID-enabled device from a host machine.
This repository is a minimal reference implementation for the final step of the ioID registration flow: a machine on the network talks to the device firmware, signs the required payloads, and submits the registration transaction using the configured wallet.
Use this project if you already have:
- an ioID-compatible device running the expected firmware
- a device owner wallet with the required NFT / token setup
- network access from your host machine to the device endpoint
This is not a full SDK. It is a focused example that shows the host-side registration flow in JavaScript.
This example follows the decentralized ioID tutorial:
Clone the repository and install dependencies:
git clone https://github.com/simonerom/ioid-registration-js.git
cd ioid-registration-js
npm installCreate your local environment file:
cp .env.example .envThen fill in the values described in .env.example.
Before running the script, make sure that:
- the device firmware is already running
- the device is reachable from your machine over TCP/IP
- the device owner wallet is funded and configured correctly
- the correct device token / NFT id is set in
.env
If any of these conditions are missing, the registration flow will fail or stall midway.
node index.jsThis repository is intentionally small and example-oriented.
If you are looking for a production integration, treat this code as a starting point:
- validate network and device availability more aggressively
- add better error handling and retries
- move secrets and signing material into a safer runtime setup
- wrap the flow behind a reusable service or CLI