ethr-did-resolver
Advanced tools
Comparing version 10.0.1 to 10.1.0
@@ -12,4 +12,5 @@ "use strict"; | ||
{ chainId: 5, registry: '0xdca7ef03e98e0dc2b855be647c39abe984fcf21b', name: 'goerli', legacyNonce: true }, | ||
{ chainId: 11155111, registry: '0x03d5003bf0e79C5F5223588F347ebA39AfbC3818', name: 'sepolia', legacyNonce: false }, | ||
// { chainId: 42, registry: '0xdca7ef03e98e0dc2b855be647c39abe984fcf21b', name: 'kovan', legacyNonce: true }, | ||
// // rsk networks cause socket hang up | ||
// { chainId: 42, registry: '0xdca7ef03e98e0dc2b855be647c39abe984fcf21b', name: 'kovan', legacyNonce: true }, | ||
// { chainId: 30, registry: '0xdca7ef03e98e0dc2b855be647c39abe984fcf21b', name: 'rsk', legacyNonce: true }, | ||
@@ -16,0 +17,0 @@ // { |
@@ -9,4 +9,4 @@ import { Contract, Provider } from 'ethers'; | ||
* { name: 'development', registry: '0x9af37603e98e0dc2b855be647c39abe984fc2445', rpcUrl: 'http://127.0.0.1:8545/' } | ||
* { name: 'goerli', chainId: 5, provider: new InfuraProvider('goerli') } | ||
* { name: 'rinkeby', provider: new AlchemyProvider('rinkeby') } | ||
* { name: 'sepolia', chainId: 11155111, provider: new InfuraProvider('sepolia') } | ||
* { name: 'goerli', provider: new AlchemyProvider('goerli') } | ||
* { name: 'rsk:testnet', chainId: '0x1f', rpcUrl: 'https://public-node.testnet.rsk.co' } | ||
@@ -41,3 +41,3 @@ * ``` | ||
* { name: 'goerli', chainId: 5, provider: new InfuraProvider('goerli') }, | ||
* { name: 'rinkeby', provider: new AlchemyProvider('rinkeby') }, | ||
* { name: 'sepolia', provider: new AlchemyProvider('sepolia') }, | ||
* { name: 'rsk:testnet', chainId: '0x1f', rpcUrl: 'https://public-node.testnet.rsk.co' }, | ||
@@ -44,0 +44,0 @@ * ] |
@@ -17,3 +17,3 @@ "use strict"; | ||
}; | ||
const knownInfuraNames = ['mainnet', 'goerli', 'aurora', 'linea:goerli']; | ||
const knownInfuraNames = ['mainnet', 'goerli', 'aurora', 'linea:goerli', 'sepolia']; | ||
function configureNetworksWithInfura(projectId) { | ||
@@ -88,3 +88,3 @@ if (!projectId) { | ||
* { name: 'goerli', chainId: 5, provider: new InfuraProvider('goerli') }, | ||
* { name: 'rinkeby', provider: new AlchemyProvider('rinkeby') }, | ||
* { name: 'sepolia', provider: new AlchemyProvider('sepolia') }, | ||
* { name: 'rsk:testnet', chainId: '0x1f', rpcUrl: 'https://public-node.testnet.rsk.co' }, | ||
@@ -91,0 +91,0 @@ * ] |
{ | ||
"name": "ethr-did-resolver", | ||
"version": "10.0.1", | ||
"version": "10.1.0", | ||
"description": "Resolve DID documents for ethereum addresses and public keys", | ||
@@ -83,4 +83,4 @@ "type": "commonjs", | ||
"devDependencies": { | ||
"@babel/core": "7.23.3", | ||
"@babel/preset-env": "7.23.3", | ||
"@babel/core": "7.23.5", | ||
"@babel/preset-env": "7.23.5", | ||
"@babel/preset-typescript": "7.23.3", | ||
@@ -91,7 +91,7 @@ "@ethers-ext/provider-ganache": "6.0.0-beta.2", | ||
"@types/jest": "29.5.10", | ||
"@typescript-eslint/eslint-plugin": "6.12.0", | ||
"@typescript-eslint/parser": "6.12.0", | ||
"@typescript-eslint/eslint-plugin": "6.13.1", | ||
"@typescript-eslint/parser": "6.13.1", | ||
"babel-jest": "29.7.0", | ||
"eslint": "8.54.0", | ||
"eslint-config-prettier": "9.0.0", | ||
"eslint": "8.55.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-jest": "27.6.0", | ||
@@ -98,0 +98,0 @@ "eslint-plugin-prettier": "5.0.1", |
@@ -95,2 +95,29 @@ import { Resolver } from 'did-resolver' | ||
it('resolves on sepolia when configured', async () => { | ||
const did = 'did:ethr:sepolia:' + addr | ||
const ethr = getResolver({ | ||
infuraProjectId: '6b734e0b04454df8a6ce234023c04f26', | ||
}) | ||
const resolver = new Resolver(ethr) | ||
const result = await resolver.resolve(did) | ||
expect(result).toEqual({ | ||
didDocumentMetadata: {}, | ||
didResolutionMetadata: { contentType: 'application/did+ld+json' }, | ||
didDocument: { | ||
'@context': expect.anything(), | ||
id: did, | ||
verificationMethod: [ | ||
{ | ||
id: `${did}#controller`, | ||
type: 'EcdsaSecp256k1RecoveryMethod2020', | ||
controller: did, | ||
blockchainAccountId: `eip155:11155111:${checksumAddr}`, | ||
}, | ||
], | ||
authentication: [`${did}#controller`], | ||
assertionMethod: [`${did}#controller`], | ||
}, | ||
}) | ||
}) | ||
// socket hangup | ||
@@ -97,0 +124,0 @@ it.skip('resolves on rsk when configured', async () => { |
@@ -47,4 +47,5 @@ /** | ||
{ chainId: 5, registry: '0xdca7ef03e98e0dc2b855be647c39abe984fcf21b', name: 'goerli', legacyNonce: true }, | ||
{ chainId: 11155111, registry: '0x03d5003bf0e79C5F5223588F347ebA39AfbC3818', name: 'sepolia', legacyNonce: false }, | ||
// { chainId: 42, registry: '0xdca7ef03e98e0dc2b855be647c39abe984fcf21b', name: 'kovan', legacyNonce: true }, | ||
// // rsk networks cause socket hang up | ||
// { chainId: 42, registry: '0xdca7ef03e98e0dc2b855be647c39abe984fcf21b', name: 'kovan', legacyNonce: true }, | ||
// { chainId: 30, registry: '0xdca7ef03e98e0dc2b855be647c39abe984fcf21b', name: 'rsk', legacyNonce: true }, | ||
@@ -51,0 +52,0 @@ // { |
@@ -13,3 +13,3 @@ import { Contract, ContractFactory, JsonRpcProvider, Provider } from 'ethers' | ||
const knownInfuraNames = ['mainnet', 'goerli', 'aurora', 'linea:goerli'] | ||
const knownInfuraNames = ['mainnet', 'goerli', 'aurora', 'linea:goerli', 'sepolia'] | ||
@@ -22,4 +22,4 @@ /** | ||
* { name: 'development', registry: '0x9af37603e98e0dc2b855be647c39abe984fc2445', rpcUrl: 'http://127.0.0.1:8545/' } | ||
* { name: 'goerli', chainId: 5, provider: new InfuraProvider('goerli') } | ||
* { name: 'rinkeby', provider: new AlchemyProvider('rinkeby') } | ||
* { name: 'sepolia', chainId: 11155111, provider: new InfuraProvider('sepolia') } | ||
* { name: 'goerli', provider: new AlchemyProvider('goerli') } | ||
* { name: 'rsk:testnet', chainId: '0x1f', rpcUrl: 'https://public-node.testnet.rsk.co' } | ||
@@ -120,3 +120,3 @@ * ``` | ||
* { name: 'goerli', chainId: 5, provider: new InfuraProvider('goerli') }, | ||
* { name: 'rinkeby', provider: new AlchemyProvider('rinkeby') }, | ||
* { name: 'sepolia', provider: new AlchemyProvider('sepolia') }, | ||
* { name: 'rsk:testnet', chainId: '0x1f', rpcUrl: 'https://public-node.testnet.rsk.co' }, | ||
@@ -123,0 +123,0 @@ * ] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1175395
26203