File tree Expand file tree Collapse file tree 3 files changed +26
-11
lines changed Expand file tree Collapse file tree 3 files changed +26
-11
lines changed Original file line number Diff line number Diff line change 33
33
"ethr-did-resolver" : " ^10.0.0" ,
34
34
"express" : " ^4.18.2" ,
35
35
"express-actuator" : " ^1.8.4" ,
36
- "peer-did-resolver" : " ^1 .0.1 " ,
36
+ "peer-did-resolver" : " ^2 .0.0 " ,
37
37
"plc-did-resolver" : " ^1.0.0" ,
38
38
"web-did-resolver" : " ^2.0.27"
39
39
},
Original file line number Diff line number Diff line change @@ -16,6 +16,21 @@ describe('did:peer driver', () => {
16
16
} )
17
17
} )
18
18
19
+ it ( 'responds with didResolutionResult for "did:peer:2 with 2 service endpoints (github #119)' , async ( ) => {
20
+ expect . assertions ( 6 )
21
+ const did =
22
+ 'did:peer:2.Vz6Mkj3PUd1WjvaDhNZhhhXQdz5UnZXmS7ehtx8bsPpD47kKc.Ez6LSg8zQom395jKLrGiBNruB9MM6V8PWuf2FpEy4uRFiqQBR.SeyJ0IjoiZG0iLCJzIjp7InVyaSI6Imh0dHA6Ly9leGFtcGxlLmNvbS9kaWRjb21tIiwiYSI6WyJkaWRjb21tL3YyIl0sInIiOlsiZGlkOmV4YW1wbGU6MTIzNDU2Nzg5YWJjZGVmZ2hpI2tleS0xIl19fQ.SeyJ0IjoiZG0iLCJzIjp7InVyaSI6Imh0dHA6Ly9leGFtcGxlLmNvbS9hbm90aGVyIiwiYSI6WyJkaWRjb21tL3YyIl0sInIiOlsiZGlkOmV4YW1wbGU6MTIzNDU2Nzg5YWJjZGVmZ2hpI2tleS0yIl19fQ\n'
23
+ const response = await request ( app ) . get ( `/1.0/identifiers/${ did } ` )
24
+ expect ( response . status ) . toBe ( 200 )
25
+ expect ( response . body ) . toHaveProperty ( 'didDocument' )
26
+ expect ( response . body . didDocument ) . toHaveProperty ( 'authentication' )
27
+ expect ( response . body . didDocument . service ) . toHaveLength ( 2 )
28
+ expect ( response . body ) . toHaveProperty ( 'didDocumentMetadata' )
29
+ expect ( response . body . didResolutionMetadata ) . toEqual ( {
30
+ contentType : 'application/did+ld+json' ,
31
+ } )
32
+ } )
33
+
19
34
it ( 'responds with notFound error for unknown DID' , async ( ) => {
20
35
// expect.assertions(1)
21
36
const did = 'did:peer:fakefakefake'
Original file line number Diff line number Diff line change 15
15
" @jridgewell/gen-mapping" " ^0.1.0"
16
16
" @jridgewell/trace-mapping" " ^0.3.9"
17
17
18
- " @aviarytech/did-peer@^0.0.19 " :
19
- version "0.0.19 "
20
- resolved "https://registry.yarnpkg.com/@aviarytech/did-peer/-/did-peer-0.0.19 .tgz#5ac20d37d762f05be7a502826cb0fbb6cd319180 "
21
- integrity sha512-koSwVi++RIVWgYoNHHFZ95ouVqCNlLvqDfJfThOwExkZ2YSoRW/EFXeXFe33Gm7wR9gwTgoZXgi71hHO9d5RVQ ==
18
+ " @aviarytech/did-peer@^0.0.22 " :
19
+ version "0.0.22 "
20
+ resolved "https://registry.yarnpkg.com/@aviarytech/did-peer/-/did-peer-0.0.22 .tgz#d0c15062c37fc6bf2720d31dbbf9eb23e09c2435 "
21
+ integrity sha512-BdA7L9wpYNLf1c3d0yB92aoj1AUWE10p408VZ4IJXfavb/oNxALZRRRJTcvMdrd5P2XXQsP5+x4bXfO24iRURg ==
22
22
dependencies :
23
23
buffer "^6.0.3"
24
24
@@ -4798,13 +4798,13 @@ path-type@^5.0.0:
4798
4798
resolved "https://registry.yarnpkg.com/path-type/-/path-type-5.0.0.tgz#14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8"
4799
4799
integrity sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==
4800
4800
4801
- peer-did-resolver@^1 .0.1 :
4802
- version "1 .0.1 "
4803
- resolved "https://registry.yarnpkg.com/peer-did-resolver/-/peer-did-resolver-1 .0.1 .tgz#15d5d490af6b8d595168a3d071385acbb54c542a "
4804
- integrity sha512-nbc8Y1L6IDqBTgWYx2OvIYJOjHAokdnVW2WzzYPaeIHM9YI6ovMGTbBct7nSLsbg/hBHc/w+tsvsn6kAcIxStQ ==
4801
+ peer-did-resolver@^2 .0.0 :
4802
+ version "2 .0.0 "
4803
+ resolved "https://registry.yarnpkg.com/peer-did-resolver/-/peer-did-resolver-2 .0.0 .tgz#81af5824a866c32e2600098a4125f833126001a1 "
4804
+ integrity sha512-4x6bv3fqEhGFJZI33S0pKLOYgE5Qynk5YLyZ+F828Nz1G4EnJuJBcz8uKaXqYhagVvAFD9Xd1dqtXlkyh2sNoA ==
4805
4805
dependencies :
4806
- " @aviarytech/did-peer" " ^0.0.19 "
4807
- did-resolver "^4.0 .0"
4806
+ " @aviarytech/did-peer" " ^0.0.22 "
4807
+ did-resolver "^4.1 .0"
4808
4808
4809
4809
picocolors@^1.0.0 :
4810
4810
version "1.0.0"
You can’t perform that action at this time.
0 commit comments