Skip to content

getAccountSummary

getAccountSummary(client, options): Promise<OutputType>

Defined in: packages/synapse-core/src/pay/get-account-summary.ts:81

Get a comprehensive account summary from the Payments contract.

Fetches account state, fixed lockup totals, and (optionally) current epoch in parallel, then derives debt, available funds, lockup breakdown, and funded-until timeline client-side.

ParameterTypeDescription
clientClient<Transport, Chain>The client to use for the query.
optionsOptionsTypegetAccountSummary.OptionsType

Promise<OutputType>

Full account summary getAccountSummary.OutputType

Errors getAccountSummary.ErrorType

import { getAccountSummary } from '@filoz/synapse-core/pay'
import { createPublicClient, http } from 'viem'
import { calibration } from '@filoz/synapse-core/chains'
const client = createPublicClient({
chain: calibration,
transport: http(),
})
const summary = await getAccountSummary(client, {
address: '0x1234567890123456789012345678901234567890',
})
console.log('Available:', summary.availableFunds)
console.log('Funded until epoch:', summary.fundedUntilEpoch)