From 5f93ed031fd3160f31026153a216498b04fffe87 Mon Sep 17 00:00:00 2001 From: Cute_Wisp Date: Tue, 16 Apr 2024 10:39:40 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20did=20document=20co?= =?UTF-8?q?ntext=20to=20array?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resolver/resolver.rs | 4 ++-- tests/did-infra-space.json | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/resolver/resolver.rs b/src/resolver/resolver.rs index e2c41f6..7206165 100644 --- a/src/resolver/resolver.rs +++ b/src/resolver/resolver.rs @@ -103,9 +103,9 @@ impl DIDResolver for InfraDIDResolver { ]; let doc = Document { - context: ssi_dids::Contexts::One(ssi_dids::Context::URI( + context: ssi_dids::Contexts::Many(vec![ssi_dids::Context::URI( ssi_dids::DEFAULT_CONTEXT.into(), - )), + )]), id: did.to_string(), verification_method: Some(vms), authentication: Some(vm_urls.clone()), diff --git a/tests/did-infra-space.json b/tests/did-infra-space.json index f8ddc4d..e7f82f7 100644 --- a/tests/did-infra-space.json +++ b/tests/did-infra-space.json @@ -1,5 +1,7 @@ { - "@context": "https://www.w3.org/ns/did/v1", + "@context": [ + "https://www.w3.org/ns/did/v1" + ], "id": "did:infra:01:5GpEYnXBoLgvzyWe4Defitp5UV25xZUiUCJM2xNgkDXkM4NW", "verificationMethod": [ {