Skip to content

Commit

Permalink
fix: bump ethr-did-resolver to 4.3.2 (uport-project#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceanis authored Apr 22, 2021
1 parent 07b5af3 commit dcd21ce
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 17 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@
"@ethersproject/base64": "^5.1.0",
"@ethersproject/basex": "^5.1.0",
"@ethersproject/bytes": "^5.1.0",
"@ethersproject/providers": "^5.1.0",
"@ethersproject/providers": "^5.1.2",
"@ethersproject/signing-key": "^5.1.0",
"@ethersproject/strings": "^5.1.0",
"@ethersproject/transactions": "^5.1.0",
"@ethersproject/transactions": "^5.1.1",
"@ethersproject/wallet": "^5.1.0",
"did-jwt": "^5.1.2",
"did-jwt": "^5.2.0",
"did-resolver": "^3.1.0",
"ethr-did-resolver": "^4.2.0"
"ethr-did-resolver": "^4.3.2"
}
}
12 changes: 12 additions & 0 deletions src/__tests__/config-test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { EthrDID } from '..'

describe('configuration', () => {
it('can use rpcUrl - github #64', () => {
const ethrDid = new EthrDID({
identifier: '0xC662e6c5F91B9FcD22D7FcafC80Cf8b640aed247',
rpcUrl: 'http://localhost:9585',
chainNameOrId: 1337,
})
expect(ethrDid).toBeDefined()
})
})
39 changes: 38 additions & 1 deletion src/__tests__/index-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`],
assertionMethod: [`${did}#controller`],
})
})
})
Expand Down Expand Up @@ -125,6 +126,7 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`],
assertionMethod: [`${did}#controller`, `${did}#delegate-1`],
})
})
})
Expand Down Expand Up @@ -165,13 +167,14 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`, `${did}#delegate-2`],
assertionMethod: [`${did}#controller`, `${did}#delegate-1`, `${did}#delegate-2`],
})
})
})

describe('expire automatically', () => {
beforeAll(async () => {
await sleep(4)
await sleep(5)
})

it('resolves document', async () => {
Expand All @@ -197,6 +200,7 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`],
assertionMethod: [`${did}#controller`, `${did}#delegate-1`],
})
})
})
Expand Down Expand Up @@ -236,6 +240,7 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`, `${did}#delegate-3`],
assertionMethod: [`${did}#controller`, `${did}#delegate-1`, `${did}#delegate-3`],
})
})
})
Expand Down Expand Up @@ -268,6 +273,7 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`],
assertionMethod: [`${did}#controller`, `${did}#delegate-1`],
})
})
})
Expand Down Expand Up @@ -312,6 +318,7 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`],
assertionMethod: [`${did}#controller`, `${did}#delegate-1`, `${did}#delegate-5`],
})
})
})
Expand Down Expand Up @@ -359,6 +366,7 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`],
assertionMethod: [`${did}#controller`, `${did}#delegate-1`, `${did}#delegate-5`, `${did}#delegate-6`],
})
})
})
Expand Down Expand Up @@ -412,6 +420,13 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`],
assertionMethod: [
`${did}#controller`,
`${did}#delegate-1`,
`${did}#delegate-5`,
`${did}#delegate-6`,
`${did}#delegate-7`,
],
})
})
})
Expand Down Expand Up @@ -462,6 +477,13 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`],
assertionMethod: [
`${did}#controller`,
`${did}#delegate-1`,
`${did}#delegate-5`,
`${did}#delegate-6`,
`${did}#delegate-7`,
],
service: [
{
id: 'did:ethr:dev:0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf#service-1',
Expand Down Expand Up @@ -517,6 +539,13 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`],
assertionMethod: [
`${did}#controller`,
`${did}#delegate-1`,
`${did}#delegate-5`,
`${did}#delegate-6`,
`${did}#delegate-7`,
],
})
})
})
Expand Down Expand Up @@ -583,6 +612,14 @@ describe('EthrDID', () => {
},
],
authentication: [`${did}#controller`],
assertionMethod: [
`${did}#controller`,
`${did}#delegate-1`,
`${did}#delegate-5`,
`${did}#delegate-6`,
`${did}#delegate-7`,
`${did}#delegate-8`,
],
})
})

Expand Down

0 comments on commit dcd21ce

Please sign in to comment.