Pools
AMM pools for both stable and uncorrelated assets of variable weights with up to 8 assets per pool.
const pools = new Aftermath("TESTNET").Pools();Pools
// single pool
const pool = await pools.getPool({
objectId: "0x..",
});
// multiple pools
const somePools = await pools.getPools({
objectIds: ["0x1..", "0x2.."],
});
// all pools
const allPools = await pools.getAllPools();Events
Deposit
const eventData = await pool.getDepositEvents({
// optional
cursor: {
txDigest: "0x..",
eventSeq: "0x..",
},
limit: 10,
});
console.log(eventData);
/*
{
events: [
{
poolId: "0x..",
depositor: "0x.."
types: ["0x1..", "0x2..", "0x3.."],
deposits: [1_000n, 1_000_000n, 500n],
lpMinted: 34_000_000n,
},
...
],
nextCursor: {...},
}
*/