Skip to content
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

fixed JSON-LD canonization; added client proto package to define governed constants for external clients #376

Merged
merged 20 commits into from
Nov 9, 2023

Conversation

arnabghose997
Copy link
Contributor

@arnabghose997 arnabghose997 commented Oct 31, 2023

JSON-LD canonization fix

The initial assumption of JSON-LD canonization was to only canonize the document (without proof attribute), hash the canonized string and sing it. However, the actual process involves canonizing proof attribute as well. The detailed flow can be referred here

client proto package.

Addresses: #375

The protocol supports selected Verification Method and Proof Types. In order to dictate these terms to external clients, such as SDK written is TS or any other language, client proto package was created to export enums for all the supported types. Refer the directory proto/ssi/client/enums.proto

…ce with EdDsaCryptoSuite2020 W3C specification; this includes canonizing the document using RDF dataset normalization and expecting publicKeyMutibase of verification method type Ed25519VerificationKey2020 to carry a 2-byte prefix as described in the said specification
…LD struct. This issue was solved by converting the jsonLd struct to an interface{} object and fed to the normalize function
	- SSI proto package name has been renamed from hypersignprotocol.hidnode.ssi to hypersign.ssi.v1

	- Client Spec has been reduced to an enum type. ADR036Signer address is infered from the blockchainAccountId

	- A common Proof message is introduced for DID, Credential Schema and Credential Status documents. It also replaces the existing Schema Proof, Credential Status Proof and DID SignInfo messages. Proof message is only stored on-chain for Credential Schema and Credential Status

	- Credential Status message has been revamped by eliminating statuses such as Live and Expired. Only Revocation and Suspension is tracked. Claim message has been discarded, making fields such as id, remarks part of the main Credential Status message. The attribute credentialHash has been renamed to merkleRootHash to indicate that the Hash represents the Merkle Root Hash of the VC

	- CreateDID RPC has been renamed to RegisterDID. Updates of any CredentialStatus document will done through a seperate RPC: UpdateCredentialStatus. Updates of any CredentialStatus document will done through a seperate RPC: UpdateCredentialSchema.

	- json_name proto tag has been added to context attribute of DidDocument to support @context field in generated TS client

	- protocgen-ts.sh script has been added to generate TS client files. This approach provides more flexibility in terms of generation options compared to using ignite CLI tool
…happens when incoming vc status document has changes
…eplaced by setDidDocumentInStore since both methods had similar interaction with store, with the exception that in case of latter the did doc count was incremented by 1, which is seperated in a different method
… added context for X25519KeyAgreementKeyEIP5630 type
@arnabghose997 arnabghose997 marked this pull request as ready for review November 8, 2023 08:44
@arnabghose997 arnabghose997 merged commit ad004f4 into develop Nov 9, 2023
2 checks passed
@arnabghose997 arnabghose997 deleted the ld-json-fix branch November 9, 2023 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant