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

Merging develop to main for v0.3.0 upgrade #395

Merged
merged 17 commits into from
Oct 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add LinkedDomains Context
Pratap2018 committed Oct 3, 2024
commit 34ecbf80a01ba314de0f972aea239fee539e7d65
20 changes: 20 additions & 0 deletions x/ssi/ld-context/context.go
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ const CredentialStatusContext string = "https://raw.githubusercontent.com/hypers
const CredentialSchemaContext string = "https://raw.githubusercontent.com/hypersign-protocol/hypersign-contexts/main/CredentialSchema.jsonld"
const BabyJubJubKey2021Context string = "https://raw.githubusercontent.com/hypersign-protocol/hypersign-contexts/main/BabyJubJubKey2021.jsonld"
const BJJSignature2021Context string = "https://raw.githubusercontent.com/hypersign-protocol/hypersign-contexts/main/BJJSignature2021.jsonld"
const LinkedDomainsContext string = "https://raw.githubusercontent.com/hypersign-protocol/hypersign-contexts/main/LinkedDomains.jsonld"

// As hid-node is not supposed to perform any GET request, the complete Context body of their
// respective Context urls has been maintained below.
@@ -842,4 +843,23 @@ var ContextUrlMap map[string]contextObject = map[string]contextObject{
},
},
},
LinkedDomainsContext: {

"@protected": true,
"id": "@id",
"type": "@type",
"LinkedDomains": map[string]interface{}{
"@id": "https://www.w3.org/ns/did#LinkedDomains",
"@type": "@id",
"@context": map[string]interface{}{
"@protected": true,
"id": "@id",
"type": "@type",
"serviceEndpoint": map[string]interface{}{
"@id": "https://www.w3.org/ns/did#serviceEndpoint",
"@type": "@id",
},
},
},
},
}

Unchanged files with check annotations Beta

err := bankKeeper.SendCoinsFromAccountToModule(ctx, acc.GetAddress(), types.FeeCollectorName, fees)
if err != nil {
return errors.Wrapf(sdkerrors.ErrInsufficientFunds, err.Error())

Check failure on line 208 in x/ssi/ante/decorators.go

GitHub Actions / Golang Lint

printf: non-constant format string in call to cosmossdk.io/errors.Wrapf (govet)
}
return nil
issuanceDate := msgCredStatus.GetIssuanceDate()
issuanceDateParsed, err := time.Parse(time.RFC3339, issuanceDate)
if err != nil {
return nil, errors.Wrapf(types.ErrInvalidDate, fmt.Sprintf("invalid issuance date format: %s", issuanceDate))

Check failure on line 54 in x/ssi/keeper/msg_server_create_credential.go

GitHub Actions / Golang Lint

printf: non-constant format string in call to cosmossdk.io/errors.Wrapf (govet)
}
// Check if the created date before issuance date
// Validate Merkle Root Hash
if err := verifyCredentialMerkleRootHash(msgCredStatus.GetCredentialMerkleRootHash()); err != nil {
return nil, errors.Wrapf(types.ErrInvalidCredentialMerkleRootHash, err.Error())

Check failure on line 68 in x/ssi/keeper/msg_server_create_credential.go

GitHub Actions / Golang Lint

printf: non-constant format string in call to cosmossdk.io/errors.Wrapf (govet)
}
// Validate Document Proof