-
Notifications
You must be signed in to change notification settings - Fork 21
feat: wallet model validation #447
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
{ | ||
"@context": ["https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1", "https://w3id.org/security/bbs/v1"], | ||
"@context": ["https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1", "https://w3id.org/security/bbs/v1", "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld", {"description": "https://schema.org/description"}], | ||
"credentialSubject": { | ||
"degree": {"type": "BachelorDegree", "university": "MIT"}, | ||
"degree": {"type": "BachelorDegree", "name": "Bachelor of Science and Arts"}, | ||
"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/1872", | ||
"id": "http://example.edu/credentials/11873", | ||
"issuanceDate": "2010-01-01T19:23:24Z", | ||
"issuer": {"id": "did:example:76e12ec712ebc6f1c221ebfeb1f", "name": "Example University"}, | ||
"name": "University Degree", | ||
"proof": { | ||
"created": "2021-03-29T13:27:36.483097-04:00", | ||
"created": "2022-10-05T16:54:47.420704-04:00", | ||
"proofPurpose": "assertionMethod", | ||
"proofValue": "rw7FeV6K1wimnYogF9qd-N0zmq5QlaIoszg64HciTca-mK_WU4E1jIusKTT6EnN2GZz04NVPBIw4yhc0kTwIZ07etMvfWUlHt_KMoy2CfTw8FBhrf66q4h7Qcqxh_Kxp6yCHyB4A-MmURlKKb8o-4w", | ||
"proofValue": "lQTjwHlvh3kiDMP1SQdMm296-OfRG7V17-sS9NMRDZagp2uFrDpTF3OHWEw2IRYJAoc_9IePn0cVoImZ5wG7_F8VMnLiGQA58n8YCIKSDllf3bkVrMzgnx6X3SDp1C1WaVPhwx-UBbXTIzAjINQoHw", | ||
"type": "BbsBlsSignature2020", | ||
"verificationMethod": "did:key:zUC72c7u4BYVmfYinDceXkNAwzPEyuEE23kUmJDjLy8495KH3pjLwFhae1Fww9qxxRdLnS2VNNwni6W3KbYZKsicDtiNNEp76fYWR6HCD8jAz6ihwmLRjcHH6kB294Xfg1SL1qQ#zUC72c7u4BYVmfYinDceXkNAwzPEyuEE23kUmJDjLy8495KH3pjLwFhae1Fww9qxxRdLnS2VNNwni6W3KbYZKsicDtiNNEp76fYWR6HCD8jAz6ihwmLRjcHH6kB294Xfg1SL1qQ" | ||
}, | ||
"referenceNumber": 83294847, | ||
"referenceId": 83294847, | ||
"type": ["VerifiableCredential", "UniversityDegreeCredential"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
{ | ||
"@context": ["https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1", "https://w3id.org/security/bbs/v1"], | ||
"@context": ["https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1", "https://w3id.org/security/bbs/v1", "https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld", {"description": "https://schema.org/description"}], | ||
"credentialSubject": { | ||
"degree": {"type": "BachelorDegree", "university": "MIT"}, | ||
"degree": {"type": "BachelorDegree", "name": "Bachelor of Science and Arts"}, | ||
"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/1872", | ||
"id": "http://example.edu/credentials/11873", | ||
"issuanceDate": "2010-01-01T19:23:24Z", | ||
"issuer": {"id": "did:example:76e12ec712ebc6f1c221ebfeb1f", "name": "Example University"}, | ||
"name": "University Degree", | ||
"proof": { | ||
"created": "2021-03-29T13:27:36.483097-04:00", | ||
"created": "2022-10-05T16:54:47.420704-04:00", | ||
"proofPurpose": "assertionMethod", | ||
"proofValue": "rw7FeV6K1wimnYogF9qd-N0zmq5QlaIoszg64HciTca-mK_WU4E1jIusKTT6EnN2GZz04NVPBIw4yhc0kTwIZ07etMvfWUlHt_KMoy2CfTw8FBhrf66q4h7Qcqxh_Kxp6yCHyB4A-MmURlKKb8o-4w", | ||
"proofValue": "lQTjwHlvh3kiDMP1SQdMm296-OfRG7V17-sS9NMRDZagp2uFrDpTF3OHWEw2IRYJAoc_9IePn0cVoImZ5wG7_F8VMnLiGQA58n8YCIKSDllf3bkVrMzgnx6X3SDp1C1WaVPhwx-UBbXTIzAjINQoHw", | ||
"type": "BbsBlsSignature2020", | ||
"verificationMethod": "did:key:zUC72c7u4BYVmfYinDceXkNAwzPEyuEE23kUmJDjLy8495KH3pjLwFhae1Fww9qxxRdLnS2VNNwni6W3KbYZKsicDtiNNEp76fYWR6HCD8jAz6ihwmLRjcHH6kB294Xfg1SL1qQ#zUC72c7u4BYVmfYinDceXkNAwzPEyuEE23kUmJDjLy8495KH3pjLwFhae1Fww9qxxRdLnS2VNNwni6W3KbYZKsicDtiNNEp76fYWR6HCD8jAz6ihwmLRjcHH6kB294Xfg1SL1qQ" | ||
}, | ||
"referenceNumber": 83294847, | ||
"referenceId": 83294847, | ||
"type": ["VerifiableCredential", "UniversityDegreeCredential"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 commentThe 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:
|
||
}); | ||
bob = await loadFrameworks({ | ||
name: BOB_LABEL_V2, | ||
mediaTypeProfiles: ["didcomm/v2"], | ||
keyType: "ecdsap256ieee1363", | ||
keyAgreementType: "p256kw", | ||
enableDIDComm: true, | ||
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"] | ||
}); | ||
|
||
aliceDID = await createWalletAndPublicDID(alice, ALICE_LABEL_V2, aliceDID) | ||
|
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.
@sudeshrshetty
network based
==external remote
for document loadingcorrect me if I'm wrong @aholovko