@steerprotocol/sdk 4.0.0-next.5 → 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 +196 -4
- package/dist/index.cjs +10714 -7307
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +186 -9
- package/dist/index.d.mts +186 -9
- package/dist/index.mjs +10711 -7308
- 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",
|
|
@@ -394,6 +400,8 @@ export interface VaultImplementationBinding {
|
|
|
394
400
|
readonly beaconNames?: readonly string[];
|
|
395
401
|
readonly beaconAddress: Address;
|
|
396
402
|
readonly implementationAddress: Address;
|
|
403
|
+
/** Runtime hash checked by this binding's native snapshot reader before returning accounting. */
|
|
404
|
+
readonly implementationCodeHash?: Hex;
|
|
397
405
|
readonly kind: VaultKind;
|
|
398
406
|
readUnderlying(context: VaultReadContext): Promise<readonly UnderlyingReference[]>;
|
|
399
407
|
createVault(context: ResolvedVaultContext): KnownSteerVault;
|
|
@@ -426,9 +434,25 @@ export declare class VaultResolver {
|
|
|
426
434
|
constructor(definition: VaultResolverDefinition, amms: DeploymentRegistry<AmmAdapter>, lending: DeploymentRegistry<LendingAdapter>);
|
|
427
435
|
resolve(steer: SteerNetwork, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
428
436
|
/** Bounded bulk identity pages at one block; compatibility uses four active loads. */
|
|
429
|
-
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[]>;
|
|
430
446
|
/** Identity and accounting share a pinned block; dispatch custom constructors and methods. */
|
|
431
|
-
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[]>;
|
|
432
456
|
}
|
|
433
457
|
//#endregion
|
|
434
458
|
//#region src/vault/steer.d.ts
|
|
@@ -455,8 +479,24 @@ export declare class SteerNetwork {
|
|
|
455
479
|
/** Synchronous registration check with no RPC or HTTP; does not verify a particular vault. */
|
|
456
480
|
supportsVaultSnapshots(beaconName: string): boolean;
|
|
457
481
|
getVault(address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
458
|
-
getVaults(addresses: readonly Address[], options
|
|
459
|
-
|
|
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[]>;
|
|
460
500
|
getVaultUserPositions(addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
461
501
|
getLiquidityVault(address: Address, options?: VaultLoadOptions): Promise<LiquidityVault>;
|
|
462
502
|
getLendingVault(address: Address, options?: VaultLoadOptions): Promise<LendingVault>;
|
|
@@ -613,6 +653,7 @@ interface VaultRewardPayout {
|
|
|
613
653
|
type WithdrawRewards = VaultRewardPayout;
|
|
614
654
|
/** Actual withdrawal simulation, including contract burn rounding and fee policy. */
|
|
615
655
|
interface WithdrawPreview {
|
|
656
|
+
readonly rewardPayouts?: readonly VaultRewardPayout[];
|
|
616
657
|
readonly rewards?: WithdrawRewards;
|
|
617
658
|
readonly blockNumber: bigint;
|
|
618
659
|
readonly shares: bigint;
|
|
@@ -664,6 +705,8 @@ interface V4VaultPool {
|
|
|
664
705
|
}
|
|
665
706
|
type LiquidityPool = Address | V4VaultPool;
|
|
666
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;
|
|
667
710
|
readonly kind: PositionKind.Liquidity;
|
|
668
711
|
readonly amm: AmmAdapter;
|
|
669
712
|
readonly pool: TPool;
|
|
@@ -685,6 +728,28 @@ interface LiquidityPositionRange {
|
|
|
685
728
|
readonly relativeWeight: number;
|
|
686
729
|
readonly weightPercent: string | undefined;
|
|
687
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
|
+
}
|
|
688
753
|
/** Separate reward-token accounting, never folded into proportional LP pair holdings. */
|
|
689
754
|
interface LiquidityVaultRewards {
|
|
690
755
|
readonly token: Address;
|
|
@@ -703,8 +768,32 @@ interface LiquidityVaultRewards {
|
|
|
703
768
|
readonly strategist: PoolTokenBalance;
|
|
704
769
|
};
|
|
705
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
|
+
};
|
|
706
786
|
interface LiquidityVaultSnapshot<TPool extends LiquidityPool = LiquidityPool> {
|
|
787
|
+
readonly rewardAssets?: readonly VaultRewardAsset[];
|
|
707
788
|
readonly blockNumber: bigint;
|
|
789
|
+
/** Verified implementation at blockNumber, supplied by registered bulk snapshot readers. */
|
|
790
|
+
readonly implementation?: {
|
|
791
|
+
readonly address: Address;
|
|
792
|
+
readonly codeHash: Hex;
|
|
793
|
+
readonly beacon: Address;
|
|
794
|
+
/** Indexed descriptive name, not onchain identity evidence. */
|
|
795
|
+
readonly beaconName: string;
|
|
796
|
+
};
|
|
708
797
|
readonly pool: TPool;
|
|
709
798
|
readonly token0: Address;
|
|
710
799
|
readonly token1: Address;
|
|
@@ -931,6 +1020,10 @@ export declare abstract class AlgebraIntegralAdapter extends AmmAdapter<AlgebraP
|
|
|
931
1020
|
amountOut: bigint;
|
|
932
1021
|
}>>;
|
|
933
1022
|
}
|
|
1023
|
+
export declare class Blackhole extends AlgebraIntegralAdapter {
|
|
1024
|
+
readonly protocol = AmmProtocol.Blackhole;
|
|
1025
|
+
readonly version = BlackholeVersion.CL;
|
|
1026
|
+
}
|
|
934
1027
|
export declare class QuickSwapIntegral extends AlgebraIntegralAdapter {
|
|
935
1028
|
readonly protocol = AmmProtocol.QuickSwap;
|
|
936
1029
|
readonly version = QuickSwapVersion.V4;
|
|
@@ -1180,10 +1273,19 @@ export declare class UniswapV4 extends UniswapV4Adapter {
|
|
|
1180
1273
|
readonly version = UniswapVersion.V4;
|
|
1181
1274
|
}
|
|
1182
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
|
|
1183
1282
|
//#region src/amm/types.d.ts
|
|
1184
|
-
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | CamelotVersion | PancakeSwapVersion;
|
|
1283
|
+
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | BlackholeVersion | CamelotVersion | PancakeSwapVersion;
|
|
1185
1284
|
/** Protocol versions select concrete adapters; families remain an implementation detail. */
|
|
1186
1285
|
interface AmmProtocolAdapters {
|
|
1286
|
+
[AmmProtocol.Blackhole]: {
|
|
1287
|
+
[BlackholeVersion.CL]: Blackhole;
|
|
1288
|
+
};
|
|
1187
1289
|
[AmmProtocol.Aerodrome]: {
|
|
1188
1290
|
[AerodromeVersion.Slipstream]: AerodromeSlipstream;
|
|
1189
1291
|
[AerodromeVersion.SlipstreamV2]: AerodromeSlipstreamV2;
|
|
@@ -1316,6 +1418,16 @@ type DiscoveredPool = (SlipstreamPoolState & {
|
|
|
1316
1418
|
}) | (InfinityCLPoolState & {
|
|
1317
1419
|
readonly amm: InfinityCLAdapter;
|
|
1318
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
|
+
};
|
|
1319
1431
|
type PoolReadOptions = ReadOptions & DataAdapterRequestOptions;
|
|
1320
1432
|
interface TickLiquidity {
|
|
1321
1433
|
readonly tick: number;
|
|
@@ -1378,7 +1490,13 @@ export declare abstract class AmmAdapter<TPoolRef = unknown, TPoolState = unknow
|
|
|
1378
1490
|
abstract quote(request: SwapQuoteRequest<TPoolRef>, options?: PoolReadOptions): Promise<SwapQuote>;
|
|
1379
1491
|
abstract getPool(reference: TPoolRef, options?: ReadOptions): Promise<TPoolState>;
|
|
1380
1492
|
/** Read snapshots at one block, preserving input order and duplicate references. */
|
|
1381
|
-
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>[]>;
|
|
1382
1500
|
}
|
|
1383
1501
|
//#endregion
|
|
1384
1502
|
//#region src/amm/adapters/pancakeswap-v3/data-adapter.d.ts
|
|
@@ -3555,8 +3673,24 @@ export declare class SteerClient {
|
|
|
3555
3673
|
})[]>;
|
|
3556
3674
|
getPools(request: PoolsLookupRequest): Promise<readonly DiscoveredPool[]>;
|
|
3557
3675
|
getVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
3558
|
-
getVaults(chainId: number, addresses: readonly Address[], options
|
|
3559
|
-
|
|
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[]>;
|
|
3560
3694
|
getVaultUserPositions(chainId: number, addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
3561
3695
|
listUserVaults(request: UserVaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
|
|
3562
3696
|
listVaults(request: VaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
|
|
@@ -3651,6 +3785,49 @@ export declare class AlgebraLegacyVault extends LiquidityVault<AlgebraLegacyAdap
|
|
|
3651
3785
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3652
3786
|
}
|
|
3653
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
|
|
3654
3831
|
//#region src/vault/adapters/uniswap-v3/vault.d.ts
|
|
3655
3832
|
/** Directly owned V3 positions for the exact qualified multi-position implementations. */
|
|
3656
3833
|
export declare class UniswapV3Vault extends LiquidityVault<UniswapV3Adapter, Address> {
|
|
@@ -3679,5 +3856,5 @@ export declare class UniswapV4Vault extends LiquidityVault<UniswapV4Adapter, V4V
|
|
|
3679
3856
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3680
3857
|
}
|
|
3681
3858
|
//#endregion
|
|
3682
|
-
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 };
|
|
3683
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",
|
|
@@ -394,6 +400,8 @@ export interface VaultImplementationBinding {
|
|
|
394
400
|
readonly beaconNames?: readonly string[];
|
|
395
401
|
readonly beaconAddress: Address;
|
|
396
402
|
readonly implementationAddress: Address;
|
|
403
|
+
/** Runtime hash checked by this binding's native snapshot reader before returning accounting. */
|
|
404
|
+
readonly implementationCodeHash?: Hex;
|
|
397
405
|
readonly kind: VaultKind;
|
|
398
406
|
readUnderlying(context: VaultReadContext): Promise<readonly UnderlyingReference[]>;
|
|
399
407
|
createVault(context: ResolvedVaultContext): KnownSteerVault;
|
|
@@ -426,9 +434,25 @@ export declare class VaultResolver {
|
|
|
426
434
|
constructor(definition: VaultResolverDefinition, amms: DeploymentRegistry<AmmAdapter>, lending: DeploymentRegistry<LendingAdapter>);
|
|
427
435
|
resolve(steer: SteerNetwork, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
428
436
|
/** Bounded bulk identity pages at one block; compatibility uses four active loads. */
|
|
429
|
-
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[]>;
|
|
430
446
|
/** Identity and accounting share a pinned block; dispatch custom constructors and methods. */
|
|
431
|
-
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[]>;
|
|
432
456
|
}
|
|
433
457
|
//#endregion
|
|
434
458
|
//#region src/vault/steer.d.ts
|
|
@@ -455,8 +479,24 @@ export declare class SteerNetwork {
|
|
|
455
479
|
/** Synchronous registration check with no RPC or HTTP; does not verify a particular vault. */
|
|
456
480
|
supportsVaultSnapshots(beaconName: string): boolean;
|
|
457
481
|
getVault(address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
458
|
-
getVaults(addresses: readonly Address[], options
|
|
459
|
-
|
|
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[]>;
|
|
460
500
|
getVaultUserPositions(addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
461
501
|
getLiquidityVault(address: Address, options?: VaultLoadOptions): Promise<LiquidityVault>;
|
|
462
502
|
getLendingVault(address: Address, options?: VaultLoadOptions): Promise<LendingVault>;
|
|
@@ -613,6 +653,7 @@ interface VaultRewardPayout {
|
|
|
613
653
|
type WithdrawRewards = VaultRewardPayout;
|
|
614
654
|
/** Actual withdrawal simulation, including contract burn rounding and fee policy. */
|
|
615
655
|
interface WithdrawPreview {
|
|
656
|
+
readonly rewardPayouts?: readonly VaultRewardPayout[];
|
|
616
657
|
readonly rewards?: WithdrawRewards;
|
|
617
658
|
readonly blockNumber: bigint;
|
|
618
659
|
readonly shares: bigint;
|
|
@@ -664,6 +705,8 @@ interface V4VaultPool {
|
|
|
664
705
|
}
|
|
665
706
|
type LiquidityPool = Address | V4VaultPool;
|
|
666
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;
|
|
667
710
|
readonly kind: PositionKind.Liquidity;
|
|
668
711
|
readonly amm: AmmAdapter;
|
|
669
712
|
readonly pool: TPool;
|
|
@@ -685,6 +728,28 @@ interface LiquidityPositionRange {
|
|
|
685
728
|
readonly relativeWeight: number;
|
|
686
729
|
readonly weightPercent: string | undefined;
|
|
687
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
|
+
}
|
|
688
753
|
/** Separate reward-token accounting, never folded into proportional LP pair holdings. */
|
|
689
754
|
interface LiquidityVaultRewards {
|
|
690
755
|
readonly token: Address;
|
|
@@ -703,8 +768,32 @@ interface LiquidityVaultRewards {
|
|
|
703
768
|
readonly strategist: PoolTokenBalance;
|
|
704
769
|
};
|
|
705
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
|
+
};
|
|
706
786
|
interface LiquidityVaultSnapshot<TPool extends LiquidityPool = LiquidityPool> {
|
|
787
|
+
readonly rewardAssets?: readonly VaultRewardAsset[];
|
|
707
788
|
readonly blockNumber: bigint;
|
|
789
|
+
/** Verified implementation at blockNumber, supplied by registered bulk snapshot readers. */
|
|
790
|
+
readonly implementation?: {
|
|
791
|
+
readonly address: Address;
|
|
792
|
+
readonly codeHash: Hex;
|
|
793
|
+
readonly beacon: Address;
|
|
794
|
+
/** Indexed descriptive name, not onchain identity evidence. */
|
|
795
|
+
readonly beaconName: string;
|
|
796
|
+
};
|
|
708
797
|
readonly pool: TPool;
|
|
709
798
|
readonly token0: Address;
|
|
710
799
|
readonly token1: Address;
|
|
@@ -931,6 +1020,10 @@ export declare abstract class AlgebraIntegralAdapter extends AmmAdapter<AlgebraP
|
|
|
931
1020
|
amountOut: bigint;
|
|
932
1021
|
}>>;
|
|
933
1022
|
}
|
|
1023
|
+
export declare class Blackhole extends AlgebraIntegralAdapter {
|
|
1024
|
+
readonly protocol = AmmProtocol.Blackhole;
|
|
1025
|
+
readonly version = BlackholeVersion.CL;
|
|
1026
|
+
}
|
|
934
1027
|
export declare class QuickSwapIntegral extends AlgebraIntegralAdapter {
|
|
935
1028
|
readonly protocol = AmmProtocol.QuickSwap;
|
|
936
1029
|
readonly version = QuickSwapVersion.V4;
|
|
@@ -1180,10 +1273,19 @@ export declare class UniswapV4 extends UniswapV4Adapter {
|
|
|
1180
1273
|
readonly version = UniswapVersion.V4;
|
|
1181
1274
|
}
|
|
1182
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
|
|
1183
1282
|
//#region src/amm/types.d.ts
|
|
1184
|
-
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | CamelotVersion | PancakeSwapVersion;
|
|
1283
|
+
type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | BlackholeVersion | CamelotVersion | PancakeSwapVersion;
|
|
1185
1284
|
/** Protocol versions select concrete adapters; families remain an implementation detail. */
|
|
1186
1285
|
interface AmmProtocolAdapters {
|
|
1286
|
+
[AmmProtocol.Blackhole]: {
|
|
1287
|
+
[BlackholeVersion.CL]: Blackhole;
|
|
1288
|
+
};
|
|
1187
1289
|
[AmmProtocol.Aerodrome]: {
|
|
1188
1290
|
[AerodromeVersion.Slipstream]: AerodromeSlipstream;
|
|
1189
1291
|
[AerodromeVersion.SlipstreamV2]: AerodromeSlipstreamV2;
|
|
@@ -1316,6 +1418,16 @@ type DiscoveredPool = (SlipstreamPoolState & {
|
|
|
1316
1418
|
}) | (InfinityCLPoolState & {
|
|
1317
1419
|
readonly amm: InfinityCLAdapter;
|
|
1318
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
|
+
};
|
|
1319
1431
|
type PoolReadOptions = ReadOptions & DataAdapterRequestOptions;
|
|
1320
1432
|
interface TickLiquidity {
|
|
1321
1433
|
readonly tick: number;
|
|
@@ -1378,7 +1490,13 @@ export declare abstract class AmmAdapter<TPoolRef = unknown, TPoolState = unknow
|
|
|
1378
1490
|
abstract quote(request: SwapQuoteRequest<TPoolRef>, options?: PoolReadOptions): Promise<SwapQuote>;
|
|
1379
1491
|
abstract getPool(reference: TPoolRef, options?: ReadOptions): Promise<TPoolState>;
|
|
1380
1492
|
/** Read snapshots at one block, preserving input order and duplicate references. */
|
|
1381
|
-
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>[]>;
|
|
1382
1500
|
}
|
|
1383
1501
|
//#endregion
|
|
1384
1502
|
//#region src/amm/adapters/pancakeswap-v3/data-adapter.d.ts
|
|
@@ -3555,8 +3673,24 @@ export declare class SteerClient {
|
|
|
3555
3673
|
})[]>;
|
|
3556
3674
|
getPools(request: PoolsLookupRequest): Promise<readonly DiscoveredPool[]>;
|
|
3557
3675
|
getVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
|
|
3558
|
-
getVaults(chainId: number, addresses: readonly Address[], options
|
|
3559
|
-
|
|
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[]>;
|
|
3560
3694
|
getVaultUserPositions(chainId: number, addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
|
|
3561
3695
|
listUserVaults(request: UserVaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
|
|
3562
3696
|
listVaults(request: VaultDiscoveryRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
|
|
@@ -3651,6 +3785,49 @@ export declare class AlgebraLegacyVault extends LiquidityVault<AlgebraLegacyAdap
|
|
|
3651
3785
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3652
3786
|
}
|
|
3653
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
|
|
3654
3831
|
//#region src/vault/adapters/uniswap-v3/vault.d.ts
|
|
3655
3832
|
/** Directly owned V3 positions for the exact qualified multi-position implementations. */
|
|
3656
3833
|
export declare class UniswapV3Vault extends LiquidityVault<UniswapV3Adapter, Address> {
|
|
@@ -3679,5 +3856,5 @@ export declare class UniswapV4Vault extends LiquidityVault<UniswapV4Adapter, V4V
|
|
|
3679
3856
|
prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
|
|
3680
3857
|
}
|
|
3681
3858
|
//#endregion
|
|
3682
|
-
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 };
|
|
3683
3860
|
//# sourceMappingURL=index.d.mts.map
|