Skip to content

Commit

Permalink
chore: upgrade ethers and ethr-did-resolver (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
strumswell authored Dec 13, 2023
1 parent ed76046 commit 6414cdf
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 42 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"dependencies": {
"did-jwt": "^7.2.0",
"did-resolver": "^4.1.0",
"ethers": "^6.7.1",
"ethr-did-resolver": "9.0.0"
"ethers": "^6.8.1",
"ethr-did-resolver": "10.1.0"
}
}
47 changes: 40 additions & 7 deletions src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ describe('EthrDID', () => {

it('resolves document', async () => {
return expect((await resolver.resolve(did)).didDocument).toEqual({
'@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/secp256k1recovery-2020/v2'],
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
{
Expand Down Expand Up @@ -104,7 +108,11 @@ describe('EthrDID', () => {
it('resolves document', async () => {
const resolution = await resolver.resolve(did)
return expect(resolution.didDocument).toEqual({
'@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/secp256k1recovery-2020/v2'],
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
{
Expand Down Expand Up @@ -137,7 +145,11 @@ describe('EthrDID', () => {

it('resolves document', async () => {
return expect((await resolver.resolve(did)).didDocument).toEqual({
'@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/secp256k1recovery-2020/v2'],
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
{
Expand Down Expand Up @@ -173,7 +185,11 @@ describe('EthrDID', () => {
it('resolves document', async () => {
const resolution = await resolver.resolve(did)
return expect(resolution.didDocument).toEqual({
'@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/secp256k1recovery-2020/v2'],
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
{
Expand Down Expand Up @@ -205,7 +221,11 @@ describe('EthrDID', () => {

it('resolves document', async () => {
return expect((await resolver.resolve(did)).didDocument).toEqual({
'@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/secp256k1recovery-2020/v2'],
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
{
Expand Down Expand Up @@ -241,7 +261,11 @@ describe('EthrDID', () => {

const resolution = await resolver.resolve(did)
return expect(resolution.didDocument).toEqual({
'@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/secp256k1recovery-2020/v2'],
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
{
Expand Down Expand Up @@ -281,6 +305,7 @@ describe('EthrDID', () => {
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
Expand Down Expand Up @@ -324,6 +349,7 @@ describe('EthrDID', () => {
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
Expand Down Expand Up @@ -373,6 +399,7 @@ describe('EthrDID', () => {
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
Expand Down Expand Up @@ -431,6 +458,7 @@ describe('EthrDID', () => {
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
Expand Down Expand Up @@ -494,6 +522,7 @@ describe('EthrDID', () => {
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
Expand Down Expand Up @@ -558,7 +587,11 @@ describe('EthrDID', () => {

it('resolves document', async () => {
return expect((await resolver.resolve(did)).didDocument).toEqual({
'@context': ['https://www.w3.org/ns/did/v1', 'https://w3id.org/security/suites/secp256k1recovery-2020/v2'],
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
'https://w3id.org/security/v3-unstable',
],
id: did,
verificationMethod: [
{
Expand Down
56 changes: 23 additions & 33 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
resolved "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz"
integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==

"@adraffy/ens-normalize@1.9.2":
version "1.9.2"
resolved "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.9.2.tgz"
integrity sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg==
"@adraffy/ens-normalize@1.10.0":
version "1.10.0"
resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7"
integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==

"@ampproject/remapping@^2.2.0":
version "2.2.1"
Expand Down Expand Up @@ -1506,28 +1506,18 @@
resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-0.4.0.tgz#e3f69e3ce935683dd8dadb636652a5cb5cd5958c"
integrity sha512-xaUaUUDWbHIFSxaQ/pIe+33VG2mfJp6N/KxKLmZr5biWdNznCAmfu24QRhX10BbVAuqOahAoyp0S4M9md6GPDw==

"@noble/curves@^1.0.0":
"@noble/curves@1.2.0", "@noble/curves@^1.0.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35"
integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==
dependencies:
"@noble/hashes" "1.3.2"

"@noble/[email protected]":
version "1.1.2"
resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz"
integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==

"@noble/[email protected]", "@noble/hashes@^1.3.0":
version "1.3.2"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39"
integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==

"@noble/[email protected]":
version "1.7.1"
resolved "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz"
integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==

"@nodelib/[email protected]":
version "2.1.5"
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz"
Expand Down Expand Up @@ -2218,7 +2208,7 @@

"@types/[email protected]":
version "18.15.13"
resolved "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469"
integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==

"@types/normalize-package-data@^2.4.1":
Expand Down Expand Up @@ -2460,7 +2450,7 @@ acorn@^8.8.2, acorn@^8.9.0:

[email protected]:
version "4.0.0-beta.5"
resolved "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz"
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873"
integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==

agent-base@6, agent-base@^6.0.2:
Expand Down Expand Up @@ -3588,7 +3578,7 @@ did-jwt@^7.2.0:
multiformats "^9.6.2"
uint8arrays "3.1.1"

did-resolver@^4.0.1, did-resolver@^4.1.0:
did-resolver@^4.1.0:
version "4.1.0"
resolved "https://registry.npmjs.org/did-resolver/-/did-resolver-4.1.0.tgz"
integrity sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA==
Expand Down Expand Up @@ -3988,26 +3978,26 @@ esutils@^2.0.2:
resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==

ethers@6.7.1, ethers@^6.7.1:
version "6.7.1"
resolved "https://registry.npmjs.org/ethers/-/ethers-6.7.1.tgz"
integrity sha512-qX5kxIFMfg1i+epfgb0xF4WM7IqapIIu50pOJ17aebkxxa4BacW5jFrQRmCJpDEg2ZK2oNtR5QjrQ1WDBF29dA==
ethers@^6.8.1:
version "6.9.0"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.9.0.tgz#a4534bdcdfde306aee94ef32f3d5c70d7e33fcb9"
integrity sha512-pmfNyQzc2mseLe91FnT2vmNaTt8dDzhxZ/xItAV7uGsF4dI4ek2ufMu3rAkgQETL/TIs0GS5A+U05g9QyWnv3Q==
dependencies:
"@adraffy/ens-normalize" "1.9.2"
"@noble/hashes" "1.1.2"
"@noble/secp256k1" "1.7.1"
"@adraffy/ens-normalize" "1.10.0"
"@noble/curves" "1.2.0"
"@noble/hashes" "1.3.2"
"@types/node" "18.15.13"
aes-js "4.0.0-beta.5"
tslib "2.4.0"
ws "8.5.0"

ethr-did-resolver@9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/ethr-did-resolver/-/ethr-did-resolver-9.0.0.tgz#3d453e8c03e41c7287c3458cd70ebaf15c664823"
integrity sha512-L+c3NZk4fEC+jB1WWPtlUVPZk0r1XItxP54oRLhYpRMRwpG7lPnCzKV6XjuiCTDI7bJEfzrAYYn9sbxbIwEtLA==
ethr-did-resolver@10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/ethr-did-resolver/-/ethr-did-resolver-10.1.0.tgz#b61466a66c01648af5085bbdfdd70249b9526992"
integrity sha512-PH3R8UQGpJGWXaVVSWPppPiEzb7eHrzG6yTCGtk23Fw8Et2totj+7V1id+zxCQvToM9cW+CHA/+k64F8xpk/Mw==
dependencies:
did-resolver "^4.0.1"
ethers "6.7.1"
did-resolver "^4.1.0"
ethers "^6.8.1"

event-target-shim@^5.0.0:
version "5.0.1"
Expand Down Expand Up @@ -8454,7 +8444,7 @@ [email protected]:

[email protected]:
version "2.4.0"
resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==

tslib@^1.8.1:
Expand Down Expand Up @@ -8824,7 +8814,7 @@ [email protected]:

[email protected]:
version "8.5.0"
resolved "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f"
integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==

xtend@~4.0.1:
Expand Down

0 comments on commit 6414cdf

Please sign in to comment.