Basic Blueprint
Install
npm install aoffp
# or
yarn add aoffpGet FFP Settlement Process ID
import { getSettleProcessId } from 'aoffp'
const settleProcessId = getSettleProcessId()
console.log('settleProcessId', settleProcessId)Create Basic Agent
If the Basic Agent Process has not been created, it needs to be created first. The creation operation is as follows:
import { createBasicProcess } from 'aoffp'
import { createDataItemSigner } from '@permaweb/aoconnect'
const signer = createDataItemSigner(arJWK)
const settleProcessId = getSettleProcessId()
const agent = await createBasicProcess(signer)
const agentProcessId = agent.agentId
console.log('agentProcessId', agentProcessId)Use the following command to create a new agent instance:
Agent Operations
Deposit Funds
If you need to deposit funds into the agent, use the following operation:
Withdraw Funds
If you need to withdraw funds from the agent, use the following operation:
Get All Orders in FFP
Take Order
Last updated
Was this helpful?