Skip to content

Commit

Permalink
chore: attempting to upgrade veramo to 5.6.1-next.57
Browse files Browse the repository at this point in the history
  • Loading branch information
nickreynolds committed Mar 27, 2024
1 parent 6e87c72 commit 0578956
Show file tree
Hide file tree
Showing 7 changed files with 634 additions and 758 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"publish:next": "lerna publish --conventional-prerelease --force-publish --canary --no-git-tag-version --include-merged-tags --preid next --pre-dist-tag next --yes"
},
"devDependencies": {
"@veramo/core": "5.5.4-next.22",
"@veramo/core-types": "5.5.4-next.22",
"@veramo/remote-client": "5.5.4-next.22",
"@veramo/core": "5.6.1-next.57",
"@veramo/core-types": "5.6.1-next.57",
"@veramo/remote-client": "5.6.1-next.57",
"aws-sdk": "^2.1476.0",
"dotenv": "^16.3.1",
"lerna": "7.3.0",
Expand Down
49 changes: 25 additions & 24 deletions packages/agent-explore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"devDependencies": {
"@ant-design/icons": "^5.1.4",
"@ant-design/pro-components": "^2.6.13",
"@aviarytech/did-peer": "^0.0.22",
"@babel/plugin-syntax-import-assertions": "^7.20.0",
"@babel/preset-react": "^7.22.5",
"@commitlint/cli": "^17.6.5",
Expand All @@ -111,30 +112,30 @@
"@typescript-eslint/parser": "^6.4.0",
"@veramo-community/agent-explorer-plugin": "workspace:*",
"@veramo-community/veramo-react": "1.6.2",
"@veramo/core": "5.5.4-next.23",
"@veramo/core-types": "5.5.4-next.23",
"@veramo/credential-eip712": "5.5.4-next.23",
"@veramo/credential-ld": "5.5.4-next.23",
"@veramo/credential-w3c": "5.5.4-next.23",
"@veramo/data-store": "5.5.4-next.23",
"@veramo/data-store-json": "5.5.4-next.23",
"@veramo/did-comm": "5.5.4-next.23",
"@veramo/did-discovery": "5.5.4-next.23",
"@veramo/did-jwt": "5.5.4-next.23",
"@veramo/did-manager": "5.5.4-next.23",
"@veramo/did-provider-ethr": "5.5.4-next.23",
"@veramo/did-provider-jwk": "5.5.4-next.23",
"@veramo/did-provider-key": "5.5.4-next.23",
"@veramo/did-provider-peer": "5.5.4-next.23",
"@veramo/did-provider-pkh": "5.5.4-next.23",
"@veramo/did-resolver": "5.5.4-next.23",
"@veramo/key-manager": "5.5.4-next.23",
"@veramo/kms-local": "5.5.4-next.23",
"@veramo/kms-web3": "5.5.4-next.23",
"@veramo/message-handler": "5.5.4-next.23",
"@veramo/remote-client": "5.5.4-next.23",
"@veramo/selective-disclosure": "5.5.4-next.23",
"@veramo/utils": "5.5.4-next.23",
"@veramo/core": "5.6.1-next.57",
"@veramo/core-types": "5.6.1-next.57",
"@veramo/credential-eip712": "5.6.1-next.57",
"@veramo/credential-ld": "5.6.1-next.57",
"@veramo/credential-w3c": "5.6.1-next.57",
"@veramo/data-store": "5.6.1-next.57",
"@veramo/data-store-json": "5.6.1-next.57",
"@veramo/did-comm": "5.6.1-next.57",
"@veramo/did-discovery": "5.6.1-next.57",
"@veramo/did-jwt": "5.6.1-next.57",
"@veramo/did-manager": "5.6.1-next.57",
"@veramo/did-provider-ethr": "5.6.1-next.57",
"@veramo/did-provider-jwk": "5.6.1-next.57",
"@veramo/did-provider-key": "5.6.1-next.57",
"@veramo/did-provider-peer": "5.6.1-next.57",
"@veramo/did-provider-pkh": "5.6.1-next.57",
"@veramo/did-resolver": "5.6.1-next.57",
"@veramo/key-manager": "5.6.1-next.57",
"@veramo/kms-local": "5.6.1-next.57",
"@veramo/kms-web3": "5.6.1-next.57",
"@veramo/message-handler": "5.6.1-next.57",
"@veramo/remote-client": "5.6.1-next.57",
"@veramo/selective-disclosure": "5.6.1-next.57",
"@veramo/utils": "5.6.1-next.57",
"@web3modal/wagmi": "^3.0.2",
"@yudiel/react-qr-scanner": "^1.1.8",
"antd": "~5.8.4",
Expand Down
23 changes: 19 additions & 4 deletions packages/agent-explore/src/context/ChatProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { useVeramo } from '@veramo-community/veramo-react'
import { IDIDManager } from '@veramo/core'
import { IDIDManager, IKeyManager, IResolver } from '@veramo/core'
import React, { createContext, useState, useContext, useEffect } from 'react'
import { pickup } from '../utils/didcomm-mediation'
// import { pickup } from '../utils/didcomm-mediation'
import { mapIdentifierKeysToDoc } from '@veramo/utils'
import { resolve } from '@aviarytech/did-peer'

const ChatContext = createContext<any>({})

Expand All @@ -11,7 +13,7 @@ const ChatProvider = (props: any) => {
const [newRecipient, setNewRecipient] = useState()

const MINUTE_MS = 6000
const { agent } = useVeramo<IDIDManager>()
const { agent } = useVeramo<IDIDManager & IKeyManager & IResolver>()

useEffect(() => {
const checkMyDIDs = async () => {
Expand All @@ -33,7 +35,20 @@ const ChatProvider = (props: any) => {
for (const identifier of managedIdentifiers) {
for (const service of identifier.services) {
if (service.type === 'DIDCommMessaging') {
pickup(agent, identifier.did, service.serviceEndpoint as string)

const sender = await agent.didManagerGet({ did: identifier.did })
console.log("sender: ", sender)

const resolvedSender = await agent.resolveDid({ didUrl: sender.did })
console.log("resolvedSender: ", resolvedSender)

const aviaryResolved = await resolve(sender.did)
console.log("aviaryResolved: ", aviaryResolved)

const senderKeys = await mapIdentifierKeysToDoc(identifier, 'keyAgreement', { agent })
console.log("senderKeys: ", senderKeys)

// pickup(agent, identifier.did, service.serviceEndpoint as string)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
NewIdentifierFormValues,
} from './NewIdentifierForm'
import { shortId, IdentifierProfile } from '@veramo-community/agent-explorer-plugin'
import { createMediateRequestMessage } from '@veramo/did-comm'
import { createV3MediateRequestMessage } from '@veramo/did-comm'
import { DeleteOutlined, PlusOutlined } from '@ant-design/icons'
import { IDataStore } from '@veramo/core'

Expand Down Expand Up @@ -60,12 +60,12 @@ export const ManagedIdentifiers = () => {
if (!identifier) return

if (provider === 'did:peer' && values.mediator) {
const message = createMediateRequestMessage(
const message = createV3MediateRequestMessage(
identifier.did,
values.mediator,
)

const stored = await agent?.dataStoreSaveMessage({ message })
const stored = await agent?.dataStoreSaveMessage({ message: { ...message, to: message.to![0] } })
console.log('stored?: ', stored)

const packedMessage = await agent?.packDIDCommMessage({
Expand Down
48 changes: 24 additions & 24 deletions packages/plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,30 @@
"@ant-design/pro-components": "^2.6.13",
"@transmute/credentials-context": "0.7.0-unstable.81",
"@veramo-community/veramo-react": "^1.6.2",
"@veramo/core": "5.5.4-next.23",
"@veramo/core-types": "5.5.4-next.23",
"@veramo/credential-eip712": "5.5.4-next.23",
"@veramo/credential-ld": "5.5.4-next.23",
"@veramo/credential-w3c": "5.5.4-next.23",
"@veramo/data-store": "5.5.4-next.23",
"@veramo/data-store-json": "5.5.4-next.23",
"@veramo/did-comm": "5.5.4-next.23",
"@veramo/did-discovery": "5.5.4-next.23",
"@veramo/did-jwt": "5.5.4-next.23",
"@veramo/did-manager": "5.5.4-next.23",
"@veramo/did-provider-ethr": "5.5.4-next.23",
"@veramo/did-provider-jwk": "5.5.4-next.23",
"@veramo/did-provider-key": "5.5.4-next.23",
"@veramo/did-provider-peer": "5.5.4-next.23",
"@veramo/did-provider-pkh": "5.5.4-next.23",
"@veramo/did-resolver": "5.5.4-next.23",
"@veramo/key-manager": "5.5.4-next.23",
"@veramo/kms-local": "5.5.4-next.23",
"@veramo/kms-web3": "5.5.4-next.23",
"@veramo/message-handler": "5.5.4-next.23",
"@veramo/remote-client": "5.5.4-next.23",
"@veramo/selective-disclosure": "5.5.4-next.23",
"@veramo/utils": "5.5.4-next.23",
"@veramo/core": "5.6.1-next.57",
"@veramo/core-types": "5.6.1-next.57",
"@veramo/credential-eip712": "5.6.1-next.57",
"@veramo/credential-ld": "5.6.1-next.57",
"@veramo/credential-w3c": "5.6.1-next.57",
"@veramo/data-store": "5.6.1-next.57",
"@veramo/data-store-json": "5.6.1-next.57",
"@veramo/did-comm": "5.6.1-next.57",
"@veramo/did-discovery": "5.6.1-next.57",
"@veramo/did-jwt": "5.6.1-next.57",
"@veramo/did-manager": "5.6.1-next.57",
"@veramo/did-provider-ethr": "5.6.1-next.57",
"@veramo/did-provider-jwk": "5.6.1-next.57",
"@veramo/did-provider-key": "5.6.1-next.57",
"@veramo/did-provider-peer": "5.6.1-next.57",
"@veramo/did-provider-pkh": "5.6.1-next.57",
"@veramo/did-resolver": "5.6.1-next.57",
"@veramo/key-manager": "5.6.1-next.57",
"@veramo/kms-local": "5.6.1-next.57",
"@veramo/kms-web3": "5.6.1-next.57",
"@veramo/message-handler": "5.6.1-next.57",
"@veramo/remote-client": "5.6.1-next.57",
"@veramo/selective-disclosure": "5.6.1-next.57",
"@veramo/utils": "5.6.1-next.57",
"@web3modal/wagmi": "^3.0.2",
"antd": "~5.8.4",
"date-fns": "^2.30.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/plugin/src/web3/web3Agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export async function createWeb3Agent({ connectors, messageHandlers }: {
networks: [
{
chainId: '0x' + info.chainId,
// @ts-ignore
provider: info.provider,
},
],
Expand Down Expand Up @@ -146,6 +147,7 @@ export async function createWeb3Agent({ connectors, messageHandlers }: {
store: keyStore,
kms: {
local: new KeyManagementSystem(privateKeyStore),
// @ts-ignore
web3: new Web3KeyManagementSystem(web3Providers),
},
}),
Expand Down Expand Up @@ -173,7 +175,7 @@ export async function createWeb3Agent({ connectors, messageHandlers }: {
...messageHandlers || [],
],
}),
new DIDComm([new DIDCommHttpTransport()]),
new DIDComm({ transports: [new DIDCommHttpTransport()] }),
new IdentifierProfilePlugin(),
new DIDDiscovery({
providers: [
Expand Down
Loading

0 comments on commit 0578956

Please sign in to comment.