@steerprotocol/sdk 4.0.0-next.6 → 4.0.0-next.7
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 +189 -4
- package/dist/index.cjs +10250 -6866
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +176 -9
- package/dist/index.d.mts +176 -9
- package/dist/index.mjs +10247 -6867
- 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>;
|
|
@@ -615,6 +653,7 @@ interface VaultRewardPayout {
|
|
|
615
653
|
type WithdrawRewards = VaultRewardPayout;
|
|
616
654
|
/** Actual withdrawal simulation, including contract burn rounding and fee policy. */
|
|
617
655
|
interface WithdrawPreview {
|
|
656
|
+
readonly rewardPayouts?: readonly VaultRewardPayout[];
|
|
618
657
|
readonly rewards?: WithdrawRewards;
|
|
619
658
|
readonly blockNumber: bigint;
|
|
620
659
|
readonly shares: bigint;
|
|
@@ -666,6 +705,8 @@ interface V4VaultPool {
|
|
|
666
705
|
}
|
|
667
706
|
type LiquidityPool = Address | V4VaultPool;
|
|
668
707
|
interface LiquidityPosition<TPool extends LiquidityPool = LiquidityPool> {
|
|
708
|
+
/** NFT checkpoint amounts excluded from LP fees/totals when the qualified vault cannot pay them out. */
|
|
709
|
+
readonly nftTokensOwed?: TokenPairAmounts;
|
|
669
710
|
readonly kind: PositionKind.Liquidity;
|
|
670
711
|
readonly amm: AmmAdapter;
|
|
671
712
|
readonly pool: TPool;
|
|
@@ -687,6 +728,28 @@ interface LiquidityPositionRange {
|
|
|
687
728
|
readonly relativeWeight: number;
|
|
688
729
|
readonly weightPercent: string | undefined;
|
|
689
730
|
}
|
|
731
|
+
/** One reward asset, deduplicated by token even when base and bonus rewards overlap. */
|
|
732
|
+
interface VaultRewardFee {
|
|
733
|
+
readonly identifier: string;
|
|
734
|
+
readonly recipient: Address;
|
|
735
|
+
readonly unpaid: PoolTokenBalance;
|
|
736
|
+
readonly unclaimed: PoolTokenBalance;
|
|
737
|
+
}
|
|
738
|
+
interface VaultRewardAsset {
|
|
739
|
+
readonly token: Address;
|
|
740
|
+
readonly decimals: number;
|
|
741
|
+
readonly balance: PoolTokenBalance;
|
|
742
|
+
readonly reservedFees: PoolTokenBalance;
|
|
743
|
+
/** Stored fees not attributed to the current fee identifiers, still excluded from LP holdings. */
|
|
744
|
+
readonly unattributedReservedFees: PoolTokenBalance;
|
|
745
|
+
readonly accumulatedPerShareX18: bigint;
|
|
746
|
+
readonly unclaimed: {
|
|
747
|
+
readonly gross: PoolTokenBalance;
|
|
748
|
+
readonly net: PoolTokenBalance;
|
|
749
|
+
readonly fee: PoolTokenBalance;
|
|
750
|
+
};
|
|
751
|
+
readonly feeRecipients: readonly VaultRewardFee[];
|
|
752
|
+
}
|
|
690
753
|
/** Separate reward-token accounting, never folded into proportional LP pair holdings. */
|
|
691
754
|
interface LiquidityVaultRewards {
|
|
692
755
|
readonly token: Address;
|
|
@@ -705,7 +768,23 @@ interface LiquidityVaultRewards {
|
|
|
705
768
|
readonly strategist: PoolTokenBalance;
|
|
706
769
|
};
|
|
707
770
|
}
|
|
771
|
+
/** One result for every requested vault, preserving input order and duplicates. */
|
|
772
|
+
type VaultLoadResult = {
|
|
773
|
+
readonly status: "success";
|
|
774
|
+
readonly vault: KnownSteerVault;
|
|
775
|
+
} | {
|
|
776
|
+
readonly status: "failure";
|
|
777
|
+
readonly error: Error;
|
|
778
|
+
};
|
|
779
|
+
type VaultSnapshotResult = {
|
|
780
|
+
readonly status: "success";
|
|
781
|
+
readonly snapshot: LiquidityVaultSnapshot;
|
|
782
|
+
} | {
|
|
783
|
+
readonly status: "failure";
|
|
784
|
+
readonly error: Error;
|
|
785
|
+
};
|
|
708
786
|
interface LiquidityVaultSnapshot<TPool extends LiquidityPool = LiquidityPool> {
|
|
787
|
+
readonly rewardAssets?: readonly VaultRewardAsset[];
|
|
709
788
|
readonly blockNumber: bigint;
|
|
710
789
|
/** Verified implementation at blockNumber, supplied by registered bulk snapshot readers. */
|
|
711
790
|
readonly implementation?: {
|
|
@@ -941,6 +1020,10 @@ export declare abstract class AlgebraIntegralAdapter extends AmmAdapter<AlgebraP
|
|
|
941
1020
|
amountOut: bigint;
|
|
942
1021
|
}>>;
|
|
943
1022
|
}
|
|
1023
|
+
export declare class Blackhole extends AlgebraIntegralAdapter {
|
|
1024
|
+
readonly protocol = AmmProtocol.Blackhole;
|
|
1025
|
+
readonly version = BlackholeVersion.CL;
|
|
1026
|
+
}
|
|
944
1027
|
export declare class QuickSwapIntegral extends AlgebraIntegralAdapter {
|
|
945
1028
|
readonly protocol = AmmProtocol.QuickSwap;
|
|
946
1029
|
readonly version = QuickSwapVersion.V4;
|
|
@@ -1190,10 +1273,19 @@ export declare class UniswapV4 extends UniswapV4Adapter {
|
|
|
1190
1273
|
readonly version = UniswapVersion.V4;
|
|
1191
1274
|
}
|
|
1192
1275
|
//#endregion
|
|
1276
|
+
//#region src/amm/adapters/uniswap-v4/errors.d.ts
|
|
1277
|
+
/** A verified absent key, rather than a failed provider or indexer request. */
|
|
1278
|
+
export declare class V4PoolKeyNotFoundError extends Error {
|
|
1279
|
+
constructor(message?: string);
|
|
1280
|
+
}
|
|
1281
|
+
//#endregion
|
|
1193
1282
|
//#region src/amm/types.d.ts
|
|
1194
|
-
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | CamelotVersion | PancakeSwapVersion;
|
|
1283
|
+
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | BlackholeVersion | CamelotVersion | PancakeSwapVersion;
|
|
1195
1284
|
/** Protocol versions select concrete adapters; families remain an implementation detail. */
|
|
1196
1285
|
interface AmmProtocolAdapters {
|
|
1286
|
+
[AmmProtocol.Blackhole]: {
|
|
1287
|
+
[BlackholeVersion.CL]: Blackhole;
|
|
1288
|
+
};
|
|
1197
1289
|
[AmmProtocol.Aerodrome]: {
|
|
1198
1290
|
[AerodromeVersion.Slipstream]: AerodromeSlipstream;
|
|
1199
1291
|
[AerodromeVersion.SlipstreamV2]: AerodromeSlipstreamV2;
|
|
@@ -1326,6 +1418,16 @@ type DiscoveredPool = (SlipstreamPoolState & {
|
|
|
1326
1418
|
}) | (InfinityCLPoolState & {
|
|
1327
1419
|
readonly amm: InfinityCLAdapter;
|
|
1328
1420
|
});
|
|
1421
|
+
type PoolReadResult<TPool> = {
|
|
1422
|
+
readonly status: "success";
|
|
1423
|
+
readonly pool: TPool;
|
|
1424
|
+
} | {
|
|
1425
|
+
readonly status: "failure";
|
|
1426
|
+
readonly error: Error;
|
|
1427
|
+
};
|
|
1428
|
+
type PoolBatchReadOptions = PoolReadOptions & {
|
|
1429
|
+
readonly allowFailure?: boolean;
|
|
1430
|
+
};
|
|
1329
1431
|
type PoolReadOptions = ReadOptions & DataAdapterRequestOptions;
|
|
1330
1432
|
interface TickLiquidity {
|
|
1331
1433
|
readonly tick: number;
|
|
@@ -1388,7 +1490,13 @@ export declare abstract class AmmAdapter<TPoolRef = unknown, TPoolState = unknow
|
|
|
1388
1490
|
abstract quote(request: SwapQuoteRequest<TPoolRef>, options?: PoolReadOptions): Promise<SwapQuote>;
|
|
1389
1491
|
abstract getPool(reference: TPoolRef, options?: ReadOptions): Promise<TPoolState>;
|
|
1390
1492
|
/** Read snapshots at one block, preserving input order and duplicate references. */
|
|
1391
|
-
getPools(references: readonly TPoolRef[], options
|
|
1493
|
+
getPools(references: readonly TPoolRef[], options: PoolReadOptions & {
|
|
1494
|
+
allowFailure: true;
|
|
1495
|
+
}): Promise<readonly PoolReadResult<TPoolState>[]>;
|
|
1496
|
+
getPools(references: readonly TPoolRef[], options?: PoolReadOptions & {
|
|
1497
|
+
allowFailure?: false;
|
|
1498
|
+
}): Promise<readonly TPoolState[]>;
|
|
1499
|
+
getPools(references: readonly TPoolRef[], options?: PoolBatchReadOptions): Promise<readonly TPoolState[] | readonly PoolReadResult<TPoolState>[]>;
|
|
1392
1500
|
}
|
|
1393
1501
|
//#endregion
|
|
1394
1502
|
//#region src/amm/adapters/pancakeswap-v3/data-adapter.d.ts
|
|
@@ -3565,8 +3673,24 @@ export declare class SteerClient {
|
|
|
3565
3673
|
})[]>;
|
|
3566
3674
|
getPools(request: PoolsLookupRequest): Promise<readonly DiscoveredPool[]>;
|
|
3567
3675
|
getVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
3568
|
-
getVaults(chainId: number, addresses: readonly Address[], options
|
|
3569
|
-
|
|
3676
|
+
getVaults(chainId: number, addresses: readonly Address[], options: VaultLoadOptions & {
|
|
3677
|
+
allowFailure: true;
|
|
3678
|
+
}): Promise<readonly VaultLoadResult[]>;
|
|
3679
|
+
getVaults(chainId: number, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
3680
|
+
allowFailure?: false;
|
|
3681
|
+
}): Promise<readonly KnownSteerVault[]>;
|
|
3682
|
+
getVaults(chainId: number, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
3683
|
+
allowFailure?: boolean;
|
|
3684
|
+
}): Promise<readonly KnownSteerVault[] | readonly VaultLoadResult[]>;
|
|
3685
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options: ReadOptions & {
|
|
3686
|
+
allowFailure: true;
|
|
3687
|
+
}): Promise<readonly VaultSnapshotResult[]>;
|
|
3688
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options?: ReadOptions & {
|
|
3689
|
+
allowFailure?: false;
|
|
3690
|
+
}): Promise<readonly LiquidityVaultSnapshot[]>;
|
|
3691
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options?: ReadOptions & {
|
|
3692
|
+
allowFailure?: boolean;
|
|
3693
|
+
}): Promise<readonly LiquidityVaultSnapshot[] | readonly VaultSnapshotResult[]>;
|
|
3570
3694
|
getVaultUserPositions(chainId: number, addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
3571
3695
|
listUserVaults(request: UserVaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
|
|
3572
3696
|
listVaults(request: VaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
|
|
@@ -3661,6 +3785,49 @@ export declare class AlgebraLegacyVault extends LiquidityVault<AlgebraLegacyAdap
|
|
|
3661
3785
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3662
3786
|
}
|
|
3663
3787
|
//#endregion
|
|
3788
|
+
//#region src/vault/adapters/blackhole/types.d.ts
|
|
3789
|
+
interface BlackholePosition extends LiquidityPosition<Address> {
|
|
3790
|
+
readonly nftTokensOwed: TokenPairAmounts;
|
|
3791
|
+
}
|
|
3792
|
+
interface BlackholeWithdrawPlan extends WithdrawPlan {
|
|
3793
|
+
readonly preview: BlackholeWithdrawPreview;
|
|
3794
|
+
}
|
|
3795
|
+
interface BlackholeVaultSnapshot extends LiquidityVaultSnapshot<Address> {
|
|
3796
|
+
readonly positions: readonly BlackholePosition[];
|
|
3797
|
+
readonly rewardAssets: readonly VaultRewardAsset[];
|
|
3798
|
+
readonly reservedRewards: NonNullable<LiquidityVaultSnapshot["reservedRewards"]>;
|
|
3799
|
+
readonly configuredPositions: NonNullable<LiquidityVaultSnapshot["configuredPositions"]>;
|
|
3800
|
+
}
|
|
3801
|
+
interface BlackholeWithdrawPreview extends WithdrawPreview {
|
|
3802
|
+
readonly rewardPayouts: NonNullable<WithdrawPreview["rewardPayouts"]>;
|
|
3803
|
+
}
|
|
3804
|
+
/** Separate post-confirmation step. WAVAX pays AVAX directly to the transaction sender. */
|
|
3805
|
+
interface BlackholeNativeUnwrapPlan extends TransactionPlan {
|
|
3806
|
+
readonly account: Address;
|
|
3807
|
+
readonly blockNumber: bigint;
|
|
3808
|
+
readonly amount: PoolTokenBalance;
|
|
3809
|
+
}
|
|
3810
|
+
//#endregion
|
|
3811
|
+
//#region src/vault/adapters/blackhole/vault.d.ts
|
|
3812
|
+
/** Exact source-qualified Blackhole NFT/farming vault, with separate reward assets. */
|
|
3813
|
+
export declare class BlackholeVault extends LiquidityVault<AlgebraIntegralAdapter, Address> {
|
|
3814
|
+
readonly amm: AlgebraIntegralAdapter;
|
|
3815
|
+
readonly pool: Address;
|
|
3816
|
+
constructor(context: ResolvedVaultContext);
|
|
3817
|
+
getShareBalance(account: Address, options?: ReadOptions): Promise<bigint>;
|
|
3818
|
+
getSnapshot(options?: ReadOptions): Promise<BlackholeVaultSnapshot>;
|
|
3819
|
+
getPositions(options?: ReadOptions): Promise<readonly BlackholePosition[]>;
|
|
3820
|
+
quoteDeposit(input: AssetAmount, options?: ReadOptions): Promise<DepositQuote>;
|
|
3821
|
+
previewDeposit(request: DepositRequest, options?: ReadOptions): Promise<LiquidityDepositPreview>;
|
|
3822
|
+
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3823
|
+
prepareUnwrapNative(request: {
|
|
3824
|
+
readonly account: Address;
|
|
3825
|
+
readonly amount: bigint;
|
|
3826
|
+
}, options?: ReadOptions): Promise<BlackholeNativeUnwrapPlan>;
|
|
3827
|
+
previewWithdraw(request: WithdrawRequest, options?: ReadOptions): Promise<BlackholeWithdrawPreview>;
|
|
3828
|
+
prepareWithdraw(request: PrepareWithdrawRequest, options?: ReadOptions): Promise<BlackholeWithdrawPlan>;
|
|
3829
|
+
}
|
|
3830
|
+
//#endregion
|
|
3664
3831
|
//#region src/vault/adapters/uniswap-v3/vault.d.ts
|
|
3665
3832
|
/** Directly owned V3 positions for the exact qualified multi-position implementations. */
|
|
3666
3833
|
export declare class UniswapV3Vault extends LiquidityVault<UniswapV3Adapter, Address> {
|
|
@@ -3689,5 +3856,5 @@ export declare class UniswapV4Vault extends LiquidityVault<UniswapV4Adapter, V4V
|
|
|
3689
3856
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3690
3857
|
}
|
|
3691
3858
|
//#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 };
|
|
3859
|
+
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
3860
|
//# 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>;
|
|
@@ -615,6 +653,7 @@ interface VaultRewardPayout {
|
|
|
615
653
|
type WithdrawRewards = VaultRewardPayout;
|
|
616
654
|
/** Actual withdrawal simulation, including contract burn rounding and fee policy. */
|
|
617
655
|
interface WithdrawPreview {
|
|
656
|
+
readonly rewardPayouts?: readonly VaultRewardPayout[];
|
|
618
657
|
readonly rewards?: WithdrawRewards;
|
|
619
658
|
readonly blockNumber: bigint;
|
|
620
659
|
readonly shares: bigint;
|
|
@@ -666,6 +705,8 @@ interface V4VaultPool {
|
|
|
666
705
|
}
|
|
667
706
|
type LiquidityPool = Address | V4VaultPool;
|
|
668
707
|
interface LiquidityPosition<TPool extends LiquidityPool = LiquidityPool> {
|
|
708
|
+
/** NFT checkpoint amounts excluded from LP fees/totals when the qualified vault cannot pay them out. */
|
|
709
|
+
readonly nftTokensOwed?: TokenPairAmounts;
|
|
669
710
|
readonly kind: PositionKind.Liquidity;
|
|
670
711
|
readonly amm: AmmAdapter;
|
|
671
712
|
readonly pool: TPool;
|
|
@@ -687,6 +728,28 @@ interface LiquidityPositionRange {
|
|
|
687
728
|
readonly relativeWeight: number;
|
|
688
729
|
readonly weightPercent: string | undefined;
|
|
689
730
|
}
|
|
731
|
+
/** One reward asset, deduplicated by token even when base and bonus rewards overlap. */
|
|
732
|
+
interface VaultRewardFee {
|
|
733
|
+
readonly identifier: string;
|
|
734
|
+
readonly recipient: Address;
|
|
735
|
+
readonly unpaid: PoolTokenBalance;
|
|
736
|
+
readonly unclaimed: PoolTokenBalance;
|
|
737
|
+
}
|
|
738
|
+
interface VaultRewardAsset {
|
|
739
|
+
readonly token: Address;
|
|
740
|
+
readonly decimals: number;
|
|
741
|
+
readonly balance: PoolTokenBalance;
|
|
742
|
+
readonly reservedFees: PoolTokenBalance;
|
|
743
|
+
/** Stored fees not attributed to the current fee identifiers, still excluded from LP holdings. */
|
|
744
|
+
readonly unattributedReservedFees: PoolTokenBalance;
|
|
745
|
+
readonly accumulatedPerShareX18: bigint;
|
|
746
|
+
readonly unclaimed: {
|
|
747
|
+
readonly gross: PoolTokenBalance;
|
|
748
|
+
readonly net: PoolTokenBalance;
|
|
749
|
+
readonly fee: PoolTokenBalance;
|
|
750
|
+
};
|
|
751
|
+
readonly feeRecipients: readonly VaultRewardFee[];
|
|
752
|
+
}
|
|
690
753
|
/** Separate reward-token accounting, never folded into proportional LP pair holdings. */
|
|
691
754
|
interface LiquidityVaultRewards {
|
|
692
755
|
readonly token: Address;
|
|
@@ -705,7 +768,23 @@ interface LiquidityVaultRewards {
|
|
|
705
768
|
readonly strategist: PoolTokenBalance;
|
|
706
769
|
};
|
|
707
770
|
}
|
|
771
|
+
/** One result for every requested vault, preserving input order and duplicates. */
|
|
772
|
+
type VaultLoadResult = {
|
|
773
|
+
readonly status: "success";
|
|
774
|
+
readonly vault: KnownSteerVault;
|
|
775
|
+
} | {
|
|
776
|
+
readonly status: "failure";
|
|
777
|
+
readonly error: Error;
|
|
778
|
+
};
|
|
779
|
+
type VaultSnapshotResult = {
|
|
780
|
+
readonly status: "success";
|
|
781
|
+
readonly snapshot: LiquidityVaultSnapshot;
|
|
782
|
+
} | {
|
|
783
|
+
readonly status: "failure";
|
|
784
|
+
readonly error: Error;
|
|
785
|
+
};
|
|
708
786
|
interface LiquidityVaultSnapshot<TPool extends LiquidityPool = LiquidityPool> {
|
|
787
|
+
readonly rewardAssets?: readonly VaultRewardAsset[];
|
|
709
788
|
readonly blockNumber: bigint;
|
|
710
789
|
/** Verified implementation at blockNumber, supplied by registered bulk snapshot readers. */
|
|
711
790
|
readonly implementation?: {
|
|
@@ -941,6 +1020,10 @@ export declare abstract class AlgebraIntegralAdapter extends AmmAdapter<AlgebraP
|
|
|
941
1020
|
amountOut: bigint;
|
|
942
1021
|
}>>;
|
|
943
1022
|
}
|
|
1023
|
+
export declare class Blackhole extends AlgebraIntegralAdapter {
|
|
1024
|
+
readonly protocol = AmmProtocol.Blackhole;
|
|
1025
|
+
readonly version = BlackholeVersion.CL;
|
|
1026
|
+
}
|
|
944
1027
|
export declare class QuickSwapIntegral extends AlgebraIntegralAdapter {
|
|
945
1028
|
readonly protocol = AmmProtocol.QuickSwap;
|
|
946
1029
|
readonly version = QuickSwapVersion.V4;
|
|
@@ -1190,10 +1273,19 @@ export declare class UniswapV4 extends UniswapV4Adapter {
|
|
|
1190
1273
|
readonly version = UniswapVersion.V4;
|
|
1191
1274
|
}
|
|
1192
1275
|
//#endregion
|
|
1276
|
+
//#region src/amm/adapters/uniswap-v4/errors.d.ts
|
|
1277
|
+
/** A verified absent key, rather than a failed provider or indexer request. */
|
|
1278
|
+
export declare class V4PoolKeyNotFoundError extends Error {
|
|
1279
|
+
constructor(message?: string);
|
|
1280
|
+
}
|
|
1281
|
+
//#endregion
|
|
1193
1282
|
//#region src/amm/types.d.ts
|
|
1194
|
-
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | CamelotVersion | PancakeSwapVersion;
|
|
1283
|
+
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | BlackholeVersion | CamelotVersion | PancakeSwapVersion;
|
|
1195
1284
|
/** Protocol versions select concrete adapters; families remain an implementation detail. */
|
|
1196
1285
|
interface AmmProtocolAdapters {
|
|
1286
|
+
[AmmProtocol.Blackhole]: {
|
|
1287
|
+
[BlackholeVersion.CL]: Blackhole;
|
|
1288
|
+
};
|
|
1197
1289
|
[AmmProtocol.Aerodrome]: {
|
|
1198
1290
|
[AerodromeVersion.Slipstream]: AerodromeSlipstream;
|
|
1199
1291
|
[AerodromeVersion.SlipstreamV2]: AerodromeSlipstreamV2;
|
|
@@ -1326,6 +1418,16 @@ type DiscoveredPool = (SlipstreamPoolState & {
|
|
|
1326
1418
|
}) | (InfinityCLPoolState & {
|
|
1327
1419
|
readonly amm: InfinityCLAdapter;
|
|
1328
1420
|
});
|
|
1421
|
+
type PoolReadResult<TPool> = {
|
|
1422
|
+
readonly status: "success";
|
|
1423
|
+
readonly pool: TPool;
|
|
1424
|
+
} | {
|
|
1425
|
+
readonly status: "failure";
|
|
1426
|
+
readonly error: Error;
|
|
1427
|
+
};
|
|
1428
|
+
type PoolBatchReadOptions = PoolReadOptions & {
|
|
1429
|
+
readonly allowFailure?: boolean;
|
|
1430
|
+
};
|
|
1329
1431
|
type PoolReadOptions = ReadOptions & DataAdapterRequestOptions;
|
|
1330
1432
|
interface TickLiquidity {
|
|
1331
1433
|
readonly tick: number;
|
|
@@ -1388,7 +1490,13 @@ export declare abstract class AmmAdapter<TPoolRef = unknown, TPoolState = unknow
|
|
|
1388
1490
|
abstract quote(request: SwapQuoteRequest<TPoolRef>, options?: PoolReadOptions): Promise<SwapQuote>;
|
|
1389
1491
|
abstract getPool(reference: TPoolRef, options?: ReadOptions): Promise<TPoolState>;
|
|
1390
1492
|
/** Read snapshots at one block, preserving input order and duplicate references. */
|
|
1391
|
-
getPools(references: readonly TPoolRef[], options
|
|
1493
|
+
getPools(references: readonly TPoolRef[], options: PoolReadOptions & {
|
|
1494
|
+
allowFailure: true;
|
|
1495
|
+
}): Promise<readonly PoolReadResult<TPoolState>[]>;
|
|
1496
|
+
getPools(references: readonly TPoolRef[], options?: PoolReadOptions & {
|
|
1497
|
+
allowFailure?: false;
|
|
1498
|
+
}): Promise<readonly TPoolState[]>;
|
|
1499
|
+
getPools(references: readonly TPoolRef[], options?: PoolBatchReadOptions): Promise<readonly TPoolState[] | readonly PoolReadResult<TPoolState>[]>;
|
|
1392
1500
|
}
|
|
1393
1501
|
//#endregion
|
|
1394
1502
|
//#region src/amm/adapters/pancakeswap-v3/data-adapter.d.ts
|
|
@@ -3565,8 +3673,24 @@ export declare class SteerClient {
|
|
|
3565
3673
|
})[]>;
|
|
3566
3674
|
getPools(request: PoolsLookupRequest): Promise<readonly DiscoveredPool[]>;
|
|
3567
3675
|
getVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
3568
|
-
getVaults(chainId: number, addresses: readonly Address[], options
|
|
3569
|
-
|
|
3676
|
+
getVaults(chainId: number, addresses: readonly Address[], options: VaultLoadOptions & {
|
|
3677
|
+
allowFailure: true;
|
|
3678
|
+
}): Promise<readonly VaultLoadResult[]>;
|
|
3679
|
+
getVaults(chainId: number, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
3680
|
+
allowFailure?: false;
|
|
3681
|
+
}): Promise<readonly KnownSteerVault[]>;
|
|
3682
|
+
getVaults(chainId: number, addresses: readonly Address[], options?: VaultLoadOptions & {
|
|
3683
|
+
allowFailure?: boolean;
|
|
3684
|
+
}): Promise<readonly KnownSteerVault[] | readonly VaultLoadResult[]>;
|
|
3685
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options: ReadOptions & {
|
|
3686
|
+
allowFailure: true;
|
|
3687
|
+
}): Promise<readonly VaultSnapshotResult[]>;
|
|
3688
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options?: ReadOptions & {
|
|
3689
|
+
allowFailure?: false;
|
|
3690
|
+
}): Promise<readonly LiquidityVaultSnapshot[]>;
|
|
3691
|
+
getVaultSnapshots(chainId: number, addresses: readonly Address[], options?: ReadOptions & {
|
|
3692
|
+
allowFailure?: boolean;
|
|
3693
|
+
}): Promise<readonly LiquidityVaultSnapshot[] | readonly VaultSnapshotResult[]>;
|
|
3570
3694
|
getVaultUserPositions(chainId: number, addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
3571
3695
|
listUserVaults(request: UserVaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
|
|
3572
3696
|
listVaults(request: VaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
|
|
@@ -3661,6 +3785,49 @@ export declare class AlgebraLegacyVault extends LiquidityVault<AlgebraLegacyAdap
|
|
|
3661
3785
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3662
3786
|
}
|
|
3663
3787
|
//#endregion
|
|
3788
|
+
//#region src/vault/adapters/blackhole/types.d.ts
|
|
3789
|
+
interface BlackholePosition extends LiquidityPosition<Address> {
|
|
3790
|
+
readonly nftTokensOwed: TokenPairAmounts;
|
|
3791
|
+
}
|
|
3792
|
+
interface BlackholeWithdrawPlan extends WithdrawPlan {
|
|
3793
|
+
readonly preview: BlackholeWithdrawPreview;
|
|
3794
|
+
}
|
|
3795
|
+
interface BlackholeVaultSnapshot extends LiquidityVaultSnapshot<Address> {
|
|
3796
|
+
readonly positions: readonly BlackholePosition[];
|
|
3797
|
+
readonly rewardAssets: readonly VaultRewardAsset[];
|
|
3798
|
+
readonly reservedRewards: NonNullable<LiquidityVaultSnapshot["reservedRewards"]>;
|
|
3799
|
+
readonly configuredPositions: NonNullable<LiquidityVaultSnapshot["configuredPositions"]>;
|
|
3800
|
+
}
|
|
3801
|
+
interface BlackholeWithdrawPreview extends WithdrawPreview {
|
|
3802
|
+
readonly rewardPayouts: NonNullable<WithdrawPreview["rewardPayouts"]>;
|
|
3803
|
+
}
|
|
3804
|
+
/** Separate post-confirmation step. WAVAX pays AVAX directly to the transaction sender. */
|
|
3805
|
+
interface BlackholeNativeUnwrapPlan extends TransactionPlan {
|
|
3806
|
+
readonly account: Address;
|
|
3807
|
+
readonly blockNumber: bigint;
|
|
3808
|
+
readonly amount: PoolTokenBalance;
|
|
3809
|
+
}
|
|
3810
|
+
//#endregion
|
|
3811
|
+
//#region src/vault/adapters/blackhole/vault.d.ts
|
|
3812
|
+
/** Exact source-qualified Blackhole NFT/farming vault, with separate reward assets. */
|
|
3813
|
+
export declare class BlackholeVault extends LiquidityVault<AlgebraIntegralAdapter, Address> {
|
|
3814
|
+
readonly amm: AlgebraIntegralAdapter;
|
|
3815
|
+
readonly pool: Address;
|
|
3816
|
+
constructor(context: ResolvedVaultContext);
|
|
3817
|
+
getShareBalance(account: Address, options?: ReadOptions): Promise<bigint>;
|
|
3818
|
+
getSnapshot(options?: ReadOptions): Promise<BlackholeVaultSnapshot>;
|
|
3819
|
+
getPositions(options?: ReadOptions): Promise<readonly BlackholePosition[]>;
|
|
3820
|
+
quoteDeposit(input: AssetAmount, options?: ReadOptions): Promise<DepositQuote>;
|
|
3821
|
+
previewDeposit(request: DepositRequest, options?: ReadOptions): Promise<LiquidityDepositPreview>;
|
|
3822
|
+
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3823
|
+
prepareUnwrapNative(request: {
|
|
3824
|
+
readonly account: Address;
|
|
3825
|
+
readonly amount: bigint;
|
|
3826
|
+
}, options?: ReadOptions): Promise<BlackholeNativeUnwrapPlan>;
|
|
3827
|
+
previewWithdraw(request: WithdrawRequest, options?: ReadOptions): Promise<BlackholeWithdrawPreview>;
|
|
3828
|
+
prepareWithdraw(request: PrepareWithdrawRequest, options?: ReadOptions): Promise<BlackholeWithdrawPlan>;
|
|
3829
|
+
}
|
|
3830
|
+
//#endregion
|
|
3664
3831
|
//#region src/vault/adapters/uniswap-v3/vault.d.ts
|
|
3665
3832
|
/** Directly owned V3 positions for the exact qualified multi-position implementations. */
|
|
3666
3833
|
export declare class UniswapV3Vault extends LiquidityVault<UniswapV3Adapter, Address> {
|
|
@@ -3689,5 +3856,5 @@ export declare class UniswapV4Vault extends LiquidityVault<UniswapV4Adapter, V4V
|
|
|
3689
3856
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3690
3857
|
}
|
|
3691
3858
|
//#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 };
|
|
3859
|
+
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
3860
|
//# sourceMappingURL=index.d.mts.map
|