import { AugustBase, type IAugustBase } from '../../core/base.class'; import type { ICollateralExcessOrDeficit, ICollateralSimulationInput, ICollateralSimulationResults, ICuratorWhitelistStatus, IDiscountFactorLadder, ILoanBookInfo, IOracleClassification, IOtcMarginRequirement, IOtcPositionRead, IRevertReason, ITimelockRequest, ITransparencyApySeries, ITransparencyAuditCategory, ITransparencyAuditLog, ITransparencyFees, ITransparencyGovernancePermissions, ITransparencyGovernanceRoles, ITransparencyHistoricalAllocations, ITransparencyPositions, ITransparencyRatioPoint, ITransparencyTimelocks, ITransparencyTimelockStatus, IUnrealizedPnlSnapshot, IVaultPerformanceFees, IWSSubaccountListItem } from '../../types'; /** * Read-only client for August backend REST endpoints that have no on-chain * equivalent: the unrealized-PnL series, the transparency dashboard * (position snapshot, backing series, smoothed APY, allocations, fee config, * governance), plus authenticated loan-book / risk / OTC reads. * * Every public method makes exactly one HTTPS request to the August API and * zero RPC calls. Responses are not cached by the SDK: this is time-sensitive * state where staleness is worse than a request. Accessible as * `sdk.apiModule`; only the unrealized-PnL methods are also mirrored on the * root `AugustSDK` class. */ export declare class AugustApi extends AugustBase { private headers; constructor(baseConfig: IAugustBase); /** * Retrieve the global loan-book aggregate across every active client * subaccount — one {@link ILoanBookInfo} entry per loan, with principal / * interest amounts, APRs, state, and the next upcoming payment. * * Backed by the admin-only `GET /dashboard/loans` backend endpoint (60-second * server-side cache), so the August API key configured on the SDK must * belong to an admin user. Makes exactly one HTTP request and no RPC calls. * * @returns Array of loan-book entries; empty when there are no active loans. * @throws AugustAuthError When the API key is missing or not admin-scoped. * @throws AugustServerError When the API responds with a non-2xx status. * @example * const loans = await sdk.apiModule.getDashboardLoans(); * const active = loans.filter((l) => l.state === 'ACTIVE'); */ getDashboardLoans(): Promise; /** * Retrieve every token discount-factor ladder the risk engine applies when * valuing collateral. * * Backed by `GET /risk/discount_factors` (60-second server-side cache), * which requires an authenticated August user; an admin-scoped API key * works. Makes exactly one HTTP request and no RPC calls. * * @returns Array of {@link IDiscountFactorLadder}, one per whitelisted token that has a configured ladder. * @throws AugustAuthError When the API key is missing or not authorized. * @throws AugustServerError When the API responds with a non-2xx status. * @example * const ladders = await sdk.apiModule.getDiscountFactors(); * console.log(ladders.map((d) => `${d.address}@${d.chain}`)); */ getDiscountFactors(): Promise; /** * Compute how much collateral a subaccount has in excess of — or is short * of — what it needs to hold a target health factor, for one collateral * token. * * Backed by `GET /risk/collateral_excess_or_deficit` (60-second server-side * cache), which resolves the subaccount and reads its current health factor. * The backend serves this route to anonymous callers today, so no August API * key is needed; pass one if you get `AUTH_UNAUTHORIZED`. Makes exactly one * HTTP request and no RPC calls. * * @param params.subaccount Subaccount (smart-contract wallet) address. * @param params.tokenAddress Collateral token address to evaluate. * @param params.tokenChain Numeric August chain id of the token (e.g. `1` for Ethereum mainnet). * @param params.targetHealthFactor Health factor to solve for. Defaults server-side to the minimum healthy factor (1.2); when supplied must be a finite number greater than 0. * @returns The signed excess (positive) or deficit (negative) in USD and token units. Zeroes when the subaccount has no debt. * @throws AugustValidationError When an address is invalid, `tokenChain` is not an integer, or `targetHealthFactor` is out of range. * @throws AugustServerError When the token has no discount factor (backend 404) or the API otherwise responds non-2xx. * @example * const r = await sdk.apiModule.getCollateralExcessOrDeficit({ * subaccount: '0xabc…', * tokenAddress: '0xdef…', * tokenChain: 1, * }); * console.log(r.amount_usd > 0 ? 'excess' : 'deficit'); */ getCollateralExcessOrDeficit(params: { subaccount: string; tokenAddress: string; tokenChain: number; targetHealthFactor?: number; }): Promise; /** * Simulate the collateral required to open a hypothetical loan against a * chosen basket of collateral tokens. * * This is a pure, read-only simulation: the backend `POST * /risk/collateral_simulation` endpoint (60-second server-side cache) * computes required collateral and effective discount factors and changes * no state. The route is public, so no August API key is needed. Makes * exactly one HTTP request and no RPC calls. * * @param input Simulation parameters — see {@link ICollateralSimulationInput}. `collateral_tokens` and `collateral_token_allocation` must be non-empty and equal length; when `on_platform` is `true`, both `loan_redeployed_token_*` fields are required. * @returns The simulated {@link ICollateralSimulationResults}: total debt, required collateral, resulting health factor, and a per-token breakdown. * @throws AugustValidationError When addresses are invalid, `loan_amount` is not a finite non-negative number, the collateral arrays are empty / mismatched, or `on_platform` is set without redeployed-token details. * @throws AugustServerError When the API responds with a non-2xx status (e.g. a token missing a discount factor). * @example * const sim = await sdk.apiModule.simulateCollateral({ * loan_token_chain: 1, * loan_token_address: '0xloan…', * loan_amount: 1_000_000, * collateral_tokens: [[1, '0xcol…']], * collateral_token_allocation: [1], * }); * console.log(sim.total_required_collateral_usd); */ simulateCollateral(input: ICollateralSimulationInput): Promise; /** * Fetch the decoded revert reason(s) for a transaction — error messages, * revert strings, and recognized universal-subaccount errors extracted from * a `debug_traceTransaction` call tree. * * Backed by the public (unauthenticated) `GET /revert_reason` endpoint; no * API key required. The backend relies on the target chain's RPC supporting * `debug_trace*`; on chains/RPCs without it the backend returns a 5xx whose * detail explains why, surfaced here as an {@link AugustServerError}. Makes * exactly one HTTP request and no RPC calls from the SDK itself. * * @param txHash Transaction hash to trace. * @param chain Numeric August chain id the transaction is on (e.g. `1` for Ethereum mainnet). * @returns The decoded {@link IRevertReason}; all arrays empty when the trace yielded no matching signal. * @throws AugustValidationError When `txHash` is empty or `chain` is not an integer. * @throws AugustServerError When the chain/RPC does not support tracing, or the API otherwise responds non-2xx. * @example * const r = await sdk.apiModule.getRevertReason('0xabc…', 1); * console.log(r.revert_reasons); */ getRevertReason(txHash: string, chain: number): Promise; /** * Retrieve every tracked OTC position. * * Backed by the admin-only `GET /otc/position` backend endpoint, so the * configured August API key must belong to an admin user. Makes exactly one * HTTP request and no RPC calls. * * @returns Array of {@link IOtcPositionRead}; empty when there are no OTC positions. * @throws AugustAuthError When the API key is missing or not admin-scoped. * @throws AugustServerError When the API responds with a non-2xx status. * @example * const positions = await sdk.apiModule.getOtcPositions(); */ getOtcPositions(): Promise; /** * Retrieve OTC margin requirements, optionally filtered by counterparty * and/or payer. * * Backed by the admin-only `GET /otc/margin_requirement` backend endpoint, * so the configured August API key must belong to an admin user. Makes * exactly one HTTP request and no RPC calls. * * @param options - Optional filters * @param options.otcCounterpartyId - Restrict to a single counterparty (UUID) * @param options.payer - Restrict to a single payer address * @returns Array of {@link IOtcMarginRequirement} matching the filters (all when none given). * @throws AugustAuthError When the API key is missing or not admin-scoped. * @throws AugustServerError When the API responds with a non-2xx status. * @example * const reqs = await sdk.apiModule.getOtcMarginRequirements({ payer: '0xabc…' }); */ getOtcMarginRequirements(options?: { otcCounterpartyId?: string; payer?: string; }): Promise; /** * List the subaccounts linked to a vault (curator surface). * * Backed by the curator-or-admin `GET * /curator/vaults/{vault_address}/subaccounts` backend endpoint, so the * configured August API key must belong to the vault's curator or an admin. * Makes exactly one HTTP request and no RPC calls. * * @param vaultAddress - The vault address (EVM `0x…`, Solana, or Stellar) * @returns Array of subaccount records linked to the vault (same shape as the subaccount directory); empty when none are linked. * @throws AugustValidationError When `vaultAddress` is not a valid address. * @throws AugustAuthError When the API key is missing or not curator/admin for the vault. * @throws AugustServerError When the API responds with a non-2xx status. * @example * const subs = await sdk.apiModule.getCuratorVaultSubaccounts('0xvault…'); */ getCuratorVaultSubaccounts(vaultAddress: string): Promise; /** * Get on-chain whitelist status for every subaccount linked to a vault * (curator surface). * * Backed by the curator-or-admin `GET * /curator/vaults/{vault_address}/whitelist` backend endpoint. EVM vaults * only — non-EVM vaults manage access internally and the backend returns a * 400 (surfaced as {@link AugustServerError}). Makes exactly one HTTP * request and no RPC calls from the SDK. * * @param vaultAddress - The EVM vault address (`0x…`) * @returns Array of {@link ICuratorWhitelistStatus}, one per linked subaccount; empty when the vault has no subaccounts. * @throws AugustValidationError When `vaultAddress` is not a valid address. * @throws AugustAuthError When the API key is missing or not curator/admin for the vault. * @throws AugustServerError When the vault is non-EVM (backend 400) or the API otherwise responds non-2xx. * @example * const status = await sdk.apiModule.getCuratorVaultWhitelist('0xvault…'); * console.log(status.filter((s) => !s.is_whitelisted)); */ getCuratorVaultWhitelist(vaultAddress: string): Promise; /** * List timelock (governance) requests for a vault on a chain, optionally * filtered by status. * * Backed by the `GET /timelock-requests` backend endpoint. Makes exactly one * HTTP request and no RPC calls. * * @param params.vaultAddress The vault address the requests target. * @param params.chainId Numeric August chain id (must be a positive integer). * @param params.status Status filter: `"scheduled"` (backend default), `"executed"`, `"cancelled"`, or `"all"`. Omit to use the backend default. * @returns Array of {@link ITimelockRequest}; empty when the vault has no matching requests. * @throws AugustValidationError When `vaultAddress` is invalid or `chainId` is not a positive integer. * @throws AugustServerError When the API responds with a non-2xx status (e.g. an invalid status filter). * @example * const reqs = await sdk.apiModule.getTimelockRequests({ vaultAddress: '0xvault…', chainId: 1 }); */ getTimelockRequests(params: { vaultAddress: string; chainId: number; status?: string; }): Promise; /** * Compute a vault's performance fees over a period (backend-computed from * its snapshot history). * * Backed by `GET /metrics/vault_performance_fees`. The backend runs pandas * over the vault's full snapshot history, so the first call is slow; results * are cached server-side for 20 minutes. Makes exactly one HTTP request and * no RPC calls. * * @param params.vault The vault address (EVM `0x…`, Solana, or Stellar). * @param params.annualizedFeesPct Annualized performance-fee percentage. Defaults to 20. * @param params.nativeDenominated Whether to denominate in the vault's native token. Defaults to `true`. * @param params.calculationPeriod Period preset — `"YearToDate"` (default) or `"MonthToDate"`. Ignored by the backend when a custom `startDate`/`endDate` range is supplied. * @param params.startDate ISO-8601 datetime range start. Must be supplied together with `endDate`. * @param params.endDate ISO-8601 datetime range end. Must be supplied together with `startDate`. * @returns The vault's {@link IVaultPerformanceFees} computation. * @throws AugustValidationError When `vault` is invalid, or exactly one of `startDate`/`endDate` is supplied. * @throws AugustServerError When there is insufficient snapshot data for the period, or the API otherwise responds non-2xx. * @example * const fees = await sdk.apiModule.getVaultPerformanceFees({ vault: '0xvault…' }); * console.log(fees.total_perf_fees_asset); */ getVaultPerformanceFees(params: { vault: string; annualizedFeesPct?: number; nativeDenominated?: boolean; calculationPeriod?: string; startDate?: string; endDate?: string; }): Promise; /** * Fetch a vault's NAV-oracle classification table — how each position/token * is priced (Primary / Secondary Market / CeFi) and its USD value, plus * warnings for tokens that could not be resolved. * * Backed by the public (unauthenticated) `GET * /upshift/oracle_classification/{vault_address}` endpoint; no API key * required. Reads the newest daily snapshot. Makes exactly one HTTP request * and no RPC calls from the SDK. * * @param vault The vault address (EVM `0x…`, Solana, or Stellar). * @param chainId Numeric August chain id the vault lives on. * @returns The vault's {@link IOracleClassification}. * @throws AugustValidationError When `vault` is invalid or `chainId` is not an integer. * @throws AugustServerError When the vault or its snapshot is not found, or the API otherwise responds non-2xx. * @example * const cls = await sdk.apiModule.getVaultOracleClassification('0xvault…', 1); * console.log(cls.warnings); */ getVaultOracleClassification(vault: string, chainId: number): Promise; /** * Fetch the latest position snapshot for a vault, grouped per wallet — the * data behind the transparency Overview tab (strategy breakdown, backing * composition, vault buffer, per-wallet table, headline TVL). * * Public `GET /upshift/positions/{vault_address}`; no API key. One HTTPS * request, no RPC. Snapshots land hourly; every field is from the single * `snapshot_at` instant. Vault buffer = `total_nav − Σ subaccounts[].total_usd`; * `reported_tvl` is the vault-contract-reported total assets from the same snapshot. * * @param params.vault EVM vault address. * @param params.chainId Numeric chain id the vault lives on. * @returns {@link ITransparencyPositions}. * @throws AugustValidationError When arguments fail validation (no request is made). * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422). * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * ```ts * const p = await sdk.apiModule.getVaultPositionSnapshot({ vault: '0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA', chainId: 143 }); * const buffer = p.total_nav - p.subaccounts.reduce((a, s) => a + s.total_usd, 0); * ``` */ getVaultPositionSnapshot(params: { vault: string; chainId: number; }): Promise; /** * Fetch the backing / supply / collateral-ratio time series behind the * Performance tab's "Backing vs Supply" and "Collateral Ratio" charts, and * the Overview sidebar's 7-day deltas. * * Public `GET /upshift/unrealized_pnl?fields=ratio`; no API key. One HTTPS * request, no RPC. Points are hourly, returned newest-first — sort before * charting. `actual_tvl` = backing (mark-to-market), `tvl_on_vault` = supply * (vault-reported), `adjusted_redeem_ratio` = collateral ratio. * * Unlike the chain-scoped transparency endpoints (positions, fees, * governance…), this one is keyed by vault address only and accepts * non-EVM (Solana / Stellar) vaults — same contract as * {@link AugustApi.getVaultUnrealizedPnlHistory}, which it shares a route with. * * @param params.vault Vault address (EVM, Solana, or Stellar). * @param params.startDate Optional inclusive lower bound, `YYYY-MM-DD`. * @param params.endDate Optional inclusive upper bound, `YYYY-MM-DD`. * @param params.limit Optional max points. * @returns Array of {@link ITransparencyRatioPoint}; empty when no history. * @throws AugustValidationError When arguments fail validation (no request is made). * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422). * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * ```ts * const pts = await sdk.apiModule.getVaultBackingSeries({ vault, startDate: '2026-08-01' }); * const ratio = pts.map((p) => p.adjusted_redeem_ratio * 100); // percent * ``` */ getVaultBackingSeries(params: { vault: string; startDate?: string; endDate?: string; limit?: number; }): Promise; /** * Fetch the smoothed 7-day APY series — the exact series the Upshift app * charts (Overview "APY last 30 days" and Performance "APY Over Time"). * * Public `GET /upshift/historical_apy/chart`; no API key. One HTTPS request, * no RPC. The backend marks this route deprecated in its OpenAPI spec but it * remains the series the Upshift app itself charts; this wrapper tracks it. * The backend applies a rolling-median/mean smoothing filter server-side * when `applySmoothing` is true (the app default); computing APY locally from * raw share ratios will NOT match the published figures. * * Unlike the chain-scoped transparency endpoints (positions, fees, * governance…), this one is keyed by vault address only and accepts * non-EVM (Solana / Stellar) vaults. * * @param params.vault Vault address (EVM, Solana, or Stellar). * @param params.daysAgo Window length in days; pass `-1` for the full history since inception. Default 30. * @param params.averagingPeriodDays Rolling window for the annualized return; must be ≥ 2. Default 7 (the app's "7D APY"). * @param params.applySmoothing Apply the backend smoothing filter. Default true. * @returns {@link ITransparencyApySeries} — `labels` are `M/D/YYYY`, `values` are decimal fractions (0.0245 = 2.45%). Empty arrays when the vault has no data. * @throws AugustValidationError When arguments fail validation (no request is made). * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422). * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * ```ts * const apy = await sdk.apiModule.getVaultSmoothedApy({ vault, daysAgo: 30 }); * console.log(apy.values.at(-1)); // latest 7D APY as a fraction * ``` */ getVaultSmoothedApy(params: { vault: string; daysAgo?: number; averagingPeriodDays?: number; applySmoothing?: boolean; }): Promise; /** * Fetch daily allocation history per protocol — the Performance tab's * "Allocation Over Time" chart. * * Public `GET /upshift/historical_allocations/{vault_address}`; no API key. * One HTTPS request, no RPC. * * @param params.vault EVM vault address. * @param params.chainId Numeric chain id. * @param params.startDate Optional inclusive lower bound, `YYYY-MM-DD`. * @param params.endDate Optional inclusive upper bound, `YYYY-MM-DD`. * @returns {@link ITransparencyHistoricalAllocations}. * @throws AugustValidationError When arguments fail validation (no request is made). * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422). * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * ```ts * const h = await sdk.apiModule.getVaultHistoricalAllocations({ vault, chainId: 143, startDate: '2026-08-01' }); * const byDate = Map.groupBy(h.points, (p) => p.date); * ``` */ getVaultHistoricalAllocations(params: { vault: string; chainId: number; startDate?: string; endDate?: string; }): Promise; /** * Fetch a vault's fee configuration — the Performance tab's fee card. * * Public `GET /upshift/fees/{vault_address}`; no API key. One HTTPS * request, no RPC. Percent fields are already scaled (`management_fee_pct` * of `1.5` means 1.5%). * * @param params.vault EVM vault address. * @param params.chainId Numeric chain id. * @returns {@link ITransparencyFees}. * @throws AugustValidationError When arguments fail validation (no request is made). * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422). * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * ```ts * const fees = await sdk.apiModule.getVaultFeeConfig({ vault, chainId: 143 }); * console.log(`${fees.management_fee_pct}% mgmt / ${fees.performance_fee_pct}% perf`); * ``` */ getVaultFeeConfig(params: { vault: string; chainId: number; }): Promise; /** * Fetch the vault's privileged addresses (owner / operators) with custody * enrichment — the Governance tab's "Vault Roles" card. * * Public `GET /upshift/governance/{vault_address}/roles`; no API key. One * HTTPS request from the SDK (the backend performs the on-chain reads). * Third-party enrichment failures (Safe / Fordefi) degrade rows and append * to `warnings` rather than failing. * * @param params.vault EVM vault address. * @param params.chainId Numeric chain id. * @returns {@link ITransparencyGovernanceRoles}. * @throws AugustValidationError When arguments fail validation (no request is made). * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422). * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * ```ts * const { roles, warnings } = await sdk.apiModule.getVaultGovernanceRoles({ vault, chainId: 143 }); * const owner = roles.find((r) => r.role === 'owner'); // owner?.is_safe → Safe threshold in safe_threshold * ``` */ getVaultGovernanceRoles(params: { vault: string; chainId: number; }): Promise; /** * Fetch the integrations each vault wallet is whitelisted to operate — * the Governance tab's "Vault Permissions" table. * * Public `GET /upshift/governance/{vault_address}/permissions`; no API key. * One HTTPS request, no RPC. * * @param params.vault EVM vault address. * @param params.chainId Numeric chain id. * @returns {@link ITransparencyGovernancePermissions}. * @throws AugustValidationError When arguments fail validation (no request is made). * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422). * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * ```ts * const { permissions } = await sdk.apiModule.getVaultGovernancePermissions({ vault, chainId: 143 }); * for (const p of permissions) console.log(p.integration, p.functions.join(',')); * ``` */ getVaultGovernancePermissions(params: { vault: string; chainId: number; }): Promise; /** * Fetch the vault's timelock queue — the Governance tab's "Pending * Timelocks" table. Defaults to pending (`scheduled`) requests. * * Public `GET /upshift/governance/{vault_address}/timelocks`; no API key. * `executable_at` is `scheduled_at + TIMELOCK_DURATION()` read live from * the timelock contract; null (plus a warning) when that read failed. * The default filter is pending only — the list is often empty; pass * `status: 'all'` for history. `getTimelockRequests` returns the raw * backend rows; this returns the dashboard view (labels, `executable_at`, * warnings). * * @param params.vault EVM vault address. * @param params.chainId Numeric chain id. * @param params.status Filter: a single {@link ITransparencyTimelockStatus} or `'all'`. Default `'scheduled'`. Any other string is rejected with `AugustValidationError` before a request is made. * @returns {@link ITransparencyTimelocks}. * @throws AugustValidationError When arguments fail validation (no request is made). * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422). * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * ```ts * const { timelocks } = await sdk.apiModule.getVaultGovernanceTimelocks({ vault, chainId: 1 }); // pending only * const ready = timelocks.filter((t) => t.executable_at && Date.parse(`${t.executable_at}Z`) <= Date.now()); * ``` */ getVaultGovernanceTimelocks(params: { vault: string; chainId: number; status?: ITransparencyTimelockStatus | 'all'; }): Promise; /** * Fetch one page of the vault's governance audit log, newest first — the * Governance tab's "Audit Log" timeline. Merges live timelock events with * manually recorded entries (attestations, permission changes). * * Public `GET /upshift/governance/{vault_address}/audit_log`; no API key. * Paginate with `before` = the last returned entry's `timestamp` while * `has_more` is true (exclusive cursor; ties at the exact boundary * timestamp are skipped, never duplicated). * * @param params.vault EVM vault address. * @param params.chainId Numeric chain id. * @param params.category Optional {@link ITransparencyAuditCategory} filter. Any other string is rejected with `AugustValidationError` before a request is made. * @param params.before Optional exclusive cursor — pass the previous page's last `entry.timestamp` back verbatim (naive-UTC, no offset). * @param params.limit Page size, 1–200. Backend default 50. * @returns {@link ITransparencyAuditLog}. * @throws AugustValidationError When arguments fail validation (no request is made). * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422). * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * ```ts * // Walk the whole log, newest first. * let before: string | undefined; * do { * const page = await sdk.apiModule.getVaultGovernanceAuditLog({ vault, chainId: 1, before, limit: 50 }); * for (const e of page.entries) console.log(e.timestamp, e.type, e.summary); * before = page.has_more ? page.entries.at(-1)?.timestamp : undefined; * } while (before); * ``` */ getVaultGovernanceAuditLog(params: { vault: string; chainId: number; category?: ITransparencyAuditCategory; before?: string; limit?: number; }): Promise; /** * Fetch the historical unrealized-PnL series for a vault, newest first, * as computed by the August backend from periodic vault snapshots. * * Makes one HTTPS request to the public August API; no RPC calls. * * @param params.vault Vault address (EVM `0x…`, Solana, or Stellar). * @param params.limit Maximum number of snapshots to return (1–1000). Backend default applies when omitted. * @returns Array of {@link IUnrealizedPnlSnapshot}; empty when the backend has no history for the vault. * @throws AugustValidationError When `vault` is not a valid address or `limit` is out of range. * @throws AugustServerError When the API responds with a 5xx, or returns a body that is not a snapshot array. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * const series = await sdk.getVaultUnrealizedPnlHistory({ vault: '0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA', limit: 30 }); * console.log(series[0]?.unrealizedPnlInAsset); */ getVaultUnrealizedPnlHistory(params: { vault: string; limit?: number; }): Promise; /** * Fetch the latest unrealized-PnL snapshot for every vault the backend * tracks — one entry per vault. * * Makes one HTTPS request to the public August API; no RPC calls. * * @returns Array of {@link IUnrealizedPnlSnapshot}, one per tracked vault. * @throws AugustServerError When the API responds with a 5xx, or returns a body that is not a snapshot array. * @throws AugustRateLimitError When the API responds 429. * @throws AugustTimeoutError When the request exceeds the SDK request timeout. * @example * const all = await sdk.getLatestUnrealizedPnl(); * const losing = all.filter((s) => s.unrealizedPnl < 0); */ getLatestUnrealizedPnl(): Promise; }