fetchTimedAccountInfo
function fetchTimedAccountInfo(
accountInfo: {
publicKey: string | PublicKey;
tokenId?: string | Field;
},
graphqlEndpoint?: string,
config?: FetchConfig): Promise<
| {
account: Account;
blockHeight: UInt32;
error: undefined;
globalSlot: UInt32;
liquidBalance: UInt64;
lockedBalance: UInt64;
totalBalance: UInt64;
}
| {
error: FetchError;
}>;
Defined in: lib/mina/v1/fetch.ts:273
Fetches detailed balance information for a time-locked account.
This function retrieves account data and calculates the liquid and locked balances based on the current global slot and the account's vesting schedule.
Parameters
accountInfo
The account identifier containing publicKey and optional tokenId
publicKey
string | PublicKey
tokenId?
string | Field
graphqlEndpoint?
string = networkConfig.minaEndpoint
The GraphQL endpoint to fetch from (defaults to configured endpoint)
config?
FetchConfig = {}
Optional fetch configuration with timeout and headers
Returns
Promise<
| {
account: Account;
blockHeight: UInt32;
error: undefined;
globalSlot: UInt32;
liquidBalance: UInt64;
lockedBalance: UInt64;
totalBalance: UInt64;
}
| {
error: FetchError;
}>
An object containing balance details and timing information, or an error