@coinbase/agentkit
Version:
Coinbase AgentKit core primitives
11 lines (10 loc) • 518 B
TypeScript
import { ProtocolResponse, PrunedProtocolResponse } from "./types";
/**
* Prunes the protocol response by limiting time-series data arrays
* to show only the most recent entries.
*
* @param data - The original protocol data from DefiLlama API
* @param maxEntries - The maximum number of time-series entries to keep (default: 5)
* @returns A pruned copy of the protocol data
*/
export declare const pruneGetProtocolResponse: (data: ProtocolResponse | null, maxEntries?: number) => PrunedProtocolResponse | null;