Skip to content

Commit

Permalink
fix(deps): bump did-jwt to v6 and all related deps to latest
Browse files Browse the repository at this point in the history
closes #923
closes #848
  • Loading branch information
mirceanis committed Jun 10, 2022
1 parent 219cde2 commit f02988c
Show file tree
Hide file tree
Showing 35 changed files with 366 additions and 446 deletions.
6 changes: 3 additions & 3 deletions __tests__/shared/documentationExamples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default (testContext: {
id: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller',
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
blockchainAccountId: '0xb09B66026bA5909A7CFE99b76875431D2b8D5190@eip155:4',
blockchainAccountId: 'eip155:4:0xb09B66026bA5909A7CFE99b76875431D2b8D5190',
})
})

Expand All @@ -52,15 +52,15 @@ export default (testContext: {
expect(doc.didDocument).toEqual({
'@context': [
'https://www.w3.org/ns/did/v1',
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
],
id: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
verificationMethod: [
{
id: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller',
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
blockchainAccountId: '0xb09B66026bA5909A7CFE99b76875431D2b8D5190@eip155:4',
blockchainAccountId: 'eip155:4:0xb09B66026bA5909A7CFE99b76875431D2b8D5190',
},
],
authentication: ['did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller'],
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
"cross-fetch": "^3.1.4",
"date-fns": "^2.28.0",
"debug": "^4.3.3",
"did-resolver": "3.2.2",
"did-resolver": "^3.2.2",
"dotenv": "^16.0.0",
"ethr-did-resolver": "^5.0.4",
"ethr-did-resolver": "^6.0.1",
"express": "^4.17.2",
"express-handlebars": "^6.0.2",
"fuzzy": "^0.1.3",
Expand All @@ -66,7 +66,7 @@
"ts-json-schema-generator": "^1.0.0",
"typeorm": "0.3.6",
"url-parse": "^1.5.4",
"web-did-resolver": "^2.0.12",
"web-did-resolver": "^2.0.18",
"ws": "^8.4.0",
"yaml": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"debug": "^4.3.3",
"did-jwt-vc": "^2.1.9",
"did-jwt-vc": "^2.1.12",
"events": "^3.2.0",
"z-schema": "^5.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,5 +313,5 @@ export function createAgent<T extends IPluginMethodMap, C = Record<string, any>>
options: IAgentOptions & { context?: C },
): TAgent<T> & { context?: C } {
//@ts-ignore
return new Agent(options)
return new Agent(options) as TAgent<T>
}
14 changes: 7 additions & 7 deletions packages/core/src/types/IResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ export interface IResolver extends IPluginMethodMap {
* expect(doc.didDocument).toEqual({
* '@context': [
* 'https://www.w3.org/ns/did/v1',
* 'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld',
* 'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
* ],
* id: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
* verificationMethod: [
* {
* id: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller',
* type: 'EcdsaSecp256k1RecoveryMethod2020',
* controller: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
* blockchainAccountId: '0xb09B66026bA5909A7CFE99b76875431D2b8D5190@eip155:4',
* blockchainAccountId: 'eip155:4:0xb09B66026bA5909A7CFE99b76875431D2b8D5190',
* },
* ],
* authentication: ['did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller'],
Expand All @@ -114,11 +114,11 @@ export interface IResolver extends IPluginMethodMap {
* section: 'authentication'
* })
* expect(fragment).toEqual({
* id: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller',
* type: 'EcdsaSecp256k1RecoveryMethod2020',
* controller: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
* blockchainAccountId: '0xb09B66026bA5909A7CFE99b76875431D2b8D5190@eip155:4',
* })
* id: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190#controller',
* type: 'EcdsaSecp256k1RecoveryMethod2020',
* controller: 'did:ethr:rinkeby:0xb09b66026ba5909a7cfe99b76875431d2b8d5190',
* blockchainAccountId: 'eip155:4:0xb09B66026bA5909A7CFE99b76875431D2b8D5190',
* })
* ```
*
* @param args - The description of the component you want.
Expand Down
2 changes: 1 addition & 1 deletion packages/credential-ld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@veramo/did-resolver": "^3.1.0",
"@veramo/utils": "^3.1.0",
"debug": "^4.3.3",
"did-resolver": "3.2.2",
"did-resolver": "^3.2.2",
"uint8arrays": "^3.0.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/credential-status/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
},
"dependencies": {
"@veramo/core": "^3.1.0",
"credential-status": "^2.0.2",
"did-jwt": "^5.12.4",
"did-resolver": "3.2.2"
"credential-status": "^2.0.3",
"did-jwt": "^6.1.2",
"did-resolver": "^3.2.2"
},
"devDependencies": {
"@types/debug": "4.1.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-w3c/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@veramo/message-handler": "^3.1.4",
"@veramo/utils": "^3.1.4",
"debug": "^4.3.3",
"did-jwt-vc": "^2.1.9",
"did-resolver": "3.2.2",
"did-jwt-vc": "^2.1.12",
"did-resolver": "^3.2.2",
"uint8arrays": "^3.0.0",
"uuid": "^8.3.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('@veramo/credential-w3c', () => {
id: `${didEthr}#owner`,
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: args?.didUrl,
blockchainAccountId: `${didEthr.slice(-42)}@eip155:1`,
blockchainAccountId: `eip155:1:${didEthr.slice(-42)}`,
},
],
authentication: [`${didEthr}#owner`],
Expand Down
6 changes: 3 additions & 3 deletions packages/did-comm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"@veramo/utils": "^3.1.4",
"cross-fetch": "^3.1.4",
"debug": "^4.3.3",
"did-jwt": "^5.12.3",
"did-resolver": "3.2.2",
"uint8arrays": "3.0.0",
"did-jwt": "^6.1.2",
"did-resolver": "^3.2.2",
"uint8arrays": "^3.0.0",
"uuid": "^8.3.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/did-jwt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@veramo/core": "^3.1.4",
"@veramo/message-handler": "^3.1.4",
"debug": "^4.3.3",
"did-jwt": "^5.12.3",
"did-resolver": "3.2.2"
"did-jwt": "^6.1.2",
"did-resolver": "^3.2.2"
},
"devDependencies": {
"@types/debug": "4.1.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/did-provider-ethr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@veramo/core": "^3.1.4",
"@veramo/did-manager": "^3.1.4",
"debug": "^4.3.3",
"ethr-did": "^2.2.0"
"ethr-did": "^2.2.3"
},
"devDependencies": {
"@types/debug": "4.1.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/did-resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"devDependencies": {
"@types/debug": "4.1.7",
"did-resolver": "3.2.2",
"ethr-did-resolver": "5.0.4",
"ethr-did-resolver": "6.0.1",
"typescript": "4.7.3",
"web-did-resolver": "2.0.16"
"web-did-resolver": "2.0.18"
},
"files": [
"build/**/*",
Expand Down
4 changes: 2 additions & 2 deletions packages/did-resolver/src/__tests__/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ describe('@veramo/did-resolver', () => {
didDocument: {
'@context': [
'https://www.w3.org/ns/did/v1',
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
],
id: 'did:ethr:rinkeby:0xE6Fe788d8ca214A080b0f6aC7F48480b2AEfa9a6',
verificationMethod: [
{
id: 'did:ethr:rinkeby:0xE6Fe788d8ca214A080b0f6aC7F48480b2AEfa9a6#controller',
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: 'did:ethr:rinkeby:0xE6Fe788d8ca214A080b0f6aC7F48480b2AEfa9a6',
blockchainAccountId: '0xE6Fe788d8ca214A080b0f6aC7F48480b2AEfa9a6@eip155:4',
blockchainAccountId: 'eip155:4:0xE6Fe788d8ca214A080b0f6aC7F48480b2AEfa9a6',
},
],
authentication: ['did:ethr:rinkeby:0xE6Fe788d8ca214A080b0f6aC7F48480b2AEfa9a6#controller'],
Expand Down
10 changes: 5 additions & 5 deletions packages/key-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"extract-api": "yarn veramo dev extract-api"
},
"dependencies": {
"@ethersproject/bytes": "5.6.1",
"@ethersproject/strings": "5.6.1",
"@ethersproject/transactions": "5.6.2",
"@ethersproject/bytes": "^5.6.1",
"@ethersproject/strings": "^5.6.1",
"@ethersproject/transactions": "^5.6.2",
"@stablelib/ed25519": "^1.0.2",
"@veramo/core": "^3.1.4",
"did-jwt": "^5.12.3",
"uint8arrays": "3.0.0",
"did-jwt": "^6.1.2",
"uint8arrays": "^3.0.0",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
18 changes: 9 additions & 9 deletions packages/kms-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
"extract-api": "yarn veramo dev extract-api"
},
"dependencies": {
"@ethersproject/abstract-provider": "5.6.1",
"@ethersproject/abstract-signer": "5.6.2",
"@ethersproject/bytes": "5.6.1",
"@ethersproject/random": "5.6.1",
"@ethersproject/signing-key": "5.6.2",
"@ethersproject/strings": "5.6.1",
"@ethersproject/transactions": "5.6.2",
"@ethersproject/wallet": "5.6.2",
"@ethersproject/abstract-provider": "^5.6.1",
"@ethersproject/abstract-signer": "^5.6.2",
"@ethersproject/bytes": "^5.6.1",
"@ethersproject/random": "^5.6.1",
"@ethersproject/signing-key": "^5.6.2",
"@ethersproject/strings": "^5.6.1",
"@ethersproject/transactions": "^5.6.2",
"@ethersproject/wallet": "^5.6.2",
"@stablelib/ed25519": "^1.0.2",
"@stablelib/nacl": "^1.0.2",
"@veramo/core": "^3.1.4",
"@veramo/key-manager": "^3.1.4",
"base-58": "^0.0.1",
"debug": "^4.3.3",
"did-jwt": "^5.12.3",
"did-jwt": "^6.1.2",
"uint8arrays": "^3.0.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/kms-local/src/key-management-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export class KeyManagementSystem extends AbstractKeyManagementSystem {
* @returns a base64url encoded signature for the `EdDSA` alg
*/
private async signEdDSA(key: string, data: Uint8Array): Promise<string> {
const signer = EdDSASigner(key)
const signer = EdDSASigner(arrayify(key, { allowMissingPrefix: true }))
const signature = await signer(data)
// base64url encoded string
return signature as string
Expand All @@ -253,7 +253,7 @@ export class KeyManagementSystem extends AbstractKeyManagementSystem {
alg: string | undefined,
data: Uint8Array,
): Promise<string> {
const signer = ES256KSigner(privateKeyHex, alg === 'ES256K-R')
const signer = ES256KSigner(arrayify(privateKeyHex, { allowMissingPrefix: true }), alg === 'ES256K-R')
const signature = await signer(data)
// base64url encoded string
return signature as string
Expand Down
2 changes: 1 addition & 1 deletion packages/selective-disclosure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@veramo/did-jwt": "^3.1.4",
"@veramo/message-handler": "^3.1.4",
"debug": "^4.3.3",
"did-jwt": "^5.12.3",
"did-jwt": "^6.1.2",
"uuid": "^8.3.0"
},
"devDependencies": {
Expand Down
25 changes: 0 additions & 25 deletions packages/test-react-app/.eslintrc.js

This file was deleted.

33 changes: 33 additions & 0 deletions packages/test-react-app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"env": {
"jest": true,
"node": true,
"browser": true
},
"globals": {
"page": true,
"browser": true,
"context": true,
"jestPuppeteer": true
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020,
"ecmaFeatures": {
"jsx": true,
"modules": true,
"experimentalObjectRestSpread": true
}
},
"plugins": [
"react",
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"ignorePatterns": ["**/*.browser-test.ts"]
}
3 changes: 0 additions & 3 deletions packages/test-react-app/babel.config.js

This file was deleted.

13 changes: 13 additions & 0 deletions packages/test-react-app/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
"@babel/preset-typescript"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ describe('Browser integration tests', () => {
didDocument: {
'@context': [
'https://www.w3.org/ns/did/v1',
'https://identity.foundation/EcdsaSecp256k1RecoverySignature2020/lds-ecdsa-secp256k1-recovery2020-0.0.jsonld',
'https://w3id.org/security/suites/secp256k1recovery-2020/v2',
],
id: 'did:ethr:rinkeby:0x6acf3bb1ef0ee84559de2bc2bd9d91532062a730',
verificationMethod: [
{
id: 'did:ethr:rinkeby:0x6acf3bb1ef0ee84559de2bc2bd9d91532062a730#controller',
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: 'did:ethr:rinkeby:0x6acf3bb1ef0ee84559de2bc2bd9d91532062a730',
blockchainAccountId: '0x6AcF3bB1eF0eE84559De2bC2Bd9D91532062a730@eip155:4',
blockchainAccountId: 'eip155:4:0x6AcF3bB1eF0eE84559De2bC2Bd9D91532062a730',
},
],
authentication: ['did:ethr:rinkeby:0x6acf3bb1ef0ee84559de2bc2bd9d91532062a730#controller'],
Expand Down
8 changes: 4 additions & 4 deletions packages/test-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"@veramo/url-handler": "^3.1.0",
"@veramo/utils": "^3.1.0",
"crypto": "npm:crypto-browserify",
"did-resolver": "3.2.2",
"ethr-did-resolver": "5.0.4",
"did-resolver": "^3.2.2",
"ethr-did-resolver": "^6.0.1",
"react": "18.1.0",
"react-dom": "18.1.0",
"stream": "npm:stream-browserify",
"typeorm": "0.3.6",
"web-did-resolver": "2.0.18",
"web-vitals": "2.1.4"
"web-did-resolver": "^2.0.18",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
Expand Down
Loading

0 comments on commit f02988c

Please sign in to comment.