/** * Performance Queries * * GraphQL queries for vault performance tracking and historical metrics. * Includes vault performance analysis and period summaries for APR calculations. */ /** * Vault performance GraphQL query * * Fetches TotalAssetsUpdated transactions for historical TVL time-series. * Only TotalAssetsUpdated is queried because it carries totalAssetsUsd in * USD. PeriodSummary records carry totalAssetsAtEnd as a raw token amount in * wei, which is not USD-comparable. * * Used by: get_vault_performance tool * * Usage: * ```typescript * const data = await graphqlClient.request( * GET_VAULT_PERFORMANCE_QUERY, * { * where: { * vault_in: ['0x...'], * type_in: ['TotalAssetsUpdated'] * }, * orderBy: 'timestamp', * orderDirection: 'asc', * first: 1000 * } * ); * ``` */ export declare const GET_VAULT_PERFORMANCE_QUERY = "\n query GetVaultPerformance(\n $where: TransactionFilterInput!,\n $orderBy: TransactionOrderBy!,\n $orderDirection: OrderDirection!,\n $first: Int!\n ) {\n transactions(\n where: $where,\n orderBy: $orderBy,\n orderDirection: $orderDirection,\n first: $first\n ) {\n items {\n ...TransactionBaseFragment\n data {\n ... on TotalAssetsUpdated {\n totalAssetsUsd\n totalAssets\n }\n }\n }\n pageInfo {\n ...PageInfoMinimalFragment\n }\n }\n }\n \n fragment TransactionBaseFragment on Transaction {\n type\n timestamp\n blockNumber\n hash\n logIndex\n chain {\n id\n name\n }\n }\n\n \n fragment PageInfoMinimalFragment on PageInfo {\n hasNextPage\n hasPreviousPage\n }\n\n"; /** * Query to fetch period summaries for a vault * * Period summaries contain historical snapshots of vault state at regular intervals. * Used by Lagoon SDK to calculate accurate APR from price per share changes over time. * * Note: The GraphQL API doesn't have a direct 'periodSummaries' query. PeriodSummary data * is fetched through the transactions query with type filtering. * * Used by: get_vault_performance tool (via calculateSDKAPR function) * * Usage: * ```typescript * const data = await graphqlClient.request<{ transactions: { items: Transaction[] } }>( * GET_PERIOD_SUMMARIES_QUERY, * { * where: { * vault_in: ['0x...'], * chainId_eq: 1, * type_in: ['PeriodSummary'] * }, * orderBy: 'timestamp', * orderDirection: 'asc', * first: 1000 * } * ); * ``` * * @returns Transactions containing PeriodSummary data with timestamp and vault state */ export declare const GET_PERIOD_SUMMARIES_QUERY = "\n query GetPeriodSummaries(\n $where: TransactionFilterInput!,\n $orderBy: TransactionOrderBy!,\n $orderDirection: OrderDirection!,\n $first: Int!\n ) {\n transactions(\n where: $where,\n orderBy: $orderBy,\n orderDirection: $orderDirection,\n first: $first\n ) {\n items {\n timestamp\n data {\n ... on PeriodSummary {\n duration\n totalAssetsAtStart\n totalAssetsAtEnd\n totalSupplyAtStart\n totalSupplyAtEnd\n netTotalSupplyAtEnd\n }\n }\n }\n pageInfo {\n ...PageInfoMinimalFragment\n }\n }\n }\n \n fragment PageInfoMinimalFragment on PageInfo {\n hasNextPage\n hasPreviousPage\n }\n\n"; //# sourceMappingURL=performance.queries.d.ts.map