Integrating the Device Map
Global Device Map in DePIN Projects
A global map of devices for a DePIN project is an invaluable tool, offering a clear visualization of the network's scale and reach. It promotes transparency for all stakeholders, highlighting areas of high device concentration and potential expansion zones.
For decentralized systems where location affects performance or service availability, a global map aids in strategic planning and optimization.
DePINscan's Device Map
Since a global device map crystallizes the decentralized nature of DePIN projects, DePINscan introduces an intuitive and visually appealing global device map that any DePIN project can integrate.
Given that DePINscan operates on W3bstream's Trusted Metrics API, you need to transmit your device location data to a W3bstream project with a certain format. This ensures the data is published via the Trusted Metrics API and thereby becomes accessible to DePINscan.
To integrate your DePIN project's device locations with the DePINscan map, follow the steps below.
Integration of Device Locations with the DePINscan Map
If your DePIN project isn't hosted on a W3bstream node, start by creating a new W3bstream project in W3bstream Studio by using the link below:
This project's sole function is to receive device location data and relay it to the Trusted Metrics API.
Step 1: Activating device location data collection
The easiest way of activating the device location data collection is to use the DePIN Integration Template in the modal that will appear when creating a new project (as shown in the image below):
Once your W3bstream project is up and running, you'll notice that the Default event routing strategy in the Events tab, is already set to Auto Collect the location metrics (see image below):
You can always edit your Event Routing strategy, but this default one is enough for your project to receive location data and get integrated in DePINscan.
It's now time to send this location data to your newly created W3bstream project.
Step 2: Transmitting device location data
Once you've deployed your W3bstream project and set up an event routing to relay location data to the Trusted Metrics service, the final step is to embed the actual device location data within a W3bstream message directed at that specific event in your project.
You can refer to the Sending Data to W3bstream section to learn how to send device data to your W3bstream project
The W3bstream PC Client SDK simplifies the process of relaying messages to a W3bstream project from your backend. This SDK is compatible with Node JS, Python, and Go Lang.
Here's a sample of how to embed device location data into a W3bstream data message and transmit it to your W3bstream project using Node JS:
Last updated