@steerprotocol/sdk 4.0.0-next.10 → 4.0.0-next.12

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/dist/index.d.mts CHANGED
@@ -1,4 +1,6 @@
1
1
  import "viem";
2
+ import * as v from "valibot";
3
+ import { SmartPoolExecutionContext } from "@steerprotocol/data-connector-loader";
2
4
  //#region src/http/transport.d.ts
3
5
  /** Transport settings shared by client defaults and per-request overrides. */
4
6
  interface HttpRequestOptions {
@@ -112,6 +114,11 @@ export interface ChainContext {
112
114
  readonly chainId: number;
113
115
  readonly transport?: RpcTransport;
114
116
  readonly indexerRequest?: HttpTransport;
117
+ /** Per-client credential snapshot for WASM connector requests, outside network metadata. */
118
+ readonly connectorCredentials?: () => {
119
+ readonly subgraphStudioKey?: string;
120
+ readonly sentioApiKey?: string;
121
+ };
115
122
  readonly logger?: Logger;
116
123
  }
117
124
  export interface ContractDeployment {
@@ -148,53 +155,43 @@ export interface PageFreshness {
148
155
  readonly source: "stored" | "retained" | "bundled";
149
156
  }
150
157
  //#endregion
151
- //#region src/amm/adapters/uniswap-v4/types.d.ts
152
- interface V4PoolKey {
153
- readonly currency0: Address;
154
- readonly currency1: Address;
155
- readonly fee: number;
156
- readonly tickSpacing: number;
157
- readonly hooks: Address;
158
+ //#region src/data/adapter.d.ts
159
+ export declare enum DataAdapterKind {
160
+ Subgraph = "subgraph",
161
+ Api = "api",
162
+ Rpc = "rpc"
158
163
  }
159
- type V4PoolReference = V4PoolKey | {
160
- readonly poolId: Hex;
164
+ /** Public endpoint metadata must not contain credentials. */
165
+ export type DataAdapterDefinition = {
166
+ readonly kind: DataAdapterKind.Subgraph;
167
+ readonly url: string;
168
+ } | {
169
+ readonly kind: DataAdapterKind.Api;
170
+ readonly url: string;
171
+ } | {
172
+ readonly kind: DataAdapterKind.Rpc;
161
173
  };
162
- type V4ReadOptions = PoolReadOptions;
163
- interface V4SwapQuoteRequest extends SwapQuoteRequest<V4PoolReference> {
164
- readonly hookData?: Hex;
165
- }
166
- interface V4DirectionalFees {
167
- /** One pip is one millionth. */
168
- readonly protocolFeePips: number;
169
- readonly protocolFeePercent: string;
174
+ export declare abstract class DataAdapter {
175
+ readonly definition: DataAdapterDefinition;
176
+ constructor(definition: DataAdapterDefinition);
177
+ get subgraphUrl(): string | undefined;
170
178
  }
171
- interface V4PoolFees {
172
- /** Original key fee, including the dynamic-fee flag when set. */
173
- readonly configuredFee: number;
174
- /** Stored LP fee in millionths; hooks can override it during a swap. */
175
- readonly lpFeePips: number;
176
- readonly lpFeePercent: string;
177
- /** Raw packed uint24 containing both directional protocol fees. */
178
- readonly protocolFeePacked: number;
179
- readonly currency0ToCurrency1: V4DirectionalFees;
180
- readonly currency1ToCurrency0: V4DirectionalFees;
179
+ /** Per-request HTTP settings; credentials never become public adapter metadata. */
180
+ export type DataAdapterRequestOptions = HttpRequestOptions;
181
+ export interface TokenFilter {
182
+ readonly address?: Address;
183
+ /** Case-insensitive substring match. */
184
+ readonly symbol?: string;
185
+ /** Case-insensitive substring match. */
186
+ readonly name?: string;
181
187
  }
182
- interface V4PoolState extends ConcentratedPoolState {
183
- readonly key: V4PoolKey;
184
- readonly poolId: Hex;
185
- readonly poolManager: Address;
186
- readonly currency0Decimals: number;
187
- readonly currency1Decimals: number;
188
- readonly currency0IsNative: boolean;
189
- readonly currency1IsNative: boolean;
190
- readonly price: PoolPrice;
191
- readonly fees: V4PoolFees;
192
- readonly blockNumber: bigint;
188
+ export type PoolTokenFilter = TokenFilter;
189
+ export interface PoolListRequest extends PageRequest {
190
+ /** Matches either pool token. All supplied fields must match the same token. */
191
+ readonly token?: PoolTokenFilter;
193
192
  }
194
- interface V4Contracts extends ContractMap {
195
- readonly poolManager: ContractDeployment;
196
- readonly stateView: ContractDeployment;
197
- readonly quoter: ContractDeployment;
193
+ export declare abstract class PoolDataAdapter<TPoolRef> extends DataAdapter {
194
+ abstract listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<TPoolRef>>;
198
195
  }
199
196
  //#endregion
200
197
  //#region src/amm/enums.d.ts
@@ -266,1551 +263,1055 @@ export declare enum AmmFamily {
266
263
  UniswapV4 = "uniswap-v4"
267
264
  }
268
265
  //#endregion
269
- //#region src/core/deployment.d.ts
270
- export interface DeploymentDefinition<TContracts extends ContractMap = ContractMap> {
271
- readonly id: string;
272
- readonly chainId: number;
273
- readonly contracts: TContracts;
274
- readonly dataAdapter: DataAdapterDefinition;
266
+ //#region src/amm/adapters/aerodrome/types.d.ts
267
+ interface SlipstreamContracts extends ContractMap {
268
+ readonly factory: ContractDeployment;
269
+ readonly quoter: ContractDeployment;
270
+ readonly positionManager: ContractDeployment;
275
271
  }
276
- export interface DeploymentReference<TAdapter, TContracts extends ContractMap = ContractMap, TContext extends ChainContext = ChainContext> {
277
- readonly definition: DeploymentDefinition<TContracts>;
278
- connect(context: TContext): TAdapter;
272
+ interface SlipstreamPoolFees {
273
+ /** Observed fee in millionths at the snapshot block, not a guarantee for a later swap. */
274
+ readonly swapFeePips: number;
275
+ readonly swapFeePercent: string;
276
+ /** Portion of unstaked LP trading fees allocated away, not an additional trader fee. */
277
+ readonly unstakedFeePips: number;
278
+ readonly unstakedFeePercent: string;
279
279
  }
280
- /** Import a deployment object for lookup; consumers do not look up free-form IDs. */
281
- export declare class Deployment<TAdapter, TContracts extends ContractMap = ContractMap, TContext extends ChainContext = ChainContext> implements DeploymentReference<TAdapter, TContracts, TContext> {
282
- #private;
283
- readonly definition: DeploymentDefinition<TContracts>;
284
- constructor(definition: DeploymentDefinition<TContracts>, factory: (context: TContext, definition: DeploymentDefinition<TContracts>) => TAdapter);
285
- connect(context: TContext): TAdapter;
280
+ interface SlipstreamPoolState extends ConcentratedPoolState {
281
+ readonly address: Address;
282
+ readonly factory: Address;
283
+ readonly token0: Address;
284
+ readonly token1: Address;
285
+ readonly token0Decimals: number;
286
+ readonly token1Decimals: number;
287
+ readonly tickSpacing: number;
288
+ /** Already included in liquidity. */
289
+ readonly stakedLiquidity: bigint;
290
+ readonly gauge: Address;
291
+ readonly positionManager: Address;
292
+ readonly fees: SlipstreamPoolFees;
293
+ readonly balances: {
294
+ readonly token0: PoolTokenBalance;
295
+ readonly token1: PoolTokenBalance;
296
+ };
297
+ readonly price: PoolPrice;
298
+ readonly blockNumber: bigint;
286
299
  }
287
- /** Construction is explicit. Lookup creates an adapter without global registration or caching. */
288
- export declare class DeploymentRegistry<TBase> {
289
- #private;
290
- readonly context: ChainContext;
291
- constructor(context: ChainContext, deployments: readonly DeploymentReference<TBase>[]);
292
- get<TAdapter extends TBase>(deployment: DeploymentReference<TAdapter>): TAdapter;
293
- list(): readonly DeploymentReference<TBase>[];
300
+ /** Optional caller for fee modules that apply transaction-origin discounts. */
301
+ interface SlipstreamQuoteOptions extends ReadOptions {
302
+ readonly account?: Address;
294
303
  }
295
304
  //#endregion
296
- //#region src/lending/adapter.d.ts
297
- export declare enum LendingProtocol {
298
- AaveV3 = "aave-v3"
299
- }
300
- export declare enum LendingFamily {
301
- AaveV3 = "aave-v3"
302
- }
303
- export declare abstract class LendingAdapter<TMarketRef = unknown, TMarketState = unknown, TContracts extends ContractMap = ContractMap> {
304
- readonly context: ChainContext;
305
- readonly deployment: DeploymentDefinition<TContracts>;
306
- readonly dataAdapter: LendingDataAdapter<TMarketRef>;
307
- abstract readonly family: LendingFamily;
308
- abstract readonly protocol: LendingProtocol;
309
- constructor(context: ChainContext, deployment: DeploymentDefinition<TContracts>, dataAdapter: LendingDataAdapter<TMarketRef>);
310
- get subgraphUrl(): string | undefined;
311
- abstract getMarket(reference: TMarketRef, options?: ReadOptions): Promise<TMarketState>;
312
- }
313
- export interface AaveReserveState {
314
- readonly asset: Address;
315
- readonly supplyRateRay: bigint;
316
- readonly variableBorrowRateRay: bigint;
317
- }
318
- export interface SupplyRequest {
319
- readonly asset: Address;
320
- readonly amount: bigint;
321
- readonly account: Address;
305
+ //#region src/amm/adapters/aerodrome/adapter.d.ts
306
+ export declare abstract class AerodromeSlipstreamAdapter extends AmmAdapter<Address, SlipstreamPoolState, SlipstreamContracts> {
307
+ #private;
308
+ readonly family = AmmFamily.AerodromeSlipstream;
309
+ getPool(address: Address, options?: ReadOptions): Promise<SlipstreamPoolState>;
310
+ quote(request: SwapQuoteRequest<Address>, options?: SlipstreamQuoteOptions): Promise<Readonly<{
311
+ amountIn: bigint;
312
+ amountOut: bigint;
313
+ }>>;
314
+ getTicks(address: Address, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
315
+ getSurroundingTicks(address: Address, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
322
316
  }
323
- export interface AaveV3Contracts extends ContractMap {
324
- readonly pool: ContractDeployment;
317
+ //#endregion
318
+ //#region src/amm/adapters/aerodrome/data-adapter.d.ts
319
+ /** Dedicated factory-bound endpoints. Indexed addresses still require native pool verification. */
320
+ export declare class SlipstreamDataAdapter extends PoolDataAdapter<Address> {
321
+ #private;
322
+ constructor(definition: DataAdapterDefinition, factory: Address, indexerRequest?: HttpTransport, chainId?: number);
323
+ listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<`0x${string}`>>;
325
324
  }
326
- export declare abstract class AaveV3Adapter extends LendingAdapter<Address, AaveReserveState, AaveV3Contracts> {
327
- readonly family = LendingFamily.AaveV3;
328
- abstract prepareSupply(request: SupplyRequest): Promise<TransactionPlan>;
325
+ //#endregion
326
+ //#region src/amm/adapters/aerodrome/slipstream.d.ts
327
+ export declare class AerodromeSlipstream extends AerodromeSlipstreamAdapter {
328
+ readonly protocol = AmmProtocol.Aerodrome;
329
+ readonly version = AerodromeVersion.Slipstream;
329
330
  }
330
331
  //#endregion
331
- //#region src/vault/enums.d.ts
332
- export declare enum VaultKind {
333
- Liquidity = "liquidity",
334
- Lending = "lending",
335
- Composite = "composite"
332
+ //#region src/amm/adapters/aerodrome/slipstream-v2.d.ts
333
+ export declare class AerodromeSlipstreamV2 extends AerodromeSlipstreamAdapter {
334
+ readonly protocol = AmmProtocol.Aerodrome;
335
+ readonly version = AerodromeVersion.SlipstreamV2;
336
336
  }
337
- export declare enum PositionKind {
338
- Liquidity = "liquidity",
339
- Lending = "lending",
340
- Idle = "idle"
337
+ //#endregion
338
+ //#region src/amm/adapters/aerodrome/slipstream-v3.d.ts
339
+ export declare class AerodromeSlipstreamV3 extends AerodromeSlipstreamAdapter {
340
+ readonly protocol = AmmProtocol.Aerodrome;
341
+ readonly version = AerodromeVersion.SlipstreamV3;
341
342
  }
342
343
  //#endregion
343
- //#region src/vault/resolver-types.d.ts
344
- export declare enum ProtocolContractRole {
345
- AmmFactory = "amm-factory",
346
- PoolManager = "pool-manager",
347
- LendingPool = "lending-pool",
348
- LendingMarketFactory = "lending-market-factory"
344
+ //#region src/amm/adapters/algebra/types.d.ts
345
+ interface AlgebraContracts extends ContractMap {
346
+ readonly factory: ContractDeployment;
347
+ readonly poolDeployer: ContractDeployment;
348
+ readonly quoter: ContractDeployment;
349
349
  }
350
- export interface VaultReadContext {
351
- readonly steer: SteerNetwork;
350
+ /** Fields shared by qualified Algebra families; fee and plugin layouts remain family-specific. */
351
+ interface AlgebraPoolState extends ConcentratedPoolState {
352
352
  readonly address: Address;
353
+ readonly factory: Address;
354
+ readonly token0: Address;
355
+ readonly token1: Address;
356
+ readonly token0Decimals: number;
357
+ readonly token1Decimals: number;
358
+ readonly tickSpacing: number;
359
+ readonly price: PoolPrice;
360
+ readonly balances: {
361
+ readonly token0: PoolTokenBalance;
362
+ readonly token1: PoolTokenBalance;
363
+ };
353
364
  readonly blockNumber: bigint;
354
365
  }
355
- export interface VaultIdentity {
356
- readonly chainId: number;
357
- readonly vaultAddress: Address;
358
- readonly registryAddress: Address;
359
- /** Beacon registered for this vault in Steer's VaultRegistry. */
360
- readonly beaconAddress: Address;
361
- /** Beacon actually used by the vault proxy. */
362
- readonly proxyBeaconAddress: Address;
363
- readonly implementationAddress: Address;
364
- }
365
- /** The reader must check registry membership and the proxy's actual beacon/implementation. */
366
- export interface VaultIdentityReader {
367
- getBlockNumber(steer: SteerNetwork): Promise<bigint>;
368
- /** Read actual contracts at context.blockNumber; return null for an unregistered vault. */
369
- readIdentity(context: VaultReadContext): Promise<VaultIdentity | null>;
370
- }
371
- export type UnderlyingReference = {
372
- readonly kind: PositionKind.Liquidity;
373
- readonly role: ProtocolContractRole.AmmFactory | ProtocolContractRole.PoolManager;
374
- readonly protocolAddress: Address;
375
- readonly pool: unknown;
376
- } | {
377
- readonly kind: PositionKind.Lending;
378
- readonly role: ProtocolContractRole.LendingPool | ProtocolContractRole.LendingMarketFactory;
379
- readonly protocolAddress: Address;
380
- readonly market: unknown;
381
- };
382
- export type ProtocolBinding = {
383
- readonly kind: PositionKind.Liquidity;
384
- readonly role: ProtocolContractRole.AmmFactory | ProtocolContractRole.PoolManager;
385
- readonly protocolAddress: Address;
386
- readonly deployment: DeploymentReference<AmmAdapter>;
387
- } | {
388
- readonly kind: PositionKind.Lending;
389
- readonly role: ProtocolContractRole.LendingPool | ProtocolContractRole.LendingMarketFactory;
390
- readonly protocolAddress: Address;
391
- readonly deployment: DeploymentReference<LendingAdapter>;
366
+ //#endregion
367
+ //#region src/amm/adapters/algebra-integral/types.d.ts
368
+ /** Base pools accept an address. Custom pool listings carry their verified routing identity. */
369
+ type AlgebraPoolReference = Address | {
370
+ readonly address: Address;
371
+ readonly deployer: Address;
392
372
  };
393
- export interface ResolvedVaultContext extends VaultReadContext {
394
- readonly underlying: readonly VaultUnderlying[];
395
- readonly metadata: VaultMetadata;
396
- }
397
- /** Exact implementation-specific readers and constructors, supplied by SDK integration code. */
398
- export interface VaultImplementationBinding {
399
- /** Exact indexed names associated with this implementation; omitted means unknown support. */
400
- readonly beaconNames?: readonly string[];
401
- readonly beaconAddress: Address;
402
- readonly implementationAddress: Address;
403
- /** Runtime hash checked by this binding's native snapshot reader before returning accounting. */
404
- readonly implementationCodeHash?: Hex;
405
- readonly kind: VaultKind;
406
- readUnderlying(context: VaultReadContext): Promise<readonly UnderlyingReference[]>;
407
- createVault(context: ResolvedVaultContext): KnownSteerVault;
373
+ type AlgebraIntegralContracts = AlgebraContracts;
374
+ interface AlgebraIntegralPoolState extends AlgebraPoolState {
375
+ /** Zero for a base pool; custom deployer for a custom pool. */
376
+ readonly deployer: Address;
377
+ readonly plugin: Address;
378
+ readonly pluginConfig: number;
379
+ readonly fees: {
380
+ /** Stored pool fee, which can be stale when dynamic fees are enabled. */
381
+ readonly lastFeePips: number;
382
+ readonly lastFeePercent: string;
383
+ /** Share of swap fees allocated to the community, in thousandths. */
384
+ readonly communityFeePermille: number;
385
+ readonly communityFeePercent: string;
386
+ };
408
387
  }
409
- export interface VaultResolverDefinition {
410
- readonly reader: VaultIdentityReader;
411
- readonly implementations: readonly VaultImplementationBinding[];
412
- readonly protocols: readonly ProtocolBinding[];
388
+ //#endregion
389
+ //#region src/amm/adapters/algebra-integral/adapter.d.ts
390
+ export declare abstract class AlgebraIntegralAdapter extends AmmAdapter<AlgebraPoolReference, AlgebraIntegralPoolState, AlgebraIntegralContracts> {
391
+ #private;
392
+ readonly family = AmmFamily.AlgebraIntegral;
393
+ getPool(reference: AlgebraPoolReference, options?: ReadOptions): Promise<AlgebraIntegralPoolState>;
394
+ getTicks(reference: AlgebraPoolReference, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
395
+ getSurroundingTicks(reference: AlgebraPoolReference, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
396
+ quote(request: SwapQuoteRequest<AlgebraPoolReference>, options?: ReadOptions): Promise<Readonly<{
397
+ amountIn: bigint;
398
+ amountOut: bigint;
399
+ }>>;
413
400
  }
414
- export declare enum VaultResolutionErrorCode {
415
- NotConfigured = "not-configured",
416
- InvalidMapping = "invalid-mapping",
417
- NotRegistered = "not-registered",
418
- IdentityMismatch = "identity-mismatch",
419
- UnsupportedImplementation = "unsupported-implementation",
420
- UnsupportedProtocol = "unsupported-protocol",
421
- InvalidVault = "invalid-vault"
401
+ export declare class Blackhole extends AlgebraIntegralAdapter {
402
+ readonly protocol = AmmProtocol.Blackhole;
403
+ readonly version = BlackholeVersion.CL;
422
404
  }
423
- export declare class VaultResolutionError extends Error {
424
- readonly code: VaultResolutionErrorCode;
425
- constructor(code: VaultResolutionErrorCode, message: string);
405
+ export declare class QuickSwapIntegral extends AlgebraIntegralAdapter {
406
+ readonly protocol = AmmProtocol.QuickSwap;
407
+ readonly version = QuickSwapVersion.V4;
426
408
  }
427
409
  //#endregion
428
- //#region src/vault/resolver.d.ts
429
- /** One resolver belongs to one Steer deployment and its registered integrations. */
430
- export declare class VaultResolver {
410
+ //#region src/amm/adapters/algebra-integral/data-adapter.d.ts
411
+ export declare class AlgebraIntegralDataAdapter extends PoolDataAdapter<AlgebraPoolReference> {
431
412
  #private;
432
- readonly amms: DeploymentRegistry<AmmAdapter>;
433
- readonly lending: DeploymentRegistry<LendingAdapter>;
434
- constructor(definition: VaultResolverDefinition, amms: DeploymentRegistry<AmmAdapter>, lending: DeploymentRegistry<LendingAdapter>);
435
- resolve(steer: SteerNetwork, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
436
- /** Bounded bulk identity pages at one block; compatibility uses four active loads. */
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[]>;
446
- /** Identity and accounting share a pinned block; dispatch custom constructors and methods. */
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[]>;
413
+ constructor(definition: DataAdapterDefinition, factory: Address, request?: HttpTransport);
414
+ listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<AlgebraPoolReference>>;
456
415
  }
457
416
  //#endregion
458
- //#region src/vault/steer.d.ts
459
- export interface SteerContracts extends ContractMap {
460
- readonly KeeperRegistry: ContractDeployment;
461
- readonly Orchestrator: ContractDeployment;
462
- readonly StrategyRegistry: ContractDeployment;
463
- readonly VaultRegistry: ContractDeployment;
464
- readonly BundleRegistry: ContractDeployment;
465
- readonly GasVault: ContractDeployment;
466
- readonly SteerPeriphery: ContractDeployment;
417
+ //#region src/amm/adapters/algebra-legacy/types.d.ts
418
+ type AlgebraLegacyContracts = AlgebraContracts;
419
+ interface AlgebraSwapFee {
420
+ /** Stored fee, not a guarantee of the fee on the next swap. */
421
+ readonly lastFeePips: number;
422
+ readonly lastFeePercent: string;
467
423
  }
468
- /** Connected Steer deployment with one automatic vault-loading path. */
469
- export declare class SteerNetwork {
470
- #private;
471
- readonly context: ChainContext;
472
- readonly deployment: DeploymentDefinition<SteerContracts>;
473
- readonly dataAdapter: SteerDataAdapter;
474
- constructor(context: ChainContext, deployment: DeploymentDefinition<SteerContracts>, dataAdapter: SteerDataAdapter, resolver?: VaultResolver);
475
- get contracts(): SteerContracts;
476
- get subgraphUrl(): string | undefined;
477
- listUserVaults(request: UserVaultListRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
478
- listVaults(request?: VaultListRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
479
- /** Synchronous registration check with no RPC or HTTP; does not verify a particular vault. */
480
- supportsVaultSnapshots(beaconName: string): boolean;
481
- getVault(address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
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[]>;
500
- getVaultUserPositions(addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
501
- getLiquidityVault(address: Address, options?: VaultLoadOptions): Promise<LiquidityVault>;
502
- getLendingVault(address: Address, options?: VaultLoadOptions): Promise<LendingVault>;
503
- getCompositeVault(address: Address, options?: VaultLoadOptions): Promise<CompositeVault>;
424
+ interface AlgebraLegacyPoolState extends AlgebraPoolState {
425
+ readonly fees: {
426
+ readonly currency0ToCurrency1: AlgebraSwapFee;
427
+ readonly currency1ToCurrency0: AlgebraSwapFee;
428
+ readonly communityFeeToken0Permille: number;
429
+ readonly communityFeeToken1Permille: number;
430
+ readonly communityFeeToken0Percent: string;
431
+ readonly communityFeeToken1Percent: string;
432
+ };
504
433
  }
505
434
  //#endregion
506
- //#region src/vault/vault.d.ts
507
- export declare abstract class SteerVault {
508
- readonly address: Address;
509
- readonly chain: ChainContext;
510
- readonly steer: SteerNetwork;
511
- abstract readonly kind: VaultKind;
512
- readonly underlying: readonly VaultUnderlying[];
513
- readonly metadata: VaultMetadata;
514
- constructor(address: Address, chain: ChainContext, steer: SteerNetwork, underlying: readonly VaultUnderlying[], metadata: VaultMetadata);
515
- abstract getShareBalance(account: Address, options?: ReadOptions): Promise<bigint>;
516
- abstract getPositions(options?: ReadOptions): Promise<readonly StrategyPosition[]>;
517
- /** SDK request shape; contract implementations encode their own ABI and enforce asset rules. */
518
- abstract previewDeposit(request: DepositRequest, options?: ReadOptions): Promise<DepositPreview>;
519
- abstract prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<TransactionPlan>;
520
- /** Share-denominated exit; implementations map this to the contract's withdrawal flow. */
521
- abstract prepareWithdraw(request: PrepareWithdrawRequest, options?: ReadOptions): Promise<TransactionPlan>;
435
+ //#region src/amm/adapters/algebra-legacy/adapter.d.ts
436
+ export declare abstract class AlgebraLegacyAdapter extends AmmAdapter<Address, AlgebraLegacyPoolState, AlgebraLegacyContracts> {
437
+ #private;
438
+ readonly family = AmmFamily.AlgebraLegacy;
439
+ getPool(reference: Address, options?: ReadOptions): Promise<AlgebraLegacyPoolState>;
440
+ getTicks(reference: Address, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
441
+ getSurroundingTicks(reference: Address, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
442
+ quote(request: SwapQuoteRequest<Address>, options?: ReadOptions): Promise<Readonly<{
443
+ amountIn: bigint;
444
+ amountOut: bigint;
445
+ }>>;
522
446
  }
523
- export declare abstract class LiquidityVault<TAmm extends AmmAdapter = AmmAdapter, TPool extends LiquidityPool = LiquidityPool> extends SteerVault {
524
- readonly kind = VaultKind.Liquidity;
525
- abstract readonly amm: TAmm;
526
- abstract getPositions(options?: ReadOptions): Promise<readonly LiquidityPosition<TPool>[]>;
527
- abstract getSnapshot(options?: ReadOptions): Promise<LiquidityVaultSnapshot<TPool>>;
528
- /** Calculate the other token maximum at the vault's current deposit ratio. Does not swap. */
529
- abstract quoteDeposit(input: AssetAmount, options?: ReadOptions): Promise<DepositQuote>;
530
- abstract previewDeposit(request: DepositRequest, options?: ReadOptions): Promise<LiquidityDepositPreview>;
531
- abstract prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
532
- /** Simulates the original withdrawal as account at one verified block. Never submits. */
533
- previewWithdraw(request: WithdrawRequest, options?: ReadOptions): Promise<WithdrawPreview>;
534
- /** Re-simulates independently; does not trust a previously returned preview. */
535
- prepareWithdraw(request: PrepareWithdrawRequest, options?: ReadOptions): Promise<WithdrawPlan>;
536
- /** Proportional accounting amounts at one block, not a withdrawal quote. */
537
- getUserPosition(account: Address, options?: ReadOptions): Promise<LiquidityVaultUserPosition<TPool>>;
447
+ //#endregion
448
+ //#region src/amm/adapters/algebra-legacy/directional.d.ts
449
+ export declare abstract class AlgebraDirectionalAdapter extends AlgebraLegacyAdapter {}
450
+ //#endregion
451
+ //#region src/amm/adapters/algebra-legacy/camelot.d.ts
452
+ export declare class Camelot extends AlgebraDirectionalAdapter {
453
+ readonly protocol = AmmProtocol.Camelot;
454
+ readonly version = CamelotVersion.V3;
538
455
  }
539
- export declare abstract class LendingVault<TLending extends LendingAdapter = LendingAdapter> extends SteerVault {
540
- readonly kind = VaultKind.Lending;
541
- abstract readonly lending: TLending;
456
+ //#endregion
457
+ //#region src/amm/adapters/algebra-legacy/data-adapter.d.ts
458
+ export declare class AlgebraLegacyDataAdapter extends PoolDataAdapter<Address> {
459
+ #private;
460
+ constructor(definition: DataAdapterDefinition, factory: Address, request?: HttpTransport);
461
+ listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<`0x${string}`>>;
542
462
  }
543
- export declare abstract class CompositeVault extends SteerVault {
544
- readonly kind = VaultKind.Composite;
463
+ //#endregion
464
+ //#region src/amm/adapters/algebra-legacy/quickswap.d.ts
465
+ export declare class QuickSwap extends AlgebraLegacyAdapter {
466
+ readonly protocol = AmmProtocol.QuickSwap;
467
+ readonly version = QuickSwapVersion.V3;
545
468
  }
546
469
  //#endregion
547
- //#region src/vault/types.d.ts
548
- type VaultAmmFilter = { [Protocol in AmmProtocol]: Omit<AmmLookupRequest<Protocol>, "chainId">; }[AmmProtocol];
549
- /** Indexed descriptive data. This record does not establish current onchain identity. */
550
- interface VaultMetadata {
551
- readonly id: Address;
552
- readonly name: string | null;
553
- readonly symbol: string | null;
554
- readonly decimals: string | null;
555
- readonly beaconName: string;
556
- readonly createdAt: string;
557
- readonly state: string | null;
558
- /** Pool contract address or a 32-byte pool ID for singleton AMMs such as V4. */
559
- readonly pool: Hex | null;
560
- readonly poolKey?: string | null;
561
- readonly token0: Address | null;
562
- readonly token1: Address | null;
563
- readonly payloadIpfs: string | null;
564
- readonly strategyToken: {
565
- readonly id: string;
566
- } | null;
470
+ //#region src/amm/adapters/pancakeswap-infinity-cl/types.d.ts
471
+ interface InfinityCLPoolKey {
472
+ readonly currency0: Address;
473
+ readonly currency1: Address;
474
+ readonly hooks: Address;
475
+ readonly poolManager: Address;
476
+ readonly fee: number;
477
+ readonly parameters: Hex;
567
478
  }
568
- /** Loading options. Supplied indexed metadata never replaces onchain identity checks. */
569
- interface VaultLoadOptions extends ReadOptions {
570
- /** Complete records for the requested addresses; omit to fetch from the subgraph. */
571
- readonly metadata?: readonly VaultMetadata[];
479
+ interface InfinityCLPoolKeyInput extends Omit<InfinityCLPoolKey, "parameters"> {
480
+ readonly tickSpacing: number;
481
+ readonly hookPermissions?: number;
572
482
  }
573
- interface VaultListRequest extends PageRequest {
574
- /** Select a configured AMM using the same protocol/version rules as getAmm(). */
575
- readonly amm?: VaultAmmFilter;
576
- /** Match either underlying token; all supplied fields must match that same token. */
577
- readonly token?: TokenFilter;
483
+ interface InfinityCLPoolIdReference {
484
+ readonly poolId: Hex;
578
485
  }
579
- interface VaultDiscoveryRequest extends VaultListRequest {
580
- readonly chainId: number;
486
+ type InfinityCLPoolReference = InfinityCLPoolKey | InfinityCLPoolIdReference;
487
+ interface InfinityCLSwapQuoteRequest extends SwapQuoteRequest<InfinityCLPoolReference> {
488
+ readonly hookData?: Hex;
581
489
  }
582
- /** Scans at most limit indexed share-vault candidates (default 1,000) per page. */
583
- interface UserVaultListRequest extends VaultListRequest {
584
- readonly account: Address;
490
+ interface InfinityCLDirectionalFees {
491
+ readonly protocolFeePips: number;
492
+ readonly protocolFeePercent: string;
585
493
  }
586
- interface UserVaultDiscoveryRequest extends UserVaultListRequest {
587
- readonly chainId: number;
494
+ interface InfinityCLPoolFees {
495
+ readonly configuredFee: number;
496
+ readonly lpFeePips: number;
497
+ readonly lpFeePercent: string;
498
+ readonly protocolFeePacked: number;
499
+ readonly currency0ToCurrency1: InfinityCLDirectionalFees;
500
+ readonly currency1ToCurrency0: InfinityCLDirectionalFees;
588
501
  }
589
- /** Indexed candidates with positive onchain shares, not verified vault implementations.
590
- * Empty pages may have a nextCursor. Completeness depends on the indexed inventory.
591
- */
592
- interface UserVaultPage extends Page<Address> {
593
- readonly indexedBlock: bigint;
502
+ interface InfinityCLPoolState extends ConcentratedPoolState {
503
+ readonly key: InfinityCLPoolKey;
504
+ readonly poolId: Hex;
505
+ readonly poolManager: Address;
506
+ readonly tickSpacing: number;
507
+ readonly currency0Decimals: number;
508
+ readonly currency1Decimals: number;
509
+ readonly currency0IsNative: boolean;
510
+ readonly currency1IsNative: boolean;
511
+ readonly price: PoolPrice;
512
+ readonly fees: InfinityCLPoolFees;
513
+ readonly blockNumber: bigint;
594
514
  }
595
- /** SDK connection dependency, supplied by SteerClient to its data adapter factory. */
596
- interface SteerConnectionContext extends ChainContext {
597
- readonly amms: DeploymentRegistry<AmmAdapter>;
515
+ interface InfinityCLContracts extends ContractMap {
516
+ readonly poolManager: ContractDeployment;
517
+ readonly vault: ContractDeployment;
518
+ readonly quoter: ContractDeployment;
598
519
  }
599
- interface AssetAmount {
600
- readonly asset: Address;
601
- readonly amount: bigint;
520
+ //#endregion
521
+ //#region src/amm/adapters/pancakeswap-infinity-cl/adapter.d.ts
522
+ export declare abstract class InfinityCLAdapter extends AmmAdapter<InfinityCLPoolReference, InfinityCLPoolState, InfinityCLContracts, InfinityCLPoolIdReference> {
523
+ #private;
524
+ readonly family = AmmFamily.PancakeSwapInfinityCL;
525
+ createPoolKey(input: InfinityCLPoolKeyInput): InfinityCLPoolKey;
526
+ getPoolId(key: InfinityCLPoolKey): Hex;
527
+ getPoolKey(id: Hex, options?: ReadOptions): Promise<InfinityCLPoolKey>;
528
+ getPool(reference: InfinityCLPoolReference, options?: ReadOptions): Promise<InfinityCLPoolState>;
529
+ getTicks(reference: InfinityCLPoolReference, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
530
+ getSurroundingTicks(reference: InfinityCLPoolReference, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
531
+ quote(request: InfinityCLSwapQuoteRequest, options?: PoolReadOptions): Promise<Readonly<{
532
+ amountIn: bigint;
533
+ amountOut: bigint;
534
+ }>>;
602
535
  }
603
- interface DepositRequest {
604
- /** Token owner and transaction sender. */
605
- readonly account: Address;
606
- readonly assets: readonly AssetAmount[];
607
- readonly receiver: Address;
536
+ export declare class PancakeSwapInfinityCL extends InfinityCLAdapter {
537
+ readonly protocol = AmmProtocol.PancakeSwap;
538
+ readonly version = PancakeSwapVersion.InfinityCL;
608
539
  }
609
- interface DepositPreview {
610
- readonly shares: bigint;
540
+ //#endregion
541
+ //#region src/amm/adapters/pancakeswap-infinity-cl/data-adapter.d.ts
542
+ /** Listings return stable IDs; the manager resolves their canonical keys onchain. */
543
+ export declare class PancakeSwapInfinityCLDataAdapter extends PoolDataAdapter<InfinityCLPoolIdReference> {
544
+ #private;
545
+ constructor(definition: DataAdapterDefinition, manager: Address, indexerRequest?: HttpTransport);
546
+ listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<InfinityCLPoolIdReference>>;
611
547
  }
612
- interface PrepareDepositRequest extends DepositRequest {
613
- /** Integer basis points from zero through 10,000, applied to accepted token amounts. */
614
- readonly slippageBps: number;
548
+ //#endregion
549
+ //#region src/amm/adapters/uniswap-v3/types.d.ts
550
+ interface V3PoolFees {
551
+ /** Fixed swap fee in millionths, including any protocol share deducted from it. */
552
+ readonly swapFeePips: number;
553
+ /** Percentage, e.g. "0.05" for 500 pips, without a percent sign. */
554
+ readonly swapFeePercent: string;
615
555
  }
616
- /** Contract-compatible quote, independent of the account's balances and allowances. */
617
- interface LiquidityDepositPreview extends DepositPreview {
618
- readonly blockNumber: bigint;
556
+ interface V3PoolState extends ConcentratedPoolState {
557
+ readonly address: Address;
558
+ readonly factory: Address;
619
559
  readonly token0: Address;
620
560
  readonly token1: Address;
621
- readonly amounts: TokenPairAmounts;
622
- readonly unusedAmounts: TokenPairAmounts;
623
- /** Settlement of pre-existing receiver shares, separate from deposited assets. */
624
- readonly rewards?: VaultRewardPayout;
561
+ readonly fees: V3PoolFees;
562
+ readonly token0Decimals: number;
563
+ readonly token1Decimals: number;
564
+ /** Actual pool-contract balances, including any fees or donated tokens it holds. */
565
+ readonly balances: {
566
+ readonly token0: PoolTokenBalance;
567
+ readonly token1: PoolTokenBalance;
568
+ };
569
+ /** 36 significant digits, rounded down. Undefined for an uninitialized pool. */
570
+ readonly price: PoolPrice | undefined;
571
+ readonly tickSpacing: number;
572
+ readonly blockNumber: bigint;
625
573
  }
626
- /** Inferred token maxima, suitable for previewDeposit or prepareDeposit. No tokens are swapped. */
627
- interface DepositQuote extends LiquidityDepositPreview {
628
- /** Token0 and token1 maxima, in that order. */
629
- readonly assets: readonly [AssetAmount, AssetAmount];
574
+ interface V3Contracts extends ContractMap {
575
+ readonly factory: ContractDeployment;
630
576
  }
631
- /** Ordered capped approvals, if needed, followed by the unsigned deposit. */
632
- interface DepositPlan extends TransactionPlan {
633
- readonly account: Address;
634
- readonly preview: LiquidityDepositPreview;
635
- readonly minimumAmounts: TokenPairAmounts;
577
+ //#endregion
578
+ //#region src/amm/adapters/uniswap-v3/base.d.ts
579
+ /** A compatible deployment reuses this class; a behavioral fork may subclass it. */
580
+ export declare abstract class UniswapV3Adapter extends AmmAdapter<Address, V3PoolState, V3Contracts> {
581
+ readonly family = AmmFamily.UniswapV3;
636
582
  }
637
- interface WithdrawRequest {
638
- readonly shares: bigint;
639
- /** Share holder and transaction sender. The contract burns msg.sender shares. */
640
- readonly account: Address;
641
- readonly receiver: Address;
583
+ //#endregion
584
+ //#region src/amm/adapters/uniswap-v3/adapter.d.ts
585
+ /** Standard V3 reads and quoting reused by compatible protocol subclasses. */
586
+ export declare abstract class RpcUniswapV3Adapter extends UniswapV3Adapter {
587
+ #private;
588
+ getTicks(reference: Address, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
589
+ getSurroundingTicks(reference: Address, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
590
+ getPool(address: Address, options?: ReadOptions): Promise<V3PoolState>;
591
+ quote(request: SwapQuoteRequest<Address>, options?: ReadOptions): Promise<{
592
+ amountIn: bigint;
593
+ amountOut: bigint;
594
+ }>;
642
595
  }
643
- interface PrepareWithdrawRequest extends WithdrawRequest {
644
- /** Integer basis points, from zero through 10,000. Explicitly chosen by the caller. */
645
- readonly slippageBps: number;
596
+ export declare class UniswapV3 extends RpcUniswapV3Adapter {
597
+ readonly protocol = AmmProtocol.Uniswap;
598
+ readonly version = UniswapVersion.V3;
646
599
  }
647
- /** Separate reward asset paid when a vault operation settles pre-existing shares. */
648
- interface VaultRewardPayout {
649
- readonly token: Address;
650
- readonly recipient: Address;
651
- readonly amount: PoolTokenBalance;
600
+ //#endregion
601
+ //#region src/core/deployment.d.ts
602
+ export interface DeploymentDefinition<TContracts extends ContractMap = ContractMap> {
603
+ readonly id: string;
604
+ readonly chainId: number;
605
+ readonly contracts: TContracts;
606
+ readonly dataAdapter: DataAdapterDefinition;
652
607
  }
653
- /** Reward paid to the shareholder during withdrawal. */
654
- type WithdrawRewards = VaultRewardPayout;
655
- /** Actual withdrawal simulation, including contract burn rounding and fee policy. */
656
- interface WithdrawPreview {
657
- readonly rewardPayouts?: readonly VaultRewardPayout[];
658
- readonly rewards?: WithdrawRewards;
659
- readonly blockNumber: bigint;
660
- readonly shares: bigint;
661
- readonly token0: Address;
662
- readonly token1: Address;
663
- readonly amounts: TokenPairAmounts;
608
+ export interface DeploymentReference<TAdapter, TContracts extends ContractMap = ContractMap, TContext extends ChainContext = ChainContext> {
609
+ readonly definition: DeploymentDefinition<TContracts>;
610
+ connect(context: TContext): TAdapter;
664
611
  }
665
- /** Unsigned transactions must be submitted by account on chainId. */
666
- interface WithdrawPlan extends TransactionPlan {
667
- readonly account: Address;
668
- readonly preview: WithdrawPreview;
669
- readonly minimumAmounts: TokenPairAmounts;
612
+ /** Import a deployment object for lookup; consumers do not look up free-form IDs. */
613
+ export declare class Deployment<TAdapter, TContracts extends ContractMap = ContractMap, TContext extends ChainContext = ChainContext> implements DeploymentReference<TAdapter, TContracts, TContext> {
614
+ #private;
615
+ readonly definition: DeploymentDefinition<TContracts>;
616
+ constructor(definition: DeploymentDefinition<TContracts>, factory: (context: TContext, definition: DeploymentDefinition<TContracts>) => TAdapter);
617
+ connect(context: TContext): TAdapter;
670
618
  }
671
- /** Configured protocol relationships exist even when a vault has no active positions. */
672
- type VaultUnderlying = {
673
- readonly kind: PositionKind.Liquidity;
674
- readonly amm: AmmAdapter;
675
- readonly pool: unknown;
676
- } | {
677
- readonly kind: PositionKind.Lending;
678
- readonly lending: LendingAdapter;
679
- readonly market: unknown;
680
- };
681
- type StrategyPosition = (VaultUnderlying & {
682
- readonly positionId: string;
683
- }) | {
684
- readonly kind: PositionKind.Idle;
685
- readonly balance: AssetAmount;
686
- };
687
- /** Token amounts use the snapshot's token ordering and decimals. */
688
- interface TokenPairAmounts {
689
- readonly token0: PoolTokenBalance;
690
- readonly token1: PoolTokenBalance;
619
+ export declare class DeploymentRegistry<TBase> {
620
+ #private;
621
+ readonly context: ChainContext;
622
+ constructor(context: ChainContext, deployments: readonly DeploymentReference<TBase>[]);
623
+ get<TAdapter extends TBase>(deployment: DeploymentReference<TAdapter>): TAdapter;
624
+ list(): readonly DeploymentReference<TBase>[];
691
625
  }
692
- /** Both position fees and vault-wide sums use this structure. Recorded fees are part of gross. */
693
- interface LiquidityFees {
694
- /** Collectible fees, including fee growth since the last checkpoint. */
695
- readonly gross: TokenPairAmounts;
696
- /** LP share after the verified implementation's fee cut and rounding policy. */
697
- readonly net: TokenPairAmounts;
698
- /** Gross fees already checkpointed in the pool's tokensOwed fields. */
699
- readonly recorded: TokenPairAmounts;
626
+ //#endregion
627
+ //#region src/amm/adapters/uniswap-v4/types.d.ts
628
+ interface V4PoolKey {
629
+ readonly currency0: Address;
630
+ readonly currency1: Address;
631
+ readonly fee: number;
632
+ readonly tickSpacing: number;
633
+ readonly hooks: Address;
700
634
  }
701
- /** V4 pools are identified by their key and manager, never an invented address. */
702
- interface V4VaultPool {
635
+ type V4PoolReference = V4PoolKey | {
703
636
  readonly poolId: Hex;
704
- readonly poolManager: Address;
705
- readonly key: V4PoolKey;
637
+ };
638
+ type V4ReadOptions = PoolReadOptions;
639
+ interface V4SwapQuoteRequest extends SwapQuoteRequest<V4PoolReference> {
640
+ readonly hookData?: Hex;
706
641
  }
707
- type LiquidityPool = Address | V4VaultPool;
708
- interface LiquidityPosition<TPool extends LiquidityPool = LiquidityPool> {
709
- /** NFT checkpoint amounts excluded from LP fees/totals when the qualified vault cannot pay them out. */
710
- readonly nftTokensOwed?: TokenPairAmounts;
711
- readonly kind: PositionKind.Liquidity;
712
- readonly amm: AmmAdapter;
713
- readonly pool: TPool;
714
- readonly positionId: string;
715
- readonly lowerTick: number;
716
- readonly upperTick: number;
717
- /** Arbitrary relative units, not basis points. */
718
- readonly relativeWeight: number;
719
- /** Rounded down to 18 decimal places; undefined when all weights are zero. */
720
- readonly weightPercent: string | undefined;
721
- readonly liquidity: bigint;
722
- readonly principal: TokenPairAmounts;
723
- readonly fees: LiquidityFees;
724
- }
725
- /** Configured strategy ranges, which need not correspond one-to-one to active NFTs. */
726
- interface LiquidityPositionRange {
727
- readonly lowerTick: number;
728
- readonly upperTick: number;
729
- readonly relativeWeight: number;
730
- readonly weightPercent: string | undefined;
731
- }
732
- /** One reward asset, deduplicated by token even when base and bonus rewards overlap. */
733
- interface VaultRewardFee {
734
- readonly identifier: string;
735
- readonly recipient: Address;
736
- readonly unpaid: PoolTokenBalance;
737
- readonly unclaimed: PoolTokenBalance;
738
- }
739
- interface VaultRewardAsset {
740
- readonly token: Address;
741
- readonly decimals: number;
742
- readonly balance: PoolTokenBalance;
743
- readonly reservedFees: PoolTokenBalance;
744
- /** Stored fees not attributed to the current fee identifiers, still excluded from LP holdings. */
745
- readonly unattributedReservedFees: PoolTokenBalance;
746
- readonly accumulatedPerShareX18: bigint;
747
- readonly unclaimed: {
748
- readonly gross: PoolTokenBalance;
749
- readonly net: PoolTokenBalance;
750
- readonly fee: PoolTokenBalance;
751
- };
752
- readonly feeRecipients: readonly VaultRewardFee[];
753
- }
754
- /** Separate reward-token accounting, never folded into proportional LP pair holdings. */
755
- interface LiquidityVaultRewards {
756
- readonly token: Address;
757
- readonly decimals: number;
758
- readonly balance: PoolTokenBalance;
759
- readonly accumulatedPerShareX18: bigint;
760
- readonly totalSupply: bigint;
761
- readonly unclaimed: {
762
- readonly gross: PoolTokenBalance;
763
- readonly net: PoolTokenBalance;
764
- readonly steerFee: PoolTokenBalance;
765
- readonly strategistFee: PoolTokenBalance;
766
- };
767
- readonly unpaidFees: {
768
- readonly steer: PoolTokenBalance;
769
- readonly strategist: PoolTokenBalance;
770
- };
642
+ interface V4DirectionalFees {
643
+ /** One pip is one millionth. */
644
+ readonly protocolFeePips: number;
645
+ readonly protocolFeePercent: string;
771
646
  }
772
- /** One result for every requested vault, preserving input order and duplicates. */
773
- type VaultLoadResult = {
774
- readonly status: "success";
775
- readonly vault: KnownSteerVault;
776
- } | {
777
- readonly status: "failure";
778
- readonly error: Error;
779
- };
780
- type VaultSnapshotResult = {
781
- readonly status: "success";
782
- readonly snapshot: LiquidityVaultSnapshot;
783
- } | {
784
- readonly status: "failure";
785
- readonly error: Error;
786
- };
787
- interface LiquidityVaultSnapshot<TPool extends LiquidityPool = LiquidityPool> {
788
- readonly rewardAssets?: readonly VaultRewardAsset[];
789
- readonly blockNumber: bigint;
790
- /** Verified implementation at blockNumber, supplied by registered bulk snapshot readers. */
791
- readonly implementation?: {
792
- readonly address: Address;
793
- readonly codeHash: Hex;
794
- readonly beacon: Address;
795
- /** Indexed descriptive name, not onchain identity evidence. */
796
- readonly beaconName: string;
797
- };
798
- readonly pool: TPool;
799
- readonly token0: Address;
800
- readonly token1: Address;
801
- readonly token0Decimals: number;
802
- readonly token1Decimals: number;
803
- readonly positions: readonly LiquidityPosition<TPool>[];
804
- /** ERC-20 holdings, including already collected protocol/strategist fee reserves. */
805
- readonly balances: TokenPairAmounts;
806
- readonly reservedFees: TokenPairAmounts;
807
- /** Already collected rewards excluded from idle when the reward asset overlaps the LP pair. */
808
- readonly reservedRewards?: TokenPairAmounts;
809
- readonly configuredPositions?: readonly LiquidityPositionRange[];
810
- readonly rewards?: LiquidityVaultRewards;
811
- readonly idle: TokenPairAmounts;
812
- readonly principal: TokenPairAmounts;
813
- readonly feeRateBps: number;
814
- /** Sums of the corresponding fees across all positions. */
815
- readonly fees: LiquidityFees;
816
- /** Idle + principal + net uncollected fees. Accounting snapshot, not a withdrawal quote. */
817
- readonly total: TokenPairAmounts;
647
+ interface V4PoolFees {
648
+ /** Original key fee, including the dynamic-fee flag when set. */
649
+ readonly configuredFee: number;
650
+ /** Stored LP fee in millionths; hooks can override it during a swap. */
651
+ readonly lpFeePips: number;
652
+ readonly lpFeePercent: string;
653
+ /** Raw packed uint24 containing both directional protocol fees. */
654
+ readonly protocolFeePacked: number;
655
+ readonly currency0ToCurrency1: V4DirectionalFees;
656
+ readonly currency1ToCurrency0: V4DirectionalFees;
818
657
  }
819
- /** Same-block proportional accounting, not a withdrawal quote. Share amounts are raw ERC-20 units. */
820
- interface LiquidityVaultUserPosition<TPool extends LiquidityPool = LiquidityPool> {
658
+ interface V4PoolState extends ConcentratedPoolState {
659
+ readonly key: V4PoolKey;
660
+ readonly poolId: Hex;
661
+ readonly poolManager: Address;
662
+ readonly currency0Decimals: number;
663
+ readonly currency1Decimals: number;
664
+ readonly currency0IsNative: boolean;
665
+ readonly currency1IsNative: boolean;
666
+ readonly price: PoolPrice;
667
+ readonly fees: V4PoolFees;
821
668
  readonly blockNumber: bigint;
822
- readonly account: Address;
823
- readonly pool: TPool;
824
- readonly token0: Address;
825
- readonly token1: Address;
826
- readonly shares: bigint;
827
- readonly totalSupply: bigint;
828
- /** Rounded down to 18 decimal places; zero when totalSupply is zero. */
829
- readonly ownershipPercent: string;
830
- /** Proportional LP totals, including available idle, principal and net uncollected fees. */
831
- readonly amounts: TokenPairAmounts;
832
669
  }
833
- /** One requested liquidity vault's same-block wallet holdings. */
834
- interface VaultUserPosition<TPool extends LiquidityPool = LiquidityPool> {
835
- readonly vault: Address;
836
- readonly position: LiquidityVaultUserPosition<TPool>;
670
+ interface V4Contracts extends ContractMap {
671
+ readonly poolManager: ContractDeployment;
672
+ readonly stateView: ContractDeployment;
673
+ readonly quoter: ContractDeployment;
837
674
  }
838
- type KnownSteerVault = LiquidityVault | LendingVault | CompositeVault;
839
675
  //#endregion
840
- //#region src/data/adapter.d.ts
841
- export declare enum DataAdapterKind {
842
- Subgraph = "subgraph",
843
- Api = "api",
844
- Rpc = "rpc"
845
- }
846
- /** Public endpoint metadata must not contain credentials. */
847
- export type DataAdapterDefinition = {
848
- readonly kind: DataAdapterKind.Subgraph;
849
- readonly url: string;
850
- } | {
851
- readonly kind: DataAdapterKind.Api;
852
- readonly url: string;
853
- } | {
854
- readonly kind: DataAdapterKind.Rpc;
855
- };
856
- export declare abstract class DataAdapter {
857
- readonly definition: DataAdapterDefinition;
858
- constructor(definition: DataAdapterDefinition);
859
- get subgraphUrl(): string | undefined;
676
+ //#region src/amm/adapters/uniswap-v4/data-adapter.d.ts
677
+ export declare abstract class V4PoolDataAdapter extends PoolDataAdapter<V4PoolKey> {
678
+ abstract getPoolKey(id: Hex, options?: V4ReadOptions): Promise<V4PoolKey>;
860
679
  }
861
- /** Per-request HTTP settings; credentials never become public adapter metadata. */
862
- export type DataAdapterRequestOptions = HttpRequestOptions;
863
- export interface TokenFilter {
864
- readonly address?: Address;
865
- /** Case-insensitive substring match. */
866
- readonly symbol?: string;
867
- /** Case-insensitive substring match. */
868
- readonly name?: string;
680
+ /** Indexed references carry full keys; every onchain use still validates the configured manager. */
681
+ export declare class UniswapV4DataAdapter extends V4PoolDataAdapter {
682
+ #private;
683
+ constructor(definition: DataAdapterDefinition, manager: Address, context: ChainContext);
684
+ listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<V4PoolKey>>;
685
+ getPoolKey(id: Hex, options?: V4ReadOptions): Promise<V4PoolKey>;
869
686
  }
870
- export type PoolTokenFilter = TokenFilter;
871
- export interface PoolListRequest extends PageRequest {
872
- /** Matches either pool token. All supplied fields must match the same token. */
873
- readonly token?: PoolTokenFilter;
687
+ //#endregion
688
+ //#region src/amm/adapters/uniswap-v4/adapter.d.ts
689
+ export declare abstract class UniswapV4Adapter extends AmmAdapter<V4PoolReference, V4PoolState, V4Contracts, V4PoolKey> {
690
+ #private;
691
+ readonly dataAdapter: V4PoolDataAdapter;
692
+ readonly family = AmmFamily.UniswapV4;
693
+ constructor(context: ChainContext, deployment: DeploymentDefinition<V4Contracts>, dataAdapter: V4PoolDataAdapter);
694
+ getPoolId(key: V4PoolKey): Hex;
695
+ getPoolKey(id: Hex, options?: V4ReadOptions): Promise<V4PoolKey>;
696
+ getTicks(reference: V4PoolReference, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
697
+ getSurroundingTicks(reference: V4PoolReference, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
698
+ getPool(reference: V4PoolReference, options?: V4ReadOptions): Promise<V4PoolState>;
699
+ quote(request: V4SwapQuoteRequest, options?: V4ReadOptions): Promise<SwapQuote>;
874
700
  }
875
- export declare abstract class PoolDataAdapter<TPoolRef> extends DataAdapter {
876
- abstract listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<TPoolRef>>;
701
+ export declare class UniswapV4 extends UniswapV4Adapter {
702
+ readonly protocol = AmmProtocol.Uniswap;
703
+ readonly version = UniswapVersion.V4;
877
704
  }
878
- export declare abstract class LendingDataAdapter<TMarketRef> extends DataAdapter {
879
- abstract listMarkets(request?: PageRequest): Promise<Page<TMarketRef>>;
705
+ //#endregion
706
+ //#region src/amm/adapters/uniswap-v4/errors.d.ts
707
+ /** A verified absent key, rather than a failed provider or indexer request. */
708
+ export declare class V4PoolKeyNotFoundError extends Error {
709
+ constructor(message?: string);
880
710
  }
881
- export declare abstract class SteerDataAdapter extends DataAdapter {
882
- listUserVaults(_request: UserVaultListRequest, _options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
883
- getVaultMetadata(_addresses: readonly Address[], _options?: DataAdapterRequestOptions): Promise<readonly VaultMetadata[]>;
884
- abstract listVaults(request?: VaultListRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
711
+ //#endregion
712
+ //#region src/amm/adapters/pancakeswap-v3/adapter.d.ts
713
+ /** Pancake V3 uses the V3 family with a wider slot0 protocol-fee field. */
714
+ export declare class PancakeSwapV3 extends RpcUniswapV3Adapter {
715
+ readonly protocol = AmmProtocol.PancakeSwap;
716
+ readonly version = PancakeSwapVersion.V3;
885
717
  }
886
718
  //#endregion
887
- //#region src/amm/adapters/aerodrome/types.d.ts
888
- interface SlipstreamContracts extends ContractMap {
889
- readonly factory: ContractDeployment;
890
- readonly quoter: ContractDeployment;
891
- readonly positionManager: ContractDeployment;
719
+ //#region src/amm/adapters/retro-v3/adapter.d.ts
720
+ export declare class RetroV3 extends RpcUniswapV3Adapter {
721
+ readonly protocol = AmmProtocol.Retro;
722
+ readonly version = RetroVersion.V3;
892
723
  }
893
- interface SlipstreamPoolFees {
894
- /** Observed fee in millionths at the snapshot block, not a guarantee for a later swap. */
895
- readonly swapFeePips: number;
896
- readonly swapFeePercent: string;
897
- /** Portion of unstaked LP trading fees allocated away, not an additional trader fee. */
898
- readonly unstakedFeePips: number;
899
- readonly unstakedFeePercent: string;
724
+ //#endregion
725
+ //#region src/amm/adapters/sushiswap-v3/adapter.d.ts
726
+ export declare class SushiSwapV3 extends RpcUniswapV3Adapter {
727
+ readonly protocol = AmmProtocol.SushiSwap;
728
+ readonly version = SushiSwapVersion.V3;
900
729
  }
901
- interface SlipstreamPoolState extends ConcentratedPoolState {
902
- readonly address: Address;
903
- readonly factory: Address;
904
- readonly token0: Address;
905
- readonly token1: Address;
906
- readonly token0Decimals: number;
907
- readonly token1Decimals: number;
908
- readonly tickSpacing: number;
909
- /** Already included in liquidity. */
910
- readonly stakedLiquidity: bigint;
911
- readonly gauge: Address;
912
- readonly positionManager: Address;
913
- readonly fees: SlipstreamPoolFees;
914
- readonly balances: {
915
- readonly token0: PoolTokenBalance;
916
- readonly token1: PoolTokenBalance;
730
+ //#endregion
731
+ //#region src/amm/selection.d.ts
732
+ declare const ammDefinitions: {
733
+ readonly aerodrome: {
734
+ readonly slipstream: {
735
+ readonly adapter: typeof AerodromeSlipstream;
736
+ readonly family: AmmFamily.AerodromeSlipstream;
737
+ };
738
+ readonly "slipstream-v2": {
739
+ readonly adapter: typeof AerodromeSlipstreamV2;
740
+ readonly family: AmmFamily.AerodromeSlipstream;
741
+ };
742
+ readonly "slipstream-v3": {
743
+ readonly adapter: typeof AerodromeSlipstreamV3;
744
+ readonly family: AmmFamily.AerodromeSlipstream;
745
+ };
917
746
  };
918
- readonly price: PoolPrice;
919
- readonly blockNumber: bigint;
920
- }
921
- /** Optional caller for fee modules that apply transaction-origin discounts. */
922
- interface SlipstreamQuoteOptions extends ReadOptions {
923
- readonly account?: Address;
924
- }
747
+ readonly sushiswap: {
748
+ readonly v3: {
749
+ readonly adapter: typeof SushiSwapV3;
750
+ readonly family: AmmFamily.UniswapV3;
751
+ };
752
+ };
753
+ readonly retro: {
754
+ readonly v3: {
755
+ readonly adapter: typeof RetroV3;
756
+ readonly family: AmmFamily.UniswapV3;
757
+ };
758
+ };
759
+ readonly uniswap: {
760
+ readonly v3: {
761
+ readonly adapter: typeof UniswapV3;
762
+ readonly family: AmmFamily.UniswapV3;
763
+ };
764
+ readonly v4: {
765
+ readonly adapter: typeof UniswapV4;
766
+ readonly family: AmmFamily.UniswapV4;
767
+ };
768
+ };
769
+ readonly quickswap: {
770
+ readonly v3: {
771
+ readonly adapter: typeof QuickSwap;
772
+ readonly family: AmmFamily.AlgebraLegacy;
773
+ };
774
+ readonly v4: {
775
+ readonly adapter: typeof QuickSwapIntegral;
776
+ readonly family: AmmFamily.AlgebraIntegral;
777
+ };
778
+ };
779
+ readonly blackhole: {
780
+ readonly cl: {
781
+ readonly adapter: typeof Blackhole;
782
+ readonly family: AmmFamily.AlgebraIntegral;
783
+ };
784
+ };
785
+ readonly camelot: {
786
+ readonly v3: {
787
+ readonly adapter: typeof Camelot;
788
+ readonly family: AmmFamily.AlgebraLegacy;
789
+ };
790
+ };
791
+ readonly pancakeswap: {
792
+ readonly v3: {
793
+ readonly adapter: typeof PancakeSwapV3;
794
+ readonly family: AmmFamily.UniswapV3;
795
+ };
796
+ readonly "infinity-cl": {
797
+ readonly adapter: typeof PancakeSwapInfinityCL;
798
+ readonly family: AmmFamily.PancakeSwapInfinityCL;
799
+ };
800
+ };
801
+ };
925
802
  //#endregion
926
- //#region src/amm/adapters/aerodrome/adapter.d.ts
927
- /** Shared Slipstream contract behavior. Generations supply exact deployment bindings. */
928
- export declare abstract class AerodromeSlipstreamAdapter extends AmmAdapter<Address, SlipstreamPoolState, SlipstreamContracts> {
929
- #private;
930
- readonly family = AmmFamily.AerodromeSlipstream;
931
- getPool(address: Address, options?: ReadOptions): Promise<SlipstreamPoolState>;
932
- quote(request: SwapQuoteRequest<Address>, options?: SlipstreamQuoteOptions): Promise<Readonly<{
933
- amountIn: bigint;
934
- amountOut: bigint;
935
- }>>;
936
- getTicks(address: Address, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
937
- getSurroundingTicks(address: Address, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
803
+ //#region src/amm/types.d.ts
804
+ type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | BlackholeVersion | CamelotVersion | PancakeSwapVersion;
805
+ type AdapterFromDefinition<T> = T extends {
806
+ readonly adapter: abstract new (...args: never[]) => infer TAdapter;
807
+ } ? TAdapter : never;
808
+ type RegisteredAmmAdapters = { -readonly [P in keyof typeof ammDefinitions]: { -readonly [V in keyof (typeof ammDefinitions)[P]]: AdapterFromDefinition<(typeof ammDefinitions)[P][V]>; }; };
809
+ /** Protocol versions select concrete adapters; families remain an implementation detail. */
810
+ interface AmmProtocolAdapters extends RegisteredAmmAdapters {}
811
+ type AmmProtocolVersion<TProtocol extends AmmProtocol> = TProtocol extends AmmProtocol ? keyof AmmProtocolAdapters[TProtocol] : never;
812
+ type AmmProtocolAdapter<TProtocol extends AmmProtocol, TVersion> = TProtocol extends AmmProtocol ? TVersion extends keyof AmmProtocolAdapters[TProtocol] ? AmmProtocolAdapters[TProtocol][TVersion] : never : never;
813
+ interface AmmLookupRequest<TProtocol extends AmmProtocol, TVersion extends AmmProtocolVersion<TProtocol> = AmmProtocolVersion<TProtocol>> {
814
+ readonly chainId: number;
815
+ readonly protocol: TProtocol;
816
+ /** May be omitted only when the remaining selectors identify one deployment. */
817
+ readonly version?: TVersion;
818
+ readonly deployment?: AmmDeployment;
938
819
  }
939
- //#endregion
940
- //#region src/amm/adapters/aerodrome/data-adapter.d.ts
941
- /** Dedicated factory-bound endpoints. Indexed addresses still require native pool verification. */
942
- export declare class SlipstreamDataAdapter extends PoolDataAdapter<Address> {
943
- #private;
944
- constructor(definition: DataAdapterDefinition, factory: Address, indexerRequest?: HttpTransport, chainId?: number);
945
- listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<`0x${string}`>>;
820
+ interface SwapQuoteRequest<TPoolRef> {
821
+ readonly pool: TPoolRef;
822
+ readonly inputCurrency: Address;
823
+ readonly outputCurrency: Address;
824
+ readonly amountIn: bigint;
946
825
  }
947
- //#endregion
948
- //#region src/amm/adapters/aerodrome/slipstream.d.ts
949
- export declare class AerodromeSlipstream extends AerodromeSlipstreamAdapter {
950
- readonly protocol = AmmProtocol.Aerodrome;
951
- readonly version = AerodromeVersion.Slipstream;
826
+ interface SwapQuote {
827
+ readonly amountIn: bigint;
828
+ readonly amountOut: bigint;
952
829
  }
953
- //#endregion
954
- //#region src/amm/adapters/aerodrome/slipstream-v2.d.ts
955
- export declare class AerodromeSlipstreamV2 extends AerodromeSlipstreamAdapter {
956
- readonly protocol = AmmProtocol.Aerodrome;
957
- readonly version = AerodromeVersion.SlipstreamV2;
830
+ interface PoolState {
831
+ /** Whether the pool's LP/swap fee mechanism supports changing fees. Not protocol-fee settings. */
832
+ readonly dynamicFee: boolean;
958
833
  }
959
- //#endregion
960
- //#region src/amm/adapters/aerodrome/slipstream-v3.d.ts
961
- export declare class AerodromeSlipstreamV3 extends AerodromeSlipstreamAdapter {
962
- readonly protocol = AmmProtocol.Aerodrome;
963
- readonly version = AerodromeVersion.SlipstreamV3;
834
+ interface ConcentratedPoolState extends PoolState {
835
+ readonly sqrtPriceX96: bigint;
836
+ readonly tick: number;
837
+ readonly liquidity: bigint;
964
838
  }
965
- //#endregion
966
- //#region src/amm/adapters/algebra/types.d.ts
967
- interface AlgebraContracts extends ContractMap {
968
- readonly factory: ContractDeployment;
969
- readonly poolDeployer: ContractDeployment;
970
- readonly quoter: ContractDeployment;
839
+ interface PoolPrice {
840
+ /** Currency1 per whole currency0, as a decimal string. */
841
+ readonly currency0InCurrency1: string;
842
+ /** Currency0 per whole currency1, as a decimal string. */
843
+ readonly currency1InCurrency0: string;
971
844
  }
972
- /** Fields shared by qualified Algebra families; fee and plugin layouts remain family-specific. */
973
- interface AlgebraPoolState extends ConcentratedPoolState {
974
- readonly address: Address;
975
- readonly factory: Address;
976
- readonly token0: Address;
977
- readonly token1: Address;
978
- readonly token0Decimals: number;
979
- readonly token1Decimals: number;
980
- readonly tickSpacing: number;
981
- readonly price: PoolPrice;
982
- readonly balances: {
983
- readonly token0: PoolTokenBalance;
984
- readonly token1: PoolTokenBalance;
985
- };
986
- readonly blockNumber: bigint;
845
+ interface PoolTokenBalance {
846
+ readonly raw: bigint;
847
+ /** Exact decimal amount using the token's decimals, without scientific notation. */
848
+ readonly formatted: string;
987
849
  }
988
- //#endregion
989
- //#region src/amm/adapters/algebra-integral/types.d.ts
990
- /** Base pools accept an address. Custom pool listings carry their verified routing identity. */
991
- type AlgebraPoolReference = Address | {
850
+ interface SlipstreamPoolLookupRequest extends ReadOptions {
851
+ readonly chainId: number;
852
+ readonly family: AmmFamily.AerodromeSlipstream;
992
853
  readonly address: Address;
993
- readonly deployer: Address;
854
+ }
855
+ type SlipstreamPoolsLookupRequest = Omit<SlipstreamPoolLookupRequest, "address"> & {
856
+ readonly addresses: readonly Address[];
994
857
  };
995
- type AlgebraIntegralContracts = AlgebraContracts;
996
- interface AlgebraIntegralPoolState extends AlgebraPoolState {
997
- /** Zero for a base pool; custom deployer for a custom pool. */
998
- readonly deployer: Address;
999
- readonly plugin: Address;
1000
- readonly pluginConfig: number;
1001
- readonly fees: {
1002
- /** Stored pool fee, which can be stale when dynamic fees are enabled. */
1003
- readonly lastFeePips: number;
1004
- readonly lastFeePercent: string;
1005
- /** Share of swap fees allocated to the community, in thousandths. */
1006
- readonly communityFeePermille: number;
1007
- readonly communityFeePercent: string;
1008
- };
858
+ interface V3PoolLookupRequest extends ReadOptions {
859
+ readonly chainId: number;
860
+ readonly family: AmmFamily.UniswapV3;
861
+ readonly address: Address;
1009
862
  }
1010
- //#endregion
1011
- //#region src/amm/adapters/algebra-integral/adapter.d.ts
1012
- /** Integral 1.2-compatible contract behavior, shared by matching protocol deployments. */
1013
- export declare abstract class AlgebraIntegralAdapter extends AmmAdapter<AlgebraPoolReference, AlgebraIntegralPoolState, AlgebraIntegralContracts> {
1014
- #private;
1015
- readonly family = AmmFamily.AlgebraIntegral;
1016
- getPool(reference: AlgebraPoolReference, options?: ReadOptions): Promise<AlgebraIntegralPoolState>;
1017
- getTicks(reference: AlgebraPoolReference, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
1018
- getSurroundingTicks(reference: AlgebraPoolReference, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
1019
- quote(request: SwapQuoteRequest<AlgebraPoolReference>, options?: ReadOptions): Promise<Readonly<{
1020
- amountIn: bigint;
1021
- amountOut: bigint;
1022
- }>>;
863
+ interface V4PoolLookupRequest extends PoolReadOptions {
864
+ readonly chainId: number;
865
+ readonly family: AmmFamily.UniswapV4;
866
+ readonly reference: V4PoolReference;
867
+ readonly poolManager?: Address;
1023
868
  }
1024
- export declare class Blackhole extends AlgebraIntegralAdapter {
1025
- readonly protocol = AmmProtocol.Blackhole;
1026
- readonly version = BlackholeVersion.CL;
869
+ interface AlgebraPoolLookupRequest extends ReadOptions {
870
+ readonly chainId: number;
871
+ readonly family: AmmFamily.AlgebraIntegral;
872
+ readonly reference: AlgebraPoolReference;
1027
873
  }
1028
- export declare class QuickSwapIntegral extends AlgebraIntegralAdapter {
1029
- readonly protocol = AmmProtocol.QuickSwap;
1030
- readonly version = QuickSwapVersion.V4;
874
+ interface AlgebraLegacyPoolLookupRequest extends ReadOptions {
875
+ readonly chainId: number;
876
+ readonly family: AmmFamily.AlgebraLegacy;
877
+ readonly address: Address;
1031
878
  }
1032
- //#endregion
1033
- //#region src/amm/adapters/algebra-integral/data-adapter.d.ts
1034
- export declare class AlgebraIntegralDataAdapter extends PoolDataAdapter<AlgebraPoolReference> {
1035
- #private;
1036
- constructor(definition: DataAdapterDefinition, factory: Address, request?: HttpTransport);
1037
- listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<AlgebraPoolReference>>;
879
+ interface InfinityCLPoolLookupRequest extends PoolReadOptions {
880
+ readonly chainId: number;
881
+ readonly family: AmmFamily.PancakeSwapInfinityCL;
882
+ readonly reference: InfinityCLPoolReference;
883
+ readonly poolManager?: Address;
1038
884
  }
1039
- //#endregion
1040
- //#region src/amm/adapters/algebra-legacy/types.d.ts
1041
- type AlgebraLegacyContracts = AlgebraContracts;
1042
- interface AlgebraSwapFee {
1043
- /** Stored fee, not a guarantee of the fee on the next swap. */
1044
- readonly lastFeePips: number;
1045
- readonly lastFeePercent: string;
885
+ type PoolLookupRequest = SlipstreamPoolLookupRequest | InfinityCLPoolLookupRequest | AlgebraLegacyPoolLookupRequest | V3PoolLookupRequest | V4PoolLookupRequest | AlgebraPoolLookupRequest;
886
+ type V3PoolsLookupRequest = Omit<V3PoolLookupRequest, "address"> & {
887
+ readonly addresses: readonly Address[];
888
+ };
889
+ type AlgebraLegacyPoolsLookupRequest = Omit<AlgebraLegacyPoolLookupRequest, "address"> & {
890
+ readonly addresses: readonly Address[];
891
+ };
892
+ type AlgebraPoolsLookupRequest = Omit<AlgebraPoolLookupRequest, "reference"> & {
893
+ readonly references: readonly AlgebraPoolReference[];
894
+ };
895
+ type V4PoolsLookupRequest = Omit<V4PoolLookupRequest, "reference"> & {
896
+ readonly references: readonly V4PoolReference[];
897
+ };
898
+ type InfinityCLPoolsLookupRequest = Omit<InfinityCLPoolLookupRequest, "reference"> & {
899
+ readonly references: readonly InfinityCLPoolReference[];
900
+ };
901
+ type PoolsLookupRequest = SlipstreamPoolsLookupRequest | V3PoolsLookupRequest | AlgebraLegacyPoolsLookupRequest | AlgebraPoolsLookupRequest | V4PoolsLookupRequest | InfinityCLPoolsLookupRequest;
902
+ /** A verified discovery snapshot paired with the registered AMM used to read it. */
903
+ type DiscoveredPool = (SlipstreamPoolState & {
904
+ readonly amm: AerodromeSlipstreamAdapter;
905
+ }) | (V3PoolState & {
906
+ readonly amm: UniswapV3Adapter;
907
+ }) | (V4PoolState & {
908
+ readonly amm: UniswapV4Adapter;
909
+ }) | (AlgebraIntegralPoolState & {
910
+ readonly amm: AlgebraIntegralAdapter;
911
+ }) | (AlgebraLegacyPoolState & {
912
+ readonly amm: AlgebraLegacyAdapter;
913
+ }) | (InfinityCLPoolState & {
914
+ readonly amm: InfinityCLAdapter;
915
+ });
916
+ type PoolReadResult<TPool> = {
917
+ readonly status: "success";
918
+ readonly pool: TPool;
919
+ } | {
920
+ readonly status: "failure";
921
+ readonly error: Error;
922
+ };
923
+ type PoolBatchReadOptions = PoolReadOptions & {
924
+ readonly allowFailure?: boolean;
925
+ };
926
+ type PoolReadOptions = ReadOptions & DataAdapterRequestOptions;
927
+ interface TickLiquidity {
928
+ readonly tick: number;
929
+ readonly initialized: boolean;
930
+ readonly liquidityGross: bigint;
931
+ readonly liquidityNet: bigint;
1046
932
  }
1047
- interface AlgebraLegacyPoolState extends AlgebraPoolState {
1048
- readonly fees: {
1049
- readonly currency0ToCurrency1: AlgebraSwapFee;
1050
- readonly currency1ToCurrency0: AlgebraSwapFee;
1051
- readonly communityFeeToken0Permille: number;
1052
- readonly communityFeeToken1Permille: number;
1053
- readonly communityFeeToken0Percent: string;
1054
- readonly communityFeeToken1Percent: string;
1055
- };
933
+ /** Mathematical pool state anchored to the tick reads' block. */
934
+ interface TickPoolState extends ConcentratedPoolState {
935
+ readonly tickSpacing: number;
936
+ readonly currency0Decimals: number;
937
+ readonly currency1Decimals: number;
938
+ readonly blockNumber: bigint;
1056
939
  }
1057
- //#endregion
1058
- //#region src/amm/adapters/algebra-legacy/adapter.d.ts
1059
- /** Legacy V1-compatible contract behavior, shared by matching protocol deployments. */
1060
- export declare abstract class AlgebraLegacyAdapter extends AmmAdapter<Address, AlgebraLegacyPoolState, AlgebraLegacyContracts> {
1061
- #private;
1062
- readonly family = AmmFamily.AlgebraLegacy;
1063
- getPool(reference: Address, options?: ReadOptions): Promise<AlgebraLegacyPoolState>;
1064
- getTicks(reference: Address, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
1065
- getSurroundingTicks(reference: Address, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
1066
- quote(request: SwapQuoteRequest<Address>, options?: ReadOptions): Promise<Readonly<{
1067
- amountIn: bigint;
1068
- amountOut: bigint;
1069
- }>>;
1070
- }
1071
- //#endregion
1072
- //#region src/amm/adapters/algebra-legacy/directional.d.ts
1073
- export declare abstract class AlgebraDirectionalAdapter extends AlgebraLegacyAdapter {}
1074
- //#endregion
1075
- //#region src/amm/adapters/algebra-legacy/camelot.d.ts
1076
- export declare class Camelot extends AlgebraDirectionalAdapter {
1077
- readonly protocol = AmmProtocol.Camelot;
1078
- readonly version = CamelotVersion.V3;
1079
- }
1080
- //#endregion
1081
- //#region src/amm/adapters/algebra-legacy/data-adapter.d.ts
1082
- export declare class AlgebraLegacyDataAdapter extends PoolDataAdapter<Address> {
1083
- #private;
1084
- constructor(definition: DataAdapterDefinition, factory: Address, request?: HttpTransport);
1085
- listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<`0x${string}`>>;
1086
- }
1087
- //#endregion
1088
- //#region src/amm/adapters/algebra-legacy/quickswap.d.ts
1089
- export declare class QuickSwap extends AlgebraLegacyAdapter {
1090
- readonly protocol = AmmProtocol.QuickSwap;
1091
- readonly version = QuickSwapVersion.V3;
1092
- }
1093
- //#endregion
1094
- //#region src/amm/adapters/pancakeswap-infinity-cl/types.d.ts
1095
- interface InfinityCLPoolKey {
1096
- readonly currency0: Address;
1097
- readonly currency1: Address;
1098
- readonly hooks: Address;
1099
- readonly poolManager: Address;
1100
- readonly fee: number;
1101
- readonly parameters: Hex;
1102
- }
1103
- interface InfinityCLPoolKeyInput extends Omit<InfinityCLPoolKey, "parameters"> {
1104
- readonly tickSpacing: number;
1105
- readonly hookPermissions?: number;
1106
- }
1107
- interface InfinityCLPoolIdReference {
1108
- readonly poolId: Hex;
940
+ interface PoolTicks {
941
+ readonly pool: TickPoolState;
942
+ readonly ticks: readonly TickLiquidity[];
1109
943
  }
1110
- type InfinityCLPoolReference = InfinityCLPoolKey | InfinityCLPoolIdReference;
1111
- interface InfinityCLSwapQuoteRequest extends SwapQuoteRequest<InfinityCLPoolReference> {
1112
- readonly hookData?: Hex;
944
+ interface TickRange {
945
+ readonly lowerTick: number;
946
+ readonly upperTick: number;
1113
947
  }
1114
- interface InfinityCLDirectionalFees {
1115
- readonly protocolFeePips: number;
1116
- readonly protocolFeePercent: string;
948
+ interface SurroundingTicks extends PoolTicks, TickRange {}
949
+ interface LiquidityInterval extends TickRange {
950
+ readonly liquidityActive: bigint;
951
+ readonly sqrtPriceLowerX96: bigint;
952
+ readonly sqrtPriceUpperX96: bigint;
953
+ readonly lowerPrice: PoolPrice;
954
+ readonly upperPrice: PoolPrice;
1117
955
  }
1118
- interface InfinityCLPoolFees {
1119
- readonly configuredFee: number;
1120
- readonly lpFeePips: number;
1121
- readonly lpFeePercent: string;
1122
- readonly protocolFeePacked: number;
1123
- readonly currency0ToCurrency1: InfinityCLDirectionalFees;
1124
- readonly currency1ToCurrency0: InfinityCLDirectionalFees;
956
+ interface LiquidityDistribution extends TickRange {
957
+ readonly pool: TickPoolState;
958
+ readonly intervals: readonly LiquidityInterval[];
1125
959
  }
1126
- interface InfinityCLPoolState extends ConcentratedPoolState {
1127
- readonly key: InfinityCLPoolKey;
1128
- readonly poolId: Hex;
1129
- readonly poolManager: Address;
1130
- readonly tickSpacing: number;
1131
- readonly currency0Decimals: number;
1132
- readonly currency1Decimals: number;
1133
- readonly currency0IsNative: boolean;
1134
- readonly currency1IsNative: boolean;
1135
- readonly price: PoolPrice;
1136
- readonly fees: InfinityCLPoolFees;
1137
- readonly blockNumber: bigint;
960
+ interface LiquidityDepthRequest {
961
+ /** Decimal currency1 per whole currency0. Fees and hook execution are excluded. */
962
+ readonly fromPrice: string;
963
+ readonly toPrice: string;
1138
964
  }
1139
- interface InfinityCLContracts extends ContractMap {
1140
- readonly poolManager: ContractDeployment;
1141
- readonly vault: ContractDeployment;
1142
- readonly quoter: ContractDeployment;
965
+ interface LiquidityDepth {
966
+ readonly amount0: PoolTokenBalance;
967
+ readonly amount1: PoolTokenBalance;
1143
968
  }
1144
969
  //#endregion
1145
- //#region src/amm/adapters/pancakeswap-infinity-cl/adapter.d.ts
1146
- export declare abstract class InfinityCLAdapter extends AmmAdapter<InfinityCLPoolReference, InfinityCLPoolState, InfinityCLContracts, InfinityCLPoolIdReference> {
1147
- #private;
1148
- readonly family = AmmFamily.PancakeSwapInfinityCL;
1149
- createPoolKey(input: InfinityCLPoolKeyInput): InfinityCLPoolKey;
1150
- getPoolId(key: InfinityCLPoolKey): Hex;
1151
- getPoolKey(id: Hex, options?: ReadOptions): Promise<InfinityCLPoolKey>;
1152
- getPool(reference: InfinityCLPoolReference, options?: ReadOptions): Promise<InfinityCLPoolState>;
1153
- getTicks(reference: InfinityCLPoolReference, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
1154
- getSurroundingTicks(reference: InfinityCLPoolReference, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
1155
- quote(request: InfinityCLSwapQuoteRequest, options?: PoolReadOptions): Promise<Readonly<{
1156
- amountIn: bigint;
1157
- amountOut: bigint;
1158
- }>>;
1159
- }
1160
- export declare class PancakeSwapInfinityCL extends InfinityCLAdapter {
1161
- readonly protocol = AmmProtocol.PancakeSwap;
1162
- readonly version = PancakeSwapVersion.InfinityCL;
970
+ //#region src/amm/adapter.d.ts
971
+ export declare abstract class AmmAdapter<TPoolRef = unknown, TPoolState = unknown, TContracts extends ContractMap = ContractMap, TListedRef extends TPoolRef = TPoolRef> {
972
+ readonly context: ChainContext;
973
+ readonly deployment: DeploymentDefinition<TContracts>;
974
+ readonly dataAdapter: PoolDataAdapter<TListedRef>;
975
+ abstract readonly family: AmmFamily;
976
+ abstract readonly protocol: AmmProtocol;
977
+ abstract readonly version: AmmVersion;
978
+ constructor(context: ChainContext, deployment: DeploymentDefinition<TContracts>, dataAdapter: PoolDataAdapter<TListedRef>);
979
+ get contracts(): TContracts;
980
+ get subgraphUrl(): string | undefined;
981
+ listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<TListedRef>>;
982
+ abstract getTicks(reference: TPoolRef, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
983
+ abstract getSurroundingTicks(reference: TPoolRef, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
984
+ getLiquidityDistribution(reference: TPoolRef, range: TickRange, options?: PoolReadOptions): Promise<LiquidityDistribution>;
985
+ abstract quote(request: SwapQuoteRequest<TPoolRef>, options?: PoolReadOptions): Promise<SwapQuote>;
986
+ abstract getPool(reference: TPoolRef, options?: ReadOptions): Promise<TPoolState>;
987
+ /** Read snapshots at one block, preserving input order and duplicate references. */
988
+ getPools(references: readonly TPoolRef[], options: PoolReadOptions & {
989
+ allowFailure: true;
990
+ }): Promise<readonly PoolReadResult<TPoolState>[]>;
991
+ getPools(references: readonly TPoolRef[], options?: PoolReadOptions & {
992
+ allowFailure?: false;
993
+ }): Promise<readonly TPoolState[]>;
994
+ getPools(references: readonly TPoolRef[], options?: PoolBatchReadOptions): Promise<readonly TPoolState[] | readonly PoolReadResult<TPoolState>[]>;
1163
995
  }
1164
996
  //#endregion
1165
- //#region src/amm/adapters/pancakeswap-infinity-cl/data-adapter.d.ts
1166
- /** Listings return stable IDs; the manager resolves their canonical keys onchain. */
1167
- export declare class PancakeSwapInfinityCLDataAdapter extends PoolDataAdapter<InfinityCLPoolIdReference> {
997
+ //#region src/amm/adapters/pancakeswap-v3/data-adapter.d.ts
998
+ export declare class PancakeSwapV3DataAdapter extends PoolDataAdapter<Address> {
1168
999
  #private;
1169
- constructor(definition: DataAdapterDefinition, manager: Address, indexerRequest?: HttpTransport);
1170
- listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<InfinityCLPoolIdReference>>;
1000
+ constructor(definition: DataAdapterDefinition, factory: Address, indexerRequest?: HttpTransport);
1001
+ listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<`0x${string}`>>;
1171
1002
  }
1172
1003
  //#endregion
1173
- //#region src/amm/adapters/uniswap-v3/types.d.ts
1174
- interface V3PoolFees {
1175
- /** Fixed swap fee in millionths, including any protocol share deducted from it. */
1176
- readonly swapFeePips: number;
1177
- /** Percentage, e.g. "0.05" for 500 pips, without a percent sign. */
1178
- readonly swapFeePercent: string;
1179
- }
1180
- interface V3PoolState extends ConcentratedPoolState {
1181
- readonly address: Address;
1182
- readonly factory: Address;
1183
- readonly token0: Address;
1184
- readonly token1: Address;
1185
- readonly fees: V3PoolFees;
1186
- readonly token0Decimals: number;
1187
- readonly token1Decimals: number;
1188
- /** Actual pool-contract balances, including any fees or donated tokens it holds. */
1189
- readonly balances: {
1190
- readonly token0: PoolTokenBalance;
1191
- readonly token1: PoolTokenBalance;
1192
- };
1193
- /** 36 significant digits, rounded down. Undefined for an uninitialized pool. */
1194
- readonly price: PoolPrice | undefined;
1195
- readonly tickSpacing: number;
1196
- readonly blockNumber: bigint;
1197
- }
1198
- interface V3Contracts extends ContractMap {
1199
- readonly factory: ContractDeployment;
1004
+ //#region src/amm/adapters/uniswap-v3/data-adapter.d.ts
1005
+ export declare class UniswapV3DataAdapter extends PoolDataAdapter<Address> {
1006
+ #private;
1007
+ constructor(definition: DataAdapterDefinition, factory: Address, indexerRequest?: HttpTransport);
1008
+ listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<Address>>;
1200
1009
  }
1201
1010
  //#endregion
1202
- //#region src/amm/adapters/uniswap-v3/base.d.ts
1203
- /** A compatible deployment reuses this class; a behavioral fork may subclass it. */
1204
- export declare abstract class UniswapV3Adapter extends AmmAdapter<Address, V3PoolState, V3Contracts> {
1205
- readonly family = AmmFamily.UniswapV3;
1206
- }
1011
+ //#region src/amm/ticks/distribution.d.ts
1012
+ /** Reconstruct intervals from the stored current tick, including its exact boundary-side semantics. */
1013
+ export declare function buildLiquidityDistribution(window: SurroundingTicks): LiquidityDistribution;
1014
+ /** Fee-free geometric depth. Does not simulate swaps or hooks; amounts round down per interval. */
1015
+ export declare function calculateLiquidityDepth(distribution: LiquidityDistribution, request: LiquidityDepthRequest): LiquidityDepth;
1207
1016
  //#endregion
1208
- //#region src/amm/adapters/uniswap-v3/adapter.d.ts
1209
- /** Standard V3 reads and quoting reused by compatible protocol subclasses. */
1210
- export declare abstract class RpcUniswapV3Adapter extends UniswapV3Adapter {
1211
- #private;
1212
- getTicks(reference: Address, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
1213
- getSurroundingTicks(reference: Address, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
1214
- getPool(address: Address, options?: ReadOptions): Promise<V3PoolState>;
1215
- quote(request: SwapQuoteRequest<Address>, options?: ReadOptions): Promise<{
1216
- amountIn: bigint;
1217
- amountOut: bigint;
1017
+ //#region src/contracts/apechain.d.ts
1018
+ export declare const apechainContracts: Readonly<{
1019
+ BundleRegistry: Readonly<{
1020
+ address: "0x245194Ed39516431FF511A74c7B6Df4cb4b5F1F3";
1021
+ startBlock: 643298n;
1218
1022
  }>;
1219
- }
1220
- export declare class UniswapV3 extends RpcUniswapV3Adapter {
1221
- readonly protocol = AmmProtocol.Uniswap;
1222
- readonly version = UniswapVersion.V3;
1223
- }
1224
- //#endregion
1225
- //#region src/amm/adapters/pancakeswap-v3/adapter.d.ts
1226
- /** Pancake V3 uses the V3 family with a wider slot0 protocol-fee field. */
1227
- export declare class PancakeSwapV3 extends RpcUniswapV3Adapter {
1228
- readonly protocol = AmmProtocol.PancakeSwap;
1229
- readonly version = PancakeSwapVersion.V3;
1230
- }
1023
+ CamelotMultiPositionLiquidityManager: Readonly<{
1024
+ address: "0x116Dba5DcE9CcDA828218b7eB46406810632014C";
1025
+ startBlock: 643002n;
1026
+ }>;
1027
+ GasVault: Readonly<{
1028
+ address: "0xC1Ecd10398A6D7036CceE1f50551ff169715081c";
1029
+ startBlock: 643030n;
1030
+ }>;
1031
+ SteerPeriphery: Readonly<{
1032
+ address: "0xd5532a58E4ABB6485FF4e7BCf5bED278e32A516e";
1033
+ startBlock: 643272n;
1034
+ }>;
1035
+ StrategyRegistry: Readonly<{
1036
+ address: "0xF4de4180829272ae5f69AcAcf820f4F7d547513b";
1037
+ startBlock: 642937n;
1038
+ }>;
1039
+ VaultRegistry: Readonly<{
1040
+ address: "0x38a07152ee64C7067fEeBA904D72ABc9a9DA0C77";
1041
+ startBlock: 642981n;
1042
+ }>;
1043
+ KeeperRegistry: Readonly<{
1044
+ address: "0x1A7e75715d157736103eC429Ff7079994D907472";
1045
+ startBlock: 642883n;
1046
+ }>;
1047
+ Orchestrator: Readonly<{
1048
+ address: "0x317EEDB54711681056f37e10d5DE0B55455b476f";
1049
+ startBlock: 642917n;
1050
+ }>;
1051
+ FeeManager: Readonly<{
1052
+ address: "0xd47CE509bE01e62cd4629E2f1eb22BA04e7dA192";
1053
+ }>;
1054
+ }>;
1231
1055
  //#endregion
1232
- //#region src/amm/adapters/retro-v3/adapter.d.ts
1233
- export declare class RetroV3 extends RpcUniswapV3Adapter {
1234
- readonly protocol = AmmProtocol.Retro;
1235
- readonly version = RetroVersion.V3;
1236
- }
1056
+ //#region src/contracts/arbitrum.d.ts
1057
+ export declare const arbitrumContracts: Readonly<{
1058
+ BundleRegistry: Readonly<{
1059
+ address: "0x279228AAfd13Bb4642ABB772a248c78555DC39c4";
1060
+ startBlock: 88699181n;
1061
+ }>;
1062
+ CamelotMultiPositionLiquidityManager: Readonly<{
1063
+ address: "0xa2C286BD8E5d2cBA08674ACD202b37d9F922026f";
1064
+ startBlock: 151369116n;
1065
+ }>;
1066
+ GasVault: Readonly<{
1067
+ address: "0x16BA7102271dC83Fff2f709691c2B601DAD7668e";
1068
+ startBlock: 88699087n;
1069
+ }>;
1070
+ SteerPeriphery: Readonly<{
1071
+ address: "0x806c2240793b3738000fcb62C66BF462764B903F";
1072
+ startBlock: 88699141n;
1073
+ }>;
1074
+ StrategyRegistry: Readonly<{
1075
+ address: "0xd964811233b8A0185D3C93664df82136C80d1bb2";
1076
+ startBlock: 88698868n;
1077
+ }>;
1078
+ VaultRegistry: Readonly<{
1079
+ address: "0x9f5b097AD23e2CF4F34e502A3E41D941678877Dc";
1080
+ startBlock: 88698956n;
1081
+ }>;
1082
+ KeeperRegistry: Readonly<{
1083
+ address: "0x8fB2Cd40046b08F155d06C3A31b69C1Bd2C971e2";
1084
+ startBlock: 88698828n;
1085
+ }>;
1086
+ Orchestrator: Readonly<{
1087
+ address: "0x38a07152ee64C7067fEeBA904D72ABc9a9DA0C77";
1088
+ startBlock: 88698903n;
1089
+ }>;
1090
+ Helper: Readonly<{
1091
+ address: "0xd1b49Bb21d2c2638CFDdf4B2dC8dbC61DCBCe0ee";
1092
+ startBlock: 367658396n;
1093
+ }>;
1094
+ SingleAssetDeposit: Readonly<{
1095
+ address: "0x122126e397677cfd6476c531416b7cbec74c06c8";
1096
+ startBlock: 367649306n;
1097
+ }>;
1098
+ PoolHelper: Readonly<{
1099
+ address: "0x657bB5fD00e6D6BdA438988DcaF5B62Ef16F6163";
1100
+ startBlock: 256472779n;
1101
+ }>;
1102
+ }>;
1237
1103
  //#endregion
1238
- //#region src/amm/adapters/sushiswap-v3/adapter.d.ts
1239
- export declare class SushiSwapV3 extends RpcUniswapV3Adapter {
1240
- readonly protocol = AmmProtocol.SushiSwap;
1241
- readonly version = SushiSwapVersion.V3;
1242
- }
1104
+ //#region src/contracts/arc.d.ts
1105
+ export declare const arcContracts: Readonly<{
1106
+ KeeperRegistry: Readonly<{
1107
+ address: "0xE463a4A82881EF599fe8310f23ba8766Dcc448A3";
1108
+ startBlock: 21326564n;
1109
+ }>;
1110
+ Orchestrator: Readonly<{
1111
+ address: "0x8725f2f77508EDd583C6f3840F88Db6A2d0Cf009";
1112
+ startBlock: 21326605n;
1113
+ }>;
1114
+ StrategyRegistry: Readonly<{
1115
+ address: "0x08857cb7B2a481DB85984E32BdC03e95c0662eb6";
1116
+ startBlock: 21326585n;
1117
+ }>;
1118
+ VaultRegistry: Readonly<{
1119
+ address: "0x52Db9bcb9EFdBAaa8E1D2326E0b69c57Bf14c333";
1120
+ startBlock: 21326644n;
1121
+ }>;
1122
+ BundleRegistry: Readonly<{
1123
+ address: "0x6511080422911D210681f5618DBd50DEC3e954de";
1124
+ startBlock: 21326748n;
1125
+ }>;
1126
+ GasVault: Readonly<{
1127
+ address: "0x0a271fc23BA4c6A4a668E7Ceef9aDE60C59f5Ec5";
1128
+ startBlock: 21326697n;
1129
+ }>;
1130
+ WhitelistRegistry: Readonly<{
1131
+ address: "0x20B895F7C02e754AdC461e80b39a9e85f02e2bE3";
1132
+ startBlock: 21326621n;
1133
+ }>;
1134
+ SteerPeriphery: Readonly<{
1135
+ address: "0x3e2135a491CD90Ed1e7313Bd8Efd51aba8018F69";
1136
+ startBlock: 21326728n;
1137
+ }>;
1138
+ StakingRewards: Readonly<{
1139
+ address: "0xfdC6A32f2622be7Bf1481BFAC8bC6e35C42fD665";
1140
+ startBlock: 21326676n;
1141
+ }>;
1142
+ Helper: Readonly<{
1143
+ address: "0xCD31EbF762A5d1F88399E692316903767DA06Cf9";
1144
+ startBlock: 21326630n;
1145
+ }>;
1146
+ FeeManager: Readonly<{
1147
+ address: "0x83966243D6055b1A1157f800cBC9f5084162b871";
1148
+ startBlock: 21326767n;
1149
+ }>;
1150
+ }>;
1243
1151
  //#endregion
1244
- //#region src/amm/adapters/uniswap-v4/data-adapter.d.ts
1245
- /** Data providers for the V4 family return complete keys and resolve IDs. */
1246
- export declare abstract class V4PoolDataAdapter extends PoolDataAdapter<V4PoolKey> {
1247
- abstract getPoolKey(id: Hex, options?: V4ReadOptions): Promise<V4PoolKey>;
1248
- }
1249
- /** Indexed references carry full keys; every onchain use still validates the configured manager. */
1250
- export declare class UniswapV4DataAdapter extends V4PoolDataAdapter {
1251
- #private;
1252
- constructor(definition: DataAdapterDefinition, manager: Address, context: ChainContext);
1253
- listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<V4PoolKey>>;
1254
- getPoolKey(id: Hex, options?: V4ReadOptions): Promise<V4PoolKey>;
1255
- }
1152
+ //#region src/contracts/astar.d.ts
1153
+ export declare const astarContracts: Readonly<{
1154
+ BundleRegistry: Readonly<{
1155
+ address: "0x7Daa68204232a78dBF1Dd853a4018330EE934A39";
1156
+ startBlock: 5466115n;
1157
+ }>;
1158
+ GasVault: Readonly<{
1159
+ address: "0xe1C56f99a459ED47B629F3D818BcC84826bCed66";
1160
+ startBlock: 5465971n;
1161
+ }>;
1162
+ SteerPeriphery: Readonly<{
1163
+ address: "0x1afD31627170607657224eD4aE701470209C4B2e";
1164
+ startBlock: 5466109n;
1165
+ }>;
1166
+ StrategyRegistry: Readonly<{
1167
+ address: "0x2822eE30383EAbCBA817Ab4A7a592F4a194e14b5";
1168
+ startBlock: 5465955n;
1169
+ }>;
1170
+ VaultRegistry: Readonly<{
1171
+ address: "0x9f5b097AD23e2CF4F34e502A3E41D941678877Dc";
1172
+ startBlock: 5465965n;
1173
+ }>;
1174
+ KeeperRegistry: Readonly<{
1175
+ address: "0x925C4454820b2b88c2f70F2621E6890b451266Dd";
1176
+ startBlock: 5465944n;
1177
+ }>;
1178
+ Orchestrator: Readonly<{
1179
+ address: "0x09eb271b444d1db7163c8555919dE85b20Be7D1d";
1180
+ startBlock: 5465950n;
1181
+ }>;
1182
+ }>;
1256
1183
  //#endregion
1257
- //#region src/amm/adapters/uniswap-v4/adapter.d.ts
1258
- /** Standard manager-based V4 reads and quotes, reusable by compatible deployments. */
1259
- export declare abstract class UniswapV4Adapter extends AmmAdapter<V4PoolReference, V4PoolState, V4Contracts, V4PoolKey> {
1260
- #private;
1261
- readonly dataAdapter: V4PoolDataAdapter;
1262
- readonly family = AmmFamily.UniswapV4;
1263
- constructor(context: ChainContext, deployment: DeploymentDefinition<V4Contracts>, dataAdapter: V4PoolDataAdapter);
1264
- getPoolId(key: V4PoolKey): Hex;
1265
- getPoolKey(id: Hex, options?: V4ReadOptions): Promise<V4PoolKey>;
1266
- getTicks(reference: V4PoolReference, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
1267
- getSurroundingTicks(reference: V4PoolReference, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
1268
- getPool(reference: V4PoolReference, options?: V4ReadOptions): Promise<V4PoolState>;
1269
- quote(request: V4SwapQuoteRequest, options?: V4ReadOptions): Promise<SwapQuote>;
1270
- }
1271
- /** Uniswap deployments reuse the family implementation unchanged. */
1272
- export declare class UniswapV4 extends UniswapV4Adapter {
1273
- readonly protocol = AmmProtocol.Uniswap;
1274
- readonly version = UniswapVersion.V4;
1275
- }
1184
+ //#region src/contracts/astarzkevm.d.ts
1185
+ export declare const astarZkEvmContracts: Readonly<{
1186
+ BundleRegistry: Readonly<{
1187
+ address: "0xD40699A642172DeD33BCFe4E3F84D54610C757Cd";
1188
+ startBlock: 215291n;
1189
+ }>;
1190
+ GasVault: Readonly<{
1191
+ address: "0xC1Ecd10398A6D7036CceE1f50551ff169715081c";
1192
+ startBlock: 215237n;
1193
+ }>;
1194
+ SteerPeriphery: Readonly<{
1195
+ address: "0x37Cff062D52Dd6E9E39Df619CCd30c037a36bB83";
1196
+ startBlock: 215281n;
1197
+ }>;
1198
+ StrategyRegistry: Readonly<{
1199
+ address: "0x09eb271b444d1db7163c8555919dE85b20Be7D1d";
1200
+ startBlock: 210939n;
1201
+ }>;
1202
+ VaultRegistry: Readonly<{
1203
+ address: "0xa1Dd21fbd9e1F0BF28d41F18bDC22326e50C02e9";
1204
+ startBlock: 210954n;
1205
+ }>;
1206
+ KeeperRegistry: Readonly<{
1207
+ address: "0x99eca0E5Db125900E3a0389F6D3503837e99F59b";
1208
+ startBlock: 210922n;
1209
+ }>;
1210
+ Orchestrator: Readonly<{
1211
+ address: "0xF4de4180829272ae5f69AcAcf820f4F7d547513b";
1212
+ startBlock: 210932n;
1213
+ }>;
1214
+ }>;
1276
1215
  //#endregion
1277
- //#region src/amm/adapters/uniswap-v4/errors.d.ts
1278
- /** A verified absent key, rather than a failed provider or indexer request. */
1279
- export declare class V4PoolKeyNotFoundError extends Error {
1280
- constructor(message?: string);
1281
- }
1216
+ //#region src/contracts/avalanche.d.ts
1217
+ export declare const avalancheContracts: Readonly<{
1218
+ KeeperRegistry: Readonly<{
1219
+ address: "0x925C4454820b2b88c2f70F2621E6890b451266Dd";
1220
+ startBlock: 30433379n;
1221
+ }>;
1222
+ Orchestrator: Readonly<{
1223
+ address: "0x38a07152ee64C7067fEeBA904D72ABc9a9DA0C77";
1224
+ startBlock: 30433780n;
1225
+ }>;
1226
+ StrategyRegistry: Readonly<{
1227
+ address: "0x09eb271b444d1db7163c8555919dE85b20Be7D1d";
1228
+ startBlock: 30433735n;
1229
+ }>;
1230
+ VaultRegistry: Readonly<{
1231
+ address: "0x9f5b097AD23e2CF4F34e502A3E41D941678877Dc";
1232
+ startBlock: 30434642n;
1233
+ }>;
1234
+ BundleRegistry: Readonly<{
1235
+ address: "0x87A37bEEcE2918A342F95773Bea7cAA6823c6DC3";
1236
+ startBlock: 30435305n;
1237
+ }>;
1238
+ DynamicJobs: Readonly<{
1239
+ address: "0x7c464A0AB1f5ebf3E2dCccfec7EF41D02ED7a2f4";
1240
+ startBlock: 30435322n;
1241
+ }>;
1242
+ GasVault: Readonly<{
1243
+ address: "0xcA19bEc25A41443F35EeAE03411Dce87D8c0Edc4";
1244
+ startBlock: 30434925n;
1245
+ }>;
1246
+ WhitelistRegistry: Readonly<{
1247
+ address: "0xa1Dd21fbd9e1F0BF28d41F18bDC22326e50C02e9";
1248
+ startBlock: 30434591n;
1249
+ }>;
1250
+ SteerPeriphery: Readonly<{
1251
+ address: "0x5D8249e3F5f702e1Fd720167b40424fc2daDCd1e";
1252
+ startBlock: 30435289n;
1253
+ }>;
1254
+ FeeManager: Readonly<{
1255
+ address: "0x391cf3047db983caB8dD95B16c4e6C3918d72d23";
1256
+ }>;
1257
+ }>;
1282
1258
  //#endregion
1283
- //#region src/amm/types.d.ts
1284
- type AmmVersion = AerodromeVersion | SushiSwapVersion | RetroVersion | UniswapVersion | QuickSwapVersion | BlackholeVersion | CamelotVersion | PancakeSwapVersion;
1285
- /** Protocol versions select concrete adapters; families remain an implementation detail. */
1286
- interface AmmProtocolAdapters {
1287
- [AmmProtocol.Blackhole]: {
1288
- [BlackholeVersion.CL]: Blackhole;
1289
- };
1290
- [AmmProtocol.Aerodrome]: {
1291
- [AerodromeVersion.Slipstream]: AerodromeSlipstream;
1292
- [AerodromeVersion.SlipstreamV2]: AerodromeSlipstreamV2;
1293
- [AerodromeVersion.SlipstreamV3]: AerodromeSlipstreamV3;
1294
- };
1295
- [AmmProtocol.SushiSwap]: {
1296
- [SushiSwapVersion.V3]: SushiSwapV3;
1297
- };
1298
- [AmmProtocol.Retro]: {
1299
- [RetroVersion.V3]: RetroV3;
1300
- };
1301
- [AmmProtocol.Uniswap]: {
1302
- [UniswapVersion.V3]: UniswapV3;
1303
- [UniswapVersion.V4]: UniswapV4;
1304
- };
1305
- [AmmProtocol.QuickSwap]: {
1306
- [QuickSwapVersion.V3]: QuickSwap;
1307
- [QuickSwapVersion.V4]: QuickSwapIntegral;
1308
- };
1309
- [AmmProtocol.Camelot]: {
1310
- [CamelotVersion.V3]: Camelot;
1311
- };
1312
- [AmmProtocol.PancakeSwap]: {
1313
- [PancakeSwapVersion.V3]: PancakeSwapV3;
1314
- [PancakeSwapVersion.InfinityCL]: PancakeSwapInfinityCL;
1315
- };
1316
- }
1317
- type AmmProtocolVersion<TProtocol extends AmmProtocol> = TProtocol extends AmmProtocol ? keyof AmmProtocolAdapters[TProtocol] : never;
1318
- type AmmProtocolAdapter<TProtocol extends AmmProtocol, TVersion> = TProtocol extends AmmProtocol ? TVersion extends keyof AmmProtocolAdapters[TProtocol] ? AmmProtocolAdapters[TProtocol][TVersion] : never : never;
1319
- interface AmmLookupRequest<TProtocol extends AmmProtocol, TVersion extends AmmProtocolVersion<TProtocol> = AmmProtocolVersion<TProtocol>> {
1320
- readonly chainId: number;
1321
- readonly protocol: TProtocol;
1322
- /** May be omitted only when the remaining selectors identify one deployment. */
1323
- readonly version?: TVersion;
1324
- readonly deployment?: AmmDeployment;
1325
- }
1326
- interface SwapQuoteRequest<TPoolRef> {
1327
- readonly pool: TPoolRef;
1328
- readonly inputCurrency: Address;
1329
- readonly outputCurrency: Address;
1330
- readonly amountIn: bigint;
1331
- }
1332
- interface SwapQuote {
1333
- readonly amountIn: bigint;
1334
- readonly amountOut: bigint;
1335
- }
1336
- interface PoolState {
1337
- /** Whether the pool's LP/swap fee mechanism supports changing fees. Not protocol-fee settings. */
1338
- readonly dynamicFee: boolean;
1339
- }
1340
- interface ConcentratedPoolState extends PoolState {
1341
- readonly sqrtPriceX96: bigint;
1342
- readonly tick: number;
1343
- readonly liquidity: bigint;
1344
- }
1345
- interface PoolPrice {
1346
- /** Currency1 per whole currency0, as a decimal string. */
1347
- readonly currency0InCurrency1: string;
1348
- /** Currency0 per whole currency1, as a decimal string. */
1349
- readonly currency1InCurrency0: string;
1350
- }
1351
- interface PoolTokenBalance {
1352
- readonly raw: bigint;
1353
- /** Exact decimal amount using the token's decimals, without scientific notation. */
1354
- readonly formatted: string;
1355
- }
1356
- interface SlipstreamPoolLookupRequest extends ReadOptions {
1357
- readonly chainId: number;
1358
- readonly family: AmmFamily.AerodromeSlipstream;
1359
- readonly address: Address;
1360
- }
1361
- type SlipstreamPoolsLookupRequest = Omit<SlipstreamPoolLookupRequest, "address"> & {
1362
- readonly addresses: readonly Address[];
1363
- };
1364
- interface V3PoolLookupRequest extends ReadOptions {
1365
- readonly chainId: number;
1366
- readonly family: AmmFamily.UniswapV3;
1367
- readonly address: Address;
1368
- }
1369
- interface V4PoolLookupRequest extends PoolReadOptions {
1370
- readonly chainId: number;
1371
- readonly family: AmmFamily.UniswapV4;
1372
- readonly reference: V4PoolReference;
1373
- readonly poolManager?: Address;
1374
- }
1375
- interface AlgebraPoolLookupRequest extends ReadOptions {
1376
- readonly chainId: number;
1377
- readonly family: AmmFamily.AlgebraIntegral;
1378
- readonly reference: AlgebraPoolReference;
1379
- }
1380
- interface AlgebraLegacyPoolLookupRequest extends ReadOptions {
1381
- readonly chainId: number;
1382
- readonly family: AmmFamily.AlgebraLegacy;
1383
- readonly address: Address;
1384
- }
1385
- interface InfinityCLPoolLookupRequest extends PoolReadOptions {
1386
- readonly chainId: number;
1387
- readonly family: AmmFamily.PancakeSwapInfinityCL;
1388
- readonly reference: InfinityCLPoolReference;
1389
- readonly poolManager?: Address;
1390
- }
1391
- type PoolLookupRequest = SlipstreamPoolLookupRequest | InfinityCLPoolLookupRequest | AlgebraLegacyPoolLookupRequest | V3PoolLookupRequest | V4PoolLookupRequest | AlgebraPoolLookupRequest;
1392
- type V3PoolsLookupRequest = Omit<V3PoolLookupRequest, "address"> & {
1393
- readonly addresses: readonly Address[];
1394
- };
1395
- type AlgebraLegacyPoolsLookupRequest = Omit<AlgebraLegacyPoolLookupRequest, "address"> & {
1396
- readonly addresses: readonly Address[];
1397
- };
1398
- type AlgebraPoolsLookupRequest = Omit<AlgebraPoolLookupRequest, "reference"> & {
1399
- readonly references: readonly AlgebraPoolReference[];
1400
- };
1401
- type V4PoolsLookupRequest = Omit<V4PoolLookupRequest, "reference"> & {
1402
- readonly references: readonly V4PoolReference[];
1403
- };
1404
- type InfinityCLPoolsLookupRequest = Omit<InfinityCLPoolLookupRequest, "reference"> & {
1405
- readonly references: readonly InfinityCLPoolReference[];
1406
- };
1407
- type PoolsLookupRequest = SlipstreamPoolsLookupRequest | V3PoolsLookupRequest | AlgebraLegacyPoolsLookupRequest | AlgebraPoolsLookupRequest | V4PoolsLookupRequest | InfinityCLPoolsLookupRequest;
1408
- /** A verified discovery snapshot paired with the registered AMM used to read it. */
1409
- type DiscoveredPool = (SlipstreamPoolState & {
1410
- readonly amm: AerodromeSlipstreamAdapter;
1411
- }) | (V3PoolState & {
1412
- readonly amm: UniswapV3Adapter;
1413
- }) | (V4PoolState & {
1414
- readonly amm: UniswapV4Adapter;
1415
- }) | (AlgebraIntegralPoolState & {
1416
- readonly amm: AlgebraIntegralAdapter;
1417
- }) | (AlgebraLegacyPoolState & {
1418
- readonly amm: AlgebraLegacyAdapter;
1419
- }) | (InfinityCLPoolState & {
1420
- readonly amm: InfinityCLAdapter;
1421
- });
1422
- type PoolReadResult<TPool> = {
1423
- readonly status: "success";
1424
- readonly pool: TPool;
1425
- } | {
1426
- readonly status: "failure";
1427
- readonly error: Error;
1428
- };
1429
- type PoolBatchReadOptions = PoolReadOptions & {
1430
- readonly allowFailure?: boolean;
1431
- };
1432
- type PoolReadOptions = ReadOptions & DataAdapterRequestOptions;
1433
- interface TickLiquidity {
1434
- readonly tick: number;
1435
- readonly initialized: boolean;
1436
- readonly liquidityGross: bigint;
1437
- readonly liquidityNet: bigint;
1438
- }
1439
- /** Mathematical pool state anchored to the tick reads' block. */
1440
- interface TickPoolState extends ConcentratedPoolState {
1441
- readonly tickSpacing: number;
1442
- readonly currency0Decimals: number;
1443
- readonly currency1Decimals: number;
1444
- readonly blockNumber: bigint;
1445
- }
1446
- interface PoolTicks {
1447
- readonly pool: TickPoolState;
1448
- readonly ticks: readonly TickLiquidity[];
1449
- }
1450
- interface TickRange {
1451
- readonly lowerTick: number;
1452
- readonly upperTick: number;
1453
- }
1454
- interface SurroundingTicks extends PoolTicks, TickRange {}
1455
- interface LiquidityInterval extends TickRange {
1456
- readonly liquidityActive: bigint;
1457
- readonly sqrtPriceLowerX96: bigint;
1458
- readonly sqrtPriceUpperX96: bigint;
1459
- readonly lowerPrice: PoolPrice;
1460
- readonly upperPrice: PoolPrice;
1461
- }
1462
- interface LiquidityDistribution extends TickRange {
1463
- readonly pool: TickPoolState;
1464
- readonly intervals: readonly LiquidityInterval[];
1465
- }
1466
- interface LiquidityDepthRequest {
1467
- /** Decimal currency1 per whole currency0. Fees and hook execution are excluded. */
1468
- readonly fromPrice: string;
1469
- readonly toPrice: string;
1470
- }
1471
- interface LiquidityDepth {
1472
- readonly amount0: PoolTokenBalance;
1473
- readonly amount1: PoolTokenBalance;
1474
- }
1475
- //#endregion
1476
- //#region src/amm/adapter.d.ts
1477
- export declare abstract class AmmAdapter<TPoolRef = unknown, TPoolState = unknown, TContracts extends ContractMap = ContractMap, TListedRef extends TPoolRef = TPoolRef> {
1478
- readonly context: ChainContext;
1479
- readonly deployment: DeploymentDefinition<TContracts>;
1480
- readonly dataAdapter: PoolDataAdapter<TListedRef>;
1481
- abstract readonly family: AmmFamily;
1482
- abstract readonly protocol: AmmProtocol;
1483
- abstract readonly version: AmmVersion;
1484
- constructor(context: ChainContext, deployment: DeploymentDefinition<TContracts>, dataAdapter: PoolDataAdapter<TListedRef>);
1485
- get contracts(): TContracts;
1486
- get subgraphUrl(): string | undefined;
1487
- listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<TListedRef>>;
1488
- abstract getTicks(reference: TPoolRef, ticks: readonly number[], options?: PoolReadOptions): Promise<PoolTicks>;
1489
- abstract getSurroundingTicks(reference: TPoolRef, range: TickRange, options?: PoolReadOptions): Promise<SurroundingTicks>;
1490
- getLiquidityDistribution(reference: TPoolRef, range: TickRange, options?: PoolReadOptions): Promise<LiquidityDistribution>;
1491
- abstract quote(request: SwapQuoteRequest<TPoolRef>, options?: PoolReadOptions): Promise<SwapQuote>;
1492
- abstract getPool(reference: TPoolRef, options?: ReadOptions): Promise<TPoolState>;
1493
- /** Read snapshots at one block, preserving input order and duplicate references. */
1494
- getPools(references: readonly TPoolRef[], options: PoolReadOptions & {
1495
- allowFailure: true;
1496
- }): Promise<readonly PoolReadResult<TPoolState>[]>;
1497
- getPools(references: readonly TPoolRef[], options?: PoolReadOptions & {
1498
- allowFailure?: false;
1499
- }): Promise<readonly TPoolState[]>;
1500
- getPools(references: readonly TPoolRef[], options?: PoolBatchReadOptions): Promise<readonly TPoolState[] | readonly PoolReadResult<TPoolState>[]>;
1501
- }
1502
- //#endregion
1503
- //#region src/amm/adapters/pancakeswap-v3/data-adapter.d.ts
1504
- export declare class PancakeSwapV3DataAdapter extends PoolDataAdapter<Address> {
1505
- #private;
1506
- constructor(definition: DataAdapterDefinition, factory: Address, indexerRequest?: HttpTransport);
1507
- listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<`0x${string}`>>;
1508
- }
1509
- //#endregion
1510
- //#region src/amm/ticks/distribution.d.ts
1511
- /** Reconstruct intervals from the stored current tick, including its exact boundary-side semantics. */
1512
- export declare function buildLiquidityDistribution(window: SurroundingTicks): LiquidityDistribution;
1513
- /** Fee-free geometric depth. Does not simulate swaps or hooks; amounts round down per interval. */
1514
- export declare function calculateLiquidityDepth(distribution: LiquidityDistribution, request: LiquidityDepthRequest): LiquidityDepth;
1515
- //#endregion
1516
- //#region src/contracts/apechain.d.ts
1517
- export declare const apechainContracts: Readonly<{
1259
+ //#region src/contracts/base.d.ts
1260
+ export declare const baseContracts: Readonly<{
1518
1261
  BundleRegistry: Readonly<{
1519
- address: "0x245194Ed39516431FF511A74c7B6Df4cb4b5F1F3";
1520
- startBlock: 643298n;
1521
- }>;
1522
- CamelotMultiPositionLiquidityManager: Readonly<{
1523
- address: "0x116Dba5DcE9CcDA828218b7eB46406810632014C";
1524
- startBlock: 643002n;
1262
+ address: "0x806c2240793b3738000fcb62C66BF462764B903F";
1263
+ startBlock: 2092242n;
1525
1264
  }>;
1526
1265
  GasVault: Readonly<{
1527
- address: "0xC1Ecd10398A6D7036CceE1f50551ff169715081c";
1528
- startBlock: 643030n;
1266
+ address: "0x3B41454CB7858B6D0535e61bAe9362AF0151Cc2d";
1267
+ startBlock: 2092217n;
1529
1268
  }>;
1530
1269
  SteerPeriphery: Readonly<{
1531
- address: "0xd5532a58E4ABB6485FF4e7BCf5bED278e32A516e";
1532
- startBlock: 643272n;
1270
+ address: "0x16BA7102271dC83Fff2f709691c2B601DAD7668e";
1271
+ startBlock: 2092232n;
1533
1272
  }>;
1534
1273
  StrategyRegistry: Readonly<{
1535
- address: "0xF4de4180829272ae5f69AcAcf820f4F7d547513b";
1536
- startBlock: 642937n;
1274
+ address: "0x317EEDB54711681056f37e10d5DE0B55455b476f";
1275
+ startBlock: 2092162n;
1537
1276
  }>;
1538
1277
  VaultRegistry: Readonly<{
1539
- address: "0x38a07152ee64C7067fEeBA904D72ABc9a9DA0C77";
1540
- startBlock: 642981n;
1278
+ address: "0x2822eE30383EAbCBA817Ab4A7a592F4a194e14b5";
1279
+ startBlock: 2092181n;
1541
1280
  }>;
1542
1281
  KeeperRegistry: Readonly<{
1543
1282
  address: "0x1A7e75715d157736103eC429Ff7079994D907472";
1544
- startBlock: 642883n;
1283
+ startBlock: 2092152n;
1545
1284
  }>;
1546
1285
  Orchestrator: Readonly<{
1547
- address: "0x317EEDB54711681056f37e10d5DE0B55455b476f";
1548
- startBlock: 642917n;
1286
+ address: "0x8fB2Cd40046b08F155d06C3A31b69C1Bd2C971e2";
1287
+ startBlock: 2092171n;
1288
+ }>;
1289
+ Helper: Readonly<{
1290
+ address: "0xa98376572375692455172f6750C67339667974fe";
1291
+ startBlock: 17910406n;
1292
+ }>;
1293
+ SingleAssetDeposit: Readonly<{
1294
+ address: "0x588B34D2a9598497f481A9d31B4eD372C6135f32";
1295
+ startBlock: 48700149n;
1296
+ }>;
1297
+ PoolHelper: Readonly<{
1298
+ address: "0x603823Ad53c1C7D402c5A20CD1B05488Dafc2646";
1299
+ startBlock: 20147258n;
1549
1300
  }>;
1550
1301
  FeeManager: Readonly<{
1551
- address: "0xd47CE509bE01e62cd4629E2f1eb22BA04e7dA192";
1302
+ address: "0xac4D51669B80D09d8Cc5EeFF50026c4d1D3290e6";
1552
1303
  }>;
1553
1304
  }>;
1554
1305
  //#endregion
1555
- //#region src/contracts/arbitrum.d.ts
1556
- export declare const arbitrumContracts: Readonly<{
1306
+ //#region src/contracts/bera.d.ts
1307
+ export declare const beraContracts: Readonly<{
1557
1308
  BundleRegistry: Readonly<{
1558
- address: "0x279228AAfd13Bb4642ABB772a248c78555DC39c4";
1559
- startBlock: 88699181n;
1560
- }>;
1561
- CamelotMultiPositionLiquidityManager: Readonly<{
1562
- address: "0xa2C286BD8E5d2cBA08674ACD202b37d9F922026f";
1563
- startBlock: 151369116n;
1309
+ address: "0x6d5A04974ba2CdC3E307135fE5886b8c7C499e9A";
1310
+ startBlock: 785307n;
1564
1311
  }>;
1565
1312
  GasVault: Readonly<{
1566
- address: "0x16BA7102271dC83Fff2f709691c2B601DAD7668e";
1567
- startBlock: 88699087n;
1568
- }>;
1569
- SteerPeriphery: Readonly<{
1570
- address: "0x806c2240793b3738000fcb62C66BF462764B903F";
1571
- startBlock: 88699141n;
1572
- }>;
1573
- StrategyRegistry: Readonly<{
1574
- address: "0xd964811233b8A0185D3C93664df82136C80d1bb2";
1575
- startBlock: 88698868n;
1576
- }>;
1577
- VaultRegistry: Readonly<{
1578
- address: "0x9f5b097AD23e2CF4F34e502A3E41D941678877Dc";
1579
- startBlock: 88698956n;
1580
- }>;
1581
- KeeperRegistry: Readonly<{
1582
- address: "0x8fB2Cd40046b08F155d06C3A31b69C1Bd2C971e2";
1583
- startBlock: 88698828n;
1584
- }>;
1585
- Orchestrator: Readonly<{
1586
- address: "0x38a07152ee64C7067fEeBA904D72ABc9a9DA0C77";
1587
- startBlock: 88698903n;
1588
- }>;
1589
- Helper: Readonly<{
1590
- address: "0xd1b49Bb21d2c2638CFDdf4B2dC8dbC61DCBCe0ee";
1591
- startBlock: 367658396n;
1592
- }>;
1593
- SingleAssetDeposit: Readonly<{
1594
- address: "0x122126e397677cfd6476c531416b7cbec74c06c8";
1595
- startBlock: 367649306n;
1596
- }>;
1597
- PoolHelper: Readonly<{
1598
- address: "0x657bB5fD00e6D6BdA438988DcaF5B62Ef16F6163";
1599
- startBlock: 256472779n;
1600
- }>;
1601
- }>;
1602
- //#endregion
1603
- //#region src/contracts/arc.d.ts
1604
- export declare const arcContracts: Readonly<{
1605
- KeeperRegistry: Readonly<{
1606
- address: "0xE463a4A82881EF599fe8310f23ba8766Dcc448A3";
1607
- startBlock: 21326564n;
1608
- }>;
1609
- Orchestrator: Readonly<{
1610
- address: "0x8725f2f77508EDd583C6f3840F88Db6A2d0Cf009";
1611
- startBlock: 21326605n;
1612
- }>;
1613
- StrategyRegistry: Readonly<{
1614
- address: "0x08857cb7B2a481DB85984E32BdC03e95c0662eb6";
1615
- startBlock: 21326585n;
1616
- }>;
1617
- VaultRegistry: Readonly<{
1618
- address: "0x52Db9bcb9EFdBAaa8E1D2326E0b69c57Bf14c333";
1619
- startBlock: 21326644n;
1620
- }>;
1621
- BundleRegistry: Readonly<{
1622
- address: "0x6511080422911D210681f5618DBd50DEC3e954de";
1623
- startBlock: 21326748n;
1624
- }>;
1625
- GasVault: Readonly<{
1626
- address: "0x0a271fc23BA4c6A4a668E7Ceef9aDE60C59f5Ec5";
1627
- startBlock: 21326697n;
1628
- }>;
1629
- WhitelistRegistry: Readonly<{
1630
- address: "0x20B895F7C02e754AdC461e80b39a9e85f02e2bE3";
1631
- startBlock: 21326621n;
1632
- }>;
1633
- SteerPeriphery: Readonly<{
1634
- address: "0x3e2135a491CD90Ed1e7313Bd8Efd51aba8018F69";
1635
- startBlock: 21326728n;
1636
- }>;
1637
- StakingRewards: Readonly<{
1638
- address: "0xfdC6A32f2622be7Bf1481BFAC8bC6e35C42fD665";
1639
- startBlock: 21326676n;
1640
- }>;
1641
- Helper: Readonly<{
1642
- address: "0xCD31EbF762A5d1F88399E692316903767DA06Cf9";
1643
- startBlock: 21326630n;
1644
- }>;
1645
- FeeManager: Readonly<{
1646
- address: "0x83966243D6055b1A1157f800cBC9f5084162b871";
1647
- startBlock: 21326767n;
1648
- }>;
1649
- }>;
1650
- //#endregion
1651
- //#region src/contracts/astar.d.ts
1652
- export declare const astarContracts: Readonly<{
1653
- BundleRegistry: Readonly<{
1654
- address: "0x7Daa68204232a78dBF1Dd853a4018330EE934A39";
1655
- startBlock: 5466115n;
1656
- }>;
1657
- GasVault: Readonly<{
1658
- address: "0xe1C56f99a459ED47B629F3D818BcC84826bCed66";
1659
- startBlock: 5465971n;
1660
- }>;
1661
- SteerPeriphery: Readonly<{
1662
- address: "0x1afD31627170607657224eD4aE701470209C4B2e";
1663
- startBlock: 5466109n;
1664
- }>;
1665
- StrategyRegistry: Readonly<{
1666
- address: "0x2822eE30383EAbCBA817Ab4A7a592F4a194e14b5";
1667
- startBlock: 5465955n;
1668
- }>;
1669
- VaultRegistry: Readonly<{
1670
- address: "0x9f5b097AD23e2CF4F34e502A3E41D941678877Dc";
1671
- startBlock: 5465965n;
1672
- }>;
1673
- KeeperRegistry: Readonly<{
1674
- address: "0x925C4454820b2b88c2f70F2621E6890b451266Dd";
1675
- startBlock: 5465944n;
1676
- }>;
1677
- Orchestrator: Readonly<{
1678
- address: "0x09eb271b444d1db7163c8555919dE85b20Be7D1d";
1679
- startBlock: 5465950n;
1680
- }>;
1681
- }>;
1682
- //#endregion
1683
- //#region src/contracts/astarzkevm.d.ts
1684
- export declare const astarZkEvmContracts: Readonly<{
1685
- BundleRegistry: Readonly<{
1686
- address: "0xD40699A642172DeD33BCFe4E3F84D54610C757Cd";
1687
- startBlock: 215291n;
1688
- }>;
1689
- GasVault: Readonly<{
1690
- address: "0xC1Ecd10398A6D7036CceE1f50551ff169715081c";
1691
- startBlock: 215237n;
1692
- }>;
1693
- SteerPeriphery: Readonly<{
1694
- address: "0x37Cff062D52Dd6E9E39Df619CCd30c037a36bB83";
1695
- startBlock: 215281n;
1696
- }>;
1697
- StrategyRegistry: Readonly<{
1698
- address: "0x09eb271b444d1db7163c8555919dE85b20Be7D1d";
1699
- startBlock: 210939n;
1700
- }>;
1701
- VaultRegistry: Readonly<{
1702
- address: "0xa1Dd21fbd9e1F0BF28d41F18bDC22326e50C02e9";
1703
- startBlock: 210954n;
1704
- }>;
1705
- KeeperRegistry: Readonly<{
1706
- address: "0x99eca0E5Db125900E3a0389F6D3503837e99F59b";
1707
- startBlock: 210922n;
1708
- }>;
1709
- Orchestrator: Readonly<{
1710
- address: "0xF4de4180829272ae5f69AcAcf820f4F7d547513b";
1711
- startBlock: 210932n;
1712
- }>;
1713
- }>;
1714
- //#endregion
1715
- //#region src/contracts/avalanche.d.ts
1716
- export declare const avalancheContracts: Readonly<{
1717
- KeeperRegistry: Readonly<{
1718
- address: "0x925C4454820b2b88c2f70F2621E6890b451266Dd";
1719
- startBlock: 30433379n;
1720
- }>;
1721
- Orchestrator: Readonly<{
1722
- address: "0x38a07152ee64C7067fEeBA904D72ABc9a9DA0C77";
1723
- startBlock: 30433780n;
1724
- }>;
1725
- StrategyRegistry: Readonly<{
1726
- address: "0x09eb271b444d1db7163c8555919dE85b20Be7D1d";
1727
- startBlock: 30433735n;
1728
- }>;
1729
- VaultRegistry: Readonly<{
1730
- address: "0x9f5b097AD23e2CF4F34e502A3E41D941678877Dc";
1731
- startBlock: 30434642n;
1732
- }>;
1733
- BundleRegistry: Readonly<{
1734
- address: "0x87A37bEEcE2918A342F95773Bea7cAA6823c6DC3";
1735
- startBlock: 30435305n;
1736
- }>;
1737
- DynamicJobs: Readonly<{
1738
- address: "0x7c464A0AB1f5ebf3E2dCccfec7EF41D02ED7a2f4";
1739
- startBlock: 30435322n;
1740
- }>;
1741
- GasVault: Readonly<{
1742
- address: "0xcA19bEc25A41443F35EeAE03411Dce87D8c0Edc4";
1743
- startBlock: 30434925n;
1744
- }>;
1745
- WhitelistRegistry: Readonly<{
1746
- address: "0xa1Dd21fbd9e1F0BF28d41F18bDC22326e50C02e9";
1747
- startBlock: 30434591n;
1748
- }>;
1749
- SteerPeriphery: Readonly<{
1750
- address: "0x5D8249e3F5f702e1Fd720167b40424fc2daDCd1e";
1751
- startBlock: 30435289n;
1752
- }>;
1753
- FeeManager: Readonly<{
1754
- address: "0x391cf3047db983caB8dD95B16c4e6C3918d72d23";
1755
- }>;
1756
- }>;
1757
- //#endregion
1758
- //#region src/contracts/base.d.ts
1759
- export declare const baseContracts: Readonly<{
1760
- BundleRegistry: Readonly<{
1761
- address: "0x806c2240793b3738000fcb62C66BF462764B903F";
1762
- startBlock: 2092242n;
1763
- }>;
1764
- GasVault: Readonly<{
1765
- address: "0x3B41454CB7858B6D0535e61bAe9362AF0151Cc2d";
1766
- startBlock: 2092217n;
1767
- }>;
1768
- SteerPeriphery: Readonly<{
1769
- address: "0x16BA7102271dC83Fff2f709691c2B601DAD7668e";
1770
- startBlock: 2092232n;
1771
- }>;
1772
- StrategyRegistry: Readonly<{
1773
- address: "0x317EEDB54711681056f37e10d5DE0B55455b476f";
1774
- startBlock: 2092162n;
1775
- }>;
1776
- VaultRegistry: Readonly<{
1777
- address: "0x2822eE30383EAbCBA817Ab4A7a592F4a194e14b5";
1778
- startBlock: 2092181n;
1779
- }>;
1780
- KeeperRegistry: Readonly<{
1781
- address: "0x1A7e75715d157736103eC429Ff7079994D907472";
1782
- startBlock: 2092152n;
1783
- }>;
1784
- Orchestrator: Readonly<{
1785
- address: "0x8fB2Cd40046b08F155d06C3A31b69C1Bd2C971e2";
1786
- startBlock: 2092171n;
1787
- }>;
1788
- Helper: Readonly<{
1789
- address: "0xa98376572375692455172f6750C67339667974fe";
1790
- startBlock: 17910406n;
1791
- }>;
1792
- SingleAssetDeposit: Readonly<{
1793
- address: "0x588B34D2a9598497f481A9d31B4eD372C6135f32";
1794
- startBlock: 48700149n;
1795
- }>;
1796
- PoolHelper: Readonly<{
1797
- address: "0x603823Ad53c1C7D402c5A20CD1B05488Dafc2646";
1798
- startBlock: 20147258n;
1799
- }>;
1800
- FeeManager: Readonly<{
1801
- address: "0xac4D51669B80D09d8Cc5EeFF50026c4d1D3290e6";
1802
- }>;
1803
- }>;
1804
- //#endregion
1805
- //#region src/contracts/bera.d.ts
1806
- export declare const beraContracts: Readonly<{
1807
- BundleRegistry: Readonly<{
1808
- address: "0x6d5A04974ba2CdC3E307135fE5886b8c7C499e9A";
1809
- startBlock: 785307n;
1810
- }>;
1811
- GasVault: Readonly<{
1812
- address: "0xcfffEc77F478959ef5D6B1AE9f4d9b35D12921E1";
1813
- startBlock: 785218n;
1313
+ address: "0xcfffEc77F478959ef5D6B1AE9f4d9b35D12921E1";
1314
+ startBlock: 785218n;
1814
1315
  }>;
1815
1316
  SteerPeriphery: Readonly<{
1816
1317
  address: "0x71bE4708C86B8AFd6Aa47929Ce073e400B5B7747";
@@ -3584,17 +3085,635 @@ export interface ChainDefinition {
3584
3085
  readonly isWrappingEnabled?: boolean;
3585
3086
  };
3586
3087
  }
3587
- //#endregion
3588
- //#region src/data/indexers.d.ts
3589
- type TheGraphIndexerConfig = {
3590
- readonly apiKey: string;
3591
- readonly proxyUrl?: never;
3088
+ //#endregion
3089
+ //#region src/data/indexers.d.ts
3090
+ type TheGraphIndexerConfig = {
3091
+ readonly apiKey: string;
3092
+ readonly proxyUrl?: never;
3093
+ } | {
3094
+ readonly proxyUrl: string;
3095
+ readonly apiKey?: never;
3096
+ };
3097
+ interface IndexerConfig {
3098
+ readonly theGraph?: TheGraphIndexerConfig;
3099
+ readonly sentio?: {
3100
+ readonly apiKey: string;
3101
+ };
3102
+ }
3103
+ //#endregion
3104
+ //#region src/ipfs/client.d.ts
3105
+ interface IpfsRequestOptions extends HttpRequestOptions {
3106
+ /** Maximum decoded response size. Defaults to 16 MiB. */
3107
+ readonly maxResponseBytes?: number;
3108
+ }
3109
+ interface IpfsClientOptions extends IpfsRequestOptions {
3110
+ /** Gateway base URLs, in fallback order. Defaults to https://ipfs.io/ipfs/. */
3111
+ readonly gateways?: readonly string[];
3112
+ }
3113
+ export declare class IpfsClient {
3114
+ #private;
3115
+ constructor(options?: IpfsClientOptions);
3116
+ getBytes(reference: string, options?: IpfsRequestOptions): Promise<Uint8Array<ArrayBuffer>>;
3117
+ getJson(reference: string, options?: IpfsRequestOptions): Promise<unknown>;
3118
+ }
3119
+ //#endregion
3120
+ //#region src/lending/adapter.d.ts
3121
+ export declare abstract class LendingDataAdapter<TMarketRef> extends DataAdapter {
3122
+ abstract listMarkets(request?: PageRequest): Promise<Page<TMarketRef>>;
3123
+ }
3124
+ export declare enum LendingProtocol {
3125
+ AaveV3 = "aave-v3"
3126
+ }
3127
+ export declare enum LendingFamily {
3128
+ AaveV3 = "aave-v3"
3129
+ }
3130
+ export declare abstract class LendingAdapter<TMarketRef = unknown, TMarketState = unknown, TContracts extends ContractMap = ContractMap> {
3131
+ readonly context: ChainContext;
3132
+ readonly deployment: DeploymentDefinition<TContracts>;
3133
+ readonly dataAdapter: LendingDataAdapter<TMarketRef>;
3134
+ abstract readonly family: LendingFamily;
3135
+ abstract readonly protocol: LendingProtocol;
3136
+ constructor(context: ChainContext, deployment: DeploymentDefinition<TContracts>, dataAdapter: LendingDataAdapter<TMarketRef>);
3137
+ get subgraphUrl(): string | undefined;
3138
+ abstract getMarket(reference: TMarketRef, options?: ReadOptions): Promise<TMarketState>;
3139
+ }
3140
+ export interface AaveReserveState {
3141
+ readonly asset: Address;
3142
+ readonly supplyRateRay: bigint;
3143
+ readonly variableBorrowRateRay: bigint;
3144
+ }
3145
+ export interface SupplyRequest {
3146
+ readonly asset: Address;
3147
+ readonly amount: bigint;
3148
+ readonly account: Address;
3149
+ }
3150
+ export interface AaveV3Contracts extends ContractMap {
3151
+ readonly pool: ContractDeployment;
3152
+ }
3153
+ export declare abstract class AaveV3Adapter extends LendingAdapter<Address, AaveReserveState, AaveV3Contracts> {
3154
+ readonly family = LendingFamily.AaveV3;
3155
+ abstract prepareSupply(request: SupplyRequest): Promise<TransactionPlan>;
3156
+ }
3157
+ //#endregion
3158
+ //#region src/vault/enums.d.ts
3159
+ export declare enum VaultKind {
3160
+ Liquidity = "liquidity",
3161
+ Lending = "lending",
3162
+ Composite = "composite"
3163
+ }
3164
+ export declare enum PositionKind {
3165
+ Liquidity = "liquidity",
3166
+ Lending = "lending",
3167
+ Idle = "idle"
3168
+ }
3169
+ //#endregion
3170
+ //#region src/vault/resolution/types.d.ts
3171
+ export declare enum ProtocolContractRole {
3172
+ AmmFactory = "amm-factory",
3173
+ PoolManager = "pool-manager",
3174
+ LendingPool = "lending-pool",
3175
+ LendingMarketFactory = "lending-market-factory"
3176
+ }
3177
+ export interface VaultReadContext {
3178
+ readonly steer: SteerNetwork;
3179
+ readonly address: Address;
3180
+ readonly blockNumber: bigint;
3181
+ }
3182
+ export interface VaultIdentity {
3183
+ readonly chainId: number;
3184
+ readonly vaultAddress: Address;
3185
+ readonly registryAddress: Address;
3186
+ /** Beacon registered for this vault in Steer's VaultRegistry. */
3187
+ readonly beaconAddress: Address;
3188
+ /** Beacon actually used by the vault proxy. */
3189
+ readonly proxyBeaconAddress: Address;
3190
+ readonly implementationAddress: Address;
3191
+ }
3192
+ /** The reader must check registry membership and the proxy's actual beacon/implementation. */
3193
+ export interface VaultIdentityReader {
3194
+ getBlockNumber(steer: SteerNetwork): Promise<bigint>;
3195
+ /** Read actual contracts at context.blockNumber; return null for an unregistered vault. */
3196
+ readIdentity(context: VaultReadContext): Promise<VaultIdentity | null>;
3197
+ }
3198
+ export type UnderlyingReference = {
3199
+ readonly kind: PositionKind.Liquidity;
3200
+ readonly role: ProtocolContractRole.AmmFactory | ProtocolContractRole.PoolManager;
3201
+ readonly protocolAddress: Address;
3202
+ readonly pool: unknown;
3203
+ } | {
3204
+ readonly kind: PositionKind.Lending;
3205
+ readonly role: ProtocolContractRole.LendingPool | ProtocolContractRole.LendingMarketFactory;
3206
+ readonly protocolAddress: Address;
3207
+ readonly market: unknown;
3208
+ };
3209
+ export type ProtocolBinding = {
3210
+ readonly kind: PositionKind.Liquidity;
3211
+ readonly role: ProtocolContractRole.AmmFactory | ProtocolContractRole.PoolManager;
3212
+ readonly protocolAddress: Address;
3213
+ readonly deployment: DeploymentReference<AmmAdapter>;
3214
+ } | {
3215
+ readonly kind: PositionKind.Lending;
3216
+ readonly role: ProtocolContractRole.LendingPool | ProtocolContractRole.LendingMarketFactory;
3217
+ readonly protocolAddress: Address;
3218
+ readonly deployment: DeploymentReference<LendingAdapter>;
3219
+ };
3220
+ export interface ResolvedVaultContext extends VaultReadContext {
3221
+ readonly underlying: readonly VaultUnderlying[];
3222
+ readonly metadata: VaultMetadata;
3223
+ }
3224
+ /** Exact implementation-specific readers and constructors, supplied by SDK integration code. */
3225
+ export interface VaultImplementationBinding {
3226
+ /** Exact indexed names associated with this implementation; omitted means unknown support. */
3227
+ readonly beaconNames?: readonly string[];
3228
+ readonly beaconAddress: Address;
3229
+ readonly implementationAddress: Address;
3230
+ /** Runtime hash checked by this binding's native snapshot reader before returning accounting. */
3231
+ readonly implementationCodeHash?: Hex;
3232
+ readonly kind: VaultKind;
3233
+ readUnderlying(context: VaultReadContext): Promise<readonly UnderlyingReference[]>;
3234
+ createVault(context: ResolvedVaultContext): KnownSteerVault;
3235
+ }
3236
+ export interface VaultResolverDefinition {
3237
+ readonly reader: VaultIdentityReader;
3238
+ readonly implementations: readonly VaultImplementationBinding[];
3239
+ readonly protocols: readonly ProtocolBinding[];
3240
+ }
3241
+ export declare enum VaultResolutionErrorCode {
3242
+ NotConfigured = "not-configured",
3243
+ InvalidMapping = "invalid-mapping",
3244
+ NotRegistered = "not-registered",
3245
+ IdentityMismatch = "identity-mismatch",
3246
+ UnsupportedImplementation = "unsupported-implementation",
3247
+ UnsupportedProtocol = "unsupported-protocol",
3248
+ InvalidVault = "invalid-vault"
3249
+ }
3250
+ export declare class VaultResolutionError extends Error {
3251
+ readonly code: VaultResolutionErrorCode;
3252
+ constructor(code: VaultResolutionErrorCode, message: string);
3253
+ }
3254
+ //#endregion
3255
+ //#region src/vault/resolution/index.d.ts
3256
+ export declare class VaultResolver {
3257
+ #private;
3258
+ readonly amms: DeploymentRegistry<AmmAdapter>;
3259
+ readonly lending: DeploymentRegistry<LendingAdapter>;
3260
+ constructor(definition: VaultResolverDefinition, amms: DeploymentRegistry<AmmAdapter>, lending: DeploymentRegistry<LendingAdapter>);
3261
+ resolve(steer: SteerNetwork, address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
3262
+ resolveMany(steer: SteerNetwork, addresses: readonly Address[], options: VaultLoadOptions & {
3263
+ allowFailure: true;
3264
+ }): Promise<readonly VaultLoadResult[]>;
3265
+ resolveMany(steer: SteerNetwork, addresses: readonly Address[], options?: VaultLoadOptions & {
3266
+ allowFailure?: false;
3267
+ }): Promise<readonly KnownSteerVault[]>;
3268
+ resolveMany(steer: SteerNetwork, addresses: readonly Address[], options?: VaultLoadOptions & {
3269
+ allowFailure?: boolean;
3270
+ }): Promise<readonly KnownSteerVault[] | readonly VaultLoadResult[]>;
3271
+ /** Identity and accounting share a pinned block; dispatch custom constructors and methods. */
3272
+ snapshots(steer: SteerNetwork, addresses: readonly Address[], options: ReadOptions & {
3273
+ allowFailure: true;
3274
+ }): Promise<readonly VaultSnapshotResult[]>;
3275
+ snapshots(steer: SteerNetwork, addresses: readonly Address[], options?: ReadOptions & {
3276
+ allowFailure?: false;
3277
+ }): Promise<readonly LiquidityVaultSnapshot[]>;
3278
+ snapshots(steer: SteerNetwork, addresses: readonly Address[], options?: ReadOptions & {
3279
+ allowFailure?: boolean;
3280
+ }): Promise<readonly LiquidityVaultSnapshot[] | readonly VaultSnapshotResult[]>;
3281
+ }
3282
+ //#endregion
3283
+ //#region src/vault/steer.d.ts
3284
+ export interface SteerContracts extends ContractMap {
3285
+ readonly KeeperRegistry: ContractDeployment;
3286
+ readonly Orchestrator: ContractDeployment;
3287
+ readonly StrategyRegistry: ContractDeployment;
3288
+ readonly VaultRegistry: ContractDeployment;
3289
+ readonly BundleRegistry: ContractDeployment;
3290
+ readonly GasVault: ContractDeployment;
3291
+ readonly SteerPeriphery: ContractDeployment;
3292
+ }
3293
+ export declare class SteerNetwork {
3294
+ #private;
3295
+ readonly context: ChainContext;
3296
+ readonly deployment: DeploymentDefinition<SteerContracts>;
3297
+ readonly dataAdapter: SteerDataAdapter;
3298
+ readonly ipfs: IpfsClient;
3299
+ constructor(context: ChainContext, deployment: DeploymentDefinition<SteerContracts>, dataAdapter: SteerDataAdapter, resolver?: VaultResolver, ipfs?: IpfsClient);
3300
+ get contracts(): SteerContracts;
3301
+ get subgraphUrl(): string | undefined;
3302
+ listUserVaults(request: UserVaultListRequest, options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
3303
+ listVaults(request?: VaultListRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
3304
+ /** Synchronous registration check with no RPC or HTTP; does not verify a particular vault. */
3305
+ supportsVaultSnapshots(beaconName: string): boolean;
3306
+ getVault(address: Address, options?: VaultLoadOptions): Promise<KnownSteerVault>;
3307
+ getVaults(addresses: readonly Address[], options: VaultLoadOptions & {
3308
+ allowFailure: true;
3309
+ }): Promise<readonly VaultLoadResult[]>;
3310
+ getVaults(addresses: readonly Address[], options?: VaultLoadOptions & {
3311
+ allowFailure?: false;
3312
+ }): Promise<readonly KnownSteerVault[]>;
3313
+ getVaults(addresses: readonly Address[], options?: VaultLoadOptions & {
3314
+ allowFailure?: boolean;
3315
+ }): Promise<readonly KnownSteerVault[] | readonly VaultLoadResult[]>;
3316
+ getVaultSnapshots(addresses: readonly Address[], options: ReadOptions & {
3317
+ allowFailure: true;
3318
+ }): Promise<readonly VaultSnapshotResult[]>;
3319
+ getVaultSnapshots(addresses: readonly Address[], options?: ReadOptions & {
3320
+ allowFailure?: false;
3321
+ }): Promise<readonly LiquidityVaultSnapshot[]>;
3322
+ getVaultSnapshots(addresses: readonly Address[], options?: ReadOptions & {
3323
+ allowFailure?: boolean;
3324
+ }): Promise<readonly LiquidityVaultSnapshot[] | readonly VaultSnapshotResult[]>;
3325
+ getVaultUserPositions(addresses: readonly Address[], account: Address, options?: ReadOptions): Promise<readonly VaultUserPosition[]>;
3326
+ getLiquidityVault(address: Address, options?: VaultLoadOptions): Promise<LiquidityVault>;
3327
+ getLendingVault(address: Address, options?: VaultLoadOptions): Promise<LendingVault>;
3328
+ getCompositeVault(address: Address, options?: VaultLoadOptions): Promise<CompositeVault>;
3329
+ }
3330
+ //#endregion
3331
+ //#region src/vault/vault.d.ts
3332
+ export declare abstract class SteerVault {
3333
+ #private;
3334
+ readonly address: Address;
3335
+ readonly chain: ChainContext;
3336
+ readonly steer: SteerNetwork;
3337
+ abstract readonly kind: VaultKind;
3338
+ readonly underlying: readonly VaultUnderlying[];
3339
+ readonly metadata: VaultMetadata;
3340
+ constructor(address: Address, chain: ChainContext, steer: SteerNetwork, underlying: readonly VaultUnderlying[], metadata: VaultMetadata);
3341
+ /** Fetch and validate the stored manifest; runtime execution fields are not synthesized. */
3342
+ getConfig(options?: IpfsRequestOptions): Promise<Readonly<{
3343
+ readonly strategyConfigData: Readonly<{
3344
+ [x: string]: unknown;
3345
+ }>;
3346
+ readonly vaultPayload: Readonly<{
3347
+ [x: string]: unknown;
3348
+ }>;
3349
+ readonly dataConnectorsData: readonly Readonly<{
3350
+ bundleHash: string;
3351
+ readonly configData: Readonly<{
3352
+ [x: string]: unknown;
3353
+ }>;
3354
+ } & {
3355
+ [key: string]: unknown;
3356
+ }>[];
3357
+ strategy?: Readonly<{
3358
+ chainId: number;
3359
+ execBundle: string;
3360
+ tokenId: string;
3361
+ } & {
3362
+ [key: string]: unknown;
3363
+ }> | undefined;
3364
+ } & {
3365
+ [key: string]: unknown;
3366
+ }>>;
3367
+ abstract getShareBalance(account: Address, options?: ReadOptions): Promise<bigint>;
3368
+ abstract getPositions(options?: ReadOptions): Promise<readonly StrategyPosition[]>;
3369
+ /** SDK request shape; contract implementations encode their own ABI and enforce asset rules. */
3370
+ abstract previewDeposit(request: DepositRequest, options?: ReadOptions): Promise<DepositPreview>;
3371
+ abstract prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<TransactionPlan>;
3372
+ /** Share-denominated exit; implementations map this to the contract's withdrawal flow. */
3373
+ abstract prepareWithdraw(request: PrepareWithdrawRequest, options?: ReadOptions): Promise<TransactionPlan>;
3374
+ }
3375
+ export declare abstract class LiquidityVault<TAmm extends AmmAdapter = AmmAdapter, TPool extends LiquidityPool = LiquidityPool> extends SteerVault {
3376
+ readonly kind = VaultKind.Liquidity;
3377
+ abstract readonly amm: TAmm;
3378
+ abstract getPositions(options?: ReadOptions): Promise<readonly LiquidityPosition<TPool>[]>;
3379
+ abstract getSnapshot(options?: ReadOptions): Promise<LiquidityVaultSnapshot<TPool>>;
3380
+ /** Read strategy inputs at an explicit block, with timestamp-bounded indexed execution history. */
3381
+ getExecutionContext(request: ExecutionContextRequest, options?: DataAdapterRequestOptions): Promise<SmartPoolExecutionContext>;
3382
+ /** Run v2 connectors in manifest order, using configuration cached on this vault. */
3383
+ executeDataConnectors(context: SmartPoolExecutionContext, options?: IpfsRequestOptions): Promise<readonly unknown[]>;
3384
+ /** Execute the registered WASM locally. Returns parsed output without submitting transactions. */
3385
+ executeStrategy(context: SmartPoolExecutionContext, connectorData: readonly unknown[], options?: IpfsRequestOptions): Promise<unknown>;
3386
+ /** Calculate the other token maximum at the vault's current deposit ratio. Does not swap. */
3387
+ abstract quoteDeposit(input: AssetAmount, options?: ReadOptions): Promise<DepositQuote>;
3388
+ abstract previewDeposit(request: DepositRequest, options?: ReadOptions): Promise<LiquidityDepositPreview>;
3389
+ abstract prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
3390
+ /** Simulates the original withdrawal as account at one verified block. Never submits. */
3391
+ previewWithdraw(request: WithdrawRequest, options?: ReadOptions): Promise<WithdrawPreview>;
3392
+ /** Re-simulates independently; does not trust a previously returned preview. */
3393
+ prepareWithdraw(request: PrepareWithdrawRequest, options?: ReadOptions): Promise<WithdrawPlan>;
3394
+ /** Proportional accounting amounts at one block, not a withdrawal quote. */
3395
+ getUserPosition(account: Address, options?: ReadOptions): Promise<LiquidityVaultUserPosition<TPool>>;
3396
+ }
3397
+ export declare abstract class LendingVault<TLending extends LendingAdapter = LendingAdapter> extends SteerVault {
3398
+ readonly kind = VaultKind.Lending;
3399
+ abstract readonly lending: TLending;
3400
+ }
3401
+ export declare abstract class CompositeVault extends SteerVault {
3402
+ readonly kind = VaultKind.Composite;
3403
+ }
3404
+ //#endregion
3405
+ //#region src/vault/types.d.ts
3406
+ type VaultAmmFilter = { [Protocol in AmmProtocol]: Omit<AmmLookupRequest<Protocol>, "chainId">; }[AmmProtocol];
3407
+ /** Indexed descriptive data. This record does not establish current onchain identity. */
3408
+ interface VaultMetadata {
3409
+ readonly id: Address;
3410
+ readonly name: string | null;
3411
+ readonly symbol: string | null;
3412
+ readonly decimals: string | null;
3413
+ readonly beaconName: string;
3414
+ readonly createdAt: string;
3415
+ readonly state: string | null;
3416
+ /** Pool contract address or a 32-byte pool ID for singleton AMMs such as V4. */
3417
+ readonly pool: Hex | null;
3418
+ readonly poolKey?: string | null;
3419
+ readonly token0: Address | null;
3420
+ readonly token1: Address | null;
3421
+ readonly payloadIpfs: string | null;
3422
+ readonly strategyToken: {
3423
+ readonly id: string;
3424
+ } | null;
3425
+ }
3426
+ interface ExecutionContextRequest {
3427
+ readonly blockNumber: bigint;
3428
+ /** Explicit execution epoch in Unix seconds, never inferred from the wall clock. */
3429
+ readonly epochTimestamp: bigint;
3430
+ /** Strategy epoch duration in seconds. */
3431
+ readonly epochLength: number;
3432
+ }
3433
+ interface VaultExecutionHistoryRequest {
3434
+ readonly vaultAddress: Address;
3435
+ readonly blockNumber: bigint;
3436
+ readonly timestamp: bigint;
3437
+ }
3438
+ /** Loading options. Supplied indexed metadata never replaces onchain identity checks. */
3439
+ interface VaultLoadOptions extends ReadOptions {
3440
+ /** Complete records for the requested addresses; omit to fetch from the subgraph. */
3441
+ readonly metadata?: readonly VaultMetadata[];
3442
+ }
3443
+ interface VaultListRequest extends PageRequest {
3444
+ /** Select a configured AMM using the same protocol/version rules as getAmm(). */
3445
+ readonly amm?: VaultAmmFilter;
3446
+ /** Match either underlying token; all supplied fields must match that same token. */
3447
+ readonly token?: TokenFilter;
3448
+ }
3449
+ interface VaultDiscoveryRequest extends VaultListRequest {
3450
+ readonly chainId: number;
3451
+ }
3452
+ /** Scans at most limit indexed share-vault candidates (default 1,000) per page. */
3453
+ interface UserVaultListRequest extends VaultListRequest {
3454
+ readonly account: Address;
3455
+ }
3456
+ interface UserVaultDiscoveryRequest extends UserVaultListRequest {
3457
+ readonly chainId: number;
3458
+ }
3459
+ /** Indexed candidates with positive onchain shares, not verified vault implementations.
3460
+ * Empty pages may have a nextCursor. Completeness depends on the indexed inventory.
3461
+ */
3462
+ interface UserVaultPage extends Page<Address> {
3463
+ readonly indexedBlock: bigint;
3464
+ }
3465
+ /** SDK connection dependency, supplied by SteerClient to its data adapter factory. */
3466
+ interface SteerConnectionContext extends ChainContext {
3467
+ readonly amms: DeploymentRegistry<AmmAdapter>;
3468
+ }
3469
+ interface AssetAmount {
3470
+ readonly asset: Address;
3471
+ readonly amount: bigint;
3472
+ }
3473
+ interface DepositRequest {
3474
+ /** Token owner and transaction sender. */
3475
+ readonly account: Address;
3476
+ readonly assets: readonly AssetAmount[];
3477
+ readonly receiver: Address;
3478
+ }
3479
+ interface DepositPreview {
3480
+ readonly shares: bigint;
3481
+ }
3482
+ interface PrepareDepositRequest extends DepositRequest {
3483
+ /** Integer basis points from zero through 10,000, applied to accepted token amounts. */
3484
+ readonly slippageBps: number;
3485
+ }
3486
+ /** Contract-compatible quote, independent of the account's balances and allowances. */
3487
+ interface LiquidityDepositPreview extends DepositPreview {
3488
+ readonly blockNumber: bigint;
3489
+ readonly token0: Address;
3490
+ readonly token1: Address;
3491
+ readonly amounts: TokenPairAmounts;
3492
+ readonly unusedAmounts: TokenPairAmounts;
3493
+ /** Settlement of pre-existing receiver shares, separate from deposited assets. */
3494
+ readonly rewards?: VaultRewardPayout;
3495
+ }
3496
+ /** Inferred token maxima, suitable for previewDeposit or prepareDeposit. No tokens are swapped. */
3497
+ interface DepositQuote extends LiquidityDepositPreview {
3498
+ /** Token0 and token1 maxima, in that order. */
3499
+ readonly assets: readonly [AssetAmount, AssetAmount];
3500
+ }
3501
+ /** Ordered capped approvals, if needed, followed by the unsigned deposit. */
3502
+ interface DepositPlan extends TransactionPlan {
3503
+ readonly account: Address;
3504
+ readonly preview: LiquidityDepositPreview;
3505
+ readonly minimumAmounts: TokenPairAmounts;
3506
+ }
3507
+ interface WithdrawRequest {
3508
+ readonly shares: bigint;
3509
+ /** Share holder and transaction sender. The contract burns msg.sender shares. */
3510
+ readonly account: Address;
3511
+ readonly receiver: Address;
3512
+ }
3513
+ interface PrepareWithdrawRequest extends WithdrawRequest {
3514
+ /** Integer basis points, from zero through 10,000. Explicitly chosen by the caller. */
3515
+ readonly slippageBps: number;
3516
+ }
3517
+ /** Separate reward asset paid when a vault operation settles pre-existing shares. */
3518
+ interface VaultRewardPayout {
3519
+ readonly token: Address;
3520
+ readonly recipient: Address;
3521
+ readonly amount: PoolTokenBalance;
3522
+ }
3523
+ /** Reward paid to the shareholder during withdrawal. */
3524
+ type WithdrawRewards = VaultRewardPayout;
3525
+ /** Actual withdrawal simulation, including contract burn rounding and fee policy. */
3526
+ interface WithdrawPreview {
3527
+ readonly rewardPayouts?: readonly VaultRewardPayout[];
3528
+ readonly rewards?: WithdrawRewards;
3529
+ readonly blockNumber: bigint;
3530
+ readonly shares: bigint;
3531
+ readonly token0: Address;
3532
+ readonly token1: Address;
3533
+ readonly amounts: TokenPairAmounts;
3534
+ }
3535
+ /** Unsigned transactions must be submitted by account on chainId. */
3536
+ interface WithdrawPlan extends TransactionPlan {
3537
+ readonly account: Address;
3538
+ readonly preview: WithdrawPreview;
3539
+ readonly minimumAmounts: TokenPairAmounts;
3540
+ }
3541
+ /** Configured protocol relationships exist even when a vault has no active positions. */
3542
+ type VaultUnderlying = {
3543
+ readonly kind: PositionKind.Liquidity;
3544
+ readonly amm: AmmAdapter;
3545
+ readonly pool: unknown;
3546
+ } | {
3547
+ readonly kind: PositionKind.Lending;
3548
+ readonly lending: LendingAdapter;
3549
+ readonly market: unknown;
3550
+ };
3551
+ type StrategyPosition = (VaultUnderlying & {
3552
+ readonly positionId: string;
3553
+ }) | {
3554
+ readonly kind: PositionKind.Idle;
3555
+ readonly balance: AssetAmount;
3556
+ };
3557
+ /** Token amounts use the snapshot's token ordering and decimals. */
3558
+ interface TokenPairAmounts {
3559
+ readonly token0: PoolTokenBalance;
3560
+ readonly token1: PoolTokenBalance;
3561
+ }
3562
+ /** Both position fees and vault-wide sums use this structure. Recorded fees are part of gross. */
3563
+ interface LiquidityFees {
3564
+ /** Collectible fees, including fee growth since the last checkpoint. */
3565
+ readonly gross: TokenPairAmounts;
3566
+ /** LP share after the verified implementation's fee cut and rounding policy. */
3567
+ readonly net: TokenPairAmounts;
3568
+ /** Gross fees already checkpointed in the pool's tokensOwed fields. */
3569
+ readonly recorded: TokenPairAmounts;
3570
+ }
3571
+ /** V4 pools are identified by their key and manager, never an invented address. */
3572
+ interface V4VaultPool {
3573
+ readonly poolId: Hex;
3574
+ readonly poolManager: Address;
3575
+ readonly key: V4PoolKey;
3576
+ }
3577
+ type LiquidityPool = Address | V4VaultPool;
3578
+ interface LiquidityPosition<TPool extends LiquidityPool = LiquidityPool> {
3579
+ /** NFT checkpoint amounts excluded from LP fees/totals when the qualified vault cannot pay them out. */
3580
+ readonly nftTokensOwed?: TokenPairAmounts;
3581
+ readonly kind: PositionKind.Liquidity;
3582
+ readonly amm: AmmAdapter;
3583
+ readonly pool: TPool;
3584
+ readonly positionId: string;
3585
+ readonly lowerTick: number;
3586
+ readonly upperTick: number;
3587
+ /** Arbitrary relative units, not basis points. */
3588
+ readonly relativeWeight: number;
3589
+ /** Rounded down to 18 decimal places; undefined when all weights are zero. */
3590
+ readonly weightPercent: string | undefined;
3591
+ readonly liquidity: bigint;
3592
+ readonly principal: TokenPairAmounts;
3593
+ readonly fees: LiquidityFees;
3594
+ }
3595
+ /** Configured strategy ranges, which need not correspond one-to-one to active NFTs. */
3596
+ interface LiquidityPositionRange {
3597
+ readonly lowerTick: number;
3598
+ readonly upperTick: number;
3599
+ readonly relativeWeight: number;
3600
+ readonly weightPercent: string | undefined;
3601
+ }
3602
+ /** One reward asset, deduplicated by token even when base and bonus rewards overlap. */
3603
+ interface VaultRewardFee {
3604
+ readonly identifier: string;
3605
+ readonly recipient: Address;
3606
+ readonly unpaid: PoolTokenBalance;
3607
+ readonly unclaimed: PoolTokenBalance;
3608
+ }
3609
+ interface VaultRewardAsset {
3610
+ readonly token: Address;
3611
+ readonly decimals: number;
3612
+ readonly balance: PoolTokenBalance;
3613
+ readonly reservedFees: PoolTokenBalance;
3614
+ /** Stored fees not attributed to the current fee identifiers, still excluded from LP holdings. */
3615
+ readonly unattributedReservedFees: PoolTokenBalance;
3616
+ readonly accumulatedPerShareX18: bigint;
3617
+ readonly unclaimed: {
3618
+ readonly gross: PoolTokenBalance;
3619
+ readonly net: PoolTokenBalance;
3620
+ readonly fee: PoolTokenBalance;
3621
+ };
3622
+ readonly feeRecipients: readonly VaultRewardFee[];
3623
+ }
3624
+ /** Separate reward-token accounting, never folded into proportional LP pair holdings. */
3625
+ interface LiquidityVaultRewards {
3626
+ readonly token: Address;
3627
+ readonly decimals: number;
3628
+ readonly balance: PoolTokenBalance;
3629
+ readonly accumulatedPerShareX18: bigint;
3630
+ readonly totalSupply: bigint;
3631
+ readonly unclaimed: {
3632
+ readonly gross: PoolTokenBalance;
3633
+ readonly net: PoolTokenBalance;
3634
+ readonly steerFee: PoolTokenBalance;
3635
+ readonly strategistFee: PoolTokenBalance;
3636
+ };
3637
+ readonly unpaidFees: {
3638
+ readonly steer: PoolTokenBalance;
3639
+ readonly strategist: PoolTokenBalance;
3640
+ };
3641
+ }
3642
+ /** One result for every requested vault, preserving input order and duplicates. */
3643
+ type VaultLoadResult = {
3644
+ readonly status: "success";
3645
+ readonly vault: KnownSteerVault;
3592
3646
  } | {
3593
- readonly proxyUrl: string;
3594
- readonly apiKey?: never;
3647
+ readonly status: "failure";
3648
+ readonly error: Error;
3595
3649
  };
3596
- interface IndexerConfig {
3597
- readonly theGraph?: TheGraphIndexerConfig;
3650
+ type VaultSnapshotResult = {
3651
+ readonly status: "success";
3652
+ readonly snapshot: LiquidityVaultSnapshot;
3653
+ } | {
3654
+ readonly status: "failure";
3655
+ readonly error: Error;
3656
+ };
3657
+ interface LiquidityVaultSnapshot<TPool extends LiquidityPool = LiquidityPool> {
3658
+ readonly rewardAssets?: readonly VaultRewardAsset[];
3659
+ readonly blockNumber: bigint;
3660
+ /** Verified implementation at blockNumber, supplied by registered bulk snapshot readers. */
3661
+ readonly implementation?: {
3662
+ readonly address: Address;
3663
+ readonly codeHash: Hex;
3664
+ readonly beacon: Address;
3665
+ /** Indexed descriptive name, not onchain identity evidence. */
3666
+ readonly beaconName: string;
3667
+ };
3668
+ readonly pool: TPool;
3669
+ readonly token0: Address;
3670
+ readonly token1: Address;
3671
+ readonly token0Decimals: number;
3672
+ readonly token1Decimals: number;
3673
+ readonly positions: readonly LiquidityPosition<TPool>[];
3674
+ /** ERC-20 holdings, including already collected protocol/strategist fee reserves. */
3675
+ readonly balances: TokenPairAmounts;
3676
+ readonly reservedFees: TokenPairAmounts;
3677
+ /** Already collected rewards excluded from idle when the reward asset overlaps the LP pair. */
3678
+ readonly reservedRewards?: TokenPairAmounts;
3679
+ readonly configuredPositions?: readonly LiquidityPositionRange[];
3680
+ readonly rewards?: LiquidityVaultRewards;
3681
+ readonly idle: TokenPairAmounts;
3682
+ readonly principal: TokenPairAmounts;
3683
+ readonly feeRateBps: number;
3684
+ /** Sums of the corresponding fees across all positions. */
3685
+ readonly fees: LiquidityFees;
3686
+ /** Idle + principal + net uncollected fees. Accounting snapshot, not a withdrawal quote. */
3687
+ readonly total: TokenPairAmounts;
3688
+ }
3689
+ /** Same-block proportional accounting, not a withdrawal quote. Share amounts are raw ERC-20 units. */
3690
+ interface LiquidityVaultUserPosition<TPool extends LiquidityPool = LiquidityPool> {
3691
+ readonly blockNumber: bigint;
3692
+ readonly account: Address;
3693
+ readonly pool: TPool;
3694
+ readonly token0: Address;
3695
+ readonly token1: Address;
3696
+ readonly shares: bigint;
3697
+ readonly totalSupply: bigint;
3698
+ /** Rounded down to 18 decimal places; zero when totalSupply is zero. */
3699
+ readonly ownershipPercent: string;
3700
+ /** Proportional LP totals, including available idle, principal and net uncollected fees. */
3701
+ readonly amounts: TokenPairAmounts;
3702
+ }
3703
+ /** One requested liquidity vault's same-block wallet holdings. */
3704
+ interface VaultUserPosition<TPool extends LiquidityPool = LiquidityPool> {
3705
+ readonly vault: Address;
3706
+ readonly position: LiquidityVaultUserPosition<TPool>;
3707
+ }
3708
+ type KnownSteerVault = LiquidityVault | LendingVault | CompositeVault;
3709
+ //#endregion
3710
+ //#region src/vault/data-adapter.d.ts
3711
+ export declare abstract class SteerDataAdapter extends DataAdapter {
3712
+ /** Latest indexed execution through the requested block and timestamp, or null if absent. */
3713
+ getLastVaultExecution(_request: VaultExecutionHistoryRequest, _options?: DataAdapterRequestOptions): Promise<bigint | null>;
3714
+ listUserVaults(_request: UserVaultListRequest, _options?: DataAdapterRequestOptions): Promise<UserVaultPage>;
3715
+ getVaultMetadata(_addresses: readonly Address[], _options?: DataAdapterRequestOptions): Promise<readonly VaultMetadata[]>;
3716
+ abstract listVaults(request?: VaultListRequest, options?: DataAdapterRequestOptions): Promise<Page<VaultMetadata>>;
3598
3717
  }
3599
3718
  //#endregion
3600
3719
  //#region src/core/client.d.ts
@@ -3607,6 +3726,7 @@ export interface SteerNetworkDefinition {
3607
3726
  readonly vaultResolver?: VaultResolverDefinition;
3608
3727
  }
3609
3728
  export interface SteerClientOptions {
3729
+ readonly ipfs?: IpfsClient;
3610
3730
  readonly logger?: Logger;
3611
3731
  /** SDK integration override. Replaces the built-in network catalog when supplied. */
3612
3732
  readonly catalog?: readonly SteerNetworkDefinition[];
@@ -3617,6 +3737,7 @@ export interface SteerClientOptions {
3617
3737
  /** Steer is the SDK root; chain identity selects a deployment, not another protocol. */
3618
3738
  export declare class SteerClient {
3619
3739
  #private;
3740
+ readonly ipfs: IpfsClient;
3620
3741
  constructor(options?: SteerClientOptions);
3621
3742
  getChains(): readonly ChainDefinition[];
3622
3743
  getDeployment(chainId: number): SteerNetwork;
@@ -3641,19 +3762,7 @@ export declare class SteerClient {
3641
3762
  getPool(request: V4PoolLookupRequest): Promise<V4PoolState & {
3642
3763
  readonly amm: UniswapV4Adapter;
3643
3764
  }>;
3644
- getPool(request: PoolLookupRequest): Promise<(SlipstreamPoolState & {
3645
- readonly amm: AerodromeSlipstreamAdapter;
3646
- }) | (InfinityCLPoolState & {
3647
- readonly amm: InfinityCLAdapter;
3648
- }) | (AlgebraLegacyPoolState & {
3649
- readonly amm: AlgebraLegacyAdapter;
3650
- }) | (AlgebraIntegralPoolState & {
3651
- readonly amm: AlgebraIntegralAdapter;
3652
- }) | (V3PoolState & {
3653
- readonly amm: UniswapV3Adapter;
3654
- }) | (V4PoolState & {
3655
- readonly amm: UniswapV4Adapter;
3656
- })>;
3765
+ getPool(request: PoolLookupRequest): Promise<DiscoveredPool>;
3657
3766
  getPools(request: SlipstreamPoolsLookupRequest): Promise<readonly (SlipstreamPoolState & {
3658
3767
  readonly amm: AerodromeSlipstreamAdapter;
3659
3768
  })[]>;
@@ -3700,13 +3809,6 @@ export declare class SteerClient {
3700
3809
  getCompositeVault(chainId: number, address: Address, options?: VaultLoadOptions): Promise<CompositeVault>;
3701
3810
  }
3702
3811
  //#endregion
3703
- //#region src/data/uniswap-v3.d.ts
3704
- export declare class UniswapV3DataAdapter extends PoolDataAdapter<Address> {
3705
- #private;
3706
- constructor(definition: DataAdapterDefinition, factory: Address, indexerRequest?: HttpTransport);
3707
- listPools(request?: PoolListRequest, options?: DataAdapterRequestOptions): Promise<Page<Address>>;
3708
- }
3709
- //#endregion
3710
3812
  //#region src/vault/adapters/aerodrome/types.d.ts
3711
3813
  interface AerodromeVaultSnapshot extends LiquidityVaultSnapshot<Address> {
3712
3814
  readonly configuredPositions: NonNullable<LiquidityVaultSnapshot["configuredPositions"]>;
@@ -3857,5 +3959,72 @@ export declare class UniswapV4Vault extends LiquidityVault<UniswapV4Adapter, V4V
3857
3959
  prepareDeposit(request: PrepareDepositRequest, options?: ReadOptions): Promise<DepositPlan>;
3858
3960
  }
3859
3961
  //#endregion
3860
- export { type AerodromeDepositPlan, type AerodromeDepositPreview, type AerodromeVaultSnapshot, type AerodromeWithdrawPlan, type AerodromeWithdrawPreview, type AlgebraContracts, type AlgebraIntegralContracts, type AlgebraIntegralPoolState, type AlgebraLegacyContracts, type AlgebraLegacyPoolLookupRequest, type AlgebraLegacyPoolState, type AlgebraLegacyPoolsLookupRequest, type AlgebraPoolLookupRequest, type AlgebraPoolReference, type AlgebraPoolState, type AlgebraPoolsLookupRequest, type AlgebraSwapFee, type AmmLookupRequest, type AmmProtocolAdapter, type AmmProtocolAdapters, type AmmProtocolVersion, type AmmVersion, type AssetAmount, type BlackholeNativeUnwrapPlan, type BlackholePosition, type BlackholeVaultSnapshot, type BlackholeWithdrawPlan, type BlackholeWithdrawPreview, type ConcentratedPoolState, type DepositPlan, type DepositPreview, type DepositQuote, type DepositRequest, type DiscoveredPool, type IndexerConfig, type InfinityCLContracts, type InfinityCLDirectionalFees, type InfinityCLPoolFees, type InfinityCLPoolIdReference, type InfinityCLPoolKey, type InfinityCLPoolKeyInput, type InfinityCLPoolLookupRequest, type InfinityCLPoolReference, type InfinityCLPoolState, type InfinityCLPoolsLookupRequest, type InfinityCLSwapQuoteRequest, type KnownSteerVault, type LiquidityDepositPreview, type LiquidityDepth, type LiquidityDepthRequest, type LiquidityDistribution, type LiquidityFees, type LiquidityInterval, type LiquidityPool, type LiquidityPosition, type LiquidityPositionRange, type LiquidityVaultRewards, type LiquidityVaultSnapshot, type LiquidityVaultUserPosition, type LogEvent, type Logger, type PoolBatchReadOptions, type PoolLookupRequest, type PoolPrice, type PoolReadOptions, type PoolReadResult, type PoolState, type PoolTicks, type PoolTokenBalance, type PoolsLookupRequest, type PrepareDepositRequest, type PrepareWithdrawRequest, type SlipstreamContracts, type SlipstreamPoolFees, type SlipstreamPoolLookupRequest, type SlipstreamPoolState, type SlipstreamPoolsLookupRequest, type SlipstreamQuoteOptions, type StrategyPosition, type SurroundingTicks, type SwapQuote, type SwapQuoteRequest, type TheGraphIndexerConfig, type TickLiquidity, type TickPoolState, type TickRange, type TokenPairAmounts, type UserVaultDiscoveryRequest, type UserVaultListRequest, type UserVaultPage, type V3Contracts, type V3PoolFees, type V3PoolLookupRequest, type V3PoolState, type V3PoolsLookupRequest, type V4Contracts, type V4DirectionalFees, type V4PoolFees, type V4PoolKey, type V4PoolLookupRequest, type V4PoolReference, type V4PoolState, type V4PoolsLookupRequest, type V4ReadOptions, type V4SwapQuoteRequest, type V4VaultPool, type VaultAmmFilter, type VaultDiscoveryRequest, type VaultListRequest, type VaultLoadOptions, type VaultLoadResult, type VaultMetadata, type VaultRewardAsset, type VaultRewardFee, type VaultRewardPayout, type VaultSnapshotResult, type VaultUnderlying, type VaultUserPosition, type WithdrawPlan, type WithdrawPreview, type WithdrawRequest, type WithdrawRewards, ethereumContracts as mainnetContracts };
3962
+ //#region src/vault/config.d.ts
3963
+ declare const vaultConfigSchema: v.SchemaWithPipe<readonly [v.LooseObjectSchema<{
3964
+ readonly strategyConfigData: v.SchemaWithPipe<readonly [v.UnknownSchema, v.CheckAction<unknown, undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.ReadonlyAction<{
3965
+ [x: string]: unknown;
3966
+ }>]>;
3967
+ readonly vaultPayload: v.SchemaWithPipe<readonly [v.UnknownSchema, v.CheckAction<unknown, undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.ReadonlyAction<{
3968
+ [x: string]: unknown;
3969
+ }>]>;
3970
+ readonly dataConnectorsData: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.LooseObjectSchema<{
3971
+ readonly bundleHash: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3972
+ readonly configData: v.SchemaWithPipe<readonly [v.UnknownSchema, v.CheckAction<unknown, undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, v.ReadonlyAction<{
3973
+ [x: string]: unknown;
3974
+ }>]>;
3975
+ }, undefined>, v.ReadonlyAction<{
3976
+ bundleHash: string;
3977
+ readonly configData: Readonly<{
3978
+ [x: string]: unknown;
3979
+ }>;
3980
+ } & {
3981
+ [key: string]: unknown;
3982
+ }>]>, undefined>, v.ReadonlyAction<Readonly<{
3983
+ bundleHash: string;
3984
+ readonly configData: Readonly<{
3985
+ [x: string]: unknown;
3986
+ }>;
3987
+ } & {
3988
+ [key: string]: unknown;
3989
+ }>[]>]>;
3990
+ readonly strategy: v.OptionalSchema<v.SchemaWithPipe<readonly [v.LooseObjectSchema<{
3991
+ readonly chainId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
3992
+ readonly execBundle: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3993
+ readonly tokenId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3994
+ }, undefined>, v.ReadonlyAction<{
3995
+ chainId: number;
3996
+ execBundle: string;
3997
+ tokenId: string;
3998
+ } & {
3999
+ [key: string]: unknown;
4000
+ }>]>, undefined>;
4001
+ }, undefined>, v.ReadonlyAction<{
4002
+ readonly strategyConfigData: Readonly<{
4003
+ [x: string]: unknown;
4004
+ }>;
4005
+ readonly vaultPayload: Readonly<{
4006
+ [x: string]: unknown;
4007
+ }>;
4008
+ readonly dataConnectorsData: readonly Readonly<{
4009
+ bundleHash: string;
4010
+ readonly configData: Readonly<{
4011
+ [x: string]: unknown;
4012
+ }>;
4013
+ } & {
4014
+ [key: string]: unknown;
4015
+ }>[];
4016
+ strategy?: Readonly<{
4017
+ chainId: number;
4018
+ execBundle: string;
4019
+ tokenId: string;
4020
+ } & {
4021
+ [key: string]: unknown;
4022
+ }> | undefined;
4023
+ } & {
4024
+ [key: string]: unknown;
4025
+ }>]>;
4026
+ /** Stored manifest. Each strategy, vault and connector owns its configuration schema. */
4027
+ type VaultConfig = v.InferOutput<typeof vaultConfigSchema>;
4028
+ //#endregion
4029
+ 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 ExecutionContextRequest, 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 IpfsClientOptions, type IpfsRequestOptions, 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 VaultConfig, type VaultDiscoveryRequest, type VaultExecutionHistoryRequest, 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 };
3861
4030
  //# sourceMappingURL=index.d.mts.map