Action Menu module for Aries Framework JavaScript. Implements Aries RFC 0509.
Installation
Make sure you have set up the correct version of Aries Framework JavaScript according to the AFJ repository. To find out which version of AFJ you need to have installed you can run the following command. This will list the required peer dependency for @aries-framework/core
.
npm info "@aries-framework/action-menu" peerDependencies
Then add the action-menu module to your project.
yarn add @aries-framework/action-menu
Quick start
In order for this module to work, we have to inject it into the agent to access agent functionality. See the example for more information.
Example of usage
import { ActionMenuModule } from '@aries-framework/action-menu'
const agent = new Agent({
config: {
},
dependencies: agentDependencies,
modules: {
actionMenu: new ActionMenuModule(),
},
})
await agent.initialize()
await agent.modules.actionMenu.requestMenu({ connectionId })
await agent.modules.actionMenu.performAction({
connectionId,
performedAction: { name: 'option-1' },
})