How to become a resolver

To connect as a resolver, follow these steps. Authorization is managed through a unique item in a special SBT NFT collection, containing metadata with the public keys you've generated in advance. You will need to use your SBT item's address to interact with the protocol. To obtain this item, complete a Google form with the required information.

Step 1 - Key Generation

First, you need to generate a key pair for authentication. You can use the NaCl library for this purpose:

You can generate multiple keys if necessary.

Step 2 - Preparing Metadata

To register a new resolver, you’ll need to provide a name and a set of public keys in JSON format. Here’s an example:

{
  "name": "Test",
  "publicKeys": [
    "b951254b184fae6906a61ab01e37296fbb28961494cacf7befac9f638fcfe40c",
    "9397ddd52a0d6033da4a32e654b4afbddcc5d832575e396c0a6f5b213faa199f"
  ]
}

Step 3 - Uploading Metadata to the NFT Collection

Your metadata will be uploaded as a soul-bound token (SBT) in the NFT collection. Submit it through the provided Google form. This will initiate the process of uploading your metadata as an SBT in the NFT collection.

Step 4 - Connection Request

After completing the preparatory steps, you can connect to the service using the gRPC protocol.

Forming the Request Body

The request body is a proto message called ConnectPayload.

Example:

ConnectPayload {
  "connect_timestamp": 1730478661000,
  "stake_address": "EQDUF9cLVBH3BgziwOAIkezUdmfsDxxJHd6WSv0ChIUXYwCx"
}

where:

  • connect_timestamp - the current time of the request (The Current Epoch Unix Timestamp in milliseconds)

  • stake_address - the address of your SBT

Forming the Request Signature

To do this, take the request body as a byte array and create a signature using one of your private key.

Forming the Connection Request

ConnectRequest {
  "payload": "CPKnlt2xYxIwRVFDWFNzMnhaMmRoazlUQXh6R3pYcmEyRWJHX1MyU3F5TjhUZmk2Zko4MkVZaVZq",
  "public_key": "TAPsnPvWhlOvxEK19rONv4sueMeQzOzlrrIFUOKsi34=",
  "signature": "us7nMd9wmUOkuPk0otg6dvUojZwj8VcyXU6HD13BDQhVrzV8sKgyXtKze+9+j9FC1Ghxkx7Jo5FIDeE8ljbADQjyp5bdsWMSMEVRQ1hTczJ4WjJkaGs5VEF4ekd6WHJhMkViR19TMlNxeU44VGZpNmZKODJFWWlWag==" 
}

where:

  • payload - the request body

  • public_key - the public part of the key used for signing

  • signature - the request signature

Send the request to https://omni-grpc.ston.fi

Example request:

{
  "connect": {
    "payload": "CPKnlt2xYxIwRVFDWFNzMnhaMmRoazlUQXh6R3pYcmEyRWJHX1MyU3F5TjhUZmk2Zko4MkVZaVZq",
    "public_key": "TAPsnPvWhlOvxEK19rONv4sueMeQzOzlrrIFUOKsi34=",
    "signature": "us7nMd9wmUOkuPk0otg6dvUojZwj8VcyXU6HD13BDQhVrzV8sKgyXtKze+9+j9FC1Ghxkx7Jo5FIDeE8ljbADQjyp5bdsWMSMEVRQ1hTczJ4WjJkaGs5VEF4ekd6WHJhMkViR19TMlNxeU44VGZpNmZKODJFWWlWag=="
  },
  "seqno": 0
}

Last updated