Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

feat: wallet model validation #447

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions cmd/agent-js-worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func getAriesHandlers(ctx *context.Provider, r controllercmd.MessageHandler,
EDVBatchEndpointExtensionEnabled: true,
WebKMSGNAPSigner: headerFunc,
EDVGNAPSigner: headerFunc,
ValidateDataModel: opts.ValidateDataModel,
}))
if err != nil {
return nil, err
Expand Down
3 changes: 3 additions & 0 deletions cmd/wallet-js-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Wallet JavaScript SDK for user agent wallet operations.

Refer this [documentation](docs/wallet_sdk.md) to learn more about wallet SDK.

# Pre requisite

In order to successfully run tests in this wallet package, you must first build and install [agent-js-workder](../agent-js-worker/README.md).

# Build it

Expand Down
2 changes: 1 addition & 1 deletion cmd/wallet-js-sdk/src/collection/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

const JSONLD_CTX_COLLECTION = [
"https://w3id.org/wallet/v1",
"https://trustbloc.github.io/context/wallet/collections-v1.jsonld",
"https://trustbloc.github.io/context/wallet/manifest-mapping-v1.jsonld"
];
const DEF_COLLECTION_TYPE = "Vault";

Expand Down
4 changes: 2 additions & 2 deletions cmd/wallet-js-sdk/src/credential/credential-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import jp from "jsonpath";

const JSONLD_CTX_BLINDED_ROUTING_MANIFEST_MAPPING = [
"https://w3id.org/wallet/v1",
"https://trustbloc.github.io/context/wallet/manifest-mapping-v1.jsonld",
"https://trustbloc.github.io/context/wallet/manifest-mapping-v1.jsonld"
];

const JSONLD_CREDENTIAL_METADATA_MODEL = [
"https://w3id.org/wallet/v1",
"https://www.w3.org/2018/credentials/v1",
"https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld",
"https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld"
];

const MANIFEST_MAPPING_METADATA_TYPE = "ManifestMapping";
Expand Down
1 change: 1 addition & 0 deletions cmd/wallet-js-sdk/test/fixtures/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ mediatorWSEndPoint = ws://localhost:10092
did-anchor-origin = https://testnet.orb.local
bloc-domain = https://testnet.orb.local
context-provider-url[] = http://localhost:10096/agent-startup-contexts.json
validate-data-model = true
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,106 @@

}
}
},
{
"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
}
}
}
Comment on lines +313 to 413
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

@baha-ai baha-ai Oct 17, 2022

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

]
}
3 changes: 2 additions & 1 deletion cmd/wallet-js-sdk/test/fixtures/testdata/prc-vc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/citizenship/v1"
"https://w3id.org/citizenship/v1",
"https://trustbloc.github.io/context/wallet/credential-metadata-v1.jsonld"
],
"id": "https://issuer.oidp.uscis.gov/credentials/83627465",
"type": [
Expand Down
14 changes: 8 additions & 6 deletions cmd/wallet-js-sdk/test/fixtures/testdata/udc-bbs-vc.json
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"]
}
14 changes: 8 additions & 6 deletions cmd/wallet-js-sdk/test/fixtures/testdata/udc-frame.json
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"]
}
8 changes: 5 additions & 3 deletions cmd/wallet-js-sdk/test/fixtures/testdata/udc-vc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/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": {
"type": "BachelorDegree",
"university": "MIT"
"name": "Bachelor of Science and Arts"
},
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"name": "Jayden Doe",
Expand All @@ -23,7 +25,7 @@
"id": "did:example:76e12ec712ebc6f1c221ebfeb1f",
"name": "Example University"
},
"referenceNumber": 83294847,
"referenceId": 83294847,
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ before(async function () {
walletUserAgent = await loadFrameworks({
name: WALLET_USER,
enableDIDComm: true,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
});

// load sample VCs from testdata.
Expand Down
2 changes: 2 additions & 0 deletions cmd/wallet-js-sdk/test/specs/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export async function loadFrameworks({
keyType = "ed25519",
keyAgreementType = "p256kw",
enableDIDComm = false,
contextProviderURL = []
} = {}) {
let agentOpts = JSON.parse(JSON.stringify(agentStartupOpts));
agentOpts["indexed-db-namespace"] = `${name}db`;
Expand All @@ -61,6 +62,7 @@ export async function loadFrameworks({
agentOpts["key-type"] = keyType;
agentOpts["key-agreement-type"] = keyAgreementType;
agentOpts["enableDIDComm"] = enableDIDComm;
agentOpts["context-provider-url"] = contextProviderURL;

if (logLevel) {
agentOpts["log-level"] = logLevel;
Expand Down
2 changes: 2 additions & 0 deletions cmd/wallet-js-sdk/test/specs/didcomm/connect.v1.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ before(async function () {
name: ALICE_LABEL,
mediaTypeProfiles: ["didcomm/aip2;env=rfc19"],
enableDIDComm: true,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
});
bob = await loadFrameworks({
name: BOB_LABEL,
mediaTypeProfiles: ["didcomm/aip2;env=rfc19"],
enableDIDComm: true,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
});
});

Expand Down
2 changes: 2 additions & 0 deletions cmd/wallet-js-sdk/test/specs/didcomm/connect.v2.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ before(async function () {
keyType: "ecdsap256ieee1363",
keyAgreementType: "p256kw",
enableDIDComm: true,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
Copy link
Member

@sudeshrshetty sudeshrshetty Oct 7, 2022

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

Copy link
Contributor Author

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

Copy link
Contributor Author

@baha-ai baha-ai Oct 11, 2022

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.

});
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)
Expand Down
1 change: 1 addition & 0 deletions cmd/wallet-js-sdk/test/specs/didcomm/didcomm.v1.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ before(async function () {
walletUserAgent = await loadFrameworks({
name: WALLET_WACI_USER,
enableDIDComm: true,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
});

// issuer agent
Expand Down
1 change: 1 addition & 0 deletions cmd/wallet-js-sdk/test/specs/didcomm/didcomm.v2.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ before(async function () {
keyType: KEY_TYPE,
keyAgreementType: KEY_AGREEMENT_TYPE,
enableDIDComm: true,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
});

// issuer agent
Expand Down
6 changes: 5 additions & 1 deletion cmd/wallet-js-sdk/test/specs/didmanager/didmanager.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ const signatureType = 'Ed25519VerificationKey2018'
let rick

before(async function () {
rick = await loadFrameworks({ name: RICK_USER, enableDIDComm: true });
rick = await loadFrameworks({
name: RICK_USER,
enableDIDComm: true,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
});
});

after(function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ before(async function () {
walletAgent = await loadFrameworks({
name: WALLET_USER,
enableDIDComm: true,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
});
await connectToMediator(walletAgent, testConfig.mediatorEndPoint);
let conns = await getMediatorConnections(walletAgent);
Expand Down
5 changes: 4 additions & 1 deletion cmd/wallet-js-sdk/test/specs/universal/vcwallet.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ let walletAgent, rp, sampleMetadata;


before(async function () {
walletAgent = await loadFrameworks({ name: WALLET_USER });
walletAgent = await loadFrameworks({
name: WALLET_USER,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
});

rp = new VerifierAdapter(RELYING_PARTY);
await rp.init();
Expand Down
6 changes: 5 additions & 1 deletion cmd/wallet-js-sdk/test/specs/user/wallet-user.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ const JOHN_USER = "john-agent";
let john;

before(async function () {
john = await loadFrameworks({ name: JOHN_USER, enableDIDComm: true });
john = await loadFrameworks({
name: JOHN_USER,
enableDIDComm: true,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
});
});

after(function () {
Expand Down
1 change: 1 addition & 0 deletions cmd/wallet-js-sdk/test/specs/util/helper.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ before(async function () {
walletUserAgent = await loadFrameworks({
name: WALLET_USER,
enableDIDComm: true,
contextProviderURL: ["http://localhost:10096/agent-startup-contexts.json"]
});

issuer = new IssuerAdapter(VC_ISSUER);
Expand Down
1 change: 1 addition & 0 deletions pkg/agentsetup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ type AgentStartOpts struct {
GNAPSigningJWK string `json:"gnap-signing-jwk"`
GNAPAccessToken string `json:"gnap-access-token"`
GNAPUserSubject string `json:"gnap-user-subject"`
ValidateDataModel bool `json:"validate-data-model"`
}

type UserConfig struct {
Expand Down