-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anchor Credentials / Entries on to the CORD blockchain #249
base: main
Are you sure you want to change the base?
Conversation
@VenuChoudhary001 One request, I see #245 and #246 also open. Can you please keep only the relevant PR open and close other things? That way, it is easier for the maintainers to look at only one PR. @coolbung @tejash-jl would like some eyes and feedback on this, so PR can be taken to a conclusion. Happy to provide more information, or take up the work on this if more is pending according to you. @Vikastc FYI @ gamemaker1 (adding you as a reference as you contributed last time) (not adding him yet as the handle shows as busy) |
@amarts I have closed the #246. In this #249 itself all the changes are present, should i close #245 as well? |
@srprasanna @surendrasinghs some review comments on this would help to take it to next level. |
Signed-off-by: vikastc <[email protected]>
chore: Updated issuance of schema and VC to Cord v3 specifications
Signed-off-by: vikastc <[email protected]>
Signed-off-by: vikastc <[email protected]>
Signed-off-by: vikastc <[email protected]>
Signed-off-by: vikastc <[email protected]>
fix: Naming convention change to camelCase
C4GT 2023 | CORD NETWORK
Issue Link
Integrate APIs to create credentials, or entries on to this registry
How It Works
api/v1/{entityName}
api/v1/Schema
is hit, the schema is created and anchored to the chain. Refer this PR for schema and registry anchoring.The major changes are done in these files :
In the
RegistryHelper.java
, I have created a private functionand a public function
anchorCredentialsToCord()
, which internally calls the above function to anchor credentials.anchorCredentialsToCord()
is used for the following :a. Getting the schemaId and registryId of the anchored schema
b. In order to get the schemaId and registryId, this function calls the predefined
searchEntity()
function which is used by the/api/v1/{entityName}/search
endpoint internally, to get schema details.c. We are making this call, to get back the schemaId and registryId we received when we anchored the schema to chain.At that moment, we also anchored these values to the schema.
The response from the search schema api -
api/v1/Schema/search
looks like :d. After extracting the schemaId and registryId, we create a json structure to send to the credentials api, in the
appendCredentialsToCord()
functionHelper functions