@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.
- package/lib/adapters/solana/constants.d.ts +12 -4
- package/lib/adapters/solana/constants.js +8 -3
- package/lib/adapters/solana/getters.d.ts +5 -0
- package/lib/adapters/solana/getters.js +35 -1
- package/lib/adapters/solana/idl/vault-idl.d.ts +334 -7
- package/lib/adapters/solana/idl/vault-idl.js +600 -59
- package/lib/adapters/solana/idl/withdrawal-queue-idl.d.ts +790 -0
- package/lib/adapters/solana/idl/withdrawal-queue-idl.js +1868 -0
- package/lib/adapters/solana/index.d.ts +108 -10
- package/lib/adapters/solana/index.js +137 -12
- package/lib/adapters/solana/pricing.d.ts +11 -0
- package/lib/adapters/solana/pricing.js +24 -8
- package/lib/adapters/solana/queue.actions.d.ts +98 -0
- package/lib/adapters/solana/queue.actions.js +488 -0
- package/lib/adapters/solana/token-reads.d.ts +108 -0
- package/lib/adapters/solana/token-reads.js +145 -0
- package/lib/adapters/solana/types.d.ts +200 -1
- package/lib/adapters/solana/utils.d.ts +16 -0
- package/lib/adapters/solana/utils.js +41 -4
- package/lib/adapters/solana/vault.actions.d.ts +17 -0
- package/lib/adapters/solana/vault.actions.js +14 -125
- package/lib/adapters/solana/withdrawal-queue.d.ts +125 -0
- package/lib/adapters/solana/withdrawal-queue.js +301 -0
- package/lib/core/analytics/method-taxonomy.js +2 -0
- package/lib/core/analytics/version.d.ts +1 -1
- package/lib/core/analytics/version.js +1 -1
- package/lib/main.d.ts +16 -0
- package/lib/main.js +16 -0
- package/lib/modules/vaults/getters.d.ts +2 -2
- package/lib/modules/vaults/getters.js +103 -3
- package/lib/modules/vaults/main.d.ts +12 -0
- package/lib/modules/vaults/main.js +17 -1
- package/lib/modules/vaults/types.d.ts +14 -1
- package/lib/modules/vaults/utils.d.ts +8 -0
- package/lib/modules/vaults/utils.js +19 -0
- package/lib/sdk.d.ts +2406 -1723
- package/lib/types/vaults.d.ts +55 -1
- package/lib/types/vaults.js +5 -0
- package/lib/types/webserver.d.ts +8 -0
- package/package.json +1 -1
package/lib/types/vaults.d.ts
CHANGED
|
@@ -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;
|
package/lib/types/vaults.js
CHANGED
|
@@ -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
|
package/lib/types/webserver.d.ts
CHANGED
|
@@ -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,
|