AMM 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 AMM Agent
If the AMM Agent Process has not been created, it needs to be created first. The creation operation is as follows:
import { createAmmProcess } from 'aoffp'
import { createDataItemSigner } from '@permaweb/aoconnect'
const signer = createDataItemSigner(arJWK)
const ammAgent = await createAmmProcess(signer)
const const ammProcessId = ammAgent.agentId
console.log('ammProcessId', ammProcessId)To create a new AMM Agent Process instance, use the following command:
Agent Operations
Deposit Funds
To deposit funds into the agent, use the following operation:
Withdraw Funds
To withdraw funds from the agent, use the following operation:
Get All Orders in AMM
To retrieve all orders in the AMM, use the following command:
Last updated
Was this helpful?