@steerprotocol/sdk 4.0.0-next.6 → 4.0.0-next.8
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/README.md +209 -7
- package/dist/index.cjs +10400 -6957
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +178 -10
- package/dist/index.d.mts +178 -10
- package/dist/index.mjs +10397 -6958
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -199,6 +199,7 @@ interface V4Contracts extends ContractMap {
|
|
|
199
199
|
//#endregion
|
|
200
200
|
//#region src/amm/enums.d.ts
|
|
201
201
|
export declare enum AmmProtocol {
|
|
202
|
+
Blackhole = "blackhole",
|
|
202
203
|
Aerodrome = "aerodrome",
|
|
203
204
|
SushiSwap = "sushiswap",
|
|
204
205
|
Retro = "retro",
|
|
@@ -226,6 +227,9 @@ export declare enum QuickSwapVersion {
|
|
|
226
227
|
V3 = "v3",
|
|
227
228
|
V4 = "v4"
|
|
228
229
|
}
|
|
230
|
+
export declare enum BlackholeVersion {
|
|
231
|
+
CL = "cl"
|
|
232
|
+
}
|
|
229
233
|
export declare enum CamelotVersion {
|
|
230
234
|
V3 = "v3"
|
|
231
235
|
}
|
|
@@ -235,6 +239,7 @@ export declare enum PancakeSwapVersion {
|
|
|
235
239
|
}
|
|
236
240
|
/** Named deployments for explicitly selecting between otherwise ambiguous matches. */
|
|
237
241
|
export declare enum AmmDeployment {
|
|
242
|
+
BlackholeCLAvalanche = "blackhole-cl-avalanche",
|
|
238
243
|
AerodromeSlipstreamBase = "aerodrome-slipstream-base",
|
|
239
244
|
AerodromeSlipstreamV2Base = "aerodrome-slipstream-v2-base",
|
|
240
245
|
AerodromeSlipstreamV3Base = "aerodrome-slipstream-v3-base",
|
|
@@ -243,6 +248,7 @@ export declare enum AmmDeployment {
|
|
|
243
248
|
UniswapV3Polygon = "uniswap-v3-polygon",
|
|
244
249
|
QuickSwapV4Polygon = "quickswap-integral-polygon",
|
|
245
250
|
UniswapV3Base = "uniswap-v3-base",
|
|
251
|
+
UniswapV4Robinhood = "uniswap-v4-robinhood",
|
|
246
252
|
UniswapV4Bsc = "uniswap-v4-bsc",
|
|
247
253
|
UniswapV4Base = "uniswap-v4-base",
|
|
248
254
|
QuickSwapV3Polygon = "quickswap-polygon",
|
|
@@ -428,9 +434,25 @@ export declare class VaultResolver {
|
|
|
428
434
|
constructor(definition: VaultResolverDefinition, amms: DeploymentRegistry<AmmAdapter>, lending: DeploymentRegistry<LendingAdapter>);
|
|
429
435
|
resolve(steer: SteerNetwork, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
430
436
|
/** Bounded bulk identity pages at one block; compatibility uses four active loads. */
|
|
431
|
-
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options
|
|
437
|
+
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options: VaultLoadOptions & {
|
|
438
|
+
allowFailure: true;
|
|
439
|
+
}): Promise<readonly VaultLoadResult[]>;
|
|
440
|
+
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
441
|
+
allowFailure?: false;
|
|
442
|
+
}): Promise<readonly KnownSteerVault[]>;
|
|
443
|
+
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
444
|
+
allowFailure?: boolean;
|
|
445
|
+
}): Promise<readonly KnownSteerVault[] | readonly VaultLoadResult[]>;
|
|
432
446
|
/** Identity and accounting share a pinned block; dispatch custom constructors and methods. */
|
|
433
|
-
snapshots(steer: SteerNetwork, addresses: readonly Address[], options
|
|
447
|
+
snapshots(steer: SteerNetwork, addresses: readonly Address[], options: ReadOptions & {
|
|
448
|
+
allowFailure: true;
|
|
449
|
+
}): Promise<readonly VaultSnapshotResult[]>;
|
|
450
|
+
snapshots(steer: SteerNetwork, addresses: readonly Address[], options?: ReadOptions & {
|
|
451
|
+
allowFailure?: false;
|
|
452
|
+
}): Promise<readonly LiquidityVaultSnapshot[]>;
|
|
453
|
+
snapshots(steer: SteerNetwork, addresses: readonly Address[], options?: ReadOptions & {
|
|
454
|
+
allowFailure?: boolean;
|
|
455
|
+
}): Promise<readonly LiquidityVaultSnapshot[] | readonly VaultSnapshotResult[]>;
|
|
434
456
|
}
|
|
435
457
|
//#endregion
|
|
436
458
|
//#region src/vault/steer.d.ts
|
|
@@ -457,8 +479,24 @@ export declare class SteerNetwork {
|
|
|
457
479
|
/** Synchronous registration check with no RPC or HTTP; does not verify a particular vault. */
|
|
458
480
|
supportsVaultSnapshots(beaconName: string): boolean;
|
|
459
481
|
getVault(address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
460
|
-
getVaults(addresses: readonly Address[], options
|
|
461
|
-
|
|
482
|
+
getVaults(addresses: readonly Address[], options: VaultLoadOptions & {
|
|
483
|
+
allowFailure: true;
|
|
484
|
+
}): Promise<readonly VaultLoadResult[]>;
|
|
485
|
+
getVaults(addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
486
|
+
allowFailure?: false;
|
|
487
|
+
}): Promise<readonly KnownSteerVault[]>;
|
|
488
|
+
getVaults(addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
489
|
+
allowFailure?: boolean;
|
|
490
|
+
}): Promise<readonly KnownSteerVault[] | readonly VaultLoadResult[]>;
|
|
491
|
+
getVaultSnapshots(addresses: readonly Address[], options: ReadOptions & {
|
|
492
|
+
allowFailure: true;
|
|
493
|
+
}): Promise<readonly VaultSnapshotResult[]>;
|
|
494
|
+
getVaultSnapshots(addresses: readonly Address[], options?: ReadOptions & {
|
|
495
|
+
allowFailure?: false;
|
|
496
|
+
}): Promise<readonly LiquidityVaultSnapshot[]>;
|
|
497
|
+
getVaultSnapshots(addresses: readonly Address[], options?: ReadOptions & {
|
|
498
|
+
allowFailure?: boolean;
|
|
499
|
+
}): Promise<readonly LiquidityVaultSnapshot[] | readonly VaultSnapshotResult[]>;
|
|
462
500
|
getVaultUserPositions(addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
463
501
|
getLiquidityVault(address: Address, options?: VaultLoadOptions): Promise<LiquidityVault>;
|
|
464
502
|
getLendingVault(address: Address, options?: VaultLoadOptions): Promise<LendingVault>;
|
|
@@ -517,7 +555,8 @@ interface VaultMetadata {
|
|
|
517
555
|
readonly beaconName: string;
|
|
518
556
|
readonly createdAt: string;
|
|
519
557
|
readonly state: string | null;
|
|
520
|
-
|
|
558
|
+
/** Pool contract address or a 32-byte pool ID for singleton AMMs such as V4. */
|
|
559
|
+
readonly pool: Hex | null;
|
|
521
560
|
readonly poolKey?: string | null;
|
|
522
561
|
readonly token0: Address | null;
|
|
523
562
|
readonly token1: Address | null;
|
|
@@ -615,6 +654,7 @@ interface VaultRewardPayout {
|
|
|
615
654
|
type WithdrawRewards = VaultRewardPayout;
|
|
616
655
|
/** Actual withdrawal simulation, including contract burn rounding and fee policy. */
|
|
617
656
|
interface WithdrawPreview {
|
|
657
|
+
readonly rewardPayouts?: readonly VaultRewardPayout[];
|
|
618
658
|
readonly rewards?: WithdrawRewards;
|
|
619
659
|
readonly blockNumber: bigint;
|
|
620
660
|
readonly shares: bigint;
|
|
@@ -666,6 +706,8 @@ interface V4VaultPool {
|
|
|
666
706
|
}
|
|
667
707
|
type LiquidityPool = Address | V4VaultPool;
|
|
668
708
|
interface LiquidityPosition<TPool extends LiquidityPool = LiquidityPool> {
|
|
709
|
+
/** NFT checkpoint amounts excluded from LP fees/totals when the qualified vault cannot pay them out. */
|
|
710
|
+
readonly nftTokensOwed?: TokenPairAmounts;
|
|
669
711
|
readonly kind: PositionKind.Liquidity;
|
|
670
712
|
readonly amm: AmmAdapter;
|
|
671
713
|
readonly pool: TPool;
|
|
@@ -687,6 +729,28 @@ interface LiquidityPositionRange {
|
|
|
687
729
|
readonly relativeWeight: number;
|
|
688
730
|
readonly weightPercent: string | undefined;
|
|
689
731
|
}
|
|
732
|
+
/** One reward asset, deduplicated by token even when base and bonus rewards overlap. */
|
|
733
|
+
interface VaultRewardFee {
|
|
734
|
+
readonly identifier: string;
|
|
735
|
+
readonly recipient: Address;
|
|
736
|
+
readonly unpaid: PoolTokenBalance;
|
|
737
|
+
readonly unclaimed: PoolTokenBalance;
|
|
738
|
+
}
|
|
739
|
+
interface VaultRewardAsset {
|
|
740
|
+
readonly token: Address;
|
|
741
|
+
readonly decimals: number;
|
|
742
|
+
readonly balance: PoolTokenBalance;
|
|
743
|
+
readonly reservedFees: PoolTokenBalance;
|
|
744
|
+
/** Stored fees not attributed to the current fee identifiers, still excluded from LP holdings. */
|
|
745
|
+
readonly unattributedReservedFees: PoolTokenBalance;
|
|
746
|
+
readonly accumulatedPerShareX18: bigint;
|
|
747
|
+
readonly unclaimed: {
|
|
748
|
+
readonly gross: PoolTokenBalance;
|
|
749
|
+
readonly net: PoolTokenBalance;
|
|
750
|
+
readonly fee: PoolTokenBalance;
|
|
751
|
+
};
|
|
752
|
+
readonly feeRecipients: readonly VaultRewardFee[];
|
|
753
|
+
}
|
|
690
754
|
/** Separate reward-token accounting, never folded into proportional LP pair holdings. */
|
|
691
755
|
interface LiquidityVaultRewards {
|
|
692
756
|
readonly token: Address;
|
|
@@ -705,7 +769,23 @@ interface LiquidityVaultRewards {
|
|
|
705
769
|
readonly strategist: PoolTokenBalance;
|
|
706
770
|
};
|
|
707
771
|
}
|
|
772
|
+
/** One result for every requested vault, preserving input order and duplicates. */
|
|
773
|
+
type VaultLoadResult = {
|
|
774
|
+
readonly status: "success";
|
|
775
|
+
readonly vault: KnownSteerVault;
|
|
776
|
+
} | {
|
|
777
|
+
readonly status: "failure";
|
|
778
|
+
readonly error: Error;
|
|
779
|
+
};
|
|
780
|
+
type VaultSnapshotResult = {
|
|
781
|
+
readonly status: "success";
|
|
782
|
+
readonly snapshot: LiquidityVaultSnapshot;
|
|
783
|
+
} | {
|
|
784
|
+
readonly status: "failure";
|
|
785
|
+
readonly error: Error;
|
|
786
|
+
};
|
|
708
787
|
interface LiquidityVaultSnapshot<TPool extends LiquidityPool = LiquidityPool> {
|
|
788
|
+
readonly rewardAssets?: readonly VaultRewardAsset[];
|
|
709
789
|
readonly blockNumber: bigint;
|
|
710
790
|
/** Verified implementation at blockNumber, supplied by registered bulk snapshot readers. */
|
|
711
791
|
readonly implementation?: {
|
|
@@ -941,6 +1021,10 @@ export declare abstract class AlgebraIntegralAdapter extends AmmAdapter<AlgebraP
|
|
|
941
1021
|
amountOut: bigint;
|
|
942
1022
|
}>>;
|
|
943
1023
|
}
|
|
1024
|
+
export declare class Blackhole extends AlgebraIntegralAdapter {
|
|
1025
|
+
readonly protocol = AmmProtocol.Blackhole;
|
|
1026
|
+
readonly version = BlackholeVersion.CL;
|
|
1027
|
+
}
|
|
944
1028
|
export declare class QuickSwapIntegral extends AlgebraIntegralAdapter {
|
|
945
1029
|
readonly protocol = AmmProtocol.QuickSwap;
|
|
946
1030
|
readonly version = QuickSwapVersion.V4;
|
|
@@ -1190,10 +1274,19 @@ export declare class UniswapV4 extends UniswapV4Adapter {
|
|
|
1190
1274
|
readonly version = UniswapVersion.V4;
|
|
1191
1275
|
}
|
|
1192
1276
|
//#endregion
|
|
1277
|
+
//#region src/amm/adapters/uniswap-v4/errors.d.ts
|
|
1278
|
+
/** A verified absent key, rather than a failed provider or indexer request. */
|
|
1279
|
+
export declare class V4PoolKeyNotFoundError extends Error {
|
|
1280
|
+
constructor(message?: string);
|
|
1281
|
+
}
|
|
1282
|
+
//#endregion
|
|
1193
1283
|
//#region src/amm/types.d.ts
|
|
1194
|
-
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | CamelotVersion | PancakeSwapVersion;
|
|
1284
|
+
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | BlackholeVersion | CamelotVersion | PancakeSwapVersion;
|
|
1195
1285
|
/** Protocol versions select concrete adapters; families remain an implementation detail. */
|
|
1196
1286
|
interface AmmProtocolAdapters {
|
|
1287
|
+
[AmmProtocol.Blackhole]: {
|
|
1288
|
+
[BlackholeVersion.CL]: Blackhole;
|
|
1289
|
+
};
|
|
1197
1290
|
[AmmProtocol.Aerodrome]: {
|
|
1198
1291
|
[AerodromeVersion.Slipstream]: AerodromeSlipstream;
|
|
1199
1292
|
[AerodromeVersion.SlipstreamV2]: AerodromeSlipstreamV2;
|
|
@@ -1326,6 +1419,16 @@ type DiscoveredPool = (SlipstreamPoolState & {
|
|
|
1326
1419
|
}) | (InfinityCLPoolState & {
|
|
1327
1420
|
readonly amm: InfinityCLAdapter;
|
|
1328
1421
|
});
|
|
1422
|
+
type PoolReadResult<TPool> = {
|
|
1423
|
+
readonly status: "success";
|
|
1424
|
+
readonly pool: TPool;
|
|
1425
|
+
} | {
|
|
1426
|
+
readonly status: "failure";
|
|
1427
|
+
readonly error: Error;
|
|
1428
|
+
};
|
|
1429
|
+
type PoolBatchReadOptions = PoolReadOptions & {
|
|
1430
|
+
readonly allowFailure?: boolean;
|
|
1431
|
+
};
|
|
1329
1432
|
type PoolReadOptions = ReadOptions & DataAdapterRequestOptions;
|
|
1330
1433
|
interface TickLiquidity {
|
|
1331
1434
|
readonly tick: number;
|
|
@@ -1388,7 +1491,13 @@ export declare abstract class AmmAdapter<TPoolRef = unknown, TPoolState = unknow
|
|
|
1388
1491
|
abstract quote(request: SwapQuoteRequest<TPoolRef>, options?: PoolReadOptions): Promise<SwapQuote>;
|
|
1389
1492
|
abstract getPool(reference: TPoolRef, options?: ReadOptions): Promise<TPoolState>;
|
|
1390
1493
|
/** Read snapshots at one block, preserving input order and duplicate references. */
|
|
1391
|
-
getPools(references: readonly TPoolRef[], options
|
|
1494
|
+
getPools(references: readonly TPoolRef[], options: PoolReadOptions & {
|
|
1495
|
+
allowFailure: true;
|
|
1496
|
+
}): Promise<readonly PoolReadResult<TPoolState>[]>;
|
|
1497
|
+
getPools(references: readonly TPoolRef[], options?: PoolReadOptions & {
|
|
1498
|
+
allowFailure?: false;
|
|
1499
|
+
}): Promise<readonly TPoolState[]>;
|
|
1500
|
+
getPools(references: readonly TPoolRef[], options?: PoolBatchReadOptions): Promise<readonly TPoolState[] | readonly PoolReadResult<TPoolState>[]>;
|
|
1392
1501
|
}
|
|
1393
1502
|
//#endregion
|
|
1394
1503
|
//#region src/amm/adapters/pancakeswap-v3/data-adapter.d.ts
|
|
@@ -3565,8 +3674,24 @@ export declare class SteerClient {
|
|
|
3565
3674
|
})[]>;
|
|
3566
3675
|
getPools(request: PoolsLookupRequest): Promise<readonly DiscoveredPool[]>;
|
|
3567
3676
|
getVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
3568
|
-
getVaults(chainId: number, addresses: readonly Address[], options
|
|
3569
|
-
|
|
3677
|
+
getVaults(chainId: number, addresses: readonly Address[], options: VaultLoadOptions & {
|
|
3678
|
+
allowFailure: true;
|
|
3679
|
+
}): Promise<readonly VaultLoadResult[]>;
|
|
3680
|
+
getVaults(chainId: number, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
3681
|
+
allowFailure?: false;
|
|
3682
|
+
}): Promise<readonly KnownSteerVault[]>;
|
|
3683
|
+
getVaults(chainId: number, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
3684
|
+
allowFailure?: boolean;
|
|
3685
|
+
}): Promise<readonly KnownSteerVault[] | readonly VaultLoadResult[]>;
|
|
3686
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options: ReadOptions & {
|
|
3687
|
+
allowFailure: true;
|
|
3688
|
+
}): Promise<readonly VaultSnapshotResult[]>;
|
|
3689
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options?: ReadOptions & {
|
|
3690
|
+
allowFailure?: false;
|
|
3691
|
+
}): Promise<readonly LiquidityVaultSnapshot[]>;
|
|
3692
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options?: ReadOptions & {
|
|
3693
|
+
allowFailure?: boolean;
|
|
3694
|
+
}): Promise<readonly LiquidityVaultSnapshot[] | readonly VaultSnapshotResult[]>;
|
|
3570
3695
|
getVaultUserPositions(chainId: number, addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
3571
3696
|
listUserVaults(request: UserVaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
|
|
3572
3697
|
listVaults(request: VaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
|
|
@@ -3661,6 +3786,49 @@ export declare class AlgebraLegacyVault extends LiquidityVault<AlgebraLegacyAdap
|
|
|
3661
3786
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3662
3787
|
}
|
|
3663
3788
|
//#endregion
|
|
3789
|
+
//#region src/vault/adapters/blackhole/types.d.ts
|
|
3790
|
+
interface BlackholePosition extends LiquidityPosition<Address> {
|
|
3791
|
+
readonly nftTokensOwed: TokenPairAmounts;
|
|
3792
|
+
}
|
|
3793
|
+
interface BlackholeWithdrawPlan extends WithdrawPlan {
|
|
3794
|
+
readonly preview: BlackholeWithdrawPreview;
|
|
3795
|
+
}
|
|
3796
|
+
interface BlackholeVaultSnapshot extends LiquidityVaultSnapshot<Address> {
|
|
3797
|
+
readonly positions: readonly BlackholePosition[];
|
|
3798
|
+
readonly rewardAssets: readonly VaultRewardAsset[];
|
|
3799
|
+
readonly reservedRewards: NonNullable<LiquidityVaultSnapshot["reservedRewards"]>;
|
|
3800
|
+
readonly configuredPositions: NonNullable<LiquidityVaultSnapshot["configuredPositions"]>;
|
|
3801
|
+
}
|
|
3802
|
+
interface BlackholeWithdrawPreview extends WithdrawPreview {
|
|
3803
|
+
readonly rewardPayouts: NonNullable<WithdrawPreview["rewardPayouts"]>;
|
|
3804
|
+
}
|
|
3805
|
+
/** Separate post-confirmation step. WAVAX pays AVAX directly to the transaction sender. */
|
|
3806
|
+
interface BlackholeNativeUnwrapPlan extends TransactionPlan {
|
|
3807
|
+
readonly account: Address;
|
|
3808
|
+
readonly blockNumber: bigint;
|
|
3809
|
+
readonly amount: PoolTokenBalance;
|
|
3810
|
+
}
|
|
3811
|
+
//#endregion
|
|
3812
|
+
//#region src/vault/adapters/blackhole/vault.d.ts
|
|
3813
|
+
/** Exact source-qualified Blackhole NFT/farming vault, with separate reward assets. */
|
|
3814
|
+
export declare class BlackholeVault extends LiquidityVault<AlgebraIntegralAdapter, Address> {
|
|
3815
|
+
readonly amm: AlgebraIntegralAdapter;
|
|
3816
|
+
readonly pool: Address;
|
|
3817
|
+
constructor(context: ResolvedVaultContext);
|
|
3818
|
+
getShareBalance(account: Address, options?: ReadOptions): Promise<bigint>;
|
|
3819
|
+
getSnapshot(options?: ReadOptions): Promise<BlackholeVaultSnapshot>;
|
|
3820
|
+
getPositions(options?: ReadOptions): Promise<readonly BlackholePosition[]>;
|
|
3821
|
+
quoteDeposit(input: AssetAmount, options?: ReadOptions): Promise<DepositQuote>;
|
|
3822
|
+
previewDeposit(request: DepositRequest, options?: ReadOptions): Promise<LiquidityDepositPreview>;
|
|
3823
|
+
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3824
|
+
prepareUnwrapNative(request: {
|
|
3825
|
+
readonly account: Address;
|
|
3826
|
+
readonly amount: bigint;
|
|
3827
|
+
}, options?: ReadOptions): Promise<BlackholeNativeUnwrapPlan>;
|
|
3828
|
+
previewWithdraw(request: WithdrawRequest, options?: ReadOptions): Promise<BlackholeWithdrawPreview>;
|
|
3829
|
+
prepareWithdraw(request: PrepareWithdrawRequest, options?: ReadOptions): Promise<BlackholeWithdrawPlan>;
|
|
3830
|
+
}
|
|
3831
|
+
//#endregion
|
|
3664
3832
|
//#region src/vault/adapters/uniswap-v3/vault.d.ts
|
|
3665
3833
|
/** Directly owned V3 positions for the exact qualified multi-position implementations. */
|
|
3666
3834
|
export declare class UniswapV3Vault extends LiquidityVault<UniswapV3Adapter, Address> {
|
|
@@ -3689,5 +3857,5 @@ export declare class UniswapV4Vault extends LiquidityVault<UniswapV4Adapter, V4V
|
|
|
3689
3857
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3690
3858
|
}
|
|
3691
3859
|
//#endregion
|
|
3692
|
-
export { type AerodromeDepositPlan, type AerodromeDepositPreview, type AerodromeVaultSnapshot, type AerodromeWithdrawPlan, type AerodromeWithdrawPreview, type AlgebraContracts, type AlgebraIntegralContracts, type AlgebraIntegralPoolState, type AlgebraLegacyContracts, type AlgebraLegacyPoolLookupRequest, type AlgebraLegacyPoolState, type AlgebraLegacyPoolsLookupRequest, type AlgebraPoolLookupRequest, type AlgebraPoolReference, type AlgebraPoolState, type AlgebraPoolsLookupRequest, type AlgebraSwapFee, type AmmLookupRequest, type AmmProtocolAdapter, type AmmProtocolAdapters, type AmmProtocolVersion, type AmmVersion, type AssetAmount, type ConcentratedPoolState, type DepositPlan, type DepositPreview, type DepositQuote, type DepositRequest, type DiscoveredPool, type IndexerConfig, type InfinityCLContracts, type InfinityCLDirectionalFees, type InfinityCLPoolFees, type InfinityCLPoolIdReference, type InfinityCLPoolKey, type InfinityCLPoolKeyInput, type InfinityCLPoolLookupRequest, type InfinityCLPoolReference, type InfinityCLPoolState, type InfinityCLPoolsLookupRequest, type InfinityCLSwapQuoteRequest, type KnownSteerVault, type LiquidityDepositPreview, type LiquidityDepth, type LiquidityDepthRequest, type LiquidityDistribution, type LiquidityFees, type LiquidityInterval, type LiquidityPool, type LiquidityPosition, type LiquidityPositionRange, type LiquidityVaultRewards, type LiquidityVaultSnapshot, type LiquidityVaultUserPosition, type LogEvent, type Logger, type PoolLookupRequest, type PoolPrice, type PoolReadOptions, type PoolState, type PoolTicks, type PoolTokenBalance, type PoolsLookupRequest, type PrepareDepositRequest, type PrepareWithdrawRequest, type SlipstreamContracts, type SlipstreamPoolFees, type SlipstreamPoolLookupRequest, type SlipstreamPoolState, type SlipstreamPoolsLookupRequest, type SlipstreamQuoteOptions, type StrategyPosition, type SurroundingTicks, type SwapQuote, type SwapQuoteRequest, type TheGraphIndexerConfig, type TickLiquidity, type TickPoolState, type TickRange, type TokenPairAmounts, type UserVaultDiscoveryRequest, type UserVaultListRequest, type UserVaultPage, type V3Contracts, type V3PoolFees, type V3PoolLookupRequest, type V3PoolState, type V3PoolsLookupRequest, type V4Contracts, type V4DirectionalFees, type V4PoolFees, type V4PoolKey, type V4PoolLookupRequest, type V4PoolReference, type V4PoolState, type V4PoolsLookupRequest, type V4ReadOptions, type V4SwapQuoteRequest, type V4VaultPool, type VaultAmmFilter, type VaultDiscoveryRequest, type VaultListRequest, type VaultLoadOptions, type VaultMetadata, type VaultRewardPayout, type VaultUnderlying, type VaultUserPosition, type WithdrawPlan, type WithdrawPreview, type WithdrawRequest, type WithdrawRewards, ethereumContracts as mainnetContracts };
|
|
3860
|
+
export { type AerodromeDepositPlan, type AerodromeDepositPreview, type AerodromeVaultSnapshot, type AerodromeWithdrawPlan, type AerodromeWithdrawPreview, type AlgebraContracts, type AlgebraIntegralContracts, type AlgebraIntegralPoolState, type AlgebraLegacyContracts, type AlgebraLegacyPoolLookupRequest, type AlgebraLegacyPoolState, type AlgebraLegacyPoolsLookupRequest, type AlgebraPoolLookupRequest, type AlgebraPoolReference, type AlgebraPoolState, type AlgebraPoolsLookupRequest, type AlgebraSwapFee, type AmmLookupRequest, type AmmProtocolAdapter, type AmmProtocolAdapters, type AmmProtocolVersion, type AmmVersion, type AssetAmount, type BlackholeNativeUnwrapPlan, type BlackholePosition, type BlackholeVaultSnapshot, type BlackholeWithdrawPlan, type BlackholeWithdrawPreview, type ConcentratedPoolState, type DepositPlan, type DepositPreview, type DepositQuote, type DepositRequest, type DiscoveredPool, type IndexerConfig, type InfinityCLContracts, type InfinityCLDirectionalFees, type InfinityCLPoolFees, type InfinityCLPoolIdReference, type InfinityCLPoolKey, type InfinityCLPoolKeyInput, type InfinityCLPoolLookupRequest, type InfinityCLPoolReference, type InfinityCLPoolState, type InfinityCLPoolsLookupRequest, type InfinityCLSwapQuoteRequest, type KnownSteerVault, type LiquidityDepositPreview, type LiquidityDepth, type LiquidityDepthRequest, type LiquidityDistribution, type LiquidityFees, type LiquidityInterval, type LiquidityPool, type LiquidityPosition, type LiquidityPositionRange, type LiquidityVaultRewards, type LiquidityVaultSnapshot, type LiquidityVaultUserPosition, type LogEvent, type Logger, type PoolBatchReadOptions, type PoolLookupRequest, type PoolPrice, type PoolReadOptions, type PoolReadResult, type PoolState, type PoolTicks, type PoolTokenBalance, type PoolsLookupRequest, type PrepareDepositRequest, type PrepareWithdrawRequest, type SlipstreamContracts, type SlipstreamPoolFees, type SlipstreamPoolLookupRequest, type SlipstreamPoolState, type SlipstreamPoolsLookupRequest, type SlipstreamQuoteOptions, type StrategyPosition, type SurroundingTicks, type SwapQuote, type SwapQuoteRequest, type TheGraphIndexerConfig, type TickLiquidity, type TickPoolState, type TickRange, type TokenPairAmounts, type UserVaultDiscoveryRequest, type UserVaultListRequest, type UserVaultPage, type V3Contracts, type V3PoolFees, type V3PoolLookupRequest, type V3PoolState, type V3PoolsLookupRequest, type V4Contracts, type V4DirectionalFees, type V4PoolFees, type V4PoolKey, type V4PoolLookupRequest, type V4PoolReference, type V4PoolState, type V4PoolsLookupRequest, type V4ReadOptions, type V4SwapQuoteRequest, type V4VaultPool, type VaultAmmFilter, type VaultDiscoveryRequest, type VaultListRequest, type VaultLoadOptions, type VaultLoadResult, type VaultMetadata, type VaultRewardAsset, type VaultRewardFee, type VaultRewardPayout, type VaultSnapshotResult, type VaultUnderlying, type VaultUserPosition, type WithdrawPlan, type WithdrawPreview, type WithdrawRequest, type WithdrawRewards, ethereumContracts as mainnetContracts };
|
|
3693
3861
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -199,6 +199,7 @@ interface V4Contracts extends ContractMap {
|
|
|
199
199
|
//#endregion
|
|
200
200
|
//#region src/amm/enums.d.ts
|
|
201
201
|
export declare enum AmmProtocol {
|
|
202
|
+
Blackhole = "blackhole",
|
|
202
203
|
Aerodrome = "aerodrome",
|
|
203
204
|
SushiSwap = "sushiswap",
|
|
204
205
|
Retro = "retro",
|
|
@@ -226,6 +227,9 @@ export declare enum QuickSwapVersion {
|
|
|
226
227
|
V3 = "v3",
|
|
227
228
|
V4 = "v4"
|
|
228
229
|
}
|
|
230
|
+
export declare enum BlackholeVersion {
|
|
231
|
+
CL = "cl"
|
|
232
|
+
}
|
|
229
233
|
export declare enum CamelotVersion {
|
|
230
234
|
V3 = "v3"
|
|
231
235
|
}
|
|
@@ -235,6 +239,7 @@ export declare enum PancakeSwapVersion {
|
|
|
235
239
|
}
|
|
236
240
|
/** Named deployments for explicitly selecting between otherwise ambiguous matches. */
|
|
237
241
|
export declare enum AmmDeployment {
|
|
242
|
+
BlackholeCLAvalanche = "blackhole-cl-avalanche",
|
|
238
243
|
AerodromeSlipstreamBase = "aerodrome-slipstream-base",
|
|
239
244
|
AerodromeSlipstreamV2Base = "aerodrome-slipstream-v2-base",
|
|
240
245
|
AerodromeSlipstreamV3Base = "aerodrome-slipstream-v3-base",
|
|
@@ -243,6 +248,7 @@ export declare enum AmmDeployment {
|
|
|
243
248
|
UniswapV3Polygon = "uniswap-v3-polygon",
|
|
244
249
|
QuickSwapV4Polygon = "quickswap-integral-polygon",
|
|
245
250
|
UniswapV3Base = "uniswap-v3-base",
|
|
251
|
+
UniswapV4Robinhood = "uniswap-v4-robinhood",
|
|
246
252
|
UniswapV4Bsc = "uniswap-v4-bsc",
|
|
247
253
|
UniswapV4Base = "uniswap-v4-base",
|
|
248
254
|
QuickSwapV3Polygon = "quickswap-polygon",
|
|
@@ -428,9 +434,25 @@ export declare class VaultResolver {
|
|
|
428
434
|
constructor(definition: VaultResolverDefinition, amms: DeploymentRegistry<AmmAdapter>, lending: DeploymentRegistry<LendingAdapter>);
|
|
429
435
|
resolve(steer: SteerNetwork, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
430
436
|
/** Bounded bulk identity pages at one block; compatibility uses four active loads. */
|
|
431
|
-
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options
|
|
437
|
+
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options: VaultLoadOptions & {
|
|
438
|
+
allowFailure: true;
|
|
439
|
+
}): Promise<readonly VaultLoadResult[]>;
|
|
440
|
+
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
441
|
+
allowFailure?: false;
|
|
442
|
+
}): Promise<readonly KnownSteerVault[]>;
|
|
443
|
+
resolveMany(steer: SteerNetwork, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
444
|
+
allowFailure?: boolean;
|
|
445
|
+
}): Promise<readonly KnownSteerVault[] | readonly VaultLoadResult[]>;
|
|
432
446
|
/** Identity and accounting share a pinned block; dispatch custom constructors and methods. */
|
|
433
|
-
snapshots(steer: SteerNetwork, addresses: readonly Address[], options
|
|
447
|
+
snapshots(steer: SteerNetwork, addresses: readonly Address[], options: ReadOptions & {
|
|
448
|
+
allowFailure: true;
|
|
449
|
+
}): Promise<readonly VaultSnapshotResult[]>;
|
|
450
|
+
snapshots(steer: SteerNetwork, addresses: readonly Address[], options?: ReadOptions & {
|
|
451
|
+
allowFailure?: false;
|
|
452
|
+
}): Promise<readonly LiquidityVaultSnapshot[]>;
|
|
453
|
+
snapshots(steer: SteerNetwork, addresses: readonly Address[], options?: ReadOptions & {
|
|
454
|
+
allowFailure?: boolean;
|
|
455
|
+
}): Promise<readonly LiquidityVaultSnapshot[] | readonly VaultSnapshotResult[]>;
|
|
434
456
|
}
|
|
435
457
|
//#endregion
|
|
436
458
|
//#region src/vault/steer.d.ts
|
|
@@ -457,8 +479,24 @@ export declare class SteerNetwork {
|
|
|
457
479
|
/** Synchronous registration check with no RPC or HTTP; does not verify a particular vault. */
|
|
458
480
|
supportsVaultSnapshots(beaconName: string): boolean;
|
|
459
481
|
getVault(address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
460
|
-
getVaults(addresses: readonly Address[], options
|
|
461
|
-
|
|
482
|
+
getVaults(addresses: readonly Address[], options: VaultLoadOptions & {
|
|
483
|
+
allowFailure: true;
|
|
484
|
+
}): Promise<readonly VaultLoadResult[]>;
|
|
485
|
+
getVaults(addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
486
|
+
allowFailure?: false;
|
|
487
|
+
}): Promise<readonly KnownSteerVault[]>;
|
|
488
|
+
getVaults(addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
489
|
+
allowFailure?: boolean;
|
|
490
|
+
}): Promise<readonly KnownSteerVault[] | readonly VaultLoadResult[]>;
|
|
491
|
+
getVaultSnapshots(addresses: readonly Address[], options: ReadOptions & {
|
|
492
|
+
allowFailure: true;
|
|
493
|
+
}): Promise<readonly VaultSnapshotResult[]>;
|
|
494
|
+
getVaultSnapshots(addresses: readonly Address[], options?: ReadOptions & {
|
|
495
|
+
allowFailure?: false;
|
|
496
|
+
}): Promise<readonly LiquidityVaultSnapshot[]>;
|
|
497
|
+
getVaultSnapshots(addresses: readonly Address[], options?: ReadOptions & {
|
|
498
|
+
allowFailure?: boolean;
|
|
499
|
+
}): Promise<readonly LiquidityVaultSnapshot[] | readonly VaultSnapshotResult[]>;
|
|
462
500
|
getVaultUserPositions(addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
463
501
|
getLiquidityVault(address: Address, options?: VaultLoadOptions): Promise<LiquidityVault>;
|
|
464
502
|
getLendingVault(address: Address, options?: VaultLoadOptions): Promise<LendingVault>;
|
|
@@ -517,7 +555,8 @@ interface VaultMetadata {
|
|
|
517
555
|
readonly beaconName: string;
|
|
518
556
|
readonly createdAt: string;
|
|
519
557
|
readonly state: string | null;
|
|
520
|
-
|
|
558
|
+
/** Pool contract address or a 32-byte pool ID for singleton AMMs such as V4. */
|
|
559
|
+
readonly pool: Hex | null;
|
|
521
560
|
readonly poolKey?: string | null;
|
|
522
561
|
readonly token0: Address | null;
|
|
523
562
|
readonly token1: Address | null;
|
|
@@ -615,6 +654,7 @@ interface VaultRewardPayout {
|
|
|
615
654
|
type WithdrawRewards = VaultRewardPayout;
|
|
616
655
|
/** Actual withdrawal simulation, including contract burn rounding and fee policy. */
|
|
617
656
|
interface WithdrawPreview {
|
|
657
|
+
readonly rewardPayouts?: readonly VaultRewardPayout[];
|
|
618
658
|
readonly rewards?: WithdrawRewards;
|
|
619
659
|
readonly blockNumber: bigint;
|
|
620
660
|
readonly shares: bigint;
|
|
@@ -666,6 +706,8 @@ interface V4VaultPool {
|
|
|
666
706
|
}
|
|
667
707
|
type LiquidityPool = Address | V4VaultPool;
|
|
668
708
|
interface LiquidityPosition<TPool extends LiquidityPool = LiquidityPool> {
|
|
709
|
+
/** NFT checkpoint amounts excluded from LP fees/totals when the qualified vault cannot pay them out. */
|
|
710
|
+
readonly nftTokensOwed?: TokenPairAmounts;
|
|
669
711
|
readonly kind: PositionKind.Liquidity;
|
|
670
712
|
readonly amm: AmmAdapter;
|
|
671
713
|
readonly pool: TPool;
|
|
@@ -687,6 +729,28 @@ interface LiquidityPositionRange {
|
|
|
687
729
|
readonly relativeWeight: number;
|
|
688
730
|
readonly weightPercent: string | undefined;
|
|
689
731
|
}
|
|
732
|
+
/** One reward asset, deduplicated by token even when base and bonus rewards overlap. */
|
|
733
|
+
interface VaultRewardFee {
|
|
734
|
+
readonly identifier: string;
|
|
735
|
+
readonly recipient: Address;
|
|
736
|
+
readonly unpaid: PoolTokenBalance;
|
|
737
|
+
readonly unclaimed: PoolTokenBalance;
|
|
738
|
+
}
|
|
739
|
+
interface VaultRewardAsset {
|
|
740
|
+
readonly token: Address;
|
|
741
|
+
readonly decimals: number;
|
|
742
|
+
readonly balance: PoolTokenBalance;
|
|
743
|
+
readonly reservedFees: PoolTokenBalance;
|
|
744
|
+
/** Stored fees not attributed to the current fee identifiers, still excluded from LP holdings. */
|
|
745
|
+
readonly unattributedReservedFees: PoolTokenBalance;
|
|
746
|
+
readonly accumulatedPerShareX18: bigint;
|
|
747
|
+
readonly unclaimed: {
|
|
748
|
+
readonly gross: PoolTokenBalance;
|
|
749
|
+
readonly net: PoolTokenBalance;
|
|
750
|
+
readonly fee: PoolTokenBalance;
|
|
751
|
+
};
|
|
752
|
+
readonly feeRecipients: readonly VaultRewardFee[];
|
|
753
|
+
}
|
|
690
754
|
/** Separate reward-token accounting, never folded into proportional LP pair holdings. */
|
|
691
755
|
interface LiquidityVaultRewards {
|
|
692
756
|
readonly token: Address;
|
|
@@ -705,7 +769,23 @@ interface LiquidityVaultRewards {
|
|
|
705
769
|
readonly strategist: PoolTokenBalance;
|
|
706
770
|
};
|
|
707
771
|
}
|
|
772
|
+
/** One result for every requested vault, preserving input order and duplicates. */
|
|
773
|
+
type VaultLoadResult = {
|
|
774
|
+
readonly status: "success";
|
|
775
|
+
readonly vault: KnownSteerVault;
|
|
776
|
+
} | {
|
|
777
|
+
readonly status: "failure";
|
|
778
|
+
readonly error: Error;
|
|
779
|
+
};
|
|
780
|
+
type VaultSnapshotResult = {
|
|
781
|
+
readonly status: "success";
|
|
782
|
+
readonly snapshot: LiquidityVaultSnapshot;
|
|
783
|
+
} | {
|
|
784
|
+
readonly status: "failure";
|
|
785
|
+
readonly error: Error;
|
|
786
|
+
};
|
|
708
787
|
interface LiquidityVaultSnapshot<TPool extends LiquidityPool = LiquidityPool> {
|
|
788
|
+
readonly rewardAssets?: readonly VaultRewardAsset[];
|
|
709
789
|
readonly blockNumber: bigint;
|
|
710
790
|
/** Verified implementation at blockNumber, supplied by registered bulk snapshot readers. */
|
|
711
791
|
readonly implementation?: {
|
|
@@ -941,6 +1021,10 @@ export declare abstract class AlgebraIntegralAdapter extends AmmAdapter<AlgebraP
|
|
|
941
1021
|
amountOut: bigint;
|
|
942
1022
|
}>>;
|
|
943
1023
|
}
|
|
1024
|
+
export declare class Blackhole extends AlgebraIntegralAdapter {
|
|
1025
|
+
readonly protocol = AmmProtocol.Blackhole;
|
|
1026
|
+
readonly version = BlackholeVersion.CL;
|
|
1027
|
+
}
|
|
944
1028
|
export declare class QuickSwapIntegral extends AlgebraIntegralAdapter {
|
|
945
1029
|
readonly protocol = AmmProtocol.QuickSwap;
|
|
946
1030
|
readonly version = QuickSwapVersion.V4;
|
|
@@ -1190,10 +1274,19 @@ export declare class UniswapV4 extends UniswapV4Adapter {
|
|
|
1190
1274
|
readonly version = UniswapVersion.V4;
|
|
1191
1275
|
}
|
|
1192
1276
|
//#endregion
|
|
1277
|
+
//#region src/amm/adapters/uniswap-v4/errors.d.ts
|
|
1278
|
+
/** A verified absent key, rather than a failed provider or indexer request. */
|
|
1279
|
+
export declare class V4PoolKeyNotFoundError extends Error {
|
|
1280
|
+
constructor(message?: string);
|
|
1281
|
+
}
|
|
1282
|
+
//#endregion
|
|
1193
1283
|
//#region src/amm/types.d.ts
|
|
1194
|
-
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | CamelotVersion | PancakeSwapVersion;
|
|
1284
|
+
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | BlackholeVersion | CamelotVersion | PancakeSwapVersion;
|
|
1195
1285
|
/** Protocol versions select concrete adapters; families remain an implementation detail. */
|
|
1196
1286
|
interface AmmProtocolAdapters {
|
|
1287
|
+
[AmmProtocol.Blackhole]: {
|
|
1288
|
+
[BlackholeVersion.CL]: Blackhole;
|
|
1289
|
+
};
|
|
1197
1290
|
[AmmProtocol.Aerodrome]: {
|
|
1198
1291
|
[AerodromeVersion.Slipstream]: AerodromeSlipstream;
|
|
1199
1292
|
[AerodromeVersion.SlipstreamV2]: AerodromeSlipstreamV2;
|
|
@@ -1326,6 +1419,16 @@ type DiscoveredPool = (SlipstreamPoolState & {
|
|
|
1326
1419
|
}) | (InfinityCLPoolState & {
|
|
1327
1420
|
readonly amm: InfinityCLAdapter;
|
|
1328
1421
|
});
|
|
1422
|
+
type PoolReadResult<TPool> = {
|
|
1423
|
+
readonly status: "success";
|
|
1424
|
+
readonly pool: TPool;
|
|
1425
|
+
} | {
|
|
1426
|
+
readonly status: "failure";
|
|
1427
|
+
readonly error: Error;
|
|
1428
|
+
};
|
|
1429
|
+
type PoolBatchReadOptions = PoolReadOptions & {
|
|
1430
|
+
readonly allowFailure?: boolean;
|
|
1431
|
+
};
|
|
1329
1432
|
type PoolReadOptions = ReadOptions & DataAdapterRequestOptions;
|
|
1330
1433
|
interface TickLiquidity {
|
|
1331
1434
|
readonly tick: number;
|
|
@@ -1388,7 +1491,13 @@ export declare abstract class AmmAdapter<TPoolRef = unknown, TPoolState = unknow
|
|
|
1388
1491
|
abstract quote(request: SwapQuoteRequest<TPoolRef>, options?: PoolReadOptions): Promise<SwapQuote>;
|
|
1389
1492
|
abstract getPool(reference: TPoolRef, options?: ReadOptions): Promise<TPoolState>;
|
|
1390
1493
|
/** Read snapshots at one block, preserving input order and duplicate references. */
|
|
1391
|
-
getPools(references: readonly TPoolRef[], options
|
|
1494
|
+
getPools(references: readonly TPoolRef[], options: PoolReadOptions & {
|
|
1495
|
+
allowFailure: true;
|
|
1496
|
+
}): Promise<readonly PoolReadResult<TPoolState>[]>;
|
|
1497
|
+
getPools(references: readonly TPoolRef[], options?: PoolReadOptions & {
|
|
1498
|
+
allowFailure?: false;
|
|
1499
|
+
}): Promise<readonly TPoolState[]>;
|
|
1500
|
+
getPools(references: readonly TPoolRef[], options?: PoolBatchReadOptions): Promise<readonly TPoolState[] | readonly PoolReadResult<TPoolState>[]>;
|
|
1392
1501
|
}
|
|
1393
1502
|
//#endregion
|
|
1394
1503
|
//#region src/amm/adapters/pancakeswap-v3/data-adapter.d.ts
|
|
@@ -3565,8 +3674,24 @@ export declare class SteerClient {
|
|
|
3565
3674
|
})[]>;
|
|
3566
3675
|
getPools(request: PoolsLookupRequest): Promise<readonly DiscoveredPool[]>;
|
|
3567
3676
|
getVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
3568
|
-
getVaults(chainId: number, addresses: readonly Address[], options
|
|
3569
|
-
|
|
3677
|
+
getVaults(chainId: number, addresses: readonly Address[], options: VaultLoadOptions & {
|
|
3678
|
+
allowFailure: true;
|
|
3679
|
+
}): Promise<readonly VaultLoadResult[]>;
|
|
3680
|
+
getVaults(chainId: number, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
3681
|
+
allowFailure?: false;
|
|
3682
|
+
}): Promise<readonly KnownSteerVault[]>;
|
|
3683
|
+
getVaults(chainId: number, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
3684
|
+
allowFailure?: boolean;
|
|
3685
|
+
}): Promise<readonly KnownSteerVault[] | readonly VaultLoadResult[]>;
|
|
3686
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options: ReadOptions & {
|
|
3687
|
+
allowFailure: true;
|
|
3688
|
+
}): Promise<readonly VaultSnapshotResult[]>;
|
|
3689
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options?: ReadOptions & {
|
|
3690
|
+
allowFailure?: false;
|
|
3691
|
+
}): Promise<readonly LiquidityVaultSnapshot[]>;
|
|
3692
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options?: ReadOptions & {
|
|
3693
|
+
allowFailure?: boolean;
|
|
3694
|
+
}): Promise<readonly LiquidityVaultSnapshot[] | readonly VaultSnapshotResult[]>;
|
|
3570
3695
|
getVaultUserPositions(chainId: number, addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
3571
3696
|
listUserVaults(request: UserVaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
|
|
3572
3697
|
listVaults(request: VaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
|
|
@@ -3661,6 +3786,49 @@ export declare class AlgebraLegacyVault extends LiquidityVault<AlgebraLegacyAdap
|
|
|
3661
3786
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3662
3787
|
}
|
|
3663
3788
|
//#endregion
|
|
3789
|
+
//#region src/vault/adapters/blackhole/types.d.ts
|
|
3790
|
+
interface BlackholePosition extends LiquidityPosition<Address> {
|
|
3791
|
+
readonly nftTokensOwed: TokenPairAmounts;
|
|
3792
|
+
}
|
|
3793
|
+
interface BlackholeWithdrawPlan extends WithdrawPlan {
|
|
3794
|
+
readonly preview: BlackholeWithdrawPreview;
|
|
3795
|
+
}
|
|
3796
|
+
interface BlackholeVaultSnapshot extends LiquidityVaultSnapshot<Address> {
|
|
3797
|
+
readonly positions: readonly BlackholePosition[];
|
|
3798
|
+
readonly rewardAssets: readonly VaultRewardAsset[];
|
|
3799
|
+
readonly reservedRewards: NonNullable<LiquidityVaultSnapshot["reservedRewards"]>;
|
|
3800
|
+
readonly configuredPositions: NonNullable<LiquidityVaultSnapshot["configuredPositions"]>;
|
|
3801
|
+
}
|
|
3802
|
+
interface BlackholeWithdrawPreview extends WithdrawPreview {
|
|
3803
|
+
readonly rewardPayouts: NonNullable<WithdrawPreview["rewardPayouts"]>;
|
|
3804
|
+
}
|
|
3805
|
+
/** Separate post-confirmation step. WAVAX pays AVAX directly to the transaction sender. */
|
|
3806
|
+
interface BlackholeNativeUnwrapPlan extends TransactionPlan {
|
|
3807
|
+
readonly account: Address;
|
|
3808
|
+
readonly blockNumber: bigint;
|
|
3809
|
+
readonly amount: PoolTokenBalance;
|
|
3810
|
+
}
|
|
3811
|
+
//#endregion
|
|
3812
|
+
//#region src/vault/adapters/blackhole/vault.d.ts
|
|
3813
|
+
/** Exact source-qualified Blackhole NFT/farming vault, with separate reward assets. */
|
|
3814
|
+
export declare class BlackholeVault extends LiquidityVault<AlgebraIntegralAdapter, Address> {
|
|
3815
|
+
readonly amm: AlgebraIntegralAdapter;
|
|
3816
|
+
readonly pool: Address;
|
|
3817
|
+
constructor(context: ResolvedVaultContext);
|
|
3818
|
+
getShareBalance(account: Address, options?: ReadOptions): Promise<bigint>;
|
|
3819
|
+
getSnapshot(options?: ReadOptions): Promise<BlackholeVaultSnapshot>;
|
|
3820
|
+
getPositions(options?: ReadOptions): Promise<readonly BlackholePosition[]>;
|
|
3821
|
+
quoteDeposit(input: AssetAmount, options?: ReadOptions): Promise<DepositQuote>;
|
|
3822
|
+
previewDeposit(request: DepositRequest, options?: ReadOptions): Promise<LiquidityDepositPreview>;
|
|
3823
|
+
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3824
|
+
prepareUnwrapNative(request: {
|
|
3825
|
+
readonly account: Address;
|
|
3826
|
+
readonly amount: bigint;
|
|
3827
|
+
}, options?: ReadOptions): Promise<BlackholeNativeUnwrapPlan>;
|
|
3828
|
+
previewWithdraw(request: WithdrawRequest, options?: ReadOptions): Promise<BlackholeWithdrawPreview>;
|
|
3829
|
+
prepareWithdraw(request: PrepareWithdrawRequest, options?: ReadOptions): Promise<BlackholeWithdrawPlan>;
|
|
3830
|
+
}
|
|
3831
|
+
//#endregion
|
|
3664
3832
|
//#region src/vault/adapters/uniswap-v3/vault.d.ts
|
|
3665
3833
|
/** Directly owned V3 positions for the exact qualified multi-position implementations. */
|
|
3666
3834
|
export declare class UniswapV3Vault extends LiquidityVault<UniswapV3Adapter, Address> {
|
|
@@ -3689,5 +3857,5 @@ export declare class UniswapV4Vault extends LiquidityVault<UniswapV4Adapter, V4V
|
|
|
3689
3857
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3690
3858
|
}
|
|
3691
3859
|
//#endregion
|
|
3692
|
-
export { type AerodromeDepositPlan, type AerodromeDepositPreview, type AerodromeVaultSnapshot, type AerodromeWithdrawPlan, type AerodromeWithdrawPreview, type AlgebraContracts, type AlgebraIntegralContracts, type AlgebraIntegralPoolState, type AlgebraLegacyContracts, type AlgebraLegacyPoolLookupRequest, type AlgebraLegacyPoolState, type AlgebraLegacyPoolsLookupRequest, type AlgebraPoolLookupRequest, type AlgebraPoolReference, type AlgebraPoolState, type AlgebraPoolsLookupRequest, type AlgebraSwapFee, type AmmLookupRequest, type AmmProtocolAdapter, type AmmProtocolAdapters, type AmmProtocolVersion, type AmmVersion, type AssetAmount, type ConcentratedPoolState, type DepositPlan, type DepositPreview, type DepositQuote, type DepositRequest, type DiscoveredPool, type IndexerConfig, type InfinityCLContracts, type InfinityCLDirectionalFees, type InfinityCLPoolFees, type InfinityCLPoolIdReference, type InfinityCLPoolKey, type InfinityCLPoolKeyInput, type InfinityCLPoolLookupRequest, type InfinityCLPoolReference, type InfinityCLPoolState, type InfinityCLPoolsLookupRequest, type InfinityCLSwapQuoteRequest, type KnownSteerVault, type LiquidityDepositPreview, type LiquidityDepth, type LiquidityDepthRequest, type LiquidityDistribution, type LiquidityFees, type LiquidityInterval, type LiquidityPool, type LiquidityPosition, type LiquidityPositionRange, type LiquidityVaultRewards, type LiquidityVaultSnapshot, type LiquidityVaultUserPosition, type LogEvent, type Logger, type PoolLookupRequest, type PoolPrice, type PoolReadOptions, type PoolState, type PoolTicks, type PoolTokenBalance, type PoolsLookupRequest, type PrepareDepositRequest, type PrepareWithdrawRequest, type SlipstreamContracts, type SlipstreamPoolFees, type SlipstreamPoolLookupRequest, type SlipstreamPoolState, type SlipstreamPoolsLookupRequest, type SlipstreamQuoteOptions, type StrategyPosition, type SurroundingTicks, type SwapQuote, type SwapQuoteRequest, type TheGraphIndexerConfig, type TickLiquidity, type TickPoolState, type TickRange, type TokenPairAmounts, type UserVaultDiscoveryRequest, type UserVaultListRequest, type UserVaultPage, type V3Contracts, type V3PoolFees, type V3PoolLookupRequest, type V3PoolState, type V3PoolsLookupRequest, type V4Contracts, type V4DirectionalFees, type V4PoolFees, type V4PoolKey, type V4PoolLookupRequest, type V4PoolReference, type V4PoolState, type V4PoolsLookupRequest, type V4ReadOptions, type V4SwapQuoteRequest, type V4VaultPool, type VaultAmmFilter, type VaultDiscoveryRequest, type VaultListRequest, type VaultLoadOptions, type VaultMetadata, type VaultRewardPayout, type VaultUnderlying, type VaultUserPosition, type WithdrawPlan, type WithdrawPreview, type WithdrawRequest, type WithdrawRewards, ethereumContracts as mainnetContracts };
|
|
3860
|
+
export { type AerodromeDepositPlan, type AerodromeDepositPreview, type AerodromeVaultSnapshot, type AerodromeWithdrawPlan, type AerodromeWithdrawPreview, type AlgebraContracts, type AlgebraIntegralContracts, type AlgebraIntegralPoolState, type AlgebraLegacyContracts, type AlgebraLegacyPoolLookupRequest, type AlgebraLegacyPoolState, type AlgebraLegacyPoolsLookupRequest, type AlgebraPoolLookupRequest, type AlgebraPoolReference, type AlgebraPoolState, type AlgebraPoolsLookupRequest, type AlgebraSwapFee, type AmmLookupRequest, type AmmProtocolAdapter, type AmmProtocolAdapters, type AmmProtocolVersion, type AmmVersion, type AssetAmount, type BlackholeNativeUnwrapPlan, type BlackholePosition, type BlackholeVaultSnapshot, type BlackholeWithdrawPlan, type BlackholeWithdrawPreview, type ConcentratedPoolState, type DepositPlan, type DepositPreview, type DepositQuote, type DepositRequest, type DiscoveredPool, type IndexerConfig, type InfinityCLContracts, type InfinityCLDirectionalFees, type InfinityCLPoolFees, type InfinityCLPoolIdReference, type InfinityCLPoolKey, type InfinityCLPoolKeyInput, type InfinityCLPoolLookupRequest, type InfinityCLPoolReference, type InfinityCLPoolState, type InfinityCLPoolsLookupRequest, type InfinityCLSwapQuoteRequest, type KnownSteerVault, type LiquidityDepositPreview, type LiquidityDepth, type LiquidityDepthRequest, type LiquidityDistribution, type LiquidityFees, type LiquidityInterval, type LiquidityPool, type LiquidityPosition, type LiquidityPositionRange, type LiquidityVaultRewards, type LiquidityVaultSnapshot, type LiquidityVaultUserPosition, type LogEvent, type Logger, type PoolBatchReadOptions, type PoolLookupRequest, type PoolPrice, type PoolReadOptions, type PoolReadResult, type PoolState, type PoolTicks, type PoolTokenBalance, type PoolsLookupRequest, type PrepareDepositRequest, type PrepareWithdrawRequest, type SlipstreamContracts, type SlipstreamPoolFees, type SlipstreamPoolLookupRequest, type SlipstreamPoolState, type SlipstreamPoolsLookupRequest, type SlipstreamQuoteOptions, type StrategyPosition, type SurroundingTicks, type SwapQuote, type SwapQuoteRequest, type TheGraphIndexerConfig, type TickLiquidity, type TickPoolState, type TickRange, type TokenPairAmounts, type UserVaultDiscoveryRequest, type UserVaultListRequest, type UserVaultPage, type V3Contracts, type V3PoolFees, type V3PoolLookupRequest, type V3PoolState, type V3PoolsLookupRequest, type V4Contracts, type V4DirectionalFees, type V4PoolFees, type V4PoolKey, type V4PoolLookupRequest, type V4PoolReference, type V4PoolState, type V4PoolsLookupRequest, type V4ReadOptions, type V4SwapQuoteRequest, type V4VaultPool, type VaultAmmFilter, type VaultDiscoveryRequest, type VaultListRequest, type VaultLoadOptions, type VaultLoadResult, type VaultMetadata, type VaultRewardAsset, type VaultRewardFee, type VaultRewardPayout, type VaultSnapshotResult, type VaultUnderlying, type VaultUserPosition, type WithdrawPlan, type WithdrawPreview, type WithdrawRequest, type WithdrawRewards, ethereumContracts as mainnetContracts };
|
|
3693
3861
|
//# sourceMappingURL=index.d.mts.map
|