-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upgrade to latest did core spec (#99) #109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! It seems this is getting very close to DID Core Spec (proposed CR) now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I like that we are now using the DID Core Spec resolution result structure!
BREAKING CHANGES: this new did core spec requirement will break for users expecting a `publicKey` entry in the DID document
I also updated the `@context` to one that validates properly BREAKING CHANGES: this new did core spec requirement will break for users expecting an `ethereumAddress` entry in some of the the DID document entries
🎉 This PR is included in version 3.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* feat: refactor configuration options, add `chainID` * fix: improve `kid` stability during attribute changes * chore: cleanup in tests and local dependencies * test(coverage): improve test coverage * refactor(style): enable linting using `eslint` * refactor: isolate some of the type definitions * fix: test that checksum address resolves to identical DID document (#105) * fix: setAttribute with sigAuth adds key to authentication section (#95) * feat: enable base58 encoding for keys (#106)(#99) * refactor: group types, defaults, and helper methods * fix: add support for deactivated DIDs (#83)(#85) * fix(deps): bump did-resolver version * fix: update the default `@context` to be LD compatible (#99) * docs: update readme and spec to reflect reality and current DID spec compliance (#99) * fix: rename `publicKey` to `verificationMethod` (#99) * fix: rename `ethereumAddress` to `blockchainAccountId` (#99) * feat: no more errors thrown during resolution. fixes #83 closes #85 fixes #95 fixes #105 closes #106 fixes #99 BREAKING CHANGE: The return type is `DIDResolutionResult` which wraps a `DIDDocument`. BREAKING CHANGE: No errors are thrown during DID resolution. Please check `result.didResolutionMetadata.error` instead. BREAKING CHANGE: This DID core spec requirement will break for users expecting `publicKey`, `ethereumAddress`, `Secp256k1VerificationKey2018` entries in the DID document. They are replaced with `verificationMethod`, `blockchainAccountId` and `EcdsaSecp256k1VerificationKey2019` and `EcdsaSecp256k1RecoveryMethod2020` depending on the content.
* feat: refactor configuration options, add `chainID` * fix: improve `kid` stability during attribute changes * chore: cleanup in tests and local dependencies * test(coverage): improve test coverage * refactor(style): enable linting using `eslint` * refactor: isolate some of the type definitions * fix: test that checksum address resolves to identical DID document (#105) * fix: setAttribute with sigAuth adds key to authentication section (#95) * feat: enable base58 encoding for keys (#106)(#99) * refactor: group types, defaults, and helper methods * fix: add support for deactivated DIDs (#83)(#85) * fix(deps): bump did-resolver version * fix: update the default `@context` to be LD compatible (#99) * docs: update readme and spec to reflect reality and current DID spec compliance (#99) * fix: rename `publicKey` to `verificationMethod` (#99) * fix: rename `ethereumAddress` to `blockchainAccountId` (#99) * feat: no more errors thrown during resolution. fixes #83 closes #85 fixes #95 fixes #105 closes #106 fixes #99 BREAKING CHANGE: The return type is `DIDResolutionResult` which wraps a `DIDDocument`. BREAKING CHANGE: No errors are thrown during DID resolution. Please check `result.didResolutionMetadata.error` instead. BREAKING CHANGE: This DID core spec requirement will break for users expecting `publicKey`, `ethereumAddress`, `Secp256k1VerificationKey2018` entries in the DID document. They are replaced with `verificationMethod`, `blockchainAccountId` and `EcdsaSecp256k1VerificationKey2019` and `EcdsaSecp256k1RecoveryMethod2020` depending on the content.
* feat: refactor configuration options, add `chainID` * fix: improve `kid` stability during attribute changes * chore: cleanup in tests and local dependencies * test(coverage): improve test coverage * refactor(style): enable linting using `eslint` * refactor: isolate some of the type definitions * fix: test that checksum address resolves to identical DID document (#105) * fix: setAttribute with sigAuth adds key to authentication section (#95) * feat: enable base58 encoding for keys (#106)(#99) * refactor: group types, defaults, and helper methods * fix: add support for deactivated DIDs (#83)(#85) * fix(deps): bump did-resolver version * fix: update the default `@context` to be LD compatible (#99) * docs: update readme and spec to reflect reality and current DID spec compliance (#99) * fix: rename `publicKey` to `verificationMethod` (#99) * fix: rename `ethereumAddress` to `blockchainAccountId` (#99) * feat: no more errors thrown during resolution. fixes #83 closes #85 fixes #95 fixes #105 closes #106 fixes #99 BREAKING CHANGE: The return type is `DIDResolutionResult` which wraps a `DIDDocument`. BREAKING CHANGE: No errors are thrown during DID resolution. Please check `result.didResolutionMetadata.error` instead. BREAKING CHANGE: This DID core spec requirement will break for users expecting `publicKey`, `ethereumAddress`, `Secp256k1VerificationKey2018` entries in the DID document. They are replaced with `verificationMethod`, `blockchainAccountId` and `EcdsaSecp256k1VerificationKey2019` and `EcdsaSecp256k1RecoveryMethod2020` depending on the content.
# [4.0.0](3.1.0...4.0.0) (2021-03-15) ### Features * upgrade to latest did core spec ([#99](#99)) ([#109](#109)) ([#111](#111)) ([2a023b1](2a023b1)), closes [#105](#105) [#95](#95) [#106](#106) [#83](#83) [#85](#85) [#83](#83) [#85](#85) [#95](#95) [#105](#105) [#106](#106) ### BREAKING CHANGES * The return type is `DIDResolutionResult` which wraps a `DIDDocument`. * No errors are thrown during DID resolution. Please check `result.didResolutionMetadata.error` instead. * This DID core spec requirement will break for users expecting `publicKey`, `ethereumAddress`, `Secp256k1VerificationKey2018` entries in the DID document. They are replaced with `verificationMethod`, `blockchainAccountId` and `EcdsaSecp256k1VerificationKey2019` and `EcdsaSecp256k1RecoveryMethod2020` depending on the content.
# 1.0.0 (2022-07-10) ### Bug Fixes * change 'owner' to 'controller' to follow W3C Spec ([decentralized-identity#75](https://github.com/veramolabs/ens-did-resolver/issues/75)) ([decentralized-identity#81](https://github.com/veramolabs/ens-did-resolver/issues/81)) ([af37b3f](af37b3f)) * ignore query string when interpreting identifiers ([decentralized-identity#123](https://github.com/veramolabs/ens-did-resolver/issues/123)) ([5508f8a](5508f8a)), closes [decentralized-identity#122](https://github.com/veramolabs/ens-did-resolver/issues/122) * maintenance of dependencies, bots and build scripts ([decentralized-identity#136](https://github.com/veramolabs/ens-did-resolver/issues/136)) ([0d3fcf7](0d3fcf7)) * remove unused dependency ([#4](#4)) ([a97c826](a97c826)) * removed redundant code ([ca4d101](ca4d101)) * reverse events to have consistent order ([decentralized-identity#87](https://github.com/veramolabs/ens-did-resolver/issues/87)) ([08b9692](08b9692)), closes [/github.com/decentralized-identity/issues/86#issuecomment-699961595](https://github.com//github.com/decentralized-identity/ethr-did-resolver/issues/86/issues/issuecomment-699961595) * strip milliseconds from dateTime strings ([decentralized-identity#129](https://github.com/veramolabs/ens-did-resolver/issues/129)) ([3e958af](3e958af)), closes [decentralized-identity#126](https://github.com/veramolabs/ens-did-resolver/issues/126) * use rpcUrl in controller config ([decentralized-identity#128](https://github.com/veramolabs/ens-did-resolver/issues/128)) ([5302536](5302536)), closes [decentralized-identity#127](https://github.com/veramolabs/ens-did-resolver/issues/127) * **deps:** update dependency buffer to v6 ([decentralized-identity#93](https://github.com/veramolabs/ens-did-resolver/issues/93)) ([e1dc861](e1dc861)) * **deps:** update dependency did-resolver to v1.1.0 ([ab47058](ab47058)) * **deps:** update dependency did-resolver to v2 ([decentralized-identity#68](https://github.com/veramolabs/ens-did-resolver/issues/68)) ([831ec17](831ec17)) * **deps:** update dependency did-resolver to v2.1.0 ([b26d387](b26d387)) * **deps:** update dependency did-resolver to v2.1.1 ([1a4cbca](1a4cbca)) * **deps:** update dependency did-resolver to v2.1.2 ([8c2294e](8c2294e)) * **deps:** update dependency ethjs-contract to ^0.2.0 ([b667ce6](b667ce6)) * **deps:** use Resolvable type from did-resolver ([d213ae6](d213ae6)) * **types:** simplify type exports ([decentralized-identity#101](https://github.com/veramolabs/ens-did-resolver/issues/101)) ([90ca9b5](90ca9b5)) * remove ejs module distribution ([780ec08](780ec08)), closes [decentralized-identity#39](https://github.com/veramolabs/ens-did-resolver/issues/39) * require a configuration to be used when initializing the resolver ([3adc029](3adc029)) ### Features * add `assertionMethod` by default to didDocument ([decentralized-identity#124](https://github.com/veramolabs/ens-did-resolver/issues/124)) ([11b2096](11b2096)), closes [decentralized-identity#117](https://github.com/veramolabs/ens-did-resolver/issues/117) [decentralized-identity#115](https://github.com/veramolabs/ens-did-resolver/issues/115) * add ability to use a compressed publicKey as identifier ([decentralized-identity#73](https://github.com/veramolabs/ens-did-resolver/issues/73)) ([e257eb3](e257eb3)), closes [decentralized-identity#56](https://github.com/veramolabs/ens-did-resolver/issues/56) * add encryption key support for ethr-did-documents ([dff7b0f](dff7b0f)), closes [decentralized-identity#52](https://github.com/veramolabs/ens-did-resolver/issues/52) * add encryption key support for ethr-did-documents ([2f5825c](2f5825c)), closes [decentralized-identity#52](https://github.com/veramolabs/ens-did-resolver/issues/52) * Add types declaration stubb ([05944b1](05944b1)) * export `EthrDidController` helper class ([decentralized-identity#120](https://github.com/veramolabs/ens-did-resolver/issues/120)) ([745100d](745100d)) * import instead of require networks.json ([50c0832](50c0832)) * Initial version ([#1](#1)) ([d7a3cf8](d7a3cf8)) * upgrade to latest did core spec ([decentralized-identity#99](https://github.com/veramolabs/ens-did-resolver/issues/99)) ([decentralized-identity#109](https://github.com/veramolabs/ens-did-resolver/issues/109)) ([d46eea3](d46eea3)), closes [decentralized-identity#105](https://github.com/veramolabs/ens-did-resolver/issues/105) [decentralized-identity#95](https://github.com/veramolabs/ens-did-resolver/issues/95) [decentralized-identity#106](https://github.com/veramolabs/ens-did-resolver/issues/106) [decentralized-identity#83](https://github.com/veramolabs/ens-did-resolver/issues/83) [decentralized-identity#85](https://github.com/veramolabs/ens-did-resolver/issues/85) [decentralized-identity#83](https://github.com/veramolabs/ens-did-resolver/issues/83) [decentralized-identity#85](https://github.com/veramolabs/ens-did-resolver/issues/85) [decentralized-identity#95](https://github.com/veramolabs/ens-did-resolver/issues/95) [decentralized-identity#105](https://github.com/veramolabs/ens-did-resolver/issues/105) [decentralized-identity#106](https://github.com/veramolabs/ens-did-resolver/issues/106) * upgrade to latest did core spec ([decentralized-identity#99](https://github.com/veramolabs/ens-did-resolver/issues/99)) ([decentralized-identity#109](https://github.com/veramolabs/ens-did-resolver/issues/109)) ([decentralized-identity#111](https://github.com/veramolabs/ens-did-resolver/issues/111)) ([2a023b1](2a023b1)), closes [decentralized-identity#105](https://github.com/veramolabs/ens-did-resolver/issues/105) [decentralized-identity#95](https://github.com/veramolabs/ens-did-resolver/issues/95) [decentralized-identity#106](https://github.com/veramolabs/ens-did-resolver/issues/106) [decentralized-identity#83](https://github.com/veramolabs/ens-did-resolver/issues/83) [decentralized-identity#85](https://github.com/veramolabs/ens-did-resolver/issues/85) [decentralized-identity#83](https://github.com/veramolabs/ens-did-resolver/issues/83) [decentralized-identity#85](https://github.com/veramolabs/ens-did-resolver/issues/85) [decentralized-identity#95](https://github.com/veramolabs/ens-did-resolver/issues/95) [decentralized-identity#105](https://github.com/veramolabs/ens-did-resolver/issues/105) [decentralized-identity#106](https://github.com/veramolabs/ens-did-resolver/issues/106) * use only named exports ([decentralized-identity#31](https://github.com/veramolabs/ens-did-resolver/issues/31)) ([a558e14](a558e14)) * versioning ([decentralized-identity#121](https://github.com/veramolabs/ens-did-resolver/issues/121)) ([b794d69](b794d69)), closes [decentralized-identity#119](https://github.com/veramolabs/ens-did-resolver/issues/119) [decentralized-identity#118](https://github.com/veramolabs/ens-did-resolver/issues/118) [decentralized-identity#119](https://github.com/veramolabs/ens-did-resolver/issues/119) [decentralized-identity#118](https://github.com/veramolabs/ens-did-resolver/issues/118) ### BREAKING CHANGES * The return type is `DIDResolutionResult` which wraps a `DIDDocument`. * No errors are thrown during DID resolution. Please check `result.didResolutionMetadata.error` instead. * This DID core spec requirement will break for users expecting `publicKey`, `ethereumAddress`, `Secp256k1VerificationKey2018` entries in the DID document. They are replaced with `verificationMethod`, `blockchainAccountId` and `EcdsaSecp256k1VerificationKey2019` and `EcdsaSecp256k1RecoveryMethod2020` depending on the content. * JWTs that refer to the `did:ethr:...#owner` key in their header may be considered invalid after this upgrade, as the key id is now `did:ethr:...#controller` * this removes the fallback hardcoded RPC URLs and will fail early when a wrong configuration (or none) is provided to `getResolver()`
# 1.0.0 (2024-11-14) ### Bug Fixes * add esm wrapper instead of double transpile ([d2bbeaf](d2bbeaf)) * broaden window for event logs processing (fix Aurora) ([decentralized-identity#149](https://github.com/coincord/ezrah-did-resolver/issues/149)) ([5ee6bed](5ee6bed)) * **build:** add named exports to esm wrapper ([decentralized-identity#176](https://github.com/coincord/ezrah-did-resolver/issues/176)) ([725ed25](725ed25)), closes [decentralized-identity#175](https://github.com/coincord/ezrah-did-resolver/issues/175) * **build:** build commonjs and also expose esm wrapper ([522c199](522c199)) * **build:** include default export to work around some bundler issues ([decentralized-identity#205](https://github.com/coincord/ezrah-did-resolver/issues/205)) ([1e9e4ef](1e9e4ef)), closes [decentralized-identity#186](https://github.com/coincord/ezrah-did-resolver/issues/186) * **build:** transpile for commonjs, use wrapper for esm ([decentralized-identity#170](https://github.com/coincord/ezrah-did-resolver/issues/170)) ([5eba679](5eba679)) * **build:** use commonjs module in tsconfig ([e66d054](e66d054)) * change 'owner' to 'controller' to follow W3C Spec ([decentralized-identity#75](https://github.com/coincord/ezrah-did-resolver/issues/75)) ([decentralized-identity#81](https://github.com/coincord/ezrah-did-resolver/issues/81)) ([af37b3f](af37b3f)) * **ci:** groom the build scripts and dependencies ([decentralized-identity#156](https://github.com/coincord/ezrah-did-resolver/issues/156)) ([9a53958](9a53958)) * **ci:** run tests on a matrix of node versions ([3825ac0](3825ac0)) * consistent Encoding of `attrValue` on `createRevokeAttributeHash` ([decentralized-identity#200](https://github.com/coincord/ezrah-did-resolver/issues/200)) ([81363d0](81363d0)) * create alpha release ([1d5d5f2](1d5d5f2)) * **deps:** bump dependencies and adapt code ([decentralized-identity#193](https://github.com/coincord/ezrah-did-resolver/issues/193)) ([0a8da00](0a8da00)) * **deps:** bump did-resolver to 3.1.3+ ([0ddde4b](0ddde4b)) * **deps:** bump ethers to ^5.5.0 ([c39788a](c39788a)) * **deps:** remove querystring in favor of UrlSearchParams ([cd5e596](cd5e596)) * **deps:** update all non-major dependencies ([5d1be47](5d1be47)) * **deps:** update dependency buffer to v6 ([decentralized-identity#93](https://github.com/coincord/ezrah-did-resolver/issues/93)) ([e1dc861](e1dc861)) * **deps:** update dependency did-resolver to v1.1.0 ([ab47058](ab47058)) * **deps:** update dependency did-resolver to v2 ([decentralized-identity#68](https://github.com/coincord/ezrah-did-resolver/issues/68)) ([831ec17](831ec17)) * **deps:** update dependency did-resolver to v2.1.0 ([b26d387](b26d387)) * **deps:** update dependency did-resolver to v2.1.1 ([1a4cbca](1a4cbca)) * **deps:** update dependency did-resolver to v2.1.2 ([8c2294e](8c2294e)) * **deps:** Update dependency did-resolver to v4.1.0 ([ea501e1](ea501e1)) * **deps:** update dependency ethers to v6.10.0 ([435ae92](435ae92)) * **deps:** update dependency ethers to v6.11.0 ([35620c9](35620c9)) * **deps:** update dependency ethers to v6.11.1 ([d22fd46](d22fd46)) * **deps:** update dependency ethers to v6.13.0 ([9c9d978](9c9d978)) * **deps:** update dependency ethers to v6.13.1 ([e6885b9](e6885b9)) * **deps:** update dependency ethers to v6.13.2 ([c9d253f](c9d253f)) * **deps:** update dependency ethers to v6.13.3 ([840f6d4](840f6d4)) * **deps:** update dependency ethers to v6.13.4 ([f940b8e](f940b8e)) * **deps:** update dependency ethers to v6.9.0 ([0ca70ec](0ca70ec)) * **deps:** update dependency ethers to v6.9.1 ([01e0006](01e0006)) * **deps:** update dependency ethers to v6.9.2 ([0e69c5b](0e69c5b)) * **deps:** update dependency ethjs-contract to ^0.2.0 ([b667ce6](b667ce6)) * **deps:** update did-resolver to 4.0.1 ([decentralized-identity#172](https://github.com/coincord/ezrah-did-resolver/issues/172)) ([ce38d01](ce38d01)) * **deps:** update ethers to v6 ([decentralized-identity#188](https://github.com/coincord/ezrah-did-resolver/issues/188)) ([2785e61](2785e61)) * **deps:** use Resolvable type from did-resolver ([d213ae6](d213ae6)) * **doc:** update LD [@context](https://github.com/context) ([decentralized-identity#154](https://github.com/coincord/ezrah-did-resolver/issues/154)) ([29c196a](29c196a)), closes [decentralized-identity#151](https://github.com/coincord/ezrah-did-resolver/issues/151) * **doc:** update spec to use new CAIP10 format ([77a4f67](77a4f67)) * e2e tests with deprecated ethr test networks ([0fd9915](0fd9915)) * export MetaSignature type ([62f250a](62f250a)) * hex values getting wrongly encoded to utf8 for setAttributeSigned ([c5c8989](c5c8989)) * ignore query string when interpreting identifiers ([decentralized-identity#123](https://github.com/coincord/ezrah-did-resolver/issues/123)) ([5508f8a](5508f8a)), closes [decentralized-identity#122](https://github.com/coincord/ezrah-did-resolver/issues/122) * maintenance of dependencies, bots and build scripts ([decentralized-identity#136](https://github.com/coincord/ezrah-did-resolver/issues/136)) ([0d3fcf7](0d3fcf7)) * reference /enc/ keys in `keyAgreement` section of DID doc ([decentralized-identity#146](https://github.com/coincord/ezrah-did-resolver/issues/146)) ([5d507ef](5d507ef)), closes [decentralized-identity#145](https://github.com/coincord/ezrah-did-resolver/issues/145) * remove 0x prefix from publicKeyHex ([decentralized-identity#147](https://github.com/coincord/ezrah-did-resolver/issues/147)) ([063ee67](063ee67)), closes [decentralized-identity#140](https://github.com/coincord/ezrah-did-resolver/issues/140) * remove ejs module distribution ([780ec08](780ec08)), closes [decentralized-identity#39](https://github.com/coincord/ezrah-did-resolver/issues/39) * require a configuration to be used when initializing the resolver ([3adc029](3adc029)) * reverse events to have consistent order ([decentralized-identity#87](https://github.com/coincord/ezrah-did-resolver/issues/87)) ([08b9692](08b9692)), closes [/github.com/decentralized-identity/issues/86#issuecomment-699961595](https://github.com//github.com/decentralized-identity/ethr-did-resolver/issues/86/issues/issuecomment-699961595) * revert aurora tweaks and use known deployments in config ([decentralized-identity#161](https://github.com/coincord/ezrah-did-resolver/issues/161)) ([e238a9f](e238a9f)) * **spec:** remove ambiguity around deletion ([decentralized-identity#178](https://github.com/coincord/ezrah-did-resolver/issues/178)) ([da8e22e](da8e22e)), closes [decentralized-identity#177](https://github.com/coincord/ezrah-did-resolver/issues/177) * strip milliseconds from dateTime strings ([decentralized-identity#129](https://github.com/coincord/ezrah-did-resolver/issues/129)) ([3e958af](3e958af)), closes [decentralized-identity#126](https://github.com/coincord/ezrah-did-resolver/issues/126) * **test:** remove the connection test for goerli network ([decentralized-identity#201](https://github.com/coincord/ezrah-did-resolver/issues/201)) ([c861026](c861026)) * track legacy deployments, fix nonce calculation, export contract ([decentralized-identity#167](https://github.com/coincord/ezrah-did-resolver/issues/167)) ([c0d0366](c0d0366)), closes [decentralized-identity#165](https://github.com/coincord/ezrah-did-resolver/issues/165) [decentralized-identity#166](https://github.com/coincord/ezrah-did-resolver/issues/166) * **types:** simplify type exports ([decentralized-identity#101](https://github.com/coincord/ezrah-did-resolver/issues/101)) ([90ca9b5](90ca9b5)) * update blockchainAccountId to the new CAIP10 format ([decentralized-identity#153](https://github.com/coincord/ezrah-did-resolver/issues/153)) ([9c3f401](9c3f401)), closes [decentralized-identity#152](https://github.com/coincord/ezrah-did-resolver/issues/152) * **updates:** package.json changes for base versioning ([b5bfa4a](b5bfa4a)) * use rpcUrl in controller config ([decentralized-identity#128](https://github.com/coincord/ezrah-did-resolver/issues/128)) ([5302536](5302536)), closes [decentralized-identity#127](https://github.com/coincord/ezrah-did-resolver/issues/127) ### Features * add `assertionMethod` by default to didDocument ([decentralized-identity#124](https://github.com/coincord/ezrah-did-resolver/issues/124)) ([11b2096](11b2096)), closes [decentralized-identity#117](https://github.com/coincord/ezrah-did-resolver/issues/117) [decentralized-identity#115](https://github.com/coincord/ezrah-did-resolver/issues/115) * add ability to use a compressed publicKey as identifier ([decentralized-identity#73](https://github.com/coincord/ezrah-did-resolver/issues/73)) ([e257eb3](e257eb3)), closes [decentralized-identity#56](https://github.com/coincord/ezrah-did-resolver/issues/56) * add controller support for meta/signed transactions ([decentralized-identity#164](https://github.com/coincord/ezrah-did-resolver/issues/164)) ([ce93e70](ce93e70)) * add encryption key support for ethr-did-documents ([dff7b0f](dff7b0f)), closes [decentralized-identity#52](https://github.com/coincord/ezrah-did-resolver/issues/52) * add encryption key support for ethr-did-documents ([2f5825c](2f5825c)), closes [decentralized-identity#52](https://github.com/coincord/ezrah-did-resolver/issues/52) * add experimental support for ServiceEndpoint objects ([decentralized-identity#163](https://github.com/coincord/ezrah-did-resolver/issues/163)) ([3919a25](3919a25)) * add JSON-LD contexts that define all the terms being used ([decentralized-identity#192](https://github.com/coincord/ezrah-did-resolver/issues/192)) ([cd49ab8](cd49ab8)) * add linea:goerli deployment ([b7a36b3](b7a36b3)) * add Sepolia deployment ([decentralized-identity#195](https://github.com/coincord/ezrah-did-resolver/issues/195)) ([94015bf](94015bf)) * Add types declaration stubb ([05944b1](05944b1)) * **deployment:** add gnosischain and holesky deployments ([decentralized-identity#206](https://github.com/coincord/ezrah-did-resolver/issues/206)) ([4992094](4992094)) * export `EthrDidController` helper class ([decentralized-identity#120](https://github.com/coincord/ezrah-did-resolver/issues/120)) ([745100d](745100d)) * import instead of require networks.json ([50c0832](50c0832)) * track signing keys independently ([decentralized-identity#194](https://github.com/coincord/ezrah-did-resolver/issues/194)) ([cc44100](cc44100)), closes [decentralized-identity#184](https://github.com/coincord/ezrah-did-resolver/issues/184) * upgrade to latest did core spec ([decentralized-identity#99](https://github.com/coincord/ezrah-did-resolver/issues/99)) ([decentralized-identity#109](https://github.com/coincord/ezrah-did-resolver/issues/109)) ([d46eea3](d46eea3)), closes [decentralized-identity#105](https://github.com/coincord/ezrah-did-resolver/issues/105) [decentralized-identity#95](https://github.com/coincord/ezrah-did-resolver/issues/95) [decentralized-identity#106](https://github.com/coincord/ezrah-did-resolver/issues/106) [decentralized-identity#83](https://github.com/coincord/ezrah-did-resolver/issues/83) [decentralized-identity#85](https://github.com/coincord/ezrah-did-resolver/issues/85) [decentralized-identity#83](https://github.com/coincord/ezrah-did-resolver/issues/83) [decentralized-identity#85](https://github.com/coincord/ezrah-did-resolver/issues/85) [decentralized-identity#95](https://github.com/coincord/ezrah-did-resolver/issues/95) [decentralized-identity#105](https://github.com/coincord/ezrah-did-resolver/issues/105) [decentralized-identity#106](https://github.com/coincord/ezrah-did-resolver/issues/106) * upgrade to latest did core spec ([decentralized-identity#99](https://github.com/coincord/ezrah-did-resolver/issues/99)) ([decentralized-identity#109](https://github.com/coincord/ezrah-did-resolver/issues/109)) ([decentralized-identity#111](https://github.com/coincord/ezrah-did-resolver/issues/111)) ([2a023b1](2a023b1)), closes [decentralized-identity#105](https://github.com/coincord/ezrah-did-resolver/issues/105) [decentralized-identity#95](https://github.com/coincord/ezrah-did-resolver/issues/95) [decentralized-identity#106](https://github.com/coincord/ezrah-did-resolver/issues/106) [decentralized-identity#83](https://github.com/coincord/ezrah-did-resolver/issues/83) [decentralized-identity#85](https://github.com/coincord/ezrah-did-resolver/issues/85) [decentralized-identity#83](https://github.com/coincord/ezrah-did-resolver/issues/83) [decentralized-identity#85](https://github.com/coincord/ezrah-did-resolver/issues/85) [decentralized-identity#95](https://github.com/coincord/ezrah-did-resolver/issues/95) [decentralized-identity#105](https://github.com/coincord/ezrah-did-resolver/issues/105) [decentralized-identity#106](https://github.com/coincord/ezrah-did-resolver/issues/106) * use only named exports ([decentralized-identity#31](https://github.com/coincord/ezrah-did-resolver/issues/31)) ([a558e14](a558e14)) * versioning ([decentralized-identity#121](https://github.com/coincord/ezrah-did-resolver/issues/121)) ([b794d69](b794d69)), closes [decentralized-identity#119](https://github.com/coincord/ezrah-did-resolver/issues/119) [decentralized-identity#118](https://github.com/coincord/ezrah-did-resolver/issues/118) [decentralized-identity#119](https://github.com/coincord/ezrah-did-resolver/issues/119) [decentralized-identity#118](https://github.com/coincord/ezrah-did-resolver/issues/118) ### BREAKING CHANGES * the keys in the `verificationMethod` array are no longer all referenced in the `assertionMethod` array. Only authentication (`sigAuth`) or signing keys (`veriKey`) are added. * **deps:** this update uses ethers v6 which has a sufficiently different API from v5 that will likely need attention. While the API of this library hasn't changed, it is likely that an update will need attention so this is marked as a breaking change and a new major version is released. * **spec:** This is a breaking change of the spec as "soft deletion" of non-updated DIDs is no longer considered valid. * **build:** previous versions (<7.0.0) would be transpiled twice by microbundle, but this seems to be [anti-pattern](https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1) Please raise an issue on https://github.com/decentralized-identity/ethr-did-resolver if this change is incompatible with your tech stack and there are no workarounds. * ESM is only supported through a wrapper * **doc:** Since the context definitions most often have to be embedded in apps, this requires apps to download the new definition. * Apps have to update their processing of `blockchainAccountId` to use the [new CAIP10 format](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md) * `publicKeyHex` values in the DID document no longer contain a `0x` prefix * The return type is `DIDResolutionResult` which wraps a `DIDDocument`. * No errors are thrown during DID resolution. Please check `result.didResolutionMetadata.error` instead. * This DID core spec requirement will break for users expecting `publicKey`, `ethereumAddress`, `Secp256k1VerificationKey2018` entries in the DID document. They are replaced with `verificationMethod`, `blockchainAccountId` and `EcdsaSecp256k1VerificationKey2019` and `EcdsaSecp256k1RecoveryMethod2020` depending on the content. * JWTs that refer to the `did:ethr:...#owner` key in their header may be considered invalid after this upgrade, as the key id is now `did:ethr:...#controller` * this removes the fallback hardcoded RPC URLs and will fail early when a wrong configuration (or none) is provided to `getResolver()`
What's new
Everything.
The library has been fully revised. It is now written in typescript and is using the
ethersjs
stack to interact with the ethereum blockchains.This PR closes a number of issues and other PRs: #83, #85, #95, #105, #106, and most importantly this is an almost complete fix for #99
Another fixed issue that was not previously filed is the stability of IDs. This way, DID URLs that refer to an entry in the DID document will always refer to the same entry until that entry is revoked, or expires.
What's not new
Some elements of the DID core spec were not yet implemented:
verificationMethod
instead ofpublicKey
(yet... it is trivial to make the switch now)hex
andbase64
encodings for keys are kept, they were not forcefully migrated topublicKeyBase58
Testing
All existing test data was kept, but because of the different stack and lots of refactoring, all files are now changed.
Basing the interactions on ethersjs allows a lot more expressiveness in tests (this is not really relevant now, but will be for the upcoming upgrades)
I also added regression tests for the issues that are marked as fixed or the other PRs that are now obsolete.
BREAKING CHANGES
ethereumAddress
are now listed asEcdsaSecp256k1RecoveryMethod2020
and secp256k1 keys are listed asEcdsaSecp256k1VerificationKey2019
resolver
returnsDIDResolutionResult
which wraps aDIDDocument
, but also contains some meta-data, according to [email protected] and the latest DID core spec.