@augustdigital/sdk 8.24.0 → 8.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,6 +36,16 @@ exports.METHOD_CATEGORIES = {
36
36
  getTimelockRequests: 'read.vault',
37
37
  getVaultPerformanceFees: 'read.vault',
38
38
  getVaultOracleClassification: 'read.vault',
39
+ // Transparency dashboard (one per card/tab)
40
+ getVaultPositionSnapshot: 'read.vault',
41
+ getVaultBackingSeries: 'read.vault',
42
+ getVaultSmoothedApy: 'read.vault',
43
+ getVaultHistoricalAllocations: 'read.vault',
44
+ getVaultFeeConfig: 'read.vault',
45
+ getVaultGovernanceRoles: 'read.vault',
46
+ getVaultGovernancePermissions: 'read.vault',
47
+ getVaultGovernanceTimelocks: 'read.vault',
48
+ getVaultGovernanceAuditLog: 'read.vault',
39
49
  getVaultBorrowerHealthFactor: 'read.vault',
40
50
  getYieldLastRealizedOn: 'read.vault',
41
51
  getVaultActivity: 'read.vault',
@@ -3,4 +3,4 @@
3
3
  * Generated during publish from package.json version
4
4
  * This file is gitignored and created at publish time
5
5
  */
6
- export declare const SDK_VERSION = "8.24.0";
6
+ export declare const SDK_VERSION = "8.25.0";
@@ -6,5 +6,5 @@ exports.SDK_VERSION = void 0;
6
6
  * Generated during publish from package.json version
7
7
  * This file is gitignored and created at publish time
8
8
  */
9
- exports.SDK_VERSION = '8.24.0';
9
+ exports.SDK_VERSION = '8.25.0';
10
10
  //# sourceMappingURL=version.js.map
@@ -117,6 +117,17 @@ export declare const WEBSERVER_ENDPOINTS: {
117
117
  };
118
118
  revertReason: (txHash: string, chain: number) => string;
119
119
  oracleClassification: (vaultAddress: string, chainId: number) => string;
120
+ transparency: {
121
+ positions: (vaultAddress: string, chainId: number) => string;
122
+ historicalAllocations: (vaultAddress: string, chainId: number, startDate?: string, endDate?: string) => string;
123
+ fees: (vaultAddress: string, chainId: number) => string;
124
+ ratioSeries: (vaultAddress: string, startDate?: string, endDate?: string, limit?: number) => string;
125
+ smoothedApy: (vaultAddress: string, daysAgo: number, averagingPeriodDays: number, applySmoothing: boolean) => string;
126
+ governanceRoles: (vaultAddress: string, chainId: number) => string;
127
+ governancePermissions: (vaultAddress: string, chainId: number) => string;
128
+ governanceTimelocks: (vaultAddress: string, chainId: number, status?: string) => string;
129
+ governanceAuditLog: (vaultAddress: string, chainId: number, category?: string, before?: string, limit?: number) => string;
130
+ };
120
131
  };
121
132
  upshift: {
122
133
  vaults: {
@@ -191,6 +191,60 @@ exports.WEBSERVER_ENDPOINTS = {
191
191
  chain: String(chain),
192
192
  }).toString()}`,
193
193
  oracleClassification: (vaultAddress, chainId) => `/upshift/oracle_classification/${encodeURIComponent(vaultAddress)}?chain_id=${chainId}`,
194
+ // Transparency dashboard endpoints (all public, snapshot-backed).
195
+ transparency: {
196
+ positions: (vaultAddress, chainId) => `/upshift/positions/${encodeURIComponent(vaultAddress)}?chain_id=${chainId}`,
197
+ historicalAllocations: (vaultAddress, chainId, startDate, endDate) => {
198
+ const q = new URLSearchParams({ chain_id: String(chainId) });
199
+ if (startDate)
200
+ q.set('start_date', startDate);
201
+ // The backend compares `<= end_date` as a datetime, so a bare date
202
+ // would exclude the whole last day; widen to end-of-day for the
203
+ // documented inclusive semantics.
204
+ if (endDate)
205
+ q.set('end_date', `${endDate}T23:59:59.999`);
206
+ return `/upshift/historical_allocations/${encodeURIComponent(vaultAddress)}?${q.toString()}`;
207
+ },
208
+ fees: (vaultAddress, chainId) => `/upshift/fees/${encodeURIComponent(vaultAddress)}?chain_id=${chainId}`,
209
+ ratioSeries: (vaultAddress, startDate, endDate, limit) => {
210
+ const q = new URLSearchParams({
211
+ vault_address: vaultAddress,
212
+ fields: 'ratio',
213
+ });
214
+ if (startDate)
215
+ q.set('start_date', startDate);
216
+ // See historicalAllocations: widen to end-of-day for inclusive semantics.
217
+ if (endDate)
218
+ q.set('end_date', `${endDate}T23:59:59.999`);
219
+ if (limit !== undefined)
220
+ q.set('limit', String(limit));
221
+ return `/upshift/unrealized_pnl?${q.toString()}`;
222
+ },
223
+ smoothedApy: (vaultAddress, daysAgo, averagingPeriodDays, applySmoothing) => `/upshift/historical_apy/chart?${new URLSearchParams({
224
+ vault_address: vaultAddress,
225
+ days_ago: String(daysAgo),
226
+ averaging_period_in_days: String(averagingPeriodDays),
227
+ apply_smoothing: String(applySmoothing),
228
+ }).toString()}`,
229
+ governanceRoles: (vaultAddress, chainId) => `/upshift/governance/${encodeURIComponent(vaultAddress)}/roles?chain_id=${chainId}`,
230
+ governancePermissions: (vaultAddress, chainId) => `/upshift/governance/${encodeURIComponent(vaultAddress)}/permissions?chain_id=${chainId}`,
231
+ governanceTimelocks: (vaultAddress, chainId, status) => {
232
+ const q = new URLSearchParams({ chain_id: String(chainId) });
233
+ if (status)
234
+ q.set('status', status);
235
+ return `/upshift/governance/${encodeURIComponent(vaultAddress)}/timelocks?${q.toString()}`;
236
+ },
237
+ governanceAuditLog: (vaultAddress, chainId, category, before, limit) => {
238
+ const q = new URLSearchParams({ chain_id: String(chainId) });
239
+ if (category)
240
+ q.set('category', category);
241
+ if (before)
242
+ q.set('before', before);
243
+ if (limit !== undefined)
244
+ q.set('limit', String(limit));
245
+ return `/upshift/governance/${encodeURIComponent(vaultAddress)}/audit_log?${q.toString()}`;
246
+ },
247
+ },
194
248
  },
195
249
  upshift: {
196
250
  vaults: {
package/lib/main.d.ts CHANGED
@@ -41,8 +41,9 @@ export declare class AugustSDK extends AugustBase {
41
41
  get vaultsModule(): AugustVaults;
42
42
  /**
43
43
  * Get the backend API module instance ({@link AugustApi}) — read-only
44
- * access to backend-computed data with no on-chain equivalent
45
- * (unrealized-PnL series).
44
+ * access to backend-computed data with no on-chain equivalent: the
45
+ * unrealized-PnL series and the transparency dashboard (position snapshot,
46
+ * backing series, smoothed APY, allocations, fee config, governance).
46
47
  */
47
48
  get apiModule(): AugustApi;
48
49
  /**
@@ -119,8 +120,27 @@ export declare class AugustSDK extends AugustBase {
119
120
  }): Promise<import("./types").IVaultLoan[]>;
120
121
  /**
121
122
  * Get vault asset allocations across DeFi protocols, CeFi, and OTC positions.
123
+ *
124
+ * This is the data behind the "Vault Exposure" section of the Upshift app —
125
+ * a partner rendering that section in their own frontend needs only this
126
+ * call. Read `exposurePerCategory` for the pre-bucketed view the UI renders
127
+ * (`supplying` / `borrowing` / `wallet` / `lending` legs plus per-category
128
+ * USD totals) and `netValue` for the headline figure; the raw `defi` /
129
+ * `cefi` / `otc` arrays back the drill-downs. See the "Rendering the Vault
130
+ * Exposure section" guide in the vaults docs for a faithful reproduction.
131
+ *
122
132
  * @param props - Vault address and chain ID
123
133
  * @returns Detailed breakdown of vault allocations by category
134
+ * @example
135
+ * ```ts
136
+ * const { exposurePerCategory, netValue } = await sdk.getVaultAllocations({
137
+ * vault: '0xcd69123b3FBBfC666E1f6a501da27B564C00De54',
138
+ * chainId: 1,
139
+ * });
140
+ * for (const item of exposurePerCategory?.supplying ?? []) {
141
+ * console.log(item.protocol, item.symbol, item.amount);
142
+ * }
143
+ * ```
124
144
  */
125
145
  getVaultAllocations(props: {
126
146
  vault: IAddress;
package/lib/main.js CHANGED
@@ -146,8 +146,9 @@ class AugustSDK extends core_1.AugustBase {
146
146
  }
147
147
  /**
148
148
  * Get the backend API module instance ({@link AugustApi}) — read-only
149
- * access to backend-computed data with no on-chain equivalent
150
- * (unrealized-PnL series).
149
+ * access to backend-computed data with no on-chain equivalent: the
150
+ * unrealized-PnL series and the transparency dashboard (position snapshot,
151
+ * backing series, smoothed APY, allocations, fee config, governance).
151
152
  */
152
153
  get apiModule() {
153
154
  return this.api;
@@ -242,8 +243,27 @@ class AugustSDK extends core_1.AugustBase {
242
243
  }
243
244
  /**
244
245
  * Get vault asset allocations across DeFi protocols, CeFi, and OTC positions.
246
+ *
247
+ * This is the data behind the "Vault Exposure" section of the Upshift app —
248
+ * a partner rendering that section in their own frontend needs only this
249
+ * call. Read `exposurePerCategory` for the pre-bucketed view the UI renders
250
+ * (`supplying` / `borrowing` / `wallet` / `lending` legs plus per-category
251
+ * USD totals) and `netValue` for the headline figure; the raw `defi` /
252
+ * `cefi` / `otc` arrays back the drill-downs. See the "Rendering the Vault
253
+ * Exposure section" guide in the vaults docs for a faithful reproduction.
254
+ *
245
255
  * @param props - Vault address and chain ID
246
256
  * @returns Detailed breakdown of vault allocations by category
257
+ * @example
258
+ * ```ts
259
+ * const { exposurePerCategory, netValue } = await sdk.getVaultAllocations({
260
+ * vault: '0xcd69123b3FBBfC666E1f6a501da27B564C00De54',
261
+ * chainId: 1,
262
+ * });
263
+ * for (const item of exposurePerCategory?.supplying ?? []) {
264
+ * console.log(item.protocol, item.symbol, item.amount);
265
+ * }
266
+ * ```
247
267
  */
248
268
  async getVaultAllocations(props) {
249
269
  return await this.vaults.getVaultAllocations(props);
@@ -1,5 +1,5 @@
1
1
  import { type IFetchAugustOptions } from '../../core';
2
- import type { ICollateralExcessOrDeficit, ICollateralSimulationInput, ICollateralSimulationResults, ICuratorWhitelistStatus, IDiscountFactorLadder, ILoanBookInfo, IOracleClassification, IOtcMarginRequirement, IOtcPositionRead, IRevertReason, ITimelockRequest, IVaultPerformanceFees, IWSSubaccountListItem } from '../../types';
2
+ import type { ICollateralExcessOrDeficit, ICollateralSimulationInput, ICollateralSimulationResults, ICuratorWhitelistStatus, IDiscountFactorLadder, ILoanBookInfo, IOracleClassification, IOtcMarginRequirement, IOtcPositionRead, IRevertReason, ITimelockRequest, ITransparencyAuditLog, ITransparencyFees, ITransparencyGovernancePermissions, ITransparencyGovernanceRoles, ITransparencyHistoricalAllocations, ITransparencyPositions, ITransparencyRatioPoint, ITransparencyTimelocks, IVaultPerformanceFees, IWSSubaccountListItem } from '../../types';
3
3
  /**
4
4
  * Fetch the global loan-book aggregate (admin-only `GET /dashboard/loans`).
5
5
  */
@@ -80,3 +80,29 @@ export declare const fetchVaultPerformanceFees: (params: {
80
80
  * required.
81
81
  */
82
82
  export declare const fetchVaultOracleClassification: (vaultAddress: string, chainId: number, headers?: IFetchAugustOptions["headers"]) => Promise<IOracleClassification>;
83
+ /** Public `GET /upshift/positions/{vault}` — latest per-wallet position snapshot. */
84
+ export declare const fetchTransparencyPositions: (vaultAddress: string, chainId: number, headers?: IFetchAugustOptions["headers"]) => Promise<ITransparencyPositions>;
85
+ /** Public `GET /upshift/historical_allocations/{vault}` — daily per-protocol allocation history. */
86
+ export declare const fetchTransparencyHistoricalAllocations: (vaultAddress: string, chainId: number, startDate?: string, endDate?: string, headers?: IFetchAugustOptions["headers"]) => Promise<ITransparencyHistoricalAllocations>;
87
+ /** Public `GET /upshift/fees/{vault}` — vault fee configuration. */
88
+ export declare const fetchTransparencyFees: (vaultAddress: string, chainId: number, headers?: IFetchAugustOptions["headers"]) => Promise<ITransparencyFees>;
89
+ /** Public `GET /upshift/unrealized_pnl?fields=ratio` — hourly backing / supply / collateral-ratio series. */
90
+ export declare const fetchTransparencyRatioSeries: (vaultAddress: string, startDate?: string, endDate?: string, limit?: number, headers?: IFetchAugustOptions["headers"]) => Promise<ITransparencyRatioPoint[]>;
91
+ /** Public `GET /upshift/historical_apy/chart` — smoothed rolling-APY series; returns the raw backend envelope. */
92
+ export declare const fetchTransparencySmoothedApy: (vaultAddress: string, daysAgo: number, averagingPeriodDays: number, applySmoothing: boolean, headers?: IFetchAugustOptions["headers"]) => Promise<{
93
+ data: {
94
+ labels: string[];
95
+ values: number[];
96
+ };
97
+ average_apy?: number | null;
98
+ status: number;
99
+ error?: string | null;
100
+ }>;
101
+ /** Public `GET /upshift/governance/{vault}/roles` — owner/operator addresses with custody enrichment. */
102
+ export declare const fetchTransparencyGovernanceRoles: (vaultAddress: string, chainId: number, headers?: IFetchAugustOptions["headers"]) => Promise<ITransparencyGovernanceRoles>;
103
+ /** Public `GET /upshift/governance/{vault}/permissions` — whitelisted integrations per vault wallet. */
104
+ export declare const fetchTransparencyGovernancePermissions: (vaultAddress: string, chainId: number, headers?: IFetchAugustOptions["headers"]) => Promise<ITransparencyGovernancePermissions>;
105
+ /** Public `GET /upshift/governance/{vault}/timelocks` — timelock queue, default pending only. */
106
+ export declare const fetchTransparencyGovernanceTimelocks: (vaultAddress: string, chainId: number, status?: string, headers?: IFetchAugustOptions["headers"]) => Promise<ITransparencyTimelocks>;
107
+ /** Public `GET /upshift/governance/{vault}/audit_log` — one page of the governance audit log. */
108
+ export declare const fetchTransparencyGovernanceAuditLog: (vaultAddress: string, chainId: number, category?: string, before?: string, limit?: number, headers?: IFetchAugustOptions["headers"]) => Promise<ITransparencyAuditLog>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchVaultOracleClassification = exports.fetchVaultPerformanceFees = exports.fetchTimelockRequests = exports.fetchCuratorVaultWhitelist = exports.fetchCuratorVaultSubaccounts = exports.fetchOtcMarginRequirements = exports.fetchOtcPositions = exports.fetchRevertReason = exports.fetchCollateralSimulation = exports.fetchCollateralExcessOrDeficit = exports.fetchDiscountFactors = exports.fetchDashboardLoans = void 0;
3
+ exports.fetchTransparencyGovernanceAuditLog = exports.fetchTransparencyGovernanceTimelocks = exports.fetchTransparencyGovernancePermissions = exports.fetchTransparencyGovernanceRoles = exports.fetchTransparencySmoothedApy = exports.fetchTransparencyRatioSeries = exports.fetchTransparencyFees = exports.fetchTransparencyHistoricalAllocations = exports.fetchTransparencyPositions = exports.fetchVaultOracleClassification = exports.fetchVaultPerformanceFees = exports.fetchTimelockRequests = exports.fetchCuratorVaultWhitelist = exports.fetchCuratorVaultSubaccounts = exports.fetchOtcMarginRequirements = exports.fetchOtcPositions = exports.fetchRevertReason = exports.fetchCollateralSimulation = exports.fetchCollateralExcessOrDeficit = exports.fetchDiscountFactors = exports.fetchDashboardLoans = void 0;
4
4
  const core_1 = require("../../core");
5
5
  /**
6
6
  * Fetch the global loan-book aggregate (admin-only `GET /dashboard/loans`).
@@ -147,4 +147,41 @@ const fetchVaultOracleClassification = async (vaultAddress, chainId, headers) =>
147
147
  return response.json();
148
148
  };
149
149
  exports.fetchVaultOracleClassification = fetchVaultOracleClassification;
150
+ /**
151
+ * Shared GET for the public transparency-dashboard endpoints. One HTTPS
152
+ * request, no RPC. `fetchAugustPublic` already maps non-2xx to typed
153
+ * `AugustServerError` / `AugustRateLimitError` / `AugustTimeoutError`, so
154
+ * this only parses the body; validation happens in the module layer.
155
+ */
156
+ const fetchTransparency = async (endpoint, headers) => {
157
+ const response = await (0, core_1.fetchAugustPublic)(endpoint, { headers });
158
+ return response.json();
159
+ };
160
+ /** Public `GET /upshift/positions/{vault}` — latest per-wallet position snapshot. */
161
+ const fetchTransparencyPositions = (vaultAddress, chainId, headers) => fetchTransparency(core_1.WEBSERVER_ENDPOINTS.public.transparency.positions(vaultAddress, chainId), headers);
162
+ exports.fetchTransparencyPositions = fetchTransparencyPositions;
163
+ /** Public `GET /upshift/historical_allocations/{vault}` — daily per-protocol allocation history. */
164
+ const fetchTransparencyHistoricalAllocations = (vaultAddress, chainId, startDate, endDate, headers) => fetchTransparency(core_1.WEBSERVER_ENDPOINTS.public.transparency.historicalAllocations(vaultAddress, chainId, startDate, endDate), headers);
165
+ exports.fetchTransparencyHistoricalAllocations = fetchTransparencyHistoricalAllocations;
166
+ /** Public `GET /upshift/fees/{vault}` — vault fee configuration. */
167
+ const fetchTransparencyFees = (vaultAddress, chainId, headers) => fetchTransparency(core_1.WEBSERVER_ENDPOINTS.public.transparency.fees(vaultAddress, chainId), headers);
168
+ exports.fetchTransparencyFees = fetchTransparencyFees;
169
+ /** Public `GET /upshift/unrealized_pnl?fields=ratio` — hourly backing / supply / collateral-ratio series. */
170
+ const fetchTransparencyRatioSeries = (vaultAddress, startDate, endDate, limit, headers) => fetchTransparency(core_1.WEBSERVER_ENDPOINTS.public.transparency.ratioSeries(vaultAddress, startDate, endDate, limit), headers);
171
+ exports.fetchTransparencyRatioSeries = fetchTransparencyRatioSeries;
172
+ /** Public `GET /upshift/historical_apy/chart` — smoothed rolling-APY series; returns the raw backend envelope. */
173
+ const fetchTransparencySmoothedApy = (vaultAddress, daysAgo, averagingPeriodDays, applySmoothing, headers) => fetchTransparency(core_1.WEBSERVER_ENDPOINTS.public.transparency.smoothedApy(vaultAddress, daysAgo, averagingPeriodDays, applySmoothing), headers);
174
+ exports.fetchTransparencySmoothedApy = fetchTransparencySmoothedApy;
175
+ /** Public `GET /upshift/governance/{vault}/roles` — owner/operator addresses with custody enrichment. */
176
+ const fetchTransparencyGovernanceRoles = (vaultAddress, chainId, headers) => fetchTransparency(core_1.WEBSERVER_ENDPOINTS.public.transparency.governanceRoles(vaultAddress, chainId), headers);
177
+ exports.fetchTransparencyGovernanceRoles = fetchTransparencyGovernanceRoles;
178
+ /** Public `GET /upshift/governance/{vault}/permissions` — whitelisted integrations per vault wallet. */
179
+ const fetchTransparencyGovernancePermissions = (vaultAddress, chainId, headers) => fetchTransparency(core_1.WEBSERVER_ENDPOINTS.public.transparency.governancePermissions(vaultAddress, chainId), headers);
180
+ exports.fetchTransparencyGovernancePermissions = fetchTransparencyGovernancePermissions;
181
+ /** Public `GET /upshift/governance/{vault}/timelocks` — timelock queue, default pending only. */
182
+ const fetchTransparencyGovernanceTimelocks = (vaultAddress, chainId, status, headers) => fetchTransparency(core_1.WEBSERVER_ENDPOINTS.public.transparency.governanceTimelocks(vaultAddress, chainId, status), headers);
183
+ exports.fetchTransparencyGovernanceTimelocks = fetchTransparencyGovernanceTimelocks;
184
+ /** Public `GET /upshift/governance/{vault}/audit_log` — one page of the governance audit log. */
185
+ const fetchTransparencyGovernanceAuditLog = (vaultAddress, chainId, category, before, limit, headers) => fetchTransparency(core_1.WEBSERVER_ENDPOINTS.public.transparency.governanceAuditLog(vaultAddress, chainId, category, before, limit), headers);
186
+ exports.fetchTransparencyGovernanceAuditLog = fetchTransparencyGovernanceAuditLog;
150
187
  //# sourceMappingURL=fetcher.js.map
@@ -1,21 +1,16 @@
1
1
  import { AugustBase, type IAugustBase } from '../../core/base.class';
2
- import type { ICollateralExcessOrDeficit, ICollateralSimulationInput, ICollateralSimulationResults, ICuratorWhitelistStatus, IDiscountFactorLadder, ILoanBookInfo, IOracleClassification, IOtcMarginRequirement, IOtcPositionRead, IRevertReason, ITimelockRequest, IUnrealizedPnlSnapshot, IVaultPerformanceFees, IWSSubaccountListItem } from '../../types';
2
+ 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';
3
3
  /**
4
4
  * Read-only client for August backend REST endpoints that have no on-chain
5
- * equivalent — currently the unrealized-PnL series the backend computes
6
- * from periodic vault snapshots.
5
+ * equivalent: the unrealized-PnL series, the transparency dashboard
6
+ * (position snapshot, backing series, smoothed APY, allocations, fee config,
7
+ * governance), plus authenticated loan-book / risk / OTC reads.
7
8
  *
8
- * Every method makes exactly one HTTPS request to the public
9
- * (unauthenticated) August API and zero RPC calls. Responses are not cached
10
- * by the SDK: this is time-sensitive PnL state where staleness is worse
11
- * than request latency.
12
- *
13
- * Accessible as `apiModule` on the SDK instance; the same methods are also
14
- * exposed directly on the SDK class.
15
- *
16
- * A subset of methods (loan book, risk) hit authenticated admin-only backend
17
- * endpoints and require an admin-scoped August API key on the SDK
18
- * constructor; each such method documents the requirement.
9
+ * Every public method makes exactly one HTTPS request to the August API and
10
+ * zero RPC calls. Responses are not cached by the SDK: this is time-sensitive
11
+ * state where staleness is worse than a request. Accessible as
12
+ * `sdk.apiModule`; only the unrealized-PnL methods are also mirrored on the
13
+ * root `AugustSDK` class.
19
14
  */
20
15
  export declare class AugustApi extends AugustBase {
21
16
  private headers;
@@ -274,6 +269,285 @@ export declare class AugustApi extends AugustBase {
274
269
  * console.log(cls.warnings);
275
270
  */
276
271
  getVaultOracleClassification(vault: string, chainId: number): Promise<IOracleClassification>;
272
+ /**
273
+ * Fetch the latest position snapshot for a vault, grouped per wallet — the
274
+ * data behind the transparency Overview tab (strategy breakdown, backing
275
+ * composition, vault buffer, per-wallet table, headline TVL).
276
+ *
277
+ * Public `GET /upshift/positions/{vault_address}`; no API key. One HTTPS
278
+ * request, no RPC. Snapshots land hourly; every field is from the single
279
+ * `snapshot_at` instant. Vault buffer = `total_nav − Σ subaccounts[].total_usd`;
280
+ * `reported_tvl` is the vault-contract-reported total assets from the same snapshot.
281
+ *
282
+ * @param params.vault EVM vault address.
283
+ * @param params.chainId Numeric chain id the vault lives on.
284
+ * @returns {@link ITransparencyPositions}.
285
+ * @throws AugustValidationError When arguments fail validation (no request is made).
286
+ * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
287
+ * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift.
288
+ * @throws AugustRateLimitError When the API responds 429.
289
+ * @throws AugustTimeoutError When the request exceeds the SDK request timeout.
290
+ * @example
291
+ * ```ts
292
+ * const p = await sdk.apiModule.getVaultPositionSnapshot({ vault: '0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA', chainId: 143 });
293
+ * const buffer = p.total_nav - p.subaccounts.reduce((a, s) => a + s.total_usd, 0);
294
+ * ```
295
+ */
296
+ getVaultPositionSnapshot(params: {
297
+ vault: string;
298
+ chainId: number;
299
+ }): Promise<ITransparencyPositions>;
300
+ /**
301
+ * Fetch the backing / supply / collateral-ratio time series behind the
302
+ * Performance tab's "Backing vs Supply" and "Collateral Ratio" charts, and
303
+ * the Overview sidebar's 7-day deltas.
304
+ *
305
+ * Public `GET /upshift/unrealized_pnl?fields=ratio`; no API key. One HTTPS
306
+ * request, no RPC. Points are hourly, returned newest-first — sort before
307
+ * charting. `actual_tvl` = backing (mark-to-market), `tvl_on_vault` = supply
308
+ * (vault-reported), `adjusted_redeem_ratio` = collateral ratio.
309
+ *
310
+ * Unlike the chain-scoped transparency endpoints (positions, fees,
311
+ * governance…), this one is keyed by vault address only and accepts
312
+ * non-EVM (Solana / Stellar) vaults — same contract as
313
+ * {@link AugustApi.getVaultUnrealizedPnlHistory}, which it shares a route with.
314
+ *
315
+ * @param params.vault Vault address (EVM, Solana, or Stellar).
316
+ * @param params.startDate Optional inclusive lower bound, `YYYY-MM-DD`.
317
+ * @param params.endDate Optional inclusive upper bound, `YYYY-MM-DD`.
318
+ * @param params.limit Optional max points.
319
+ * @returns Array of {@link ITransparencyRatioPoint}; empty when no history.
320
+ * @throws AugustValidationError When arguments fail validation (no request is made).
321
+ * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
322
+ * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift.
323
+ * @throws AugustRateLimitError When the API responds 429.
324
+ * @throws AugustTimeoutError When the request exceeds the SDK request timeout.
325
+ * @example
326
+ * ```ts
327
+ * const pts = await sdk.apiModule.getVaultBackingSeries({ vault, startDate: '2026-08-01' });
328
+ * const ratio = pts.map((p) => p.adjusted_redeem_ratio * 100); // percent
329
+ * ```
330
+ */
331
+ getVaultBackingSeries(params: {
332
+ vault: string;
333
+ startDate?: string;
334
+ endDate?: string;
335
+ limit?: number;
336
+ }): Promise<ITransparencyRatioPoint[]>;
337
+ /**
338
+ * Fetch the smoothed 7-day APY series — the exact series the Upshift app
339
+ * charts (Overview "APY last 30 days" and Performance "APY Over Time").
340
+ *
341
+ * Public `GET /upshift/historical_apy/chart`; no API key. One HTTPS request,
342
+ * no RPC. The backend marks this route deprecated in its OpenAPI spec but it
343
+ * remains the series the Upshift app itself charts; this wrapper tracks it.
344
+ * The backend applies a rolling-median/mean smoothing filter server-side
345
+ * when `applySmoothing` is true (the app default); computing APY locally from
346
+ * raw share ratios will NOT match the published figures.
347
+ *
348
+ * Unlike the chain-scoped transparency endpoints (positions, fees,
349
+ * governance…), this one is keyed by vault address only and accepts
350
+ * non-EVM (Solana / Stellar) vaults.
351
+ *
352
+ * @param params.vault Vault address (EVM, Solana, or Stellar).
353
+ * @param params.daysAgo Window length in days; pass `-1` for the full history since inception. Default 30.
354
+ * @param params.averagingPeriodDays Rolling window for the annualized return; must be ≥ 2. Default 7 (the app's "7D APY").
355
+ * @param params.applySmoothing Apply the backend smoothing filter. Default true.
356
+ * @returns {@link ITransparencyApySeries} — `labels` are `M/D/YYYY`, `values` are decimal fractions (0.0245 = 2.45%). Empty arrays when the vault has no data.
357
+ * @throws AugustValidationError When arguments fail validation (no request is made).
358
+ * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
359
+ * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift.
360
+ * @throws AugustRateLimitError When the API responds 429.
361
+ * @throws AugustTimeoutError When the request exceeds the SDK request timeout.
362
+ * @example
363
+ * ```ts
364
+ * const apy = await sdk.apiModule.getVaultSmoothedApy({ vault, daysAgo: 30 });
365
+ * console.log(apy.values.at(-1)); // latest 7D APY as a fraction
366
+ * ```
367
+ */
368
+ getVaultSmoothedApy(params: {
369
+ vault: string;
370
+ daysAgo?: number;
371
+ averagingPeriodDays?: number;
372
+ applySmoothing?: boolean;
373
+ }): Promise<ITransparencyApySeries>;
374
+ /**
375
+ * Fetch daily allocation history per protocol — the Performance tab's
376
+ * "Allocation Over Time" chart.
377
+ *
378
+ * Public `GET /upshift/historical_allocations/{vault_address}`; no API key.
379
+ * One HTTPS request, no RPC.
380
+ *
381
+ * @param params.vault EVM vault address.
382
+ * @param params.chainId Numeric chain id.
383
+ * @param params.startDate Optional inclusive lower bound, `YYYY-MM-DD`.
384
+ * @param params.endDate Optional inclusive upper bound, `YYYY-MM-DD`.
385
+ * @returns {@link ITransparencyHistoricalAllocations}.
386
+ * @throws AugustValidationError When arguments fail validation (no request is made).
387
+ * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
388
+ * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift.
389
+ * @throws AugustRateLimitError When the API responds 429.
390
+ * @throws AugustTimeoutError When the request exceeds the SDK request timeout.
391
+ * @example
392
+ * ```ts
393
+ * const h = await sdk.apiModule.getVaultHistoricalAllocations({ vault, chainId: 143, startDate: '2026-08-01' });
394
+ * const byDate = Map.groupBy(h.points, (p) => p.date);
395
+ * ```
396
+ */
397
+ getVaultHistoricalAllocations(params: {
398
+ vault: string;
399
+ chainId: number;
400
+ startDate?: string;
401
+ endDate?: string;
402
+ }): Promise<ITransparencyHistoricalAllocations>;
403
+ /**
404
+ * Fetch a vault's fee configuration — the Performance tab's fee card.
405
+ *
406
+ * Public `GET /upshift/fees/{vault_address}`; no API key. One HTTPS
407
+ * request, no RPC. Percent fields are already scaled (`management_fee_pct`
408
+ * of `1.5` means 1.5%).
409
+ *
410
+ * @param params.vault EVM vault address.
411
+ * @param params.chainId Numeric chain id.
412
+ * @returns {@link ITransparencyFees}.
413
+ * @throws AugustValidationError When arguments fail validation (no request is made).
414
+ * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
415
+ * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift.
416
+ * @throws AugustRateLimitError When the API responds 429.
417
+ * @throws AugustTimeoutError When the request exceeds the SDK request timeout.
418
+ * @example
419
+ * ```ts
420
+ * const fees = await sdk.apiModule.getVaultFeeConfig({ vault, chainId: 143 });
421
+ * console.log(`${fees.management_fee_pct}% mgmt / ${fees.performance_fee_pct}% perf`);
422
+ * ```
423
+ */
424
+ getVaultFeeConfig(params: {
425
+ vault: string;
426
+ chainId: number;
427
+ }): Promise<ITransparencyFees>;
428
+ /**
429
+ * Fetch the vault's privileged addresses (owner / operators) with custody
430
+ * enrichment — the Governance tab's "Vault Roles" card.
431
+ *
432
+ * Public `GET /upshift/governance/{vault_address}/roles`; no API key. One
433
+ * HTTPS request from the SDK (the backend performs the on-chain reads).
434
+ * Third-party enrichment failures (Safe / Fordefi) degrade rows and append
435
+ * to `warnings` rather than failing.
436
+ *
437
+ * @param params.vault EVM vault address.
438
+ * @param params.chainId Numeric chain id.
439
+ * @returns {@link ITransparencyGovernanceRoles}.
440
+ * @throws AugustValidationError When arguments fail validation (no request is made).
441
+ * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
442
+ * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift.
443
+ * @throws AugustRateLimitError When the API responds 429.
444
+ * @throws AugustTimeoutError When the request exceeds the SDK request timeout.
445
+ * @example
446
+ * ```ts
447
+ * const { roles, warnings } = await sdk.apiModule.getVaultGovernanceRoles({ vault, chainId: 143 });
448
+ * const owner = roles.find((r) => r.role === 'owner'); // owner?.is_safe → Safe threshold in safe_threshold
449
+ * ```
450
+ */
451
+ getVaultGovernanceRoles(params: {
452
+ vault: string;
453
+ chainId: number;
454
+ }): Promise<ITransparencyGovernanceRoles>;
455
+ /**
456
+ * Fetch the integrations each vault wallet is whitelisted to operate —
457
+ * the Governance tab's "Vault Permissions" table.
458
+ *
459
+ * Public `GET /upshift/governance/{vault_address}/permissions`; no API key.
460
+ * One HTTPS request, no RPC.
461
+ *
462
+ * @param params.vault EVM vault address.
463
+ * @param params.chainId Numeric chain id.
464
+ * @returns {@link ITransparencyGovernancePermissions}.
465
+ * @throws AugustValidationError When arguments fail validation (no request is made).
466
+ * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
467
+ * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift.
468
+ * @throws AugustRateLimitError When the API responds 429.
469
+ * @throws AugustTimeoutError When the request exceeds the SDK request timeout.
470
+ * @example
471
+ * ```ts
472
+ * const { permissions } = await sdk.apiModule.getVaultGovernancePermissions({ vault, chainId: 143 });
473
+ * for (const p of permissions) console.log(p.integration, p.functions.join(','));
474
+ * ```
475
+ */
476
+ getVaultGovernancePermissions(params: {
477
+ vault: string;
478
+ chainId: number;
479
+ }): Promise<ITransparencyGovernancePermissions>;
480
+ /**
481
+ * Fetch the vault's timelock queue — the Governance tab's "Pending
482
+ * Timelocks" table. Defaults to pending (`scheduled`) requests.
483
+ *
484
+ * Public `GET /upshift/governance/{vault_address}/timelocks`; no API key.
485
+ * `executable_at` is `scheduled_at + TIMELOCK_DURATION()` read live from
486
+ * the timelock contract; null (plus a warning) when that read failed.
487
+ * The default filter is pending only — the list is often empty; pass
488
+ * `status: 'all'` for history. `getTimelockRequests` returns the raw
489
+ * backend rows; this returns the dashboard view (labels, `executable_at`,
490
+ * warnings).
491
+ *
492
+ * @param params.vault EVM vault address.
493
+ * @param params.chainId Numeric chain id.
494
+ * @param params.status Filter: a single {@link ITransparencyTimelockStatus} or `'all'`. Default `'scheduled'`. Any other string is rejected with `AugustValidationError` before a request is made.
495
+ * @returns {@link ITransparencyTimelocks}.
496
+ * @throws AugustValidationError When arguments fail validation (no request is made).
497
+ * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
498
+ * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift.
499
+ * @throws AugustRateLimitError When the API responds 429.
500
+ * @throws AugustTimeoutError When the request exceeds the SDK request timeout.
501
+ * @example
502
+ * ```ts
503
+ * const { timelocks } = await sdk.apiModule.getVaultGovernanceTimelocks({ vault, chainId: 1 }); // pending only
504
+ * const ready = timelocks.filter((t) => t.executable_at && Date.parse(`${t.executable_at}Z`) <= Date.now());
505
+ * ```
506
+ */
507
+ getVaultGovernanceTimelocks(params: {
508
+ vault: string;
509
+ chainId: number;
510
+ status?: ITransparencyTimelockStatus | 'all';
511
+ }): Promise<ITransparencyTimelocks>;
512
+ /**
513
+ * Fetch one page of the vault's governance audit log, newest first — the
514
+ * Governance tab's "Audit Log" timeline. Merges live timelock events with
515
+ * manually recorded entries (attestations, permission changes).
516
+ *
517
+ * Public `GET /upshift/governance/{vault_address}/audit_log`; no API key.
518
+ * Paginate with `before` = the last returned entry's `timestamp` while
519
+ * `has_more` is true (exclusive cursor; ties at the exact boundary
520
+ * timestamp are skipped, never duplicated).
521
+ *
522
+ * @param params.vault EVM vault address.
523
+ * @param params.chainId Numeric chain id.
524
+ * @param params.category Optional {@link ITransparencyAuditCategory} filter. Any other string is rejected with `AugustValidationError` before a request is made.
525
+ * @param params.before Optional exclusive cursor — pass the previous page's last `entry.timestamp` back verbatim (naive-UTC, no offset).
526
+ * @param params.limit Page size, 1–200. Backend default 50.
527
+ * @returns {@link ITransparencyAuditLog}.
528
+ * @throws AugustValidationError When arguments fail validation (no request is made).
529
+ * @throws AugustServerError When the API responds non-2xx (e.g. unknown vault 404, non-EVM vault 422).
530
+ * @throws AugustServerError (status 200) When the body is not the documented shape — backend contract drift.
531
+ * @throws AugustRateLimitError When the API responds 429.
532
+ * @throws AugustTimeoutError When the request exceeds the SDK request timeout.
533
+ * @example
534
+ * ```ts
535
+ * // Walk the whole log, newest first.
536
+ * let before: string | undefined;
537
+ * do {
538
+ * const page = await sdk.apiModule.getVaultGovernanceAuditLog({ vault, chainId: 1, before, limit: 50 });
539
+ * for (const e of page.entries) console.log(e.timestamp, e.type, e.summary);
540
+ * before = page.has_more ? page.entries.at(-1)?.timestamp : undefined;
541
+ * } while (before);
542
+ * ```
543
+ */
544
+ getVaultGovernanceAuditLog(params: {
545
+ vault: string;
546
+ chainId: number;
547
+ category?: ITransparencyAuditCategory;
548
+ before?: string;
549
+ limit?: number;
550
+ }): Promise<ITransparencyAuditLog>;
277
551
  /**
278
552
  * Fetch the historical unrealized-PnL series for a vault, newest first,
279
553
  * as computed by the August backend from periodic vault snapshots.