Connection guide

To work with the registers from your app you need to determine the following things.

  • Schema - immutable description of the format in which your data will be stored

  • Emitter wallet - secured wallet which address would be associated with emitter protocol

  • Fees - amount of ETH that would be collected by your emitter for registering and updating users data

There is no restrictions about schema format. You can store a schema of your data in any format, that is comfortable for you.

Retrieving signatures

You need to obtain 2 signatures:

  • For registering schema

  • For registering emitters

For this you should contact our manager and provide following data:

  • Project name

  • Project description

  • Desired schema

  • Emitter wallet address

  • Id of the chain where you want to register the registry

  • Fee you want to collect for registering SID

  • Fee you want to collect for updating SID

Registering schema

To register a schema you should call the schemaRegistry function on the SingleIdentifierRegistry contract.

You should register a schema only on the chain which id was provided for signature!

struct SIDSchemaParams {
        string name;         //Schema name
        string description;  //Schema description
        string schema;       //Schema
        address emitter;     //Your Emitter wallet address
}

contract SingleIdentifierRegistry {
        function schemaRegistry(
                SIDSchemaParams calldata _schema, // Schema data as specified above
                bytes calldata _signature         // Signature for registering schema
        ) external
        
        function schemaIds(
                address emitter // Your Emitter wallet address
        ) external returns(bytes32 schemaId)
}

After registering schema you can get its id with schemaId function.

Registering emitter

After registering a schema you can register your emitter with the freshly registered schema using registerEmitter function of the SingleIdentifierId contract.

Pay attention to the contracts you are calling!

Schema and emitter should be registered using different contracts!

While schema should be registered only on a single chain, emitters should be deployed to every chain that you want to use.

contract SingleIdentifierId {
    function registerEmitter(
        bytes32 _schemaId,        // Id of the created schema
        uint256 _registryChainId, // Id of the chain, where schema was created
        address _emitterAddress,  // Your EmitterWallet address
        uint64 _expirationDate,   // Emitter expiration date
        uint256 _fee,             // Fee that would be collected for registering users
        bytes calldata _signature // Signature for registering emitter
    ) external 
}

Last updated