DID Registration
Every DID is associated with at least one key series. Apart from registering a new DID, every other type of request is associated with a DID address ("did_address") and one of the DID's key series. The client specifies the attribute "operation" according to the name of the request method. The current public key ("current_key") in the series and the SHA-256 hash of the next public key ("next_key_hash") is part of the request message whereas the current private key is used to sign the Base64 encoded request message.
To register for a new DID, a client must specify a new key series when she registers for a new DID address with did_register operation. The client generates the first and second public-private key pairs in the new key series. In the request message, the client then specifies the first public key ("current_key") and the SHA-256 hash of the second public key ("next_key_hash"). The request message is then encoded in Base64 and signed by the first private key.
did_register
POST https://test-network.finema.co/did/
Request Body
operation
string
The method's name that is "did_register".
current_key
string
The first public key in the series. It is used to verify the request's signature.
next_key_hash
string
The SHA-256 hash of the next public key in the series.
{
"operation": "did_register",
"did_address": "did:idin:afb7ba88c76edbda55c344b70ae0cf0556d770ec256820d7185000de395391b5"
}{
"errors": [
{
"status": 422,
"title": "Invalid Attribute",
"detail": "the server cannot process the request",
}
]
}Example Message and Request
{
"operation": "did_register",
"current_key": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWquJ9+BEBDQTA/xRmx5uAHOgKMue\nw1QoAGk+2mLVWGvFBW5D3BMPYOFtGM/tvubVjwY3tr9iRI+erSQUmFIvRg==\n-----END PUBLIC KEY-----",
"next_key_hash": "2775f71ed2bef2f395acf8781d43d0f538bf693b7c62a5bc27ec46cc839d272c"
}The above message can then be encoded in Base64 and signed with ECDSA to obtain the following HTTP request
Last updated
Was this helpful?