@augustdigital/sdk 9.11.0 → 9.12.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 (38) 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/sdk.d.ts +2389 -1723
  35. package/lib/types/vaults.d.ts +47 -1
  36. package/lib/types/vaults.js +5 -0
  37. package/lib/types/webserver.d.ts +8 -0
  38. package/package.json +1 -1
@@ -395,6 +395,12 @@ export interface IVault {
395
395
  /** Controls how the vault's APY is displayed; null when the backend has not set an override. */
396
396
  apyOverride?: IApyOverride | null;
397
397
  programId?: string;
398
+ /**
399
+ * Solana only: the vault's withdrawal queue, when it has one. Absent for
400
+ * other chains and for Solana vaults that never had a queue. See
401
+ * {@link IVaultWithdrawalQueue}.
402
+ */
403
+ withdrawalQueue?: IVaultWithdrawalQueue;
398
404
  /** Instant redemption config, populated from backend instant_redeem_config */
399
405
  instant_redeem_config?: {
400
406
  subaccountAddress: IAddress;
@@ -411,7 +417,40 @@ export interface IVault {
411
417
  }
412
418
  export declare enum VaultRedemptionStatus {
413
419
  AWAITING_COOLDOWN = "awaiting_cooldown",
414
- READY_TO_CLAIM = "ready_to_claim"
420
+ READY_TO_CLAIM = "ready_to_claim",
421
+ /**
422
+ * Solana withdrawal queue only: the request's fulfillment window has closed.
423
+ * It can no longer be claimed, only cancelled, which returns its shares.
424
+ */
425
+ EXPIRED = "expired"
426
+ }
427
+ /**
428
+ * A Solana vault's withdrawal queue, as `IVault.withdrawalQueue`.
429
+ *
430
+ * With a queue attached, holders cannot redeem directly: they request a
431
+ * withdrawal, wait out the cooldown, then claim. Read from the queue account on
432
+ * each vault fetch, so the counts are live.
433
+ */
434
+ export interface IVaultWithdrawalQueue {
435
+ /** The queue account (PDA) address, base58. */
436
+ address: string;
437
+ /**
438
+ * Whether the vault's redeem gate points at this queue, i.e. whether new
439
+ * requests are accepted and direct redemption is closed. `false` for a
440
+ * released queue, which may still hold requests made before the release.
441
+ */
442
+ enabled: boolean;
443
+ /** Seconds between a new request and when it can be claimed. */
444
+ cooldownSeconds: number;
445
+ /**
446
+ * Seconds after the cooldown that a new request stays claimable, or `0` for
447
+ * no limit. A request past its window can only be cancelled.
448
+ */
449
+ fulfillmentWindowSeconds: number;
450
+ /** Number of requests not yet claimed or cancelled, across all holders. */
451
+ pendingCount: number;
452
+ /** Shares escrowed across all pending requests, in share-token units. */
453
+ pendingShares: INormalizedNumber;
415
454
  }
416
455
  export type IVaultAvailableRedemption = {
417
456
  id: string;
@@ -425,6 +464,13 @@ export type IVaultAvailableRedemption = {
425
464
  date: Date;
426
465
  vault: IAddress;
427
466
  status?: VaultRedemptionStatus;
467
+ /**
468
+ * Solana withdrawal queue only: what claiming would pay now, in deposit-token
469
+ * units and net of the vault's withdrawal fee. The payout is priced when the
470
+ * request is claimed, so this moves with the share price. Absent when the
471
+ * vault has no share price to quote.
472
+ */
473
+ estimatedAssets?: INormalizedNumber;
428
474
  };
429
475
  export type IVaultRedemptionHistoryItem = {
430
476
  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.12.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/sdk.d.ts",
6
6
  "keywords": [