pub async fn tip(network_flag: bool) -> Result<Vec<BlockchainTip>, Error>
Expand description
Fetches the latest blockchain tip from the Koios API.
Queries the Koios API to retrieve the most recent block’s details for the specified network.
§Arguments
network_flag
- A boolean flag indicating the network:true
for Preprod/Testnet.false
for Mainnet.
§Returns
Ok(Vec<BlockchainTip>)
- A vector containing the latest blockchain tip data.Err(Error)
- If the API request or JSON parsing fails.