@nuggetslife/vc 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/interop-allowlist.json +3 -0
- package/interop-smoke-allowlist.json +3 -0
- package/package.json +8 -7
- package/src/jsonld.rs +2 -1
- package/src/ld_signatures.rs +11 -2
- package/test-fixtures/interop/README.md +46 -0
- package/test-fixtures/interop/_contexts/README.md +51 -0
- package/test-fixtures/interop/_contexts/bbs-bound-v1.jsonld +92 -0
- package/test-fixtures/interop/_contexts/citizenship-v1.jsonld +58 -0
- package/test-fixtures/interop/_contexts/credentials-v1.jsonld +316 -0
- package/test-fixtures/interop/_contexts/elm-edc-ap.jsonld +809 -0
- package/test-fixtures/interop/_contexts/essif-schemas-vc-2020-v1.jsonld +47 -0
- package/test-fixtures/interop/_contexts/identity-v2.jsonld +195 -0
- package/test-fixtures/interop/_contexts/nuggets-identity-v1.jsonld +175 -0
- package/test-fixtures/interop/_contexts/nuggets-kyb-v1.jsonld +333 -0
- package/test-fixtures/interop/_contexts/openbadges-v3.jsonld +445 -0
- package/test-fixtures/interop/_contexts/security-bbs-v1.jsonld +93 -0
- package/test-fixtures/interop/ebsi/diploma-elm/README.md +29 -0
- package/test-fixtures/interop/ebsi/diploma-elm/expected.nq +70 -0
- package/test-fixtures/interop/ebsi/diploma-elm/frame.jsonld +24 -0
- package/test-fixtures/interop/ebsi/diploma-elm/input.jsonld +444 -0
- package/test-fixtures/interop/ebsi/diploma-simple/README.md +19 -0
- package/test-fixtures/interop/ebsi/diploma-simple/expected.nq +9 -0
- package/test-fixtures/interop/ebsi/diploma-simple/frame.jsonld +13 -0
- package/test-fixtures/interop/ebsi/diploma-simple/input.jsonld +24 -0
- package/test-fixtures/interop/idv2/full-disclosure/README.md +9 -0
- package/test-fixtures/interop/idv2/full-disclosure/expected.nq +59 -0
- package/test-fixtures/interop/idv2/full-disclosure/frame.jsonld +9 -0
- package/test-fixtures/interop/idv2/full-disclosure/input.jsonld +82 -0
- package/test-fixtures/interop/nuggets/identity-v1/README.md +17 -0
- package/test-fixtures/interop/nuggets/identity-v1/expected.nq +21 -0
- package/test-fixtures/interop/nuggets/identity-v1/frame.jsonld +17 -0
- package/test-fixtures/interop/nuggets/identity-v1/input.jsonld +31 -0
- package/test-fixtures/interop/nuggets/kyb-v1/README.md +15 -0
- package/test-fixtures/interop/nuggets/kyb-v1/expected.nq +18 -0
- package/test-fixtures/interop/nuggets/kyb-v1/frame.jsonld +24 -0
- package/test-fixtures/interop/nuggets/kyb-v1/input.jsonld +60 -0
- package/test-fixtures/interop/openbadges-v3/basic-achievement/README.md +17 -0
- package/test-fixtures/interop/openbadges-v3/basic-achievement/expected.nq +12 -0
- package/test-fixtures/interop/openbadges-v3/basic-achievement/frame.jsonld +17 -0
- package/test-fixtures/interop/openbadges-v3/basic-achievement/input.jsonld +25 -0
- package/test-fixtures/interop/openbadges-v3/with-allowed-values/README.md +11 -0
- package/test-fixtures/interop/openbadges-v3/with-allowed-values/expected.nq +25 -0
- package/test-fixtures/interop/openbadges-v3/with-allowed-values/frame.jsonld +22 -0
- package/test-fixtures/interop/openbadges-v3/with-allowed-values/input.jsonld +40 -0
- package/test-fixtures/interop/vp/single-vc-wrap/README.md +6 -0
- package/test-fixtures/interop/vp/single-vc-wrap/expected.nq +7 -0
- package/test-fixtures/interop/vp/single-vc-wrap/frame.jsonld +17 -0
- package/test-fixtures/interop/vp/single-vc-wrap/input.jsonld +27 -0
- package/test-fixtures/interop/w3c-vc-v1/permanent-resident-card/README.md +5 -0
- package/test-fixtures/interop/w3c-vc-v1/permanent-resident-card/expected.nq +13 -0
- package/test-fixtures/interop/w3c-vc-v1/permanent-resident-card/frame.jsonld +14 -0
- package/test-fixtures/interop/w3c-vc-v1/permanent-resident-card/input.jsonld +29 -0
- package/test_interop.mjs +184 -0
- package/test_interop_smoke.mjs +388 -0
- package/tools/regen_expected.mjs +108 -0
- package/w3c-baseline.json +27 -30
- package/w3c-denylist.json +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuggetslife/vc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"napi": {
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"@mattrglobal/jsonld-signatures-bbs": "^1.2.0",
|
|
23
23
|
"@napi-rs/cli": "^2.18.3",
|
|
24
24
|
"@types/node": "^20.14.9",
|
|
25
|
-
"jsonld": "^8.3.3"
|
|
25
|
+
"jsonld": "^8.3.3",
|
|
26
|
+
"jsonld-signatures": "^7.0.0"
|
|
26
27
|
},
|
|
27
28
|
"engines": {
|
|
28
29
|
"node": ">= 10"
|
|
@@ -41,11 +42,11 @@
|
|
|
41
42
|
},
|
|
42
43
|
"packageManager": "yarn@4.3.1",
|
|
43
44
|
"optionalDependencies": {
|
|
44
|
-
"@nuggetslife/vc-darwin-arm64": "0.
|
|
45
|
-
"@nuggetslife/vc-linux-arm64-gnu": "0.
|
|
46
|
-
"@nuggetslife/vc-linux-arm64-musl": "0.
|
|
47
|
-
"@nuggetslife/vc-linux-x64-gnu": "0.
|
|
48
|
-
"@nuggetslife/vc-linux-x64-musl": "0.
|
|
45
|
+
"@nuggetslife/vc-darwin-arm64": "0.2.0",
|
|
46
|
+
"@nuggetslife/vc-linux-arm64-gnu": "0.2.0",
|
|
47
|
+
"@nuggetslife/vc-linux-arm64-musl": "0.2.0",
|
|
48
|
+
"@nuggetslife/vc-linux-x64-gnu": "0.2.0",
|
|
49
|
+
"@nuggetslife/vc-linux-x64-musl": "0.2.0"
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {}
|
|
51
52
|
}
|
package/src/jsonld.rs
CHANGED
|
@@ -151,8 +151,9 @@ impl JsonLd {
|
|
|
151
151
|
// retired in this commit.
|
|
152
152
|
let loader = self.loader.clone();
|
|
153
153
|
let cr = self.cr.clone();
|
|
154
|
+
let additional = self.additional_contexts();
|
|
154
155
|
let join = tokio::task::spawn_blocking(move || {
|
|
155
|
-
vc::jsonld_v2::frame_native_sync(input, frame, loader, cr, opts)
|
|
156
|
+
vc::jsonld_v2::frame_native_sync(input, frame, loader, cr, opts, &additional)
|
|
156
157
|
.map_err(|e| napi::Error::from_reason(format!("frame (native) failed: {e}")))
|
|
157
158
|
});
|
|
158
159
|
join
|
package/src/ld_signatures.rs
CHANGED
|
@@ -28,18 +28,27 @@ use vc::{
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
/// Create a DocumentLoader with nuggets contexts plus additional caller-provided contexts.
|
|
31
|
+
///
|
|
32
|
+
/// Extras are layered into the V1 context map AND retained separately so
|
|
33
|
+
/// the V2 dispatch chain (canonize_dispatch) can hand them to its own
|
|
34
|
+
/// build_loader. See clientffi#69 / PR #59.
|
|
31
35
|
pub(crate) fn create_document_loader(
|
|
32
36
|
additional_contexts: HashMap<String, Value>,
|
|
33
37
|
) -> (Arc<DocumentLoader>, Arc<ContextResolver>) {
|
|
34
38
|
let mut ctx = load_nuggets_context();
|
|
35
|
-
ctx.extend(additional_contexts);
|
|
39
|
+
ctx.extend(additional_contexts.clone());
|
|
36
40
|
|
|
37
41
|
let resolver = Arc::new(tokio::sync::RwLock::new(Resolver::new(
|
|
38
42
|
ResolverRegistry::new(),
|
|
39
43
|
None,
|
|
40
44
|
)));
|
|
41
45
|
let opts = DidResolutionOptions::default();
|
|
42
|
-
let loader = Arc::new(DocumentLoader::
|
|
46
|
+
let loader = Arc::new(DocumentLoader::with_additional_contexts(
|
|
47
|
+
ctx,
|
|
48
|
+
additional_contexts,
|
|
49
|
+
resolver,
|
|
50
|
+
opts,
|
|
51
|
+
));
|
|
43
52
|
let cr = Arc::new(ContextResolver::new(LruCache::new(
|
|
44
53
|
NonZeroUsize::new(10).unwrap(),
|
|
45
54
|
)));
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Cross-stack BBS+ interop fixtures
|
|
2
|
+
|
|
3
|
+
Fixtures for `vc/js/test_interop.mjs` — the cross-stack interop harness comparing V2 native (Rust `json-ld@0.21.4`) against `jsonld.js@^8.3.3` (the de facto third-party reference). Each fixture is a per-VC-schema test case in the form `<family>/<name>/`.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
test-fixtures/interop/
|
|
9
|
+
├── _contexts/ # bundled JSON-LD contexts (see _contexts/README.md)
|
|
10
|
+
├── <family>/<name>/
|
|
11
|
+
│ ├── input.jsonld # the VC document
|
|
12
|
+
│ ├── frame.jsonld # BBS+-style reveal frame
|
|
13
|
+
│ ├── expected.nq # canonized N-Quads from jsonld.js (committed; ground truth)
|
|
14
|
+
│ └── README.md # provenance + what this fixture tests
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`_<dir>` (underscore-prefixed) directories are excluded from fixture discovery.
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
**Adding a new fixture:**
|
|
22
|
+
|
|
23
|
+
1. Create `<family>/<name>/` with `input.jsonld`, `frame.jsonld`, and a brief `README.md` describing provenance.
|
|
24
|
+
2. If the input references a context not yet in `_contexts/`, add it (see `_contexts/README.md`).
|
|
25
|
+
3. Generate ground truth: `cd vc/js && node tools/regen_expected.mjs test-fixtures/interop/<family>/<name>`.
|
|
26
|
+
4. Run the harness: `node test_interop.mjs --check` — if `pass`, commit; if `fail`, see "When the harness fails" below.
|
|
27
|
+
|
|
28
|
+
**Regenerating after upstream context updates:** `node tools/regen_expected.mjs --all` from `vc/js/`. Re-run `--check` afterwards.
|
|
29
|
+
|
|
30
|
+
## When the harness fails
|
|
31
|
+
|
|
32
|
+
Three modes:
|
|
33
|
+
|
|
34
|
+
- **Regression** (a previously-passing fixture fails): a real V2 native bug. Investigate via `node test_interop.mjs --report` to see the unified diff. Fix in `vc/rs/src/jsonld_v2/frame_native.rs` (or wherever the divergence originates).
|
|
35
|
+
- **Expected fail** (fixture is in `interop-allowlist.json`): no action; the gap is tracked. The reason field + linked GitHub issue document next steps.
|
|
36
|
+
- **Improvement** (an allowlisted fixture starts passing): the harness exits 1 with a "newly passing — please ratchet" message. Remove the allowlist entry and close the linked GitHub issue.
|
|
37
|
+
|
|
38
|
+
The harness gates `vc-publish` via the `vc-interop-conformance` CI job, so a regression blocks release.
|
|
39
|
+
|
|
40
|
+
## Related files
|
|
41
|
+
|
|
42
|
+
- `vc/js/test_interop.mjs` — the harness (`--check`, `--report`)
|
|
43
|
+
- `vc/js/tools/regen_expected.mjs` — ground-truth generator (jsonld.js + URDNA2015, offline document loader)
|
|
44
|
+
- `vc/js/interop-allowlist.json` — `expect_fail` ratchet
|
|
45
|
+
- `vc/js/test-fixtures/interop/_contexts/README.md` — bundled context conventions + Rust sync targets
|
|
46
|
+
- `docs/plans/2026-05-05-sprint-4-phase-a.md` — Phase A implementation plan
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Interop fixture contexts
|
|
2
|
+
|
|
3
|
+
Bundled JSON-LD contexts for the cross-stack interop test harness (`vc/js/test_interop.mjs`) and its ground-truth generator (`vc/js/tools/regen_expected.mjs`).
|
|
4
|
+
|
|
5
|
+
## Convention
|
|
6
|
+
|
|
7
|
+
Each `<name>.jsonld` here is loaded by the harness's offline document loader and indexed by its embedded `__url__` marker. Shape:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"__url__": "<the URL the input.jsonld references>",
|
|
12
|
+
"@context": <verbatim copy of the upstream context body>
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The harness deletes `__url__` after reading and exposes the rest to JsonLd as a context document.
|
|
17
|
+
|
|
18
|
+
Files starting with `_` (this `README.md`, etc.) are not loaded — only `*.jsonld` and `*.json` siblings.
|
|
19
|
+
|
|
20
|
+
## Sync targets
|
|
21
|
+
|
|
22
|
+
Each bundle here is a hand-copy of a context body. Most mirror a constant in the Rust codebase ("Rust-mirror" bundles); a few mirror an external spec that Nuggets does not issue ("spec-sourced" bundles, e.g. OpenBadges v3 added in Sprint 4 Phase B for cross-stack interop coverage). **When the canonical source updates, this bundle must be updated in lockstep** — otherwise cross-stack interop silently drifts and the harness will start producing false confidence in jsonld.js parity. There is no automated drift check today; this README is the audit trail.
|
|
23
|
+
|
|
24
|
+
| bundle file | URL | Source |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `credentials-v1.jsonld` | `https://www.w3.org/2018/credentials/v1` | Rust-mirror: `vc/rs/src/jsonld/signatures/bbs/data/sample_data.rs::CREDENTIALS_CONTEXT` |
|
|
27
|
+
| `citizenship-v1.jsonld` | `https://w3id.org/citizenship/v1` | Rust-mirror: `vc/rs/src/jsonld/signatures/bbs/data/sample_data.rs::CITIZEN_VOCAB` |
|
|
28
|
+
| `security-bbs-v1.jsonld` | `https://w3id.org/security/bbs/v1` | Rust-mirror: `vc/rs/src/jsonld/signatures/bbs/data/sample_data.rs::BBS` |
|
|
29
|
+
| `identity-v2.jsonld` | `https://schemas.nuggets.life/identityV2.json` | Rust-mirror: `vc/rs/src/document_loader/context/identity_v2.rs::IDENTITY_V2` |
|
|
30
|
+
| `bbs-bound-v1.jsonld` | `https://schemas.nuggets.life/bbsBoundv1.json` | Rust-mirror: `vc/rs/src/document_loader/context/bbs_bound_v1.rs::BBS_BOUND_V1` |
|
|
31
|
+
| `nuggets-identity-v1.jsonld` | `https://schemas.nuggets.life/identity.json` | Rust-mirror: `vc/rs/src/document_loader/context/identity.rs::IDENTITY` |
|
|
32
|
+
| `nuggets-kyb-v1.jsonld` | `https://schemas.nuggets.life/kybV1.json` | Rust-mirror: `vc/rs/src/document_loader/context/kyb.rs::KYB_V1` |
|
|
33
|
+
| `openbadges-v3.jsonld` | `https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json` | Spec-sourced (no Rust mirror): IMS Global OpenBadges v3.0.3 context, retrieved 2026-05-06 from the canonical PURL above. The `https://w3id.org/openbadges/v3` alias currently 302s to a 404 (`https://openbadgespec.org/v3`), so OB v3 fixtures cite the IMS PURL directly. |
|
|
34
|
+
| `essif-schemas-vc-2020-v1.jsonld` | `https://essif.europa.eu/schemas/vc/2020/v1` | Spec-sourced (no Rust mirror): EBSI/ESSIF schemas v1 context as distributed by the EBSI4Austria pilot at `https://github.com/danubetech/ebsi4austria-examples/blob/main/context/essif-schemas-vc-2020-v1.jsonld`, retrieved 2026-05-06. Used by `ebsi/diploma-simple`. |
|
|
35
|
+
| `elm-edc-ap.jsonld` | `http://data.europa.eu/snb/model/context/edc-ap` | Spec-sourced (no Rust mirror): European Learning Model v3 EDC-AP context, retrieved 2026-05-06 from `https://github.com/european-commission-empl/European-Learning-Model/blob/master/rdf/ap/edc/edc-ap-context.jsonld`. The canonical `data.europa.eu` URL currently sits behind an Azure WAF JS challenge (cannot be fetched cleanly with curl/WebFetch); the European Commission's official ELM repo is the verbatim source. Used by `ebsi/diploma-elm`. |
|
|
36
|
+
|
|
37
|
+
### Bundle classes
|
|
38
|
+
|
|
39
|
+
- **Rust-mirror** — the upstream-of-record is a Rust constant in this repo. The bundle is a verbatim copy and must be re-synced when the Rust source changes.
|
|
40
|
+
- **Spec-sourced** — the upstream-of-record is an external spec (e.g. OpenBadges v3). Nuggets does not issue these credentials; the bundle exists purely to feed cross-stack interop fixtures. Re-sync when the spec publishes a new revision.
|
|
41
|
+
|
|
42
|
+
## Adding a new context
|
|
43
|
+
|
|
44
|
+
When a new fixture references a context not yet bundled here:
|
|
45
|
+
|
|
46
|
+
1. **Rust-mirror case** — find the canonical body in the Rust codebase (search `vc/rs/src/document_loader/` and `vc/rs/src/jsonld/signatures/bbs/data/`). **Don't network-fetch.**
|
|
47
|
+
**Spec-sourced case** — fetch the canonical context from the spec's PURL/URL with `curl -sL` and save the body verbatim.
|
|
48
|
+
2. Create `_contexts/<short-name>.jsonld` with `{ "__url__": "<URL>", "@context": <body> }`.
|
|
49
|
+
3. Verify the body is byte-equal to the source (Rust constant or fetched spec body).
|
|
50
|
+
4. Add a row to the table above naming the source (Rust path + constant for mirrors; spec name + retrieval date for spec-sourced).
|
|
51
|
+
5. Re-run `node tools/regen_expected.mjs --all` so all `expected.nq` files account for the new context.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"__url__": "https://schemas.nuggets.life/bbsBoundv1.json",
|
|
3
|
+
"@context": {
|
|
4
|
+
"@version": 1.1,
|
|
5
|
+
"id": "@id",
|
|
6
|
+
"type": "@type",
|
|
7
|
+
"BbsBlsHolderBoundSignature2022": {
|
|
8
|
+
"@id": "https://w3id.org/security#BbsBlsHolderBoundSignature2022",
|
|
9
|
+
"@context": {
|
|
10
|
+
"@version": 1.1,
|
|
11
|
+
"@protected": true,
|
|
12
|
+
"id": "@id",
|
|
13
|
+
"type": "@type",
|
|
14
|
+
"challenge": "https://w3id.org/security#challenge",
|
|
15
|
+
"created": {
|
|
16
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
17
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
18
|
+
},
|
|
19
|
+
"domain": "https://w3id.org/security#domain",
|
|
20
|
+
"proofValue": "https://w3id.org/security#proofValue",
|
|
21
|
+
"nonce": "https://w3id.org/security#nonce",
|
|
22
|
+
"proofPurpose": {
|
|
23
|
+
"@id": "https://w3id.org/security#proofPurpose",
|
|
24
|
+
"@type": "@vocab",
|
|
25
|
+
"@context": {
|
|
26
|
+
"@version": 1.1,
|
|
27
|
+
"@protected": true,
|
|
28
|
+
"id": "@id",
|
|
29
|
+
"type": "@type",
|
|
30
|
+
"assertionMethod": {
|
|
31
|
+
"@id": "https://w3id.org/security#assertionMethod",
|
|
32
|
+
"@type": "@id",
|
|
33
|
+
"@container": "@set"
|
|
34
|
+
},
|
|
35
|
+
"authentication": {
|
|
36
|
+
"@id": "https://w3id.org/security#authenticationMethod",
|
|
37
|
+
"@type": "@id",
|
|
38
|
+
"@container": "@set"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"verificationMethod": {
|
|
43
|
+
"@id": "https://w3id.org/security#verificationMethod",
|
|
44
|
+
"@type": "@id"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"BbsBlsHolderBoundSignatureProof2022": {
|
|
49
|
+
"@id": "https://w3id.org/security#BbsBlsHolderBoundSignatureProof2022",
|
|
50
|
+
"@context": {
|
|
51
|
+
"@version": 1.1,
|
|
52
|
+
"@protected": true,
|
|
53
|
+
"id": "@id",
|
|
54
|
+
"type": "@type",
|
|
55
|
+
"challenge": "https://w3id.org/security#challenge",
|
|
56
|
+
"created": {
|
|
57
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
58
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
59
|
+
},
|
|
60
|
+
"domain": "https://w3id.org/security#domain",
|
|
61
|
+
"nonce": "https://w3id.org/security#nonce",
|
|
62
|
+
"proofPurpose": {
|
|
63
|
+
"@id": "https://w3id.org/security#proofPurpose",
|
|
64
|
+
"@type": "@vocab",
|
|
65
|
+
"@context": {
|
|
66
|
+
"@version": 1.1,
|
|
67
|
+
"@protected": true,
|
|
68
|
+
"id": "@id",
|
|
69
|
+
"type": "@type",
|
|
70
|
+
"sec": "https://w3id.org/security#",
|
|
71
|
+
"assertionMethod": {
|
|
72
|
+
"@id": "https://w3id.org/security#assertionMethod",
|
|
73
|
+
"@type": "@id",
|
|
74
|
+
"@container": "@set"
|
|
75
|
+
},
|
|
76
|
+
"authentication": {
|
|
77
|
+
"@id": "https://w3id.org/security#authenticationMethod",
|
|
78
|
+
"@type": "@id",
|
|
79
|
+
"@container": "@set"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"proofValue": "https://w3id.org/security#proofValue",
|
|
84
|
+
"verificationMethod": {
|
|
85
|
+
"@id": "https://w3id.org/security#verificationMethod",
|
|
86
|
+
"@type": "@id"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"Bls12381G2Key2020": "https://w3id.org/security#Bls12381G2Key2020"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"__url__": "https://w3id.org/citizenship/v1",
|
|
3
|
+
"@context": {
|
|
4
|
+
"@version": 1.1,
|
|
5
|
+
"@protected": true,
|
|
6
|
+
|
|
7
|
+
"name": "http://schema.org/name",
|
|
8
|
+
"description": "http://schema.org/description",
|
|
9
|
+
"identifier": "http://schema.org/identifier",
|
|
10
|
+
"image": { "@id": "http://schema.org/image", "@type": "@id" },
|
|
11
|
+
|
|
12
|
+
"PermanentResidentCard": {
|
|
13
|
+
"@id": "https://w3id.org/citizenship#PermanentResidentCard",
|
|
14
|
+
"@context": {
|
|
15
|
+
"@version": 1.1,
|
|
16
|
+
"@protected": true,
|
|
17
|
+
|
|
18
|
+
"id": "@id",
|
|
19
|
+
"type": "@type",
|
|
20
|
+
|
|
21
|
+
"description": "http://schema.org/description",
|
|
22
|
+
"name": "http://schema.org/name",
|
|
23
|
+
"identifier": "http://schema.org/identifier",
|
|
24
|
+
"image": { "@id": "http://schema.org/image", "@type": "@id" }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
"PermanentResident": {
|
|
29
|
+
"@id": "https://w3id.org/citizenship#PermanentResident",
|
|
30
|
+
"@context": {
|
|
31
|
+
"@version": 1.1,
|
|
32
|
+
"@protected": true,
|
|
33
|
+
|
|
34
|
+
"id": "@id",
|
|
35
|
+
"type": "@type",
|
|
36
|
+
|
|
37
|
+
"ctzn": "https://w3id.org/citizenship#",
|
|
38
|
+
"schema": "http://schema.org/",
|
|
39
|
+
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
40
|
+
|
|
41
|
+
"birthCountry": "ctzn:birthCountry",
|
|
42
|
+
"birthDate": { "@id": "schema:birthDate", "@type": "xsd:dateTime" },
|
|
43
|
+
"commuterClassification": "ctzn:commuterClassification",
|
|
44
|
+
"familyName": "schema:familyName",
|
|
45
|
+
"gender": "schema:gender",
|
|
46
|
+
"givenName": "schema:givenName",
|
|
47
|
+
"lprCategory": "ctzn:lprCategory",
|
|
48
|
+
"lprNumber": "ctzn:lprNumber",
|
|
49
|
+
"residentSince": {
|
|
50
|
+
"@id": "ctzn:residentSince",
|
|
51
|
+
"@type": "xsd:dateTime"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
"Person": "http://schema.org/Person"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
{
|
|
2
|
+
"__url__": "https://www.w3.org/2018/credentials/v1",
|
|
3
|
+
"@context": {
|
|
4
|
+
"@version": 1.1,
|
|
5
|
+
"@protected": true,
|
|
6
|
+
"id": "@id",
|
|
7
|
+
"type": "@type",
|
|
8
|
+
"VerifiableCredential": {
|
|
9
|
+
"@id": "https://www.w3.org/2018/credentials#VerifiableCredential",
|
|
10
|
+
"@context": {
|
|
11
|
+
"@version": 1.1,
|
|
12
|
+
"@protected": true,
|
|
13
|
+
"id": "@id",
|
|
14
|
+
"type": "@type",
|
|
15
|
+
"cred": "https://www.w3.org/2018/credentials#",
|
|
16
|
+
"sec": "https://w3id.org/security#",
|
|
17
|
+
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
18
|
+
"credentialSchema": {
|
|
19
|
+
"@id": "cred:credentialSchema",
|
|
20
|
+
"@type": "@id",
|
|
21
|
+
"@context": {
|
|
22
|
+
"@version": 1.1,
|
|
23
|
+
"@protected": true,
|
|
24
|
+
"id": "@id",
|
|
25
|
+
"type": "@type",
|
|
26
|
+
"cred": "https://www.w3.org/2018/credentials#",
|
|
27
|
+
"JsonSchemaValidator2018": "cred:JsonSchemaValidator2018"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"credentialStatus": {
|
|
31
|
+
"@id": "cred:credentialStatus",
|
|
32
|
+
"@type": "@id"
|
|
33
|
+
},
|
|
34
|
+
"credentialSubject": {
|
|
35
|
+
"@id": "cred:credentialSubject",
|
|
36
|
+
"@type": "@id"
|
|
37
|
+
},
|
|
38
|
+
"evidence": {
|
|
39
|
+
"@id": "cred:evidence",
|
|
40
|
+
"@type": "@id"
|
|
41
|
+
},
|
|
42
|
+
"expirationDate": {
|
|
43
|
+
"@id": "cred:expirationDate",
|
|
44
|
+
"@type": "xsd:dateTime"
|
|
45
|
+
},
|
|
46
|
+
"holder": {
|
|
47
|
+
"@id": "cred:holder",
|
|
48
|
+
"@type": "@id"
|
|
49
|
+
},
|
|
50
|
+
"issued": {
|
|
51
|
+
"@id": "cred:issued",
|
|
52
|
+
"@type": "xsd:dateTime"
|
|
53
|
+
},
|
|
54
|
+
"issuer": {
|
|
55
|
+
"@id": "cred:issuer",
|
|
56
|
+
"@type": "@id"
|
|
57
|
+
},
|
|
58
|
+
"issuanceDate": {
|
|
59
|
+
"@id": "cred:issuanceDate",
|
|
60
|
+
"@type": "xsd:dateTime"
|
|
61
|
+
},
|
|
62
|
+
"proof": {
|
|
63
|
+
"@id": "sec:proof",
|
|
64
|
+
"@type": "@id",
|
|
65
|
+
"@container": "@graph"
|
|
66
|
+
},
|
|
67
|
+
"refreshService": {
|
|
68
|
+
"@id": "cred:refreshService",
|
|
69
|
+
"@type": "@id",
|
|
70
|
+
"@context": {
|
|
71
|
+
"@version": 1.1,
|
|
72
|
+
"@protected": true,
|
|
73
|
+
"id": "@id",
|
|
74
|
+
"type": "@type",
|
|
75
|
+
"cred": "https://www.w3.org/2018/credentials#",
|
|
76
|
+
"ManualRefreshService2018": "cred:ManualRefreshService2018"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"termsOfUse": {
|
|
80
|
+
"@id": "cred:termsOfUse",
|
|
81
|
+
"@type": "@id"
|
|
82
|
+
},
|
|
83
|
+
"validFrom": {
|
|
84
|
+
"@id": "cred:validFrom",
|
|
85
|
+
"@type": "xsd:dateTime"
|
|
86
|
+
},
|
|
87
|
+
"validUntil": {
|
|
88
|
+
"@id": "cred:validUntil",
|
|
89
|
+
"@type": "xsd:dateTime"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"VerifiablePresentation": {
|
|
94
|
+
"@id": "https://www.w3.org/2018/credentials#VerifiablePresentation",
|
|
95
|
+
"@context": {
|
|
96
|
+
"@version": 1.1,
|
|
97
|
+
"@protected": true,
|
|
98
|
+
"id": "@id",
|
|
99
|
+
"type": "@type",
|
|
100
|
+
"cred": "https://www.w3.org/2018/credentials#",
|
|
101
|
+
"sec": "https://w3id.org/security#",
|
|
102
|
+
"holder": {
|
|
103
|
+
"@id": "cred:holder",
|
|
104
|
+
"@type": "@id"
|
|
105
|
+
},
|
|
106
|
+
"proof": {
|
|
107
|
+
"@id": "sec:proof",
|
|
108
|
+
"@type": "@id",
|
|
109
|
+
"@container": "@graph"
|
|
110
|
+
},
|
|
111
|
+
"verifiableCredential": {
|
|
112
|
+
"@id": "cred:verifiableCredential",
|
|
113
|
+
"@type": "@id",
|
|
114
|
+
"@container": "@graph"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"EcdsaSecp256k1Signature2019": {
|
|
119
|
+
"@id": "https://w3id.org/security#EcdsaSecp256k1Signature2019",
|
|
120
|
+
"@context": {
|
|
121
|
+
"@version": 1.1,
|
|
122
|
+
"@protected": true,
|
|
123
|
+
"id": "@id",
|
|
124
|
+
"type": "@type",
|
|
125
|
+
"sec": "https://w3id.org/security#",
|
|
126
|
+
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
127
|
+
"challenge": "sec:challenge",
|
|
128
|
+
"created": {
|
|
129
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
130
|
+
"@type": "xsd:dateTime"
|
|
131
|
+
},
|
|
132
|
+
"domain": "sec:domain",
|
|
133
|
+
"expires": {
|
|
134
|
+
"@id": "sec:expiration",
|
|
135
|
+
"@type": "xsd:dateTime"
|
|
136
|
+
},
|
|
137
|
+
"jws": "sec:jws",
|
|
138
|
+
"nonce": "sec:nonce",
|
|
139
|
+
"proofPurpose": {
|
|
140
|
+
"@id": "sec:proofPurpose",
|
|
141
|
+
"@type": "@vocab",
|
|
142
|
+
"@context": {
|
|
143
|
+
"@version": 1.1,
|
|
144
|
+
"@protected": true,
|
|
145
|
+
"id": "@id",
|
|
146
|
+
"type": "@type",
|
|
147
|
+
"sec": "https://w3id.org/security#",
|
|
148
|
+
"assertionMethod": {
|
|
149
|
+
"@id": "sec:assertionMethod",
|
|
150
|
+
"@type": "@id",
|
|
151
|
+
"@container": "@set"
|
|
152
|
+
},
|
|
153
|
+
"authentication": {
|
|
154
|
+
"@id": "sec:authenticationMethod",
|
|
155
|
+
"@type": "@id",
|
|
156
|
+
"@container": "@set"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"proofValue": "sec:proofValue",
|
|
161
|
+
"verificationMethod": {
|
|
162
|
+
"@id": "sec:verificationMethod",
|
|
163
|
+
"@type": "@id"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"EcdsaSecp256r1Signature2019": {
|
|
168
|
+
"@id": "https://w3id.org/security#EcdsaSecp256r1Signature2019",
|
|
169
|
+
"@context": {
|
|
170
|
+
"@version": 1.1,
|
|
171
|
+
"@protected": true,
|
|
172
|
+
"id": "@id",
|
|
173
|
+
"type": "@type",
|
|
174
|
+
"sec": "https://w3id.org/security#",
|
|
175
|
+
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
176
|
+
"challenge": "sec:challenge",
|
|
177
|
+
"created": {
|
|
178
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
179
|
+
"@type": "xsd:dateTime"
|
|
180
|
+
},
|
|
181
|
+
"domain": "sec:domain",
|
|
182
|
+
"expires": {
|
|
183
|
+
"@id": "sec:expiration",
|
|
184
|
+
"@type": "xsd:dateTime"
|
|
185
|
+
},
|
|
186
|
+
"jws": "sec:jws",
|
|
187
|
+
"nonce": "sec:nonce",
|
|
188
|
+
"proofPurpose": {
|
|
189
|
+
"@id": "sec:proofPurpose",
|
|
190
|
+
"@type": "@vocab",
|
|
191
|
+
"@context": {
|
|
192
|
+
"@version": 1.1,
|
|
193
|
+
"@protected": true,
|
|
194
|
+
"id": "@id",
|
|
195
|
+
"type": "@type",
|
|
196
|
+
"sec": "https://w3id.org/security#",
|
|
197
|
+
"assertionMethod": {
|
|
198
|
+
"@id": "sec:assertionMethod",
|
|
199
|
+
"@type": "@id",
|
|
200
|
+
"@container": "@set"
|
|
201
|
+
},
|
|
202
|
+
"authentication": {
|
|
203
|
+
"@id": "sec:authenticationMethod",
|
|
204
|
+
"@type": "@id",
|
|
205
|
+
"@container": "@set"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"proofValue": "sec:proofValue",
|
|
210
|
+
"verificationMethod": {
|
|
211
|
+
"@id": "sec:verificationMethod",
|
|
212
|
+
"@type": "@id"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"Ed25519Signature2018": {
|
|
217
|
+
"@id": "https://w3id.org/security#Ed25519Signature2018",
|
|
218
|
+
"@context": {
|
|
219
|
+
"@version": 1.1,
|
|
220
|
+
"@protected": true,
|
|
221
|
+
"id": "@id",
|
|
222
|
+
"type": "@type",
|
|
223
|
+
"sec": "https://w3id.org/security#",
|
|
224
|
+
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
225
|
+
"challenge": "sec:challenge",
|
|
226
|
+
"created": {
|
|
227
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
228
|
+
"@type": "xsd:dateTime"
|
|
229
|
+
},
|
|
230
|
+
"domain": "sec:domain",
|
|
231
|
+
"expires": {
|
|
232
|
+
"@id": "sec:expiration",
|
|
233
|
+
"@type": "xsd:dateTime"
|
|
234
|
+
},
|
|
235
|
+
"jws": "sec:jws",
|
|
236
|
+
"nonce": "sec:nonce",
|
|
237
|
+
"proofPurpose": {
|
|
238
|
+
"@id": "sec:proofPurpose",
|
|
239
|
+
"@type": "@vocab",
|
|
240
|
+
"@context": {
|
|
241
|
+
"@version": 1.1,
|
|
242
|
+
"@protected": true,
|
|
243
|
+
"id": "@id",
|
|
244
|
+
"type": "@type",
|
|
245
|
+
"sec": "https://w3id.org/security#",
|
|
246
|
+
"assertionMethod": {
|
|
247
|
+
"@id": "sec:assertionMethod",
|
|
248
|
+
"@type": "@id",
|
|
249
|
+
"@container": "@set"
|
|
250
|
+
},
|
|
251
|
+
"authentication": {
|
|
252
|
+
"@id": "sec:authenticationMethod",
|
|
253
|
+
"@type": "@id",
|
|
254
|
+
"@container": "@set"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"proofValue": "sec:proofValue",
|
|
259
|
+
"verificationMethod": {
|
|
260
|
+
"@id": "sec:verificationMethod",
|
|
261
|
+
"@type": "@id"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"RsaSignature2018": {
|
|
266
|
+
"@id": "https://w3id.org/security#RsaSignature2018",
|
|
267
|
+
"@context": {
|
|
268
|
+
"@version": 1.1,
|
|
269
|
+
"@protected": true,
|
|
270
|
+
"challenge": "sec:challenge",
|
|
271
|
+
"created": {
|
|
272
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
273
|
+
"@type": "xsd:dateTime"
|
|
274
|
+
},
|
|
275
|
+
"domain": "sec:domain",
|
|
276
|
+
"expires": {
|
|
277
|
+
"@id": "sec:expiration",
|
|
278
|
+
"@type": "xsd:dateTime"
|
|
279
|
+
},
|
|
280
|
+
"jws": "sec:jws",
|
|
281
|
+
"nonce": "sec:nonce",
|
|
282
|
+
"proofPurpose": {
|
|
283
|
+
"@id": "sec:proofPurpose",
|
|
284
|
+
"@type": "@vocab",
|
|
285
|
+
"@context": {
|
|
286
|
+
"@version": 1.1,
|
|
287
|
+
"@protected": true,
|
|
288
|
+
"id": "@id",
|
|
289
|
+
"type": "@type",
|
|
290
|
+
"sec": "https://w3id.org/security#",
|
|
291
|
+
"assertionMethod": {
|
|
292
|
+
"@id": "sec:assertionMethod",
|
|
293
|
+
"@type": "@id",
|
|
294
|
+
"@container": "@set"
|
|
295
|
+
},
|
|
296
|
+
"authentication": {
|
|
297
|
+
"@id": "sec:authenticationMethod",
|
|
298
|
+
"@type": "@id",
|
|
299
|
+
"@container": "@set"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"proofValue": "sec:proofValue",
|
|
304
|
+
"verificationMethod": {
|
|
305
|
+
"@id": "sec:verificationMethod",
|
|
306
|
+
"@type": "@id"
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"proof": {
|
|
311
|
+
"@id": "https://w3id.org/security#proof",
|
|
312
|
+
"@type": "@id",
|
|
313
|
+
"@container": "@graph"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|