Integrating AgentDriver

How to use the AgentDriver in nodejs based app (goerli testnet)

import { AgentDriver } from "mto-metamask-backend-driver"; const MTO_API = 'Backend server url'; const MTO_APPKEY = 'test'; const bkdDriver = new AgentDriver({ appKey: MTO_APPKEY, baseUrl: MTO_API }); await bkdDriver.init(); // get user profile const profile = await bkdDriver.profile(); console.log('profile', profile);

Method List

check

Check if the agent is able to participate for a dispute

check()

checkInit

Check if the agent was participated and able to pick a dispute.

checkInit()

profile

Get agent profile

profile()

getDisputes

Get the list of disputes available for the agent to pick

getDisputes(query: IDisputeFilterQuery)