VC Registration
A credential issuer can register a new VC with vc_register operation. In the request message, the credential issuer must specify the current public key ("current_key") in a valid key series and the SHA-256 hash of the next public key ("next_key_hash"). The request message is then encoded in Base64 and signed by the current private key. Once the VC is registered, the server will respond with the VC's unique CID.
Once the credential issuer obtains a CID from the IDIN server, the issuer can then generate and send a VC with that CID to the credential holder.
The private key that is used to sign a vc_register request must be the same key that is used to sign the VC. This ensures the VC can be verified with "current_key" that is recorded in the IDIN blockchain.
post
https://test-network.finema.co/
vc
vc_register

Example Message and Request

1
{
2
"current_key": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEt0akFcQq6zIZqzWWqGcMf1LHEsmM\njyroeekIUmVdFy315ldxcn2fPzPqyjJVolJRvoRaVoZZZjZCBzy4yASxqw==\n-----END PUBLIC KEY-----",
3
"next_key_hash": "518b7e9e4fca365dff7b6f6d4509bbe2990037a88d7633ef0faaadeba35123ed",
4
"operation": "vc_register",
5
"did_address": "did:idin:afb7ba88c76edbda55c344b70ae0cf0556d770ec256820d7185000de395391b5",
6
"nonce": 5
7
}
Copied!
The above message can then be encoded in Base64 and signed with ECDSA to obtain the following HTTP request
1
{
2
"message": "eyJjdXJyZW50X2tleSI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFdDBha0ZjUXE2eklacXpXV3FHY01mMUxIRXNtTVxuanlyb2Vla0lVbVZkRnkzMTVsZHhjbjJmUHpQcXlqSlZvbEpSdm9SYVZvWlpaalpDQnp5NHlBU3hxdz09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS0iLCAibmV4dF9rZXlfaGFzaCI6ICI1MThiN2U5ZTRmY2EzNjVkZmY3YjZmNmQ0NTA5YmJlMjk5MDAzN2E4OGQ3NjMzZWYwZmFhYWRlYmEzNTEyM2VkIiwgIm9wZXJhdGlvbiI6ICJ2Y19yZWdpc3RlciIsICJkaWRfYWRkcmVzcyI6ICJkaWQ6aWRpbjphZmI3YmE4OGM3NmVkYmRhNTVjMzQ0YjcwYWUwY2YwNTU2ZDc3MGVjMjU2ODIwZDcxODUwMDBkZTM5NTM5MWI1IiwgIm5vbmNlIjogNX0=",
3
"signature": "MEUCIFSbmMEUcyjSYwq4QOXWZewn+xS/Jih04DRGKwNKlkQnAiEAuH3Es1opQ3LTTYbwyTJylskbaZOl7vSAF9RFp2Qn3TI="
4
}
Copied!