Skip to main content
Version: 2.15.0

fetchLastBlock

function fetchLastBlock(graphqlEndpoint?: string, headers?: HeadersInit): Promise<PreconditionBaseTypes<{
}>>;

Defined in: lib/mina/v1/fetch.ts:536

Fetches the last block on the Mina network.

This returns comprehensive network state information including the global slot since genesis (globalSlotSinceGenesis), blockchain length, ledger hashes, currency supply, and epoch data.

For a lightweight query that only fetches slot information, use fetchCurrentSlot(), which can return either the global slot since genesis or the slot within the current epoch.

Parameters​

graphqlEndpoint?​

string = networkConfig.minaEndpoint

headers?​

HeadersInit

Returns​

Promise<PreconditionBaseTypes<{ }>>