Created
July 16, 2021 09:38
-
-
Save TimoGlastra/f7b9e5a7349e351bd51d014816b92362 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Agent, HttpOutboundTransporter } from '@aries-framework/core' | |
import { agentDependencies } from '@aries-framework/react-native' | |
const agentConfig = { | |
label: 'My Personal Wallet', | |
walletConfig: { id: 'walletId' }, | |
walletCredentials: { key: 'SomeSecretKey' }, | |
autoAcceptConnections: true, | |
mediatorConnectionsInvite: 'https://mediator.animo.id/invitation?c_i=eyJAdHlwZSI6Imh0dHBzOi8vZGlkY29tbS5vcmcvY29ubmVjdGlvbnMvMS4wL2ludml0YXRpb24iLCJAaWQiOiIyY2U2MzY2Yi1jYzgyLTRlYWMtODNlZC02OGY0ZjA0ZTJhYTAiLCJsYWJlbCI6IkFuaW1vIE1lZGlhdG9yIiwicmVjaXBpZW50S2V5cyI6WyJKOW80MkJQYVNhQnBkalFGalViS3hjWW9HdUNwaG5yRk1SZkRmTmFvMkU2bSJdLCJzZXJ2aWNlRW5kcG9pbnQiOiJodHRwczovL21lZGlhdG9yLmFuaW1vLmlkIiwicm91dGluZ0tleXMiOltdfQ' | |
} | |
const agent = new Agent(agentConfig, agentDependencies) | |
agent.setOutboundTransporter(new HttpOutboundTransporter()) | |
await agent.initialize() | |
const connection = await agent.connections.receiveInvitationFromUrl('https://didcomm.acme.agent.animo.id?c_i=eyJAdHlwZSI6ICJkaWQ6c292OkJ6Q2JzTlloTXJqSGlxWkRUVUFTSGc7c3BlYy9jb25uZWN0aW9ucy8xLjAvaW52aXRhdGlvbiIsICJAaWQiOiAiZTExZDdjMjUtYWRiNC00ZDIyLWIwM2MtMDkxZjdhNjRhZDQwIiwgInJlY2lwaWVudEtleXMiOiBbIjNSaVBLcUxyOUhhazZKZnVaNGJGaDJWdHdvYlhzYlA1ckJSNGNjd3NxS3J5Il0sICJzZXJ2aWNlRW5kcG9pbnQiOiAiaHR0cHM6Ly9kaWRjb21tLmFjbWUuYWdlbnQuYW5pbW8uaWQiLCAibGFiZWwiOiAiQW5pbW8gQWNtZSBBZ2VudCJ9') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment