Commun Platform Docs(β)
  • About Commun Platform
    • What is Commun Platform
    • How do I receive PoV
    • What can I do with the spot device
    • How To Use COMMUN App for Visitor
  • Ecosystem
  • Platform Architecture
    • Overview
    • Register Spot
    • How to mint a PoV
    • About VisitorRegistry
    • How to change the PoV delivered by a spot device
    • PoV verify System
    • Spot Device
      • NFC Card
      • Bluetooth Device
      • Wireless LAN
    • Spot Signature
      • Visitor
      • Event ID
  • Builders Guides
    • For Spot Owner
      • Add Proof of Visit
    • For Visitor
      • Proxy Mint
    • Subgraph
Powered by GitBook
On this page
  • Flow
  • Check
  1. Platform Architecture

Register Spot

PreviousOverviewNextHow to mint a PoV

Last updated 2 years ago

The spot will be registered by Commun. Basically, a spot device is registered when it is manufactured.

Flow

  1. Commun receives the ECDSA public key of the spot device from the spot device.

  2. Calculate EOA from the ECDSA public key of the spot device.

  3. Registers the EOA with SpotRegistry::register() with the following information.

    {
      "spotOwner": "SPOT_OWNER_EOA(OPTION)",
      "spotAddress": "SPOT_EOA",
      "spotInfo": {
         "name": "SPOT_NAME",
         "description": "SPOT_DESCRIPTION",
         "imageUrl": "SPOT_IMAGE_URL",
         "url": "SPOT_URL(WEB_SITE)",
         "provider": "SPOT_PROVIDER(OFFICE_NAME)",
         "latitude": "SPOT_DESCRIPTION",
         "longitude": "SPOT_DESCRIPTION",
         "extra": "SPOT_DESCRIPTION"
      }
    }

SpotRegistry::register() creates a new SpotResolver contract. It provides the ability for visitors to resolve smart contracts that work by spot signatures. Smart contracts are managed by an ID called PoV ID. SpotResolver creates the first PoV contract when it is created. The PoV ID of that PoV contract is 0x0.

Check

If the registration is successful, SpotRegistry::getResolver() returns something other than address(0).