@augustdigital/sdk 9.11.0 → 9.13.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.
Files changed (40) hide show
  1. package/lib/adapters/solana/constants.d.ts +12 -4
  2. package/lib/adapters/solana/constants.js +8 -3
  3. package/lib/adapters/solana/getters.d.ts +5 -0
  4. package/lib/adapters/solana/getters.js +35 -1
  5. package/lib/adapters/solana/idl/vault-idl.d.ts +334 -7
  6. package/lib/adapters/solana/idl/vault-idl.js +600 -59
  7. package/lib/adapters/solana/idl/withdrawal-queue-idl.d.ts +790 -0
  8. package/lib/adapters/solana/idl/withdrawal-queue-idl.js +1868 -0
  9. package/lib/adapters/solana/index.d.ts +108 -10
  10. package/lib/adapters/solana/index.js +137 -12
  11. package/lib/adapters/solana/pricing.d.ts +11 -0
  12. package/lib/adapters/solana/pricing.js +24 -8
  13. package/lib/adapters/solana/queue.actions.d.ts +98 -0
  14. package/lib/adapters/solana/queue.actions.js +488 -0
  15. package/lib/adapters/solana/token-reads.d.ts +108 -0
  16. package/lib/adapters/solana/token-reads.js +145 -0
  17. package/lib/adapters/solana/types.d.ts +200 -1
  18. package/lib/adapters/solana/utils.d.ts +16 -0
  19. package/lib/adapters/solana/utils.js +41 -4
  20. package/lib/adapters/solana/vault.actions.d.ts +17 -0
  21. package/lib/adapters/solana/vault.actions.js +14 -125
  22. package/lib/adapters/solana/withdrawal-queue.d.ts +125 -0
  23. package/lib/adapters/solana/withdrawal-queue.js +301 -0
  24. package/lib/core/analytics/method-taxonomy.js +2 -0
  25. package/lib/core/analytics/version.d.ts +1 -1
  26. package/lib/core/analytics/version.js +1 -1
  27. package/lib/main.d.ts +16 -0
  28. package/lib/main.js +16 -0
  29. package/lib/modules/vaults/getters.d.ts +2 -2
  30. package/lib/modules/vaults/getters.js +103 -3
  31. package/lib/modules/vaults/main.d.ts +12 -0
  32. package/lib/modules/vaults/main.js +17 -1
  33. package/lib/modules/vaults/types.d.ts +14 -1
  34. package/lib/modules/vaults/utils.d.ts +8 -0
  35. package/lib/modules/vaults/utils.js +19 -0
  36. package/lib/sdk.d.ts +2406 -1723
  37. package/lib/types/vaults.d.ts +55 -1
  38. package/lib/types/vaults.js +5 -0
  39. package/lib/types/webserver.d.ts +8 -0
  40. package/package.json +1 -1
@@ -383,6 +383,14 @@ export interface IVault {
383
383
  enabled_historical_price_horizons?: number[];
384
384
  defaultApyHorizon?: 7 | 30 | null;
385
385
  latest_reported_tvl?: number | null;
386
+ /**
387
+ * Wrapper vaults only: the vault this one wraps, which holds the assets. A
388
+ * wrapper's own on-chain `totalAssets` reads 0, so its TVL is the underlying
389
+ * vault's. Null on a non-wrapper vault. Address casing is preserved verbatim.
390
+ */
391
+ underlyingVaultAddress?: VaultAddress | null;
392
+ /** Chain id of {@link IVault.underlyingVaultAddress}; null on a non-wrapper vault. */
393
+ underlyingChainId?: number | null;
386
394
  cachedAt?: string | null;
387
395
  /**
388
396
  * Provenance timestamps for the vault's server-side data — when its APY was last
@@ -395,6 +403,12 @@ export interface IVault {
395
403
  /** Controls how the vault's APY is displayed; null when the backend has not set an override. */
396
404
  apyOverride?: IApyOverride | null;
397
405
  programId?: string;
406
+ /**
407
+ * Solana only: the vault's withdrawal queue, when it has one. Absent for
408
+ * other chains and for Solana vaults that never had a queue. See
409
+ * {@link IVaultWithdrawalQueue}.
410
+ */
411
+ withdrawalQueue?: IVaultWithdrawalQueue;
398
412
  /** Instant redemption config, populated from backend instant_redeem_config */
399
413
  instant_redeem_config?: {
400
414
  subaccountAddress: IAddress;
@@ -411,7 +425,40 @@ export interface IVault {
411
425
  }
412
426
  export declare enum VaultRedemptionStatus {
413
427
  AWAITING_COOLDOWN = "awaiting_cooldown",
414
- READY_TO_CLAIM = "ready_to_claim"
428
+ READY_TO_CLAIM = "ready_to_claim",
429
+ /**
430
+ * Solana withdrawal queue only: the request's fulfillment window has closed.
431
+ * It can no longer be claimed, only cancelled, which returns its shares.
432
+ */
433
+ EXPIRED = "expired"
434
+ }
435
+ /**
436
+ * A Solana vault's withdrawal queue, as `IVault.withdrawalQueue`.
437
+ *
438
+ * With a queue attached, holders cannot redeem directly: they request a
439
+ * withdrawal, wait out the cooldown, then claim. Read from the queue account on
440
+ * each vault fetch, so the counts are live.
441
+ */
442
+ export interface IVaultWithdrawalQueue {
443
+ /** The queue account (PDA) address, base58. */
444
+ address: string;
445
+ /**
446
+ * Whether the vault's redeem gate points at this queue, i.e. whether new
447
+ * requests are accepted and direct redemption is closed. `false` for a
448
+ * released queue, which may still hold requests made before the release.
449
+ */
450
+ enabled: boolean;
451
+ /** Seconds between a new request and when it can be claimed. */
452
+ cooldownSeconds: number;
453
+ /**
454
+ * Seconds after the cooldown that a new request stays claimable, or `0` for
455
+ * no limit. A request past its window can only be cancelled.
456
+ */
457
+ fulfillmentWindowSeconds: number;
458
+ /** Number of requests not yet claimed or cancelled, across all holders. */
459
+ pendingCount: number;
460
+ /** Shares escrowed across all pending requests, in share-token units. */
461
+ pendingShares: INormalizedNumber;
415
462
  }
416
463
  export type IVaultAvailableRedemption = {
417
464
  id: string;
@@ -425,6 +472,13 @@ export type IVaultAvailableRedemption = {
425
472
  date: Date;
426
473
  vault: IAddress;
427
474
  status?: VaultRedemptionStatus;
475
+ /**
476
+ * Solana withdrawal queue only: what claiming would pay now, in deposit-token
477
+ * units and net of the vault's withdrawal fee. The payout is priced when the
478
+ * request is claimed, so this moves with the share price. Absent when the
479
+ * vault has no share price to quote.
480
+ */
481
+ estimatedAssets?: INormalizedNumber;
428
482
  };
429
483
  export type IVaultRedemptionHistoryItem = {
430
484
  receiver: IAddress;
@@ -5,6 +5,11 @@ var VaultRedemptionStatus;
5
5
  (function (VaultRedemptionStatus) {
6
6
  VaultRedemptionStatus["AWAITING_COOLDOWN"] = "awaiting_cooldown";
7
7
  VaultRedemptionStatus["READY_TO_CLAIM"] = "ready_to_claim";
8
+ /**
9
+ * Solana withdrawal queue only: the request's fulfillment window has closed.
10
+ * It can no longer be claimed, only cancelled, which returns its shares.
11
+ */
12
+ VaultRedemptionStatus["EXPIRED"] = "expired";
8
13
  })(VaultRedemptionStatus || (exports.VaultRedemptionStatus = VaultRedemptionStatus = {}));
9
14
  /**
10
15
  * Numeric vault-type tag used by the on-chain `SwapRouter` to branch between
@@ -647,6 +647,14 @@ export interface ITokenizedVault {
647
647
  max_drawdown: number | null;
648
648
  daily_pnl_per_share: Record<string, number>;
649
649
  latest_reported_tvl: number | null;
650
+ /**
651
+ * Set when this vault is a wrapper: the address of the inner vault it
652
+ * deposits into. null/absent = not a wrapper. A wrapper's TVL is already
653
+ * counted in its underlying vault, so platform totals skip it.
654
+ */
655
+ underlying_vault_address?: string | null;
656
+ /** Chain of the underlying vault; null/absent when not a wrapper. */
657
+ underlying_chain?: number | null;
650
658
  cached_at?: string | null;
651
659
  /**
652
660
  * Per-vault provenance timestamps (APY recompute, newest share-price snapshot,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augustdigital/sdk",
3
- "version": "9.11.0",
3
+ "version": "9.13.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/sdk.d.ts",
6
6
  "keywords": [