@augustdigital/sdk 8.22.1 → 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.
- package/lib/adapters/solana/idl/vault-idl.d.ts +185 -18
- package/lib/adapters/solana/idl/vault-idl.js +521 -28
- package/lib/core/analytics/method-taxonomy.js +10 -0
- package/lib/core/analytics/version.d.ts +1 -1
- package/lib/core/analytics/version.js +1 -1
- package/lib/core/attribution.d.ts +24 -8
- package/lib/core/attribution.js +21 -5
- package/lib/core/constants/core.d.ts +11 -0
- package/lib/core/constants/core.js +54 -0
- package/lib/core/helpers/signer.d.ts +2 -1
- package/lib/core/helpers/signer.js +7 -5
- package/lib/evm/methods/crossChainVault.d.ts +5 -1
- package/lib/evm/methods/crossChainVault.js +8 -4
- package/lib/main.d.ts +22 -2
- package/lib/main.js +22 -2
- package/lib/modules/api/fetcher.d.ts +27 -1
- package/lib/modules/api/fetcher.js +38 -1
- package/lib/modules/api/main.d.ts +288 -14
- package/lib/modules/api/main.js +439 -13
- package/lib/modules/vaults/write.actions.d.ts +4 -0
- package/lib/modules/vaults/write.actions.js +9 -1
- package/lib/sdk.d.ts +11586 -10847
- package/lib/types/api.d.ts +218 -0
- package/package.json +1 -1
package/lib/types/api.d.ts
CHANGED
|
@@ -278,3 +278,221 @@ export interface IOracleClassification {
|
|
|
278
278
|
rows: IOracleClassificationRow[];
|
|
279
279
|
warnings: string[];
|
|
280
280
|
}
|
|
281
|
+
/**
|
|
282
|
+
* Strategy bucket the backend assigns to a position group (backend
|
|
283
|
+
* `StrategyCategory` enum). `Buffer / Idle` is undeployed wallet liquidity;
|
|
284
|
+
* `CeFi` positions are the only ones not inspectable on-chain.
|
|
285
|
+
*/
|
|
286
|
+
export type ITransparencyStrategyCategory = 'Lending' | 'Yield Trading' | 'Staking / Vaults' | 'CeFi' | 'Buffer / Idle' | 'Unclassified';
|
|
287
|
+
/** Role of a token leg inside a position. Borrow legs carry NEGATIVE `usd_value` and `balance`. */
|
|
288
|
+
export type ITransparencyTokenRole = 'supply' | 'borrow' | 'reward' | 'wallet';
|
|
289
|
+
/** One token leg of a position (backend `TokenExposureView`). */
|
|
290
|
+
export interface ITransparencyTokenExposure {
|
|
291
|
+
symbol: string;
|
|
292
|
+
/** Native token units; CeFi derivatives carry signed contract units. */
|
|
293
|
+
balance: number;
|
|
294
|
+
/** USD value; negative for borrow legs. */
|
|
295
|
+
usd_value: number;
|
|
296
|
+
role: ITransparencyTokenRole;
|
|
297
|
+
}
|
|
298
|
+
/** One protocol's positions inside a subaccount (backend `IntegrationGroupView`). */
|
|
299
|
+
export interface ITransparencyIntegrationGroup {
|
|
300
|
+
/** Normalized DeFi slug, CeFi venue name, or `_idle` for undeployed wallet balances. */
|
|
301
|
+
protocol: string;
|
|
302
|
+
chain_id: number;
|
|
303
|
+
strategy_category: ITransparencyStrategyCategory;
|
|
304
|
+
/** Wallet that physically holds the position. */
|
|
305
|
+
holding_address: IAddress;
|
|
306
|
+
tokens: ITransparencyTokenExposure[];
|
|
307
|
+
total_usd: number;
|
|
308
|
+
/** Fraction of the subaccount total (0.25 = 25%); can exceed 1.0 slightly by rounding. */
|
|
309
|
+
pct_of_subaccount: number;
|
|
310
|
+
/** Minimum health factor across the grouped DeFi positions; null when none reports one. */
|
|
311
|
+
health_factor?: number | null;
|
|
312
|
+
}
|
|
313
|
+
/** One vault wallet with its positions (backend `SubaccountIntegrationsView`). */
|
|
314
|
+
export interface ITransparencySubaccount {
|
|
315
|
+
subaccount_address: IAddress;
|
|
316
|
+
label: string;
|
|
317
|
+
type: 'subaccount' | 'eoa';
|
|
318
|
+
total_usd: number;
|
|
319
|
+
/** Fraction of NAV (0.25 = 25%). */
|
|
320
|
+
pct_of_nav: number;
|
|
321
|
+
integrations: ITransparencyIntegrationGroup[];
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Latest position snapshot for a vault, grouped per wallet — the data behind
|
|
325
|
+
* the Overview tab's strategy breakdown, backing composition, vault buffer and
|
|
326
|
+
* per-wallet table (backend `VaultPositionsResponse`).
|
|
327
|
+
*
|
|
328
|
+
* `total_nav` is the mark-to-market NAV of all positions under the published
|
|
329
|
+
* pricing methodology; `reported_tvl` is the vault-reported total assets
|
|
330
|
+
* captured in the SAME snapshot (use it for a headline that matches the vault
|
|
331
|
+
* contract). The vault's own liquidity buffer is `total_nav − Σ subaccounts[].total_usd`.
|
|
332
|
+
*/
|
|
333
|
+
export interface ITransparencyPositions {
|
|
334
|
+
vault_address: IAddress;
|
|
335
|
+
chain_id: number;
|
|
336
|
+
/** ISO-8601 snapshot timestamp; every field on this response is from this instant. */
|
|
337
|
+
snapshot_at: string;
|
|
338
|
+
total_nav: number;
|
|
339
|
+
reported_tvl?: number | null;
|
|
340
|
+
subaccounts: ITransparencySubaccount[];
|
|
341
|
+
}
|
|
342
|
+
/** One point of a vault's unrealized-PnL / ratio series (backend `unrealized_pnl` record, `fields=ratio` projection). */
|
|
343
|
+
export interface ITransparencyRatioPoint {
|
|
344
|
+
timestamp: string;
|
|
345
|
+
/** Backing ÷ supply; > 1 means over-collateralized. Drives the Collateral Ratio chart. */
|
|
346
|
+
adjusted_redeem_ratio: number;
|
|
347
|
+
/** Mark-to-market NAV — the "Backing Assets" series. */
|
|
348
|
+
actual_tvl: number;
|
|
349
|
+
/** Vault-reported TVL — the "Supply" series. */
|
|
350
|
+
tvl_on_vault: number;
|
|
351
|
+
}
|
|
352
|
+
/** One (date, protocol) allocation point (backend `AllocationPoint`). */
|
|
353
|
+
export interface ITransparencyAllocationPoint {
|
|
354
|
+
/** `YYYY-MM-DD`. */
|
|
355
|
+
date: string;
|
|
356
|
+
protocol: string;
|
|
357
|
+
strategy_category: ITransparencyStrategyCategory;
|
|
358
|
+
usd_value: number;
|
|
359
|
+
/** Fraction of TVL (0.25 = 25%). */
|
|
360
|
+
pct_of_tvl: number;
|
|
361
|
+
}
|
|
362
|
+
/** Daily allocation history for the Performance tab's "Allocation Over Time" chart. */
|
|
363
|
+
export interface ITransparencyHistoricalAllocations {
|
|
364
|
+
vault_address: IAddress;
|
|
365
|
+
chain_id: number;
|
|
366
|
+
/** ISO-8601 timestamp of the earliest snapshot, or null when there is none. */
|
|
367
|
+
history_from: string | null;
|
|
368
|
+
points: ITransparencyAllocationPoint[];
|
|
369
|
+
}
|
|
370
|
+
/** Vault fee configuration as shown on the Performance tab (backend `VaultFeesResponse`). `*_pct` fields are already percents (2 = 2%), unlike the `pct_of_*` fractions elsewhere. */
|
|
371
|
+
export interface ITransparencyFees {
|
|
372
|
+
vault_address: IAddress;
|
|
373
|
+
chain_id: number;
|
|
374
|
+
management_fee_bps: number | null;
|
|
375
|
+
management_fee_pct: number | null;
|
|
376
|
+
performance_fee_ppm: number | null;
|
|
377
|
+
performance_fee_pct: number | null;
|
|
378
|
+
weekly_performance_fee_bps: number | null;
|
|
379
|
+
management_fee_waived_until_date: string | null;
|
|
380
|
+
management_fee_waived_until_tvl: number | null;
|
|
381
|
+
performance_fee_waived_until_date: string | null;
|
|
382
|
+
performance_fee_waived_until_tvl: number | null;
|
|
383
|
+
warnings: string[];
|
|
384
|
+
}
|
|
385
|
+
/** Smoothed 7D-APY series (backend `historical_apy/chart`); labels are `M/D/YYYY`, values are decimal fractions (0.0245 = 2.45%). */
|
|
386
|
+
export interface ITransparencyApySeries {
|
|
387
|
+
labels: string[];
|
|
388
|
+
values: number[];
|
|
389
|
+
average_apy?: number | null;
|
|
390
|
+
}
|
|
391
|
+
/** Public-safe summary of one Fordefi transaction-policy rule. */
|
|
392
|
+
export interface ITransparencyFordefiPolicyRule {
|
|
393
|
+
name: string;
|
|
394
|
+
transaction_types: string[];
|
|
395
|
+
recipients: string[];
|
|
396
|
+
assets: string[];
|
|
397
|
+
action: string | null;
|
|
398
|
+
}
|
|
399
|
+
/** One privileged address on the vault with custody enrichment (backend `VaultRoleView`). */
|
|
400
|
+
export interface ITransparencyGovernanceRole {
|
|
401
|
+
role: 'owner' | 'operator';
|
|
402
|
+
address: IAddress;
|
|
403
|
+
chain_id: number;
|
|
404
|
+
is_safe: boolean;
|
|
405
|
+
safe_threshold: number | null;
|
|
406
|
+
safe_owners: IAddress[] | null;
|
|
407
|
+
safe_nonce: number | null;
|
|
408
|
+
has_fordefi_policy: boolean;
|
|
409
|
+
/** Governed by the Upshift operator-policy engine (whitelisted integrations). */
|
|
410
|
+
has_august_policy: boolean;
|
|
411
|
+
/** null = unknown/uncovered — distinct from an explicit 0. */
|
|
412
|
+
fordefi_policy_count: number | null;
|
|
413
|
+
fordefi_policies: ITransparencyFordefiPolicyRule[] | null;
|
|
414
|
+
safe_ui_url: string | null;
|
|
415
|
+
}
|
|
416
|
+
/** Governance tab → "Vault Roles" card (backend `VaultRolesResponse`). `warnings` lists enrichment failures (Safe / Fordefi lookups) that degraded rows rather than failing the call. */
|
|
417
|
+
export interface ITransparencyGovernanceRoles {
|
|
418
|
+
vault_address: IAddress;
|
|
419
|
+
chain_id: number;
|
|
420
|
+
snapshot_at: string;
|
|
421
|
+
roles: ITransparencyGovernanceRole[];
|
|
422
|
+
warnings: string[];
|
|
423
|
+
}
|
|
424
|
+
/** One integration the vault's wallets may operate, with unioned scopes (backend `VaultPermissionView`). */
|
|
425
|
+
export interface ITransparencyGovernancePermission {
|
|
426
|
+
integration: string;
|
|
427
|
+
protocol: string | null;
|
|
428
|
+
/** null for chainless CeFi venue integrations. */
|
|
429
|
+
chain_id: number | null;
|
|
430
|
+
tokens: string[];
|
|
431
|
+
functions: string[];
|
|
432
|
+
spenders: IAddress[];
|
|
433
|
+
wallets: IAddress[];
|
|
434
|
+
fordefi_policy_match: boolean;
|
|
435
|
+
fordefi_policies: ITransparencyFordefiPolicyRule[] | null;
|
|
436
|
+
}
|
|
437
|
+
/** One Fordefi transaction-policy rule attributed to the vault, with the vault wallets it targets. */
|
|
438
|
+
export interface ITransparencyVaultFordefiPolicy extends ITransparencyFordefiPolicyRule {
|
|
439
|
+
wallets: IAddress[];
|
|
440
|
+
}
|
|
441
|
+
/** Governance tab → "Vault Permissions" table (backend `VaultPermissionsResponse`). */
|
|
442
|
+
export interface ITransparencyGovernancePermissions {
|
|
443
|
+
vault_address: IAddress;
|
|
444
|
+
chain_id: number;
|
|
445
|
+
permissions: ITransparencyGovernancePermission[];
|
|
446
|
+
/** null = no policy workspace could answer (unknown, not empty). */
|
|
447
|
+
fordefi_policies: ITransparencyVaultFordefiPolicy[] | null;
|
|
448
|
+
warnings: string[];
|
|
449
|
+
}
|
|
450
|
+
/** Lifecycle of a timelock request (backend `TimelockStatus` enum). */
|
|
451
|
+
export type ITransparencyTimelockStatus = 'scheduled' | 'executed' | 'cancelled';
|
|
452
|
+
/** One request in the vault timelock (backend `VaultTimelockView`). */
|
|
453
|
+
export interface ITransparencyTimelock {
|
|
454
|
+
action_id: string;
|
|
455
|
+
action_label: string;
|
|
456
|
+
target_label: string;
|
|
457
|
+
params: Record<string, unknown>;
|
|
458
|
+
status: ITransparencyTimelockStatus;
|
|
459
|
+
proposer: string | null;
|
|
460
|
+
/** Naive-UTC ISO timestamp. */
|
|
461
|
+
scheduled_at: string;
|
|
462
|
+
/** null when the timelock duration could not be read on-chain (see `warnings`). */
|
|
463
|
+
executable_at: string | null;
|
|
464
|
+
schedule_tx_hash: string;
|
|
465
|
+
execute_tx_hash: string | null;
|
|
466
|
+
cancel_tx_hash: string | null;
|
|
467
|
+
timelock_address: IAddress;
|
|
468
|
+
}
|
|
469
|
+
/** Governance tab → "Pending Timelocks" table (backend `VaultTimelocksResponse`). */
|
|
470
|
+
export interface ITransparencyTimelocks {
|
|
471
|
+
vault_address: IAddress;
|
|
472
|
+
chain_id: number;
|
|
473
|
+
timelocks: ITransparencyTimelock[];
|
|
474
|
+
warnings: string[];
|
|
475
|
+
}
|
|
476
|
+
/** Category pill of an audit-log entry (backend `AuditLogCategory` enum). */
|
|
477
|
+
export type ITransparencyAuditCategory = 'Strategy' | 'Role' | 'Permission' | 'Attestation';
|
|
478
|
+
/** One row of the governance audit log (backend `AuditLogEntryView`). `tx_hash` is set only for on-chain-backed events. */
|
|
479
|
+
export interface ITransparencyAuditLogEntry {
|
|
480
|
+
/** Naive-UTC ISO timestamp (no offset) — pass back verbatim as the `before` cursor. */
|
|
481
|
+
timestamp: string;
|
|
482
|
+
type: ITransparencyAuditCategory;
|
|
483
|
+
summary: string;
|
|
484
|
+
actor: string | null;
|
|
485
|
+
vault_address: IAddress;
|
|
486
|
+
tx_hash: string | null;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* One page of the governance audit log, newest first. Paginate with
|
|
490
|
+
* `before` = the last entry's `timestamp` while `has_more` is true.
|
|
491
|
+
*/
|
|
492
|
+
export interface ITransparencyAuditLog {
|
|
493
|
+
vault_address: IAddress;
|
|
494
|
+
chain_id: number;
|
|
495
|
+
entries: ITransparencyAuditLogEntry[];
|
|
496
|
+
has_more: boolean;
|
|
497
|
+
warnings: string[];
|
|
498
|
+
}
|