Register Spot

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).

Last updated