-
Notifications
You must be signed in to change notification settings - Fork 21
Conversation
Codecov ReportBase: 85.30% // Head: 85.30% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #447 +/- ##
=======================================
Coverage 85.30% 85.30%
=======================================
Files 14 14
Lines 1320 1320
=======================================
Hits 1126 1126
Misses 120 120
Partials 74 74 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
6611e30
to
24c96e4
Compare
24c96e4
to
f4aa361
Compare
?? weird, validation was failing before I create this pr with the flag set to true, now it seems to pass ! I have not changed the remaining models that were failing (like the manifest creds files, the context is still empty) |
f4aa361
to
ac190eb
Compare
I had bbs issue signing |
{ | ||
"url": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld", | ||
"documentURL": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld", | ||
"content": { | ||
"@context": { | ||
"@version": 1.1, | ||
|
||
"context": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#context", | ||
"@context": { | ||
"@version": 1.1 | ||
} | ||
}, | ||
"collection": "https://schema.org/collection", | ||
"credentialType": "https://schema.org/credentialType", | ||
"issuer": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#issuer", | ||
"@context": { | ||
"@version": 1.1 | ||
} | ||
}, | ||
"issuerStyle": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#issuerStyle", | ||
"@context": { | ||
"@version": 1.1, | ||
"styles": "https://schema.org/styles" | ||
} | ||
}, | ||
"resolved": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#resolved", | ||
"@container": "@set", | ||
"@context": { | ||
"@version": 1.1, | ||
"descriptor_id": "https://schema.org/descriptor_id", | ||
"properties": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#properties", | ||
"@container": "@set", | ||
"@context": { | ||
"@version": 1.1, | ||
"label": "https://schema.org/label", | ||
"schema": "https://schema.org/schema" | ||
} | ||
}, | ||
"customStyle": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#customStyle", | ||
"@context": { | ||
"@version": 1.1, | ||
"color": "https://schema.org/color", | ||
"alt": "https://schema.org/alt", | ||
"uri": "https://schema.org/uri" | ||
} | ||
}, | ||
"styles": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#styles", | ||
"@context": { | ||
"@version": 1.1, | ||
"background": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#background", | ||
"@type": "customStyle" | ||
}, | ||
"hero": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#hero", | ||
"@type": "customStyle" | ||
}, | ||
"text": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#text", | ||
"@type": "customStyle" | ||
}, | ||
"thumbnail": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#thumbnail", | ||
"@type": "customStyle" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"xsd": "http://www.w3.org/2001/XMLSchema#", | ||
|
||
"expirationDate": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#expirationDate", | ||
"@type": "xsd:date" | ||
}, | ||
"issuanceDate": { | ||
"@id": "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld#issuanceDate", | ||
"@type": "xsd:date" | ||
}, | ||
"title": "https://schema.org/title", | ||
"subtitle": "https://schema.org/subtitle" | ||
} | ||
} | ||
}, | ||
{ | ||
"url": "https://trustbloc.github.io/context/wallet/manifest-mapping-v1.jsonld", | ||
"documentURL": "https://trustbloc.github.io/context/wallet/manifest-mapping-v1.jsonld", | ||
"content": { | ||
"@context": { | ||
"@version": 1.1 | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these custom contexts be hosted in trustbloc/context
package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are already in https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld,
Apparently our external remote document loader is not enabled by default in afgo, this is why the same content is copied into this context provider server we have running as part of the test. cc @aholovko
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Baha-sk you can use network based context loader here, I don't understand why we need to host it locally again if it is published.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Baha-sk you can use network based context loader here, I don't understand why we need to host it locally again if it is published.
@sudeshrshetty network based
== external remote
for document loading
correct me if I'm wrong @aholovko
@@ -35,13 +35,15 @@ before(async function () { | |||
keyType: "ecdsap256ieee1363", | |||
keyAgreementType: "p256kw", | |||
enableDIDComm: true, | |||
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we need it since we are downloading all contexts from network for wallet tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above, we have a context provider hosted on port 10096
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems document compaction relies on doc loader which requires the context to be pre-loaded. cc @aholovko what do you think?
I tried removing this URL variable, errors in the tests I get is:
✗ "before all" hook in "{root}"
Error: agent wasm: code: 6011, message: parse vc : compact JSON-LD document: failed to compact map[string]interface {}{"@context":[]interface {}{"https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1", "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld", map[string]interface {}{"description":"https://schema.org/description"}}, "credentialSchema":[]interface {}{}, "credentialSubject":map[string]interface {}{"degree":map[string]interface {}{"name":"Bachelor of Science and Arts", "type":"BachelorDegree"}, "id":"did:example:ebfeb1f712ebc6f1c276e12ec21", "name":"Jayden Doe", "spouse":"did:example:c276e12ec21ebfeb1f712ebc6f1"}, "description":"University Degree of Mr.John Smith", "expirationDate":"2020-01-01T19:23:24Z", "id":"http://example.edu/credentials/11873", "issuanceDate":"2010-01-01T19:23:24Z", "issuer":map[string]interface {}{"id":"did:example:76e12ec712ebc6f1c221ebfeb1f", "name":"Example University"}, "name":"University Degree", "referenceId":8.3294847e+07, "type":[]interface {}{"VerifiableCredential", "UniversityDegreeCredential"}}
with context map[string]interface {}{"@context":[]interface {}{"https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1", "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld", map[string]interface {}{"description":"https://schema.org/description"}}}
and ldOptions: &ld.JsonLdOptions{Base:"", CompactArrays:true, ExpandContext:interface {}(nil), ProcessingMode:"json-ld-1.1", DocumentLoader:(*ld.DocumentLoader)(0x1717240), Embed:"@last", Explicit:false, RequireAll:true, FrameDefault:false, OmitDefault:false, OmitGraph:false, UseRdfType:false, UseNativeTypes:false, ProduceGeneralizedRdf:true, InputFormat:"", Format:"application/n-quads", Algorithm:"URGNA2012", UseNamespaces:false, OutputForm:""},
error: invalid term definition: a term definition must not contain resolved
for doc: {"@context":["https://www.w3.org/2018/credentials/v1","https://www.w3.org/2018/credentials/examples/v1","https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld",{"description":"https://schema.org/description"}],"credentialSchema":[],"credentialSubject":{"degree":{"name":"Bachelor of Science and Arts","type":"BachelorDegree"},"id":"did:example:ebfeb1f712ebc6f1c276e12ec21","name":"Jayden Doe","spouse":"did:example:c276e12ec21ebfeb1f712ebc6f1"},"description":"University Degree of Mr.John Smith","expirationDate":"2020-01-01T19:23:24Z","id":"http://example.edu/credentials/11873","issuanceDate":"2010-01-01T19:23:24Z","issuer":{"id":"did:example:76e12ec712ebc6f1c221ebfeb1f","name":"Example University"},"name":"University Degree","referenceId":83294847,"type":["VerifiableCredential","UniversityDegreeCredential"]}, externalContext: []string(nil), docLoader: &ld.DocumentLoader{store:(*ld.ContextStoreImpl)(0x17ff300), remoteDocumentLoader:(*ld.DefaultDocumentLoader)(0x140c098)} jsonldDocumentLoader
at dist/commons.js:4:1416
at a.onmessage (dist/commons.js:4:20888)
...
resolved
is properly defined in the context as expected, but the document loader engine can't find it without the specific contextProviderURL.
ac190eb
to
8d37f09
Compare
This change introduces Model validation by updating some of the existing wallet credentials. closes trustbloc#397 Signed-off-by: Baha Shaaban <[email protected]>
8d37f09
to
aa8bd71
Compare
This change introduces Model validation by updating some of the existing wallet credentials.
Closes #397
Signed-off-by: Baha Shaaban [email protected]