keyring-agent-core 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +719 -19
- package/dist/index.js +144 -144
- package/dist/index.native.js +262 -262
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2028,13 +2028,35 @@ interface AgentConfig {
|
|
|
2028
2028
|
* for buying one. Opt-in — defaults to false.
|
|
2029
2029
|
*/
|
|
2030
2030
|
nfc?: boolean;
|
|
2031
|
-
|
|
2031
|
+
/**
|
|
2032
|
+
* Uniswap Explore-backed pool agent (V2/V3/V4 + add-liquidity). Default on.
|
|
2033
|
+
* Mutually exclusive with `pool-subgraph` and `pool-defillama`.
|
|
2034
|
+
*/
|
|
2035
|
+
'pool-uniswap'?: boolean;
|
|
2032
2036
|
/**
|
|
2033
2037
|
* Subgraph-backed pool agent (Uniswap V3 via The Graph + DefiLlama APR + CoinPool ranges).
|
|
2034
|
-
* Mutually exclusive with `pool`. Enabling this
|
|
2035
|
-
*
|
|
2038
|
+
* Mutually exclusive with `pool-uniswap` and `pool-defillama`. Enabling this
|
|
2039
|
+
* (true) automatically disables `pool-uniswap` unless that key is also
|
|
2040
|
+
* explicitly set to true. Defaults to false.
|
|
2036
2041
|
*/
|
|
2037
2042
|
'pool-subgraph'?: boolean;
|
|
2043
|
+
/**
|
|
2044
|
+
* DefiLlama-backed pool agent (Uniswap V2/V3/V4 market data from DefiLlama
|
|
2045
|
+
* Yields + CoinPool ranges + on-chain add-liquidity).
|
|
2046
|
+
*
|
|
2047
|
+
* Serves the SAME capabilities as `pool-uniswap` — same questions, same
|
|
2048
|
+
* add-liquidity flow — through a different upstream API, so a deployment can
|
|
2049
|
+
* switch data sources without any user-visible behaviour change. Its data
|
|
2050
|
+
* tools are named `defillama-*` where the Uniswap stack's are `uniswap-*`;
|
|
2051
|
+
* the add-liquidity / price-range / manage tools are literally shared
|
|
2052
|
+
* (`pool-*`). Covers 7 chains rather than 8: DefiLlama tracks no Uniswap
|
|
2053
|
+
* pools on Linea.
|
|
2054
|
+
*
|
|
2055
|
+
* Mutually exclusive with `pool-uniswap` and `pool-subgraph`. Enabling this
|
|
2056
|
+
* (true) automatically disables `pool-uniswap` unless that key is also
|
|
2057
|
+
* explicitly set to true. Defaults to false. Configure via `defiLlama`.
|
|
2058
|
+
*/
|
|
2059
|
+
'pool-defillama'?: boolean;
|
|
2038
2060
|
ai?: boolean;
|
|
2039
2061
|
};
|
|
2040
2062
|
/**
|
|
@@ -2077,6 +2099,28 @@ interface AgentConfig {
|
|
|
2077
2099
|
/** Minimum USD value the user must supply to add liquidity. Default 10. */
|
|
2078
2100
|
minProvideUsd?: number;
|
|
2079
2101
|
} | false;
|
|
2102
|
+
/**
|
|
2103
|
+
* DefiLlama Yields config for the `pool-defillama` subagent. Set to `false` to
|
|
2104
|
+
* skip registering those tools.
|
|
2105
|
+
*
|
|
2106
|
+
* Independent of `uniswap` — the DefiLlama stack needs no Uniswap gateway. It
|
|
2107
|
+
* DOES still use the shared RPC endpoints (for the on-chain add-liquidity
|
|
2108
|
+
* flow) and the CoinPool API (for price-range suggestions), exactly as the
|
|
2109
|
+
* Uniswap stack does. To actually route queries here, also set
|
|
2110
|
+
* `subagents['pool-defillama']: true`.
|
|
2111
|
+
*/
|
|
2112
|
+
defiLlama?: {
|
|
2113
|
+
/** Base URL of the DefiLlama Yields API (default: https://yields.llama.fi). */
|
|
2114
|
+
baseUrl?: string;
|
|
2115
|
+
/**
|
|
2116
|
+
* How long the pool snapshot is cached, in ms. Default 5 minutes.
|
|
2117
|
+
* DefiLlama serves one un-filterable ~12MB payload, so this is fetched
|
|
2118
|
+
* whole and cached; upstream itself only refreshes hourly.
|
|
2119
|
+
*/
|
|
2120
|
+
cacheTtlMs?: number;
|
|
2121
|
+
/** Minimum USD value the user must supply to add liquidity. Default 10. */
|
|
2122
|
+
minProvideUsd?: number;
|
|
2123
|
+
} | false;
|
|
2080
2124
|
/**
|
|
2081
2125
|
* Tools that must NOT open a form in this deployment, mapped to the message
|
|
2082
2126
|
* the user gets instead (e.g. "you can swap in the app: <link>").
|
|
@@ -3130,33 +3174,38 @@ declare function createNfcAgent(llm: LLMProvider, registry: ToolRegistry, option
|
|
|
3130
3174
|
declare const AI_AGENT_TOOL_NAMES: readonly ["gemini-search-ai"];
|
|
3131
3175
|
declare function createAiAgent(llm: LLMProvider, registry: ToolRegistry, options?: SubagentOptions): Subagent;
|
|
3132
3176
|
|
|
3133
|
-
declare const
|
|
3134
|
-
declare function
|
|
3177
|
+
declare const POOL_UNISWAP_AGENT_TOOL_NAMES: readonly ["uniswap-top-pools", "uniswap-pool-detail", "uniswap-search-pools", "uniswap-pool-by-address", "pool-open-add-liquidity-form", "pool-preview-add-liquidity", "uniswap-estimate-pool-yield", "pool-price-ranges", "pool-manage-liquidity-redirect", "pool-fallback-ai"];
|
|
3178
|
+
declare function createPoolUniswapAgent(llm: LLMProvider, registry: ToolRegistry, options?: SubagentOptions): Subagent;
|
|
3135
3179
|
|
|
3136
3180
|
declare const WALLET_ACTION_AGENT_TOOL_NAMES: readonly ["open-send-native-form", "open-send-token-form", "open-send-nft-form", "open-buy-token-form", "open-swap-token-form", "open-approve-token-form"];
|
|
3137
3181
|
declare function createWalletActionAgent(llm: LLMProvider, registry: ToolRegistry, options?: SubagentOptions): Subagent;
|
|
3138
3182
|
|
|
3139
3183
|
/** Built-in subagent ids. */
|
|
3140
|
-
type DefaultSubagentName = 'wallet' | 'wallet-action' | 'lending' | 'token' | 'nft' | 'nfc' | 'pool' | 'pool-subgraph' | 'ai';
|
|
3184
|
+
type DefaultSubagentName = 'wallet' | 'wallet-action' | 'lending' | 'token' | 'nft' | 'nfc' | 'pool-uniswap' | 'pool-subgraph' | 'pool-defillama' | 'ai';
|
|
3141
3185
|
/**
|
|
3142
3186
|
* Per-subagent enable flags. Default for every key is `true` EXCEPT
|
|
3143
|
-
* `pool-subgraph`, which
|
|
3144
|
-
*
|
|
3187
|
+
* `pool-subgraph` and `pool-defillama`, which default to `false` because all
|
|
3188
|
+
* three pool agents are mutually exclusive. Enable exactly ONE per deployment:
|
|
3189
|
+
*
|
|
3190
|
+
* - `pool-uniswap` (default on) → Uniswap Explore gateway (V2/V3/V4) + add-liquidity
|
|
3191
|
+
* - `pool-subgraph` → The Graph subgraphs (V3) + DefiLlama APR + CoinPool ranges
|
|
3192
|
+
* - `pool-defillama` → DefiLlama Yields (V2/V3/V4 data, V3 add-liquidity) + CoinPool ranges
|
|
3145
3193
|
*
|
|
3146
|
-
* - `pool`
|
|
3147
|
-
*
|
|
3194
|
+
* Turning `pool-subgraph` OR `pool-defillama` on automatically turns
|
|
3195
|
+
* `pool-uniswap` off unless the caller has explicitly enabled it. This prevents
|
|
3196
|
+
* two pool agents from competing for the same user query.
|
|
3148
3197
|
*
|
|
3149
|
-
*
|
|
3150
|
-
*
|
|
3151
|
-
*
|
|
3198
|
+
* `pool-defillama` serves the same capabilities as `pool-uniswap` through a
|
|
3199
|
+
* different API: same flows, source-prefixed tool names, 7 chains instead of 8
|
|
3200
|
+
* (no Linea).
|
|
3152
3201
|
*/
|
|
3153
3202
|
type SubagentToggles = Partial<Record<DefaultSubagentName, boolean>>;
|
|
3154
3203
|
/**
|
|
3155
3204
|
* Create the default set of domain subagents. Returned in routing-priority order.
|
|
3156
3205
|
*
|
|
3157
|
-
* `toggles` lets callers disable individual subagents. `pool-subgraph`
|
|
3158
|
-
* opt-in (default false); enabling
|
|
3159
|
-
* explicitly set
|
|
3206
|
+
* `toggles` lets callers disable individual subagents. `pool-subgraph` and
|
|
3207
|
+
* `pool-defillama` are opt-in (default false); enabling either disables
|
|
3208
|
+
* `pool-uniswap` unless the caller has explicitly set it back on.
|
|
3160
3209
|
*/
|
|
3161
3210
|
declare function createDefaultSubagents(llm: LLMProvider, registry: ToolRegistry, options?: SubagentOptions, toggles?: SubagentToggles): Subagent[];
|
|
3162
3211
|
|
|
@@ -3283,6 +3332,24 @@ interface TokenMetadata {
|
|
|
3283
3332
|
usd_price?: number;
|
|
3284
3333
|
usd_price_24hr_percent_change?: number;
|
|
3285
3334
|
usd_price_24hr_usd_change?: number;
|
|
3335
|
+
/**
|
|
3336
|
+
* The token's `symbol()` as READ FROM THE CONTRACT, when the upstream index
|
|
3337
|
+
* has it. Distinct from `symbol`, which is the index's own editorial label and
|
|
3338
|
+
* is frequently lower-cased ("usdc") or otherwise diverges from the chain.
|
|
3339
|
+
*
|
|
3340
|
+
* `null` when the index never resolved it — a token whose symbol therefore
|
|
3341
|
+
* still has to be read on-chain by the caller. Absent on endpoints that don't
|
|
3342
|
+
* report it at all (e.g. top-gainers), which is the same situation.
|
|
3343
|
+
*
|
|
3344
|
+
* Consumers should not have to reach for this: `normalizePantographToken`
|
|
3345
|
+
* already promotes it over `symbol`, so the canonical field is on-chain-true
|
|
3346
|
+
* wherever Pantograph knew the answer. It stays exposed for callers that need
|
|
3347
|
+
* to know WHICH source a symbol came from — see `confirmTokenIdentities`,
|
|
3348
|
+
* which skips its RPC round-trip when the symbol is already on-chain-sourced.
|
|
3349
|
+
*/
|
|
3350
|
+
symbolOnchain?: string | null;
|
|
3351
|
+
/** The token's on-chain `name()`, same contract as {@link symbolOnchain}. */
|
|
3352
|
+
nameOnchain?: string | null;
|
|
3286
3353
|
auditGoplus?: Record<string, unknown>;
|
|
3287
3354
|
holder_count?: string;
|
|
3288
3355
|
holders?: unknown[];
|
|
@@ -8202,12 +8269,89 @@ declare class PoolByAddressTool extends BaseTool {
|
|
|
8202
8269
|
private formatPoolCandidate;
|
|
8203
8270
|
}
|
|
8204
8271
|
|
|
8272
|
+
/**
|
|
8273
|
+
* Pluggable pool LOOKUP for the add-liquidity flow.
|
|
8274
|
+
*
|
|
8275
|
+
* `OpenAddLiquidityFormTool` needs exactly one thing from a pool data source:
|
|
8276
|
+
* turn a token pair (plus an optional fee tier, plus an optionally pinned pool
|
|
8277
|
+
* address) into candidate pools it can pick from. Everything the tool does after
|
|
8278
|
+
* that — reading `slot0` / `tickSpacing` on-chain, the balance and gas-reserve
|
|
8279
|
+
* maths, tick alignment, building the gateway call — is chain state, identical
|
|
8280
|
+
* no matter which API named the pool.
|
|
8281
|
+
*
|
|
8282
|
+
* Isolating just the lookup behind this interface is what lets the Uniswap
|
|
8283
|
+
* Explore stack and the DefiLlama stack share ONE add-liquidity implementation
|
|
8284
|
+
* instead of maintaining two ~1000-line copies that would inevitably drift.
|
|
8285
|
+
*
|
|
8286
|
+
* {@link PoolCandidate} is structurally a subset of `SearchPoolResult`, so the
|
|
8287
|
+
* Uniswap resolver is a pass-through and the tool's existing matching helpers
|
|
8288
|
+
* work unchanged against either source.
|
|
8289
|
+
*/
|
|
8290
|
+
|
|
8291
|
+
/**
|
|
8292
|
+
* A token as a candidate reports it. `name` and `logo` are display-only — they
|
|
8293
|
+
* flow straight into the add-liquidity form's props — and are optional because
|
|
8294
|
+
* not every source carries them (DefiLlama reports symbols and addresses only,
|
|
8295
|
+
* so the form simply renders without them).
|
|
8296
|
+
*/
|
|
8297
|
+
interface PoolCandidateToken {
|
|
8298
|
+
symbol?: string;
|
|
8299
|
+
address?: string;
|
|
8300
|
+
name?: string;
|
|
8301
|
+
logo?: string;
|
|
8302
|
+
}
|
|
8303
|
+
/**
|
|
8304
|
+
* One candidate pool. `id` is the pool address (V2/V3) or pool id (V4) — the
|
|
8305
|
+
* identifier the add-liquidity flow reads on-chain.
|
|
8306
|
+
*/
|
|
8307
|
+
interface PoolCandidate {
|
|
8308
|
+
id?: string;
|
|
8309
|
+
protocolVersion?: 'V2' | 'V3' | 'V4';
|
|
8310
|
+
feeTier?: number;
|
|
8311
|
+
token0?: PoolCandidateToken;
|
|
8312
|
+
token1?: PoolCandidateToken;
|
|
8313
|
+
tvlUsd?: number;
|
|
8314
|
+
volume1DayUsd?: number;
|
|
8315
|
+
volumeUsd24hr?: number;
|
|
8316
|
+
apr?: number;
|
|
8317
|
+
isDynamicFee?: boolean;
|
|
8318
|
+
}
|
|
8319
|
+
interface ResolvePoolCandidatesParams {
|
|
8320
|
+
chain: string;
|
|
8321
|
+
token0Symbol: string;
|
|
8322
|
+
token1Symbol: string;
|
|
8323
|
+
/** Narrow to one fee tier (bps). Ignored when a pool address is pinned. */
|
|
8324
|
+
feeTier?: number;
|
|
8325
|
+
/**
|
|
8326
|
+
* `'V3'` for the mintable set (the default the flow works with), `'ALL'` when
|
|
8327
|
+
* the caller is diagnosing whether the pool exists as V2/V4 instead.
|
|
8328
|
+
*/
|
|
8329
|
+
protocolVersion: 'V3' | 'ALL';
|
|
8330
|
+
}
|
|
8331
|
+
/** A pool data source the add-liquidity flow can resolve candidates from. */
|
|
8332
|
+
interface PoolCandidateResolver {
|
|
8333
|
+
/**
|
|
8334
|
+
* Return every pool matching the pair on the chain. Returns `null` — distinct
|
|
8335
|
+
* from `[]` — when the LOOKUP ITSELF failed, so the caller reports an error
|
|
8336
|
+
* rather than the misleading "no pool found".
|
|
8337
|
+
*/
|
|
8338
|
+
resolveCandidates(params: ResolvePoolCandidatesParams): Promise<PoolCandidate[] | null>;
|
|
8339
|
+
}
|
|
8340
|
+
|
|
8205
8341
|
interface OpenAddLiquidityFormToolConfig extends UniswapServiceConfig {
|
|
8206
8342
|
pool?: PoolServiceConfig;
|
|
8207
8343
|
/** Min USD value the user must supply. Default 10. */
|
|
8208
8344
|
minProvideUsd?: number;
|
|
8209
8345
|
/** CoinPool API config for the reference price-range suggestions. */
|
|
8210
8346
|
coinPool?: CoinPoolServiceConfig;
|
|
8347
|
+
/**
|
|
8348
|
+
* Where candidate pools are looked up from. Defaults to Uniswap's own pool
|
|
8349
|
+
* search; the DefiLlama-backed pool agent injects its own resolver so both
|
|
8350
|
+
* agents share this single add-liquidity implementation. See
|
|
8351
|
+
* {@link PoolCandidateResolver} — only the LOOKUP varies, never the on-chain
|
|
8352
|
+
* work that follows it.
|
|
8353
|
+
*/
|
|
8354
|
+
resolver?: PoolCandidateResolver;
|
|
8211
8355
|
}
|
|
8212
8356
|
/**
|
|
8213
8357
|
* Tool: open-add-liquidity-form
|
|
@@ -8230,7 +8374,7 @@ declare class OpenAddLiquidityFormTool extends BaseTool {
|
|
|
8230
8374
|
category: string;
|
|
8231
8375
|
description: string;
|
|
8232
8376
|
parameters: ToolParameter[];
|
|
8233
|
-
private
|
|
8377
|
+
private resolver;
|
|
8234
8378
|
private pool;
|
|
8235
8379
|
private coinPool;
|
|
8236
8380
|
private minProvideUsd;
|
|
@@ -8360,7 +8504,39 @@ declare class EstimatePoolYieldTool extends BaseTool {
|
|
|
8360
8504
|
private describeQuery;
|
|
8361
8505
|
}
|
|
8362
8506
|
|
|
8363
|
-
|
|
8507
|
+
/**
|
|
8508
|
+
* A pool operation's supported-chain tier. Pools cover fewer chains than the
|
|
8509
|
+
* 12-chain global catalog, and ADD-LIQUIDITY covers fewer still:
|
|
8510
|
+
* - `info` → the 8 Uniswap-Explore chains ({@link POOL_INFO_CHAIN_HEXES}).
|
|
8511
|
+
* - `add-liquidity` → only chains with a gateway contract configured (a smaller,
|
|
8512
|
+
* dynamic subset resolved from the addresses API at call time).
|
|
8513
|
+
*
|
|
8514
|
+
* Tools never reason about these sets directly — they hand a scope to
|
|
8515
|
+
* {@link gatePoolChain}, which resolves + validates the chain and, when it isn't
|
|
8516
|
+
* served, returns the right "not available on this chain, available on: …" result.
|
|
8517
|
+
*/
|
|
8518
|
+
interface PoolChainScope {
|
|
8519
|
+
/** Selects the not-supported wording ({@link poolChainNotSupportedResult}). */
|
|
8520
|
+
readonly kind: 'info' | 'add-liquidity';
|
|
8521
|
+
/** Canonical hex ids this scope serves, intersected with the active set. */
|
|
8522
|
+
listSupported(): Promise<string[]>;
|
|
8523
|
+
/** True when this scope's data/flow is available for `chain`. */
|
|
8524
|
+
isSupported(chain: string): Promise<boolean>;
|
|
8525
|
+
}
|
|
8526
|
+
|
|
8527
|
+
interface PoolPriceRangesToolConfig extends CoinPoolServiceConfig {
|
|
8528
|
+
/**
|
|
8529
|
+
* Chain scope to gate on. Defaults to the Uniswap pool-INFO set; the
|
|
8530
|
+
* DefiLlama-backed pool agent passes its own (narrower) scope so the tool
|
|
8531
|
+
* advertises and gates the same chains as the rest of that agent's tools.
|
|
8532
|
+
* CoinPool itself is shared — only the SUPPORTED-CHAIN set differs.
|
|
8533
|
+
*/
|
|
8534
|
+
scope?: PoolChainScope;
|
|
8535
|
+
/** Human-readable supported-chain list for the tool description. */
|
|
8536
|
+
supportsLabel?: string;
|
|
8537
|
+
/** `chain` parameter description matching {@link scope}. */
|
|
8538
|
+
chainParamDescription?: string;
|
|
8539
|
+
}
|
|
8364
8540
|
/**
|
|
8365
8541
|
* Tool: get-pool-price-ranges
|
|
8366
8542
|
*
|
|
@@ -8379,6 +8555,7 @@ declare class PoolPriceRangesTool extends BaseTool {
|
|
|
8379
8555
|
category: string;
|
|
8380
8556
|
parameters: ToolParameter[];
|
|
8381
8557
|
private service;
|
|
8558
|
+
private scope;
|
|
8382
8559
|
constructor(config?: PoolPriceRangesToolConfig);
|
|
8383
8560
|
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<Record<string, unknown>>;
|
|
8384
8561
|
}
|
|
@@ -8988,6 +9165,464 @@ declare class SubgraphAddPoolTool extends BaseTool {
|
|
|
8988
9165
|
private formatPool;
|
|
8989
9166
|
}
|
|
8990
9167
|
|
|
9168
|
+
/**
|
|
9169
|
+
* DefiLlamaPoolService — pool data from the DefiLlama Yields API.
|
|
9170
|
+
*
|
|
9171
|
+
* The data source behind the `pool-defillama` subagent, mirroring what
|
|
9172
|
+
* {@link UniswapService} (Uniswap Explore) does for the `pool-uniswap`
|
|
9173
|
+
* subagent: same questions, different upstream. A deployment enables exactly
|
|
9174
|
+
* one of them.
|
|
9175
|
+
*
|
|
9176
|
+
* Three properties of the upstream shape everything here:
|
|
9177
|
+
*
|
|
9178
|
+
* 1. ONE endpoint, NO filters. `https://yields.llama.fi/pools` ignores every
|
|
9179
|
+
* query parameter and always returns the full ~12MB / 17k-pool snapshot, so
|
|
9180
|
+
* the service fetches once, caches, and does all filtering/sorting locally.
|
|
9181
|
+
* The in-flight promise is shared so a burst of tool calls triggers a single
|
|
9182
|
+
* download.
|
|
9183
|
+
* 2. NO pool addresses. A pool is identified by an opaque UUID plus
|
|
9184
|
+
* `underlyingTokens` + `poolMeta` (the fee tier). The address every on-chain
|
|
9185
|
+
* flow needs is recomputed with {@link deriveV3PoolAddress} — see
|
|
9186
|
+
* `uniswapV3PoolAddress.ts`. V2/V4 have no such derivation here, so only V3
|
|
9187
|
+
* pools carry an address.
|
|
9188
|
+
* 3. NO address index. Nothing maps an address back to a pool, so a pasted 0x
|
|
9189
|
+
* address is resolved by deriving candidate addresses for the pools we
|
|
9190
|
+
* already hold and matching (see {@link findByPoolAddress}); the caller falls
|
|
9191
|
+
* back to an on-chain read when that misses.
|
|
9192
|
+
*/
|
|
9193
|
+
interface DefiLlamaPoolServiceConfig {
|
|
9194
|
+
/** Base URL of the DefiLlama Yields API. Defaults to `https://yields.llama.fi`. */
|
|
9195
|
+
baseUrl?: string;
|
|
9196
|
+
/** Snapshot cache TTL in ms. Defaults to 5 minutes (upstream refreshes hourly). */
|
|
9197
|
+
cacheTtlMs?: number;
|
|
9198
|
+
}
|
|
9199
|
+
/** Uniswap protocol versions DefiLlama exposes as separate `project` values. */
|
|
9200
|
+
type DefiLlamaProtocolVersion = 'V2' | 'V3' | 'V4';
|
|
9201
|
+
/** A pool, normalized to the shape the pool tools render. */
|
|
9202
|
+
interface DefiLlamaPool {
|
|
9203
|
+
/** DefiLlama's opaque pool UUID — stable, and the key for the history chart. */
|
|
9204
|
+
id: string;
|
|
9205
|
+
/** `"USDC/WETH"`. Derived from the upstream `symbol` (`"USDC-WETH"`). */
|
|
9206
|
+
pair: string;
|
|
9207
|
+
chain: string;
|
|
9208
|
+
protocolVersion: DefiLlamaProtocolVersion;
|
|
9209
|
+
/**
|
|
9210
|
+
* The pool's on-chain address, recomputed via CREATE2. Present only for V3
|
|
9211
|
+
* pools on a chain with a known factory AND a parseable fee tier; `undefined`
|
|
9212
|
+
* otherwise, which callers must treat as "cannot act on-chain".
|
|
9213
|
+
*/
|
|
9214
|
+
address?: string;
|
|
9215
|
+
/** Fee tier in hundredths of a bip (500 = 0.05%), parsed from `poolMeta`. */
|
|
9216
|
+
feeTierBps?: number;
|
|
9217
|
+
/** Fee tier as a percentage (0.05 = 0.05%). */
|
|
9218
|
+
feeTierPercent?: number;
|
|
9219
|
+
tvlUsd: number;
|
|
9220
|
+
/** Fee APR as a PERCENT (5 = 5%) — same unit as the Uniswap/subgraph paths. */
|
|
9221
|
+
apr?: number;
|
|
9222
|
+
/** {@link apr} plus any reward/incentive APR upstream attributes to the pool. */
|
|
9223
|
+
totalApr?: number;
|
|
9224
|
+
volume1DayUsd?: number;
|
|
9225
|
+
volume7DayUsd?: number;
|
|
9226
|
+
/** 24h volume ÷ TVL — the capital-efficiency signal the shared rubric reads. */
|
|
9227
|
+
volumeToTvlRatio?: number;
|
|
9228
|
+
/** LP fee revenue over 24h, in USD: volume × fee tier. */
|
|
9229
|
+
fee24hUsd?: number;
|
|
9230
|
+
token0?: {
|
|
9231
|
+
symbol?: string;
|
|
9232
|
+
address?: string;
|
|
9233
|
+
};
|
|
9234
|
+
token1?: {
|
|
9235
|
+
symbol?: string;
|
|
9236
|
+
address?: string;
|
|
9237
|
+
};
|
|
9238
|
+
/** True when DefiLlama classifies the pool as a stablecoin pair. */
|
|
9239
|
+
isStablecoin?: boolean;
|
|
9240
|
+
/** Upstream impermanent-loss risk label ("no" / "yes"). */
|
|
9241
|
+
ilRisk?: string;
|
|
9242
|
+
/** APR change over 1d / 7d / 30d, in percentage points. */
|
|
9243
|
+
aprChange1D?: number;
|
|
9244
|
+
aprChange7D?: number;
|
|
9245
|
+
aprChange30D?: number;
|
|
9246
|
+
/** 30-day mean APR — a steadiness signal against the spot `apr`. */
|
|
9247
|
+
aprMean30d?: number;
|
|
9248
|
+
}
|
|
9249
|
+
interface DefiLlamaServiceResponse<T> {
|
|
9250
|
+
success: boolean;
|
|
9251
|
+
data?: T;
|
|
9252
|
+
error?: string;
|
|
9253
|
+
}
|
|
9254
|
+
type DefiLlamaSortBy = 'tvl' | 'volume1Day' | 'volume7Day' | 'apr';
|
|
9255
|
+
/** Hex chain ids this service serves, in the order tools should advertise them. */
|
|
9256
|
+
declare const DEFILLAMA_POOL_CHAIN_HEXES: string[];
|
|
9257
|
+
declare class DefiLlamaPoolService {
|
|
9258
|
+
private readonly baseUrl;
|
|
9259
|
+
private readonly cacheTtlMs;
|
|
9260
|
+
constructor(config?: DefiLlamaPoolServiceConfig);
|
|
9261
|
+
/** The cache entry for this instance's endpoint, created on first use. */
|
|
9262
|
+
private get store();
|
|
9263
|
+
isSupported(chain?: string | null): boolean;
|
|
9264
|
+
listSupportedChains(): string[];
|
|
9265
|
+
/**
|
|
9266
|
+
* The full normalized pool snapshot, cached for {@link cacheTtlMs}.
|
|
9267
|
+
*
|
|
9268
|
+
* On a refresh failure a STALE cache is returned rather than throwing: pool
|
|
9269
|
+
* data minutes out of date is far better than an error, and DefiLlama's own
|
|
9270
|
+
* numbers only refresh hourly.
|
|
9271
|
+
*/
|
|
9272
|
+
private snapshot;
|
|
9273
|
+
/**
|
|
9274
|
+
* Force the next read to re-download. Exposed for tests/diagnostics.
|
|
9275
|
+
*
|
|
9276
|
+
* Clears the cache for THIS instance's endpoint, which every service on that
|
|
9277
|
+
* endpoint shares — that is the point of the shared cache, and what makes a
|
|
9278
|
+
* test's reset actually take effect on the tools under test.
|
|
9279
|
+
*/
|
|
9280
|
+
clearCache(): void;
|
|
9281
|
+
/**
|
|
9282
|
+
* Parse `poolMeta` into a fee tier in hundredths of a bip.
|
|
9283
|
+
*
|
|
9284
|
+
* Upstream writes the tier as a percentage string ("0.05%", "0.3%"). Values
|
|
9285
|
+
* that do not correspond to a real Uniswap tier are rejected rather than
|
|
9286
|
+
* rounded: a wrong tier would derive a wrong pool address, and a wrong address
|
|
9287
|
+
* is far more damaging than a missing one.
|
|
9288
|
+
*/
|
|
9289
|
+
private parseFeeTierBps;
|
|
9290
|
+
private normalize;
|
|
9291
|
+
private sortValue;
|
|
9292
|
+
private sorted;
|
|
9293
|
+
/**
|
|
9294
|
+
* The chain-wide leaderboard — the `get-top-pools` counterpart.
|
|
9295
|
+
*
|
|
9296
|
+
* `forAddLiquidity` keeps only pools that can actually be minted into: V3
|
|
9297
|
+
* pools whose address was derivable. Without it a user could pick a V2/V4 pool
|
|
9298
|
+
* from the list and hit a dead end at the add-liquidity step.
|
|
9299
|
+
*/
|
|
9300
|
+
getTopPools(params: {
|
|
9301
|
+
chain: string;
|
|
9302
|
+
limit?: number;
|
|
9303
|
+
sortBy?: DefiLlamaSortBy;
|
|
9304
|
+
protocolVersion?: DefiLlamaProtocolVersion | 'ALL';
|
|
9305
|
+
forAddLiquidity?: boolean;
|
|
9306
|
+
}): Promise<DefiLlamaServiceResponse<DefiLlamaPool[]>>;
|
|
9307
|
+
/**
|
|
9308
|
+
* Free-text pool search — the `search-pools` counterpart.
|
|
9309
|
+
*
|
|
9310
|
+
* Matches on token SYMBOLS (and token addresses when the query looks like
|
|
9311
|
+
* one). Every named symbol must appear in the pair, so "ETH USDC" returns only
|
|
9312
|
+
* ETH/USDC pools rather than the union of both tokens' pools.
|
|
9313
|
+
*/
|
|
9314
|
+
searchPools(params: {
|
|
9315
|
+
chain: string;
|
|
9316
|
+
query: string;
|
|
9317
|
+
limit?: number;
|
|
9318
|
+
sortBy?: DefiLlamaSortBy;
|
|
9319
|
+
protocolVersion?: DefiLlamaProtocolVersion | 'ALL';
|
|
9320
|
+
forAddLiquidity?: boolean;
|
|
9321
|
+
}): Promise<DefiLlamaServiceResponse<DefiLlamaPool[]>>;
|
|
9322
|
+
/**
|
|
9323
|
+
* Symbol comparison that tolerates the wrapped/native spelling difference:
|
|
9324
|
+
* a user asking for "ETH" means the WETH pools, and "BTC" means WBTC. Exact
|
|
9325
|
+
* match first so "ETH" never matches an unrelated token that merely contains
|
|
9326
|
+
* those letters.
|
|
9327
|
+
*/
|
|
9328
|
+
private symbolMatches;
|
|
9329
|
+
/**
|
|
9330
|
+
* Resolve the pools for a token pair (and optional fee tier) — the
|
|
9331
|
+
* `get-pool-detail` counterpart. Returns EVERY matching pool, sorted, so the
|
|
9332
|
+
* caller can render fee-tier candidates when more than one comes back.
|
|
9333
|
+
*/
|
|
9334
|
+
getPoolsByPair(params: {
|
|
9335
|
+
chain: string;
|
|
9336
|
+
token0Symbol: string;
|
|
9337
|
+
token1Symbol?: string;
|
|
9338
|
+
feeTierBps?: number;
|
|
9339
|
+
protocolVersion?: DefiLlamaProtocolVersion | 'ALL';
|
|
9340
|
+
}): Promise<DefiLlamaServiceResponse<DefiLlamaPool[]>>;
|
|
9341
|
+
/**
|
|
9342
|
+
* Reverse-resolve a pool ADDRESS to its DefiLlama entry.
|
|
9343
|
+
*
|
|
9344
|
+
* DefiLlama has no address index, so this matches against the addresses the
|
|
9345
|
+
* snapshot already derived. A hit therefore means "a V3 pool DefiLlama tracks
|
|
9346
|
+
* on this chain"; a miss means only that DefiLlama does not track it — the
|
|
9347
|
+
* pool may still exist, which is why callers fall back to an on-chain read
|
|
9348
|
+
* rather than reporting "not found".
|
|
9349
|
+
*/
|
|
9350
|
+
findByPoolAddress(params: {
|
|
9351
|
+
chain: string;
|
|
9352
|
+
address: string;
|
|
9353
|
+
}): Promise<DefiLlamaServiceResponse<DefiLlamaPool | null>>;
|
|
9354
|
+
/**
|
|
9355
|
+
* Find the pools that contain a given TOKEN address — what a pasted address
|
|
9356
|
+
* resolves to when it turns out to be a token rather than a pool.
|
|
9357
|
+
*/
|
|
9358
|
+
findPoolsByTokenAddress(params: {
|
|
9359
|
+
chain: string;
|
|
9360
|
+
address: string;
|
|
9361
|
+
limit?: number;
|
|
9362
|
+
}): Promise<DefiLlamaServiceResponse<DefiLlamaPool[]>>;
|
|
9363
|
+
}
|
|
9364
|
+
|
|
9365
|
+
type DefiLlamaTopPoolsToolConfig = DefiLlamaPoolServiceConfig;
|
|
9366
|
+
/**
|
|
9367
|
+
* Tool: get-top-pools (DefiLlama-backed)
|
|
9368
|
+
*
|
|
9369
|
+
* The chain-wide pool leaderboard — the DefiLlama counterpart of the Uniswap
|
|
9370
|
+
* stack's `uniswap-top-pools`. The `llama-` prefix names the data source, so a
|
|
9371
|
+
* log line or trace says unambiguously which stack answered.
|
|
9372
|
+
*
|
|
9373
|
+
* Note the sort keys differ slightly from the Uniswap stack: DefiLlama reports a
|
|
9374
|
+
* 7-day volume bucket where Uniswap reports a 30-day one, so `volume7Day`
|
|
9375
|
+
* replaces `volume30Day` rather than being faked from data we do not have.
|
|
9376
|
+
*/
|
|
9377
|
+
declare class DefiLlamaTopPoolsTool extends BaseTool {
|
|
9378
|
+
name: string;
|
|
9379
|
+
description: string;
|
|
9380
|
+
category: string;
|
|
9381
|
+
parameters: ToolParameter[];
|
|
9382
|
+
private service;
|
|
9383
|
+
private pool;
|
|
9384
|
+
constructor(config?: DefiLlamaTopPoolsToolConfig);
|
|
9385
|
+
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<Record<string, unknown>>;
|
|
9386
|
+
}
|
|
9387
|
+
|
|
9388
|
+
type DefiLlamaPoolSearchToolConfig = DefiLlamaPoolServiceConfig;
|
|
9389
|
+
/**
|
|
9390
|
+
* Tool: search-pools (DefiLlama-backed)
|
|
9391
|
+
*
|
|
9392
|
+
* Finds pools related to a token the user named — the DefiLlama counterpart of
|
|
9393
|
+
* the Uniswap stack's `uniswap-search-pools`.
|
|
9394
|
+
*
|
|
9395
|
+
* The match is AND-across-terms (see `DefiLlamaPoolService.searchPools`), so a
|
|
9396
|
+
* two-symbol query returns that pair's pools rather than the union of each
|
|
9397
|
+
* token's pools, and "ETH" resolves to the WETH pools a user actually means.
|
|
9398
|
+
*/
|
|
9399
|
+
declare class DefiLlamaPoolSearchTool extends BaseTool {
|
|
9400
|
+
name: string;
|
|
9401
|
+
description: string;
|
|
9402
|
+
category: string;
|
|
9403
|
+
parameters: ToolParameter[];
|
|
9404
|
+
private service;
|
|
9405
|
+
private pool;
|
|
9406
|
+
constructor(config?: DefiLlamaPoolSearchToolConfig);
|
|
9407
|
+
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<Record<string, unknown>>;
|
|
9408
|
+
}
|
|
9409
|
+
|
|
9410
|
+
type DefiLlamaPoolDetailToolConfig = DefiLlamaPoolServiceConfig;
|
|
9411
|
+
/**
|
|
9412
|
+
* Tool: get-pool-detail (DefiLlama-backed)
|
|
9413
|
+
*
|
|
9414
|
+
* Full stats for ONE pool identified BY TOKEN PAIR (never by address — that is
|
|
9415
|
+
* `lookup-pool-by-address`). Mirrors the Uniswap stack's two-outcome contract
|
|
9416
|
+
* exactly, because the subagent prompt is shared:
|
|
9417
|
+
*
|
|
9418
|
+
* - the filter resolves to one pool → `{ pool: … }`
|
|
9419
|
+
* - it resolves to several → `{ candidates: [ … ] }` and NO `pool`
|
|
9420
|
+
* key, so the model asks which fee tier rather than inventing one.
|
|
9421
|
+
*/
|
|
9422
|
+
declare class DefiLlamaPoolDetailTool extends BaseTool {
|
|
9423
|
+
name: string;
|
|
9424
|
+
description: string;
|
|
9425
|
+
category: string;
|
|
9426
|
+
parameters: ToolParameter[];
|
|
9427
|
+
private service;
|
|
9428
|
+
private pool;
|
|
9429
|
+
constructor(config?: DefiLlamaPoolDetailToolConfig);
|
|
9430
|
+
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<Record<string, unknown>>;
|
|
9431
|
+
}
|
|
9432
|
+
|
|
9433
|
+
type DefiLlamaPoolByAddressToolConfig = DefiLlamaPoolServiceConfig;
|
|
9434
|
+
/**
|
|
9435
|
+
* Tool: lookup-pool-by-address (DefiLlama-backed)
|
|
9436
|
+
*
|
|
9437
|
+
* Resolves a bare 0x address the user pasted without saying what it is.
|
|
9438
|
+
*
|
|
9439
|
+
* This is the one capability DefiLlama cannot serve on its own: its Yields feed
|
|
9440
|
+
* has no address index at all — a pool is an opaque UUID — so an address can
|
|
9441
|
+
* never be looked up directly. The tool therefore resolves in three stages,
|
|
9442
|
+
* cheapest first, and only reports "not found" when all three miss:
|
|
9443
|
+
*
|
|
9444
|
+
* 1. POOL, from the snapshot. `DefiLlamaPoolService` recomputes each V3 pool's
|
|
9445
|
+
* CREATE2 address, so a pasted address can be matched against those. A hit
|
|
9446
|
+
* carries the full market stats (TVL / volume / APR).
|
|
9447
|
+
* 2. TOKEN, from the snapshot — the address is one of a tracked pool's tokens,
|
|
9448
|
+
* so we can list the pools containing it.
|
|
9449
|
+
* 3. POOL, ON-CHAIN. A miss above means only that DefiLlama does not TRACK the
|
|
9450
|
+
* pool, not that it does not exist (new pools, thin pools, and every pool on
|
|
9451
|
+
* a chain DefiLlama covers sparsely). Reading `slot0`/`token0`/`token1`
|
|
9452
|
+
* settles it definitively. Such a pool has no market stats — it is reported
|
|
9453
|
+
* as a real pool with its on-chain facts and an explicit note that TVL /
|
|
9454
|
+
* volume / APR are unavailable, never with invented numbers.
|
|
9455
|
+
*
|
|
9456
|
+
* The `resolvedAs` contract ("pool" | "token") matches the Uniswap stack's tool
|
|
9457
|
+
* exactly, so the shared subagent prompt drives either implementation.
|
|
9458
|
+
*/
|
|
9459
|
+
declare class DefiLlamaPoolByAddressTool extends BaseTool {
|
|
9460
|
+
name: string;
|
|
9461
|
+
description: string;
|
|
9462
|
+
category: string;
|
|
9463
|
+
parameters: ToolParameter[];
|
|
9464
|
+
private service;
|
|
9465
|
+
private pool;
|
|
9466
|
+
constructor(config?: DefiLlamaPoolByAddressToolConfig);
|
|
9467
|
+
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<Record<string, unknown>>;
|
|
9468
|
+
/**
|
|
9469
|
+
* Read the address as a Uniswap V3 pool directly from the chain.
|
|
9470
|
+
*
|
|
9471
|
+
* Returns `null` when the address is not a V3 pool — `readPoolOnchain`
|
|
9472
|
+
* multicalls `slot0`/`tickSpacing`/`token0`/`token1`, all of which revert on a
|
|
9473
|
+
* non-pool contract, so a throw here IS the "not a pool" signal. Token symbols
|
|
9474
|
+
* are then filled in with one batched metadata read so the pair can be named.
|
|
9475
|
+
*/
|
|
9476
|
+
private readPoolOnchain;
|
|
9477
|
+
}
|
|
9478
|
+
|
|
9479
|
+
type DefiLlamaEstimatePoolYieldToolConfig = DefiLlamaPoolServiceConfig;
|
|
9480
|
+
/**
|
|
9481
|
+
* Tool: estimate-pool-yield (DefiLlama-backed)
|
|
9482
|
+
*
|
|
9483
|
+
* Projects fee income for a USD deposit. Mirrors the Uniswap stack's tool
|
|
9484
|
+
* contract field-for-field — `candidates` / `depositMode` / `autoPickedReason` —
|
|
9485
|
+
* so the shared subagent prompt's YIELD ESTIMATION FLOW drives either one.
|
|
9486
|
+
*
|
|
9487
|
+
* The tool resolves missing inputs itself rather than bouncing questions back:
|
|
9488
|
+
* one token auto-picks that token's highest-volume pool, a missing deposit falls
|
|
9489
|
+
* back to a clearly-labelled $1000 example, and only a genuinely ambiguous fee
|
|
9490
|
+
* tier produces a candidates list.
|
|
9491
|
+
*/
|
|
9492
|
+
declare class DefiLlamaEstimatePoolYieldTool extends BaseTool {
|
|
9493
|
+
name: string;
|
|
9494
|
+
description: string;
|
|
9495
|
+
category: string;
|
|
9496
|
+
parameters: ToolParameter[];
|
|
9497
|
+
private service;
|
|
9498
|
+
constructor(config?: DefiLlamaEstimatePoolYieldToolConfig);
|
|
9499
|
+
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<Record<string, unknown>>;
|
|
9500
|
+
/** One representative pool (the deepest) per fee tier, ordered by TVL. */
|
|
9501
|
+
private dedupeByFeeTier;
|
|
9502
|
+
}
|
|
9503
|
+
|
|
9504
|
+
/**
|
|
9505
|
+
* The DefiLlama implementation of {@link PoolCandidateResolver}.
|
|
9506
|
+
*
|
|
9507
|
+
* Lets the DefiLlama-backed pool agent reuse the SHARED add-liquidity flow
|
|
9508
|
+
* (`OpenAddLiquidityFormTool` / `PreviewAddLiquidityTool`) rather than forking
|
|
9509
|
+
* it: only the pool LOOKUP changes, and everything downstream — the on-chain
|
|
9510
|
+
* reads, balance and gas maths, tick alignment, the gateway call — is identical
|
|
9511
|
+
* because it operates on a pool address, not on an API response.
|
|
9512
|
+
*
|
|
9513
|
+
* The addresses come from `DefiLlamaPoolService`, which recomputes each V3
|
|
9514
|
+
* pool's CREATE2 address (DefiLlama itself never reports one). Pools whose
|
|
9515
|
+
* address could not be derived are dropped: the flow's very next step reads the
|
|
9516
|
+
* pool on-chain by address, so an entry without one could only fail there, with
|
|
9517
|
+
* a far less clear error than "no pool found".
|
|
9518
|
+
*/
|
|
9519
|
+
|
|
9520
|
+
declare class DefiLlamaPoolCandidateResolver implements PoolCandidateResolver {
|
|
9521
|
+
private service;
|
|
9522
|
+
constructor(config?: DefiLlamaPoolServiceConfig);
|
|
9523
|
+
resolveCandidates(params: ResolvePoolCandidatesParams): Promise<PoolCandidate[] | null>;
|
|
9524
|
+
}
|
|
9525
|
+
|
|
9526
|
+
/**
|
|
9527
|
+
* Chain scope + shared parameter text for the DefiLlama-backed pool tools.
|
|
9528
|
+
*
|
|
9529
|
+
* The `pool` (Uniswap Explore) agent serves 8 chains; this stack serves 7 —
|
|
9530
|
+
* Linea is deliberately absent because DefiLlama tracks zero Uniswap pools
|
|
9531
|
+
* there, and a chain that always answers with an empty list is worse than one
|
|
9532
|
+
* that says plainly it is not supported. Everything here derives from
|
|
9533
|
+
* {@link DEFILLAMA_POOL_CHAIN_HEXES}, so the advertised set, the gate, and the
|
|
9534
|
+
* "not available on this chain" list can never drift apart.
|
|
9535
|
+
*
|
|
9536
|
+
* Only the SCOPE differs from the Uniswap stack — the gating machinery itself
|
|
9537
|
+
* ({@link gatePoolChain}, {@link poolChainNotSupportedResult}) is shared, so both
|
|
9538
|
+
* pool agents phrase an unsupported chain identically.
|
|
9539
|
+
*/
|
|
9540
|
+
|
|
9541
|
+
/**
|
|
9542
|
+
* The pool-INFO scope for the DefiLlama stack — the 7 chains with real pool
|
|
9543
|
+
* data. Constant-backed (no network call), like `poolInfoScope()`.
|
|
9544
|
+
*/
|
|
9545
|
+
declare function defiLlamaPoolInfoScope(): PoolChainScope;
|
|
9546
|
+
/**
|
|
9547
|
+
* Human-readable, comma-joined list of the DefiLlama pool chains — names ONLY,
|
|
9548
|
+
* never hex. Used in each tool's `description` "Supports:" line so the
|
|
9549
|
+
* advertised set always matches the gated one.
|
|
9550
|
+
*/
|
|
9551
|
+
declare function defiLlamaPoolSupportsLabel(): string;
|
|
9552
|
+
/**
|
|
9553
|
+
* Canonical `chain` PARAMETER description for the DefiLlama pool tools.
|
|
9554
|
+
*
|
|
9555
|
+
* Spells out an EXHAUSTIVE name→hex map rather than an "e.g." list, for the same
|
|
9556
|
+
* reason the Uniswap stack does: given a partial list the model would sometimes
|
|
9557
|
+
* emit the wrong hex, or none, for a chain the list did not name. Linea is
|
|
9558
|
+
* absent on purpose — passing it is still safe (the gate answers "not available
|
|
9559
|
+
* on Linea, available on: …"), it is simply never advertised.
|
|
9560
|
+
*/
|
|
9561
|
+
declare const DEFILLAMA_POOL_CHAIN_PARAM_DESCRIPTION: string;
|
|
9562
|
+
|
|
9563
|
+
/**
|
|
9564
|
+
* Shared rendering shape for the DefiLlama pool tools.
|
|
9565
|
+
*
|
|
9566
|
+
* Every tool in this folder returns pools through {@link formatDefiLlamaPool} so a
|
|
9567
|
+
* pool reads identically whether it arrived from a ranking, a search, a pair
|
|
9568
|
+
* lookup, or a pasted address — the same guarantee `poolDetailShape.ts` gives
|
|
9569
|
+
* the Uniswap stack. The field NAMES deliberately match the Uniswap stack's
|
|
9570
|
+
* (`tvlUsd`, `volume1DayUsd`, `apr`, `feeTierPercent`, `volumeToTvlRatio`) so
|
|
9571
|
+
* the shared analyst rubric in `poolAnalysis.ts` reads the same keys from both
|
|
9572
|
+
* sources and neither agent needs its own divergent prompt.
|
|
9573
|
+
*/
|
|
9574
|
+
|
|
9575
|
+
/** A pool as the LLM sees it. Nulls are omitted rather than sent as `null`. */
|
|
9576
|
+
interface FormattedDefiLlamaPool {
|
|
9577
|
+
pair: string;
|
|
9578
|
+
address?: string;
|
|
9579
|
+
chain: string;
|
|
9580
|
+
protocolVersion: string;
|
|
9581
|
+
feeTierBps?: number;
|
|
9582
|
+
feeTierPercent?: number;
|
|
9583
|
+
tvlUsd: number;
|
|
9584
|
+
volume1DayUsd?: number;
|
|
9585
|
+
volume7DayUsd?: number;
|
|
9586
|
+
fee24hUsd?: number;
|
|
9587
|
+
apr?: number;
|
|
9588
|
+
totalApr?: number;
|
|
9589
|
+
volumeToTvlRatio?: number;
|
|
9590
|
+
aprChange1D?: number;
|
|
9591
|
+
aprChange7D?: number;
|
|
9592
|
+
aprMean30d?: number;
|
|
9593
|
+
isStablecoin?: boolean;
|
|
9594
|
+
ilRisk?: string;
|
|
9595
|
+
token0?: {
|
|
9596
|
+
symbol?: string;
|
|
9597
|
+
address?: string;
|
|
9598
|
+
};
|
|
9599
|
+
token1?: {
|
|
9600
|
+
symbol?: string;
|
|
9601
|
+
address?: string;
|
|
9602
|
+
};
|
|
9603
|
+
uniswapUrl?: string;
|
|
9604
|
+
/**
|
|
9605
|
+
* True when this pool cannot be added to through the in-app flow — a V2/V4
|
|
9606
|
+
* pool, or a V3 pool whose address could not be derived. Surfaced so the
|
|
9607
|
+
* analyst never promises an add-liquidity step that would dead-end.
|
|
9608
|
+
*/
|
|
9609
|
+
addLiquidityUnavailable?: boolean;
|
|
9610
|
+
}
|
|
9611
|
+
/**
|
|
9612
|
+
* Shape one {@link DefiLlamaPool} for a tool response.
|
|
9613
|
+
*
|
|
9614
|
+
* The Uniswap explore URL is attached whenever the address was derivable, giving
|
|
9615
|
+
* the user the same clickable pool page the Uniswap-backed agent links to — the
|
|
9616
|
+
* pool is the same on-chain contract regardless of which API described it.
|
|
9617
|
+
*/
|
|
9618
|
+
declare function formatDefiLlamaPool(p: DefiLlamaPool): FormattedDefiLlamaPool;
|
|
9619
|
+
/**
|
|
9620
|
+
* Extra grounding signals the DefiLlama feed carries that the Uniswap Explore
|
|
9621
|
+
* feed does not. Appended to the shared rubric so the analyst actually uses the
|
|
9622
|
+
* APR-trend and IL-risk fields instead of ignoring unfamiliar keys.
|
|
9623
|
+
*/
|
|
9624
|
+
declare const DEFILLAMA_EXTRA_SIGNALS: string;
|
|
9625
|
+
|
|
8991
9626
|
/**
|
|
8992
9627
|
* The transaction-fee model for wallet-action tools — the exchange screen's
|
|
8993
9628
|
* `feeGas`, ported so the agent sizes a spend exactly like the app does.
|
|
@@ -9167,6 +9802,12 @@ interface ResolvedToken {
|
|
|
9167
9802
|
symbol?: string;
|
|
9168
9803
|
name?: string;
|
|
9169
9804
|
decimals?: number;
|
|
9805
|
+
/**
|
|
9806
|
+
* True when `symbol` is the token's own `symbol()`, promoted from Pantograph's
|
|
9807
|
+
* `symbolOnchain`. It marks the symbol as safe to display as-is, in preference
|
|
9808
|
+
* to whatever the user or the model called the token.
|
|
9809
|
+
*/
|
|
9810
|
+
symbolIsOnchain?: boolean;
|
|
9170
9811
|
}
|
|
9171
9812
|
/**
|
|
9172
9813
|
* Shared base for wallet-action tools.
|
|
@@ -12331,6 +12972,11 @@ interface PantographRawToken {
|
|
|
12331
12972
|
decimals?: number;
|
|
12332
12973
|
fixedPrice?: number | string | null;
|
|
12333
12974
|
} | null;
|
|
12975
|
+
/**
|
|
12976
|
+
* The contract's own `symbol()`, as the index read it. `null` (or absent) when
|
|
12977
|
+
* the index never resolved one — see {@link TokenMetadata.symbolOnchain}.
|
|
12978
|
+
*/
|
|
12979
|
+
symbolOnchain?: string | null;
|
|
12334
12980
|
}
|
|
12335
12981
|
/**
|
|
12336
12982
|
* The yield half of a token API row — what decides whether a quoted price
|
|
@@ -12358,6 +13004,20 @@ declare class PantographService {
|
|
|
12358
13004
|
* slug — so token lookups work the same on Ethereum, Gnosis, or any other EVM.
|
|
12359
13005
|
*/
|
|
12360
13006
|
private tokensUrl;
|
|
13007
|
+
/**
|
|
13008
|
+
* Fetch token metadata + price rows for any number of contracts on one chain,
|
|
13009
|
+
* split across as many `/keyrings/tokens/all/{chainId}` requests as needed.
|
|
13010
|
+
*
|
|
13011
|
+
* Batches run in parallel and their rows are concatenated, so the caller sees
|
|
13012
|
+
* one flat list and cannot tell how many requests produced it. A batch that
|
|
13013
|
+
* fails contributes nothing rather than failing the whole call: every caller
|
|
13014
|
+
* here degrades per token (a missing row means no price, not an error), so
|
|
13015
|
+
* losing one chunk of a large wallet is strictly better than losing all of it.
|
|
13016
|
+
*
|
|
13017
|
+
* `chainId` is the DECIMAL id this route is keyed by; callers holding a hex
|
|
13018
|
+
* chain convert before calling.
|
|
13019
|
+
*/
|
|
13020
|
+
private fetchTokensAll;
|
|
12361
13021
|
/**
|
|
12362
13022
|
* Enrich token balances with price and logo data from Pantograph.
|
|
12363
13023
|
* Mutates the array in-place. Non-fatal: silently skips on failure.
|
|
@@ -12463,6 +13123,46 @@ declare class PantographService {
|
|
|
12463
13123
|
}): Promise<MoralisApiResponse<TrendingToken[]>>;
|
|
12464
13124
|
}
|
|
12465
13125
|
|
|
13126
|
+
/**
|
|
13127
|
+
* Deterministic Uniswap V3 pool-address derivation (CREATE2).
|
|
13128
|
+
*
|
|
13129
|
+
* DefiLlama Yields identifies a pool by an opaque UUID and never reports the
|
|
13130
|
+
* pool's contract address — it only gives `underlyingTokens` (the two token
|
|
13131
|
+
* addresses) and `poolMeta` (the fee tier). That is a problem for every flow
|
|
13132
|
+
* that must touch the chain: `PoolService.readPoolOnchain` needs a real address
|
|
13133
|
+
* to read `slot0` / `tickSpacing`, and the add-liquidity mint is built from it.
|
|
13134
|
+
*
|
|
13135
|
+
* Uniswap V3 deploys every pool through the factory with CREATE2, so the address
|
|
13136
|
+
* is a pure function of (factory, token0, token1, fee) and can be recomputed
|
|
13137
|
+
* locally — no RPC call, no extra API. This module is that function, and it is
|
|
13138
|
+
* what lets the DefiLlama-backed pool agent reach full parity with the Uniswap
|
|
13139
|
+
* Explore agent on the add-liquidity flow.
|
|
13140
|
+
*
|
|
13141
|
+
* The derived address is a CLAIM, not a fact: it is where the pool WOULD live if
|
|
13142
|
+
* it exists with that exact fee tier. Callers that go on to build a transaction
|
|
13143
|
+
* must confirm it on-chain (`readPoolOnchain` reverts on a non-pool), which the
|
|
13144
|
+
* add-liquidity flow already does as its first step.
|
|
13145
|
+
*/
|
|
13146
|
+
/** True when Uniswap V3 pool addresses can be derived on this chain. */
|
|
13147
|
+
declare function canDeriveV3PoolAddress(chain: string): boolean;
|
|
13148
|
+
/**
|
|
13149
|
+
* Derive the Uniswap V3 pool address for a token pair + fee tier on `chain`.
|
|
13150
|
+
*
|
|
13151
|
+
* Token order does NOT matter: the pair is sorted the way the factory sorts it
|
|
13152
|
+
* (ascending by address), so passing (WETH, USDC) and (USDC, WETH) yield the
|
|
13153
|
+
* same pool — which matters because DefiLlama's `underlyingTokens` order does
|
|
13154
|
+
* not follow the pool's own token0/token1 order.
|
|
13155
|
+
*
|
|
13156
|
+
* @param chain Hex chain id.
|
|
13157
|
+
* @param tokenA Either token's address (order irrelevant).
|
|
13158
|
+
* @param tokenB The other token's address.
|
|
13159
|
+
* @param feeTierBps Fee tier in hundredths of a bip, as the factory stores it
|
|
13160
|
+
* (100 = 0.01%, 500 = 0.05%, 3000 = 0.3%, 10000 = 1%).
|
|
13161
|
+
* @returns The lowercase pool address, or `null` when the chain has no known
|
|
13162
|
+
* factory or either input is not a valid address.
|
|
13163
|
+
*/
|
|
13164
|
+
declare function deriveV3PoolAddress(chain: string, tokenA: string, tokenB: string, feeTierBps: number): string | null;
|
|
13165
|
+
|
|
12466
13166
|
/**
|
|
12467
13167
|
* Manages conversation history for a single session.
|
|
12468
13168
|
*
|
|
@@ -12757,4 +13457,4 @@ declare class AbortError extends Error {
|
|
|
12757
13457
|
*/
|
|
12758
13458
|
declare function isAbortError(err: unknown): boolean;
|
|
12759
13459
|
|
|
12760
|
-
export { AI_AGENT_TOOL_NAMES, type Abi, type AbiItem, type AbiParameter, AbortError, type AddLiquidityFormProps, type AddLiquiditySummary, type Address, type AffiliateFee, type AgentConfig, AgentCore, type AgentResponse, type ApprovalTx, ApproveTokenTool, type ApyPoint, BaseNftAiTool, BaseSwapProvider, BaseTool, BaseWalletActionTool, type BlockParameters, type BlockTag, type BuildApprovalsParams, type BuyTokenSide, BuyTokenTool, CachedResource, type CallParameters, type Chain, type ChainMeta, type ChainRef, type ChainSelector, ChatHistory, type ChatMessage, type ChatOptions, type ChatRole, type CheckApprovalParams, type CheckApprovalResult, type Client, type ClientBatchConfig, CoinpoolConfigApi, type ConfirmAddLiquidityTxProps, type ContractFunctionParameters, type CortexResponse, DEFAULT_CHAIN, DEFAULT_PROVIDER, DEFAULT_RPC_BY_CHAIN, DebridgeProvider, type DecodedCall, type DecodedEvent, type DecodedParam, type DefaultSubagentName, type DefiPosition, type DefiPositionDetails, type DefiPositionToken, type DefiProtocolSummary, type EIP1193RequestFn, EstimatePoolYieldTool, type EstimatePoolYieldToolConfig, type FeeContext, GeminiProvider, GeminiSearchAiTool, type GeminiSearchAiToolConfig, HEX_TO_PANTOGRAPH, type Hex, type HolderChangePeriod, type HolderSupplyTier, type HttpMethod, type IngestKnowledgeBaseInput, type IngestKnowledgeBaseResult, type InputTokenInfo, type KBSearchResult, KeyringSettingApi, KnowledgeBase, type KnowledgeBaseEntry, type KnowledgeBaseProvider, type LLMProvider, type LLMProviderConfig, type LLMResponse, type LLMToolCall, type LendingMarket, type LendingMarketCardProps, LendingMarketDetailTool, type LendingMarketDetailToolConfig, type LendingMarketListProps, type LendingMarketOverview, LendingMarketsTool, type LendingMarketsToolConfig, type LendingProtocolType, LendingReadService, LendingService, type LendingServiceConfig, type LendingSupplyPosition, LendingSupplyService, MULTICALL3_ADDRESS, ManageLiquidityRedirectTool, type MarketplaceLink, type MoralisApiResponse, MoralisService, type MoralisServiceConfig, type MulticallParameters, type MulticallRawParameters, type MulticallResult, NATIVE_GAS_LIMIT, NFC_AGENT_TOOL_NAMES, NFC_AMAZON_DEFAULT_DOMAIN, NFC_AMAZON_DOMAINS, type NFTCollectionItem, NFTContractInfoTool, type NFTContractMetadata, type NFTItem, type NFTLastSale, type NFTMetadata, NFTMetadataTool, NFT_AGENT_TOOL_NAMES, type NativeActionKind, type NativeGasGap, type NativeTokenInfo, NfcBuyTool, NfcInfoTool, type NftTransferLastSale, NoFormTool, type NoFormToolMessages, OpenAddLiquidityFormTool, type OpenAddLiquidityFormToolConfig, OpenSupplyFormTool, type OpenSupplyFormToolConfig, POOL_AGENT_TOOL_NAMES, PantographService, type PantographServiceConfig, type PantographYieldIdentity, type PaymentToken, PoolByAddressTool, type PoolByAddressToolConfig, PoolDetailTool, type PoolDetailToolConfig, type PoolDisplayInfo, PoolFallbackAiTool, type PoolFallbackAiToolConfig, type PoolOnchainInfo, PoolPriceRangesTool, type PoolPriceRangesToolConfig, PoolSearchTool, type PoolSearchToolConfig, PoolService, type PoolServiceConfig, PoolSwapRouter, type PresetInputs, PreviewAddLiquidityTool, type PreviewAddLiquidityToolConfig, type PriceBounds, type PriceRangePrefill, type ProviderName, PublicClient, type PublicClientConfig, type QuickRate, type QuoteGas, type RangePreset, type ReActPhase, type ReActStep, type ReActTrace, type ReadContractParameters, RelayProvider, type ResolvedRange, Router, type RouterAssignment, type RouterDecision, SUPPLIABLE_TYPES, SUPPORTED_CHAINS, SUPPORTED_CHAINS_LABEL, SWAP_PROVIDER_CONFIG, SendNativeTool, SendNftTool, SendTokenTool, type SpendableBalance, type StateOverride, type StorageProvider, Subagent, type SubagentCard, type SubagentOptions, type SubagentParams, type SubagentResult, type SubagentTask, type SubagentToggles, SubgraphAddPoolTool, type SubgraphAddPoolToolConfig, SubgraphCoinPoolPairsTool, type SubgraphCoinPoolPairsToolConfig, SubgraphPoolByAddressTool, type SubgraphPoolByAddressToolConfig, SubgraphPoolByPositionIdTool, type SubgraphPoolByPositionIdToolConfig, SubgraphPoolSearchTool, type SubgraphPoolSearchToolConfig, SubgraphPositionDetailTool, type SubgraphPositionDetailToolConfig, SubgraphTrendingPoolsTool, type SubgraphTrendingPoolsToolConfig, type SuggestedAction, Summarizer, type SuppliableMarket, type SupplyProtocolType, type SupplyUsdcProps, type SupportedChainId, type SupportedChainName, type SwapProviderConfig, type SwapProviderConfigMap, SwapProviderFactory, type SwapQuoteParams, type SwapQuoteResult, type SwapRoute, type SwapRouteRequest, SwapRouter, SwapRouterRegistry, type SwapTokenFormProps, SwapTokenTool, type SwapTxData, Synthesizer, TOKEN_AGENT_TOOL_NAMES, TRANSFER_TOPIC, TRENDING_DEFAULT_BY_HEX_CHAIN, type TokenAnalyticsResponse, type TokenAnalyticsTimeframeBuckets, TokenAnalyticsTool, type TokenAnalyticsToolConfig, type TokenApproval, type TokenApprovalSpender, type TokenApprovalToken, type TokenBalance, type TokenDisplay, type TokenHoldersResponse, TokenHoldersTool, type TokenHoldersToolConfig, TokenInfoTool, type TokenInfoToolConfig, type TokenMetadata, type TokenScoreMetrics, type TokenScoreResponse, type TokenScoreSupply, type TokenScoreTimeframeBuckets, TokenScoreTool, type TokenScoreToolConfig, type Tool, type ToolDefinition, type ToolKind, type ToolParameter, ToolRegistry, type ToolResult, type TopGainerTimeFrames, type TopGainerToken, type TopGainersTimeFrame, TopGainersTool, type TopGainersToolConfig, TopPoolsTool, type TopPoolsToolConfig, type TrackStatus, type TrackTransactionParams, type TrackTransactionResult, type TransactionByHashResponse, TransactionByHashTool, type TransactionByHashToolConfig, type TransactionLog, type TransactionReceipt, type TransactionReceiptLog, type Transport, type TransportConfig, type TrendingToken, type TrendingTokenTimeframeBuckets, TrendingTokensTool, type TrendingTokensToolConfig, type UIPayload, UNISWAP_CHAIN_SLUG, UNRESOLVED_ASSET, type UnsignedTx, type UpstashEmbedStrategy, type UpstashFusionAlgorithm, type UpstashKBUpsertEntry, UpstashKnowledgeBase, type UpstashKnowledgeBaseConfig, type UserContext, UserSwapRouter, type VectorKBConfig, WALLET_ACTION_AGENT_TOOL_NAMES, WALLET_AGENT_TOOL_NAMES, type WalletActionProps, type WalletActionType, type WalletApprovalsResponse, WalletApprovalsTool, type WalletApprovalsToolConfig, type WalletDefiPositionSummary, WalletDefiPositionsTool, type WalletDefiPositionsToolConfig, type WalletDefiPositionsV1Response, type WalletDefiProtocolPositionsResponse, WalletDefiProtocolPositionsTool, type WalletDefiProtocolPositionsToolConfig, type WalletDefiProtocolPositionsV1Response, type WalletDefiSummaryResponse, type WalletDefiSummaryV1Response, type WalletHistoryCategory, type WalletHistoryContractInteraction, type WalletHistoryErc20Transfer, type WalletHistoryItem, type WalletHistoryNativeTransfer, type WalletHistoryNftTransfer, type WalletHistoryResponse, WalletHistoryTool, type WalletHistoryToolConfig, WalletLendingPositionsTool, type WalletLendingPositionsToolConfig, WalletNFTsTool, type WalletNFTsToolConfig, type WalletNftCardProps, type WalletNftListProps, type WalletNftTransferItem, type WalletNftTransfersResponse, WalletNftTransfersTool, type WalletNftTransfersToolConfig, type WalletPnlDaysWindow, type WalletPnlResponse, type WalletPnlSummaryResponse, WalletPnlSummaryTool, type WalletPnlSummaryToolConfig, type WalletPnlTokenItem, WalletPnlTool, type WalletPnlToolConfig, WalletTokenBalancesTool, type WalletTokenBalancesToolConfig, type WalletTokenTransferItem, type WalletTokenTransfersResponse, WalletTokenTransfersTool, type WalletTokenTransfersToolConfig, type WebsiteTrustExtraData, type WebsiteTrustInput, WebsiteTrustKeyringAgent, type WebsiteTrustKeyringAgentConfig, type WebsiteTrustResult, type X402Authorization, type X402Challenge, type X402Display, type X402Outcome, type X402PaymentRequiredProps, type X402Receipt, type X402RequestSpec, type X402Requirements, type X402SignRequest, type X402Signer, type X402TypedData, type X402Version, type YieldConversionCall, type YieldConversionPlan, type YieldPricingOptions, type YieldPricingToken, type YieldTokenInput, type YieldTokenValue, ZERO_ADDRESS, amazonDomainForLanguage, apiClient, applyYieldConversions, buildApprovals, buildChallenge, buildRangePresets, buildUniswapPoolUrl, call, chains, checkNativeGasAffordable, checksumAddress, clampTick, clearPublicClientCache, coinpoolConfigApi, compareDecimal, completeX402, configureSupportedChains, configureSwapProvider, convertSusdsShares, createAiAgent, createDefaultSubagents, createNfcAgent, createNftAgent, createPoolAgent, createPublicClient, createTokenAgent, createTransport, createWalletActionAgent, createWalletAgent, createX402SignatureProvider, decodeAbiParameters, decodeErrorResult, decodeFunctionData, decodeFunctionResult, displayFromChallenge, effectivePriceUSD, encodeAbiParameters, encodeApprove, encodeErrorResult, encodeFunctionData, encodeSignedHeader, erc1155Abi, erc20Abi, erc20Abi_bytes32, erc721Abi, estimateGas, estimateNativeGasReserveWei, estimateTransactionFeeWei, ethCallAt, ethCallByChain, exactAmountString, extractOutRaw, extractQuoteError, fallback, feeWeiToNative, fetchTopMarketplaces, floorToDecimals, getAbiItem, getAddress, getBalance, getBlock, getBlockNumber, getChain, getChainContractAddress, getChainId, getChainMeta, getCode, getDefaultRpcUrl, getGasPrice, getNativeTokenInfo, getPublicClient, getRevertReason, getRpcOverrides, getStorageAt, getTokenPriceUSD, getTransactionCount, http, humanToWei, ingestKnowledgeBase, isAbortError, isAddress, isAddressEqual, isPaymentRequired, isShareBasedProtocol, isShareBasedYieldToken, isSupplyChain, keyringSettingApi, listCandidateChains, listSupplyChains, mulDivFloor, multicall, multicall3Abi, multicallRaw, nativeGasShortfall, nfcAmazonSearchUrl, normaliseCountry, normalizeDecimal, normalizePriceRangeToPool, parseAbi, parseAbiItem, parseAbiParameters, pickLogo, planYieldTokenConversions, priceToTick, protocolLabelFor, psm3For, readContract, readPaymentError, readPaymentRequired, readProtocolFeeWei, readReceipt, readSpendableBalance, registerMaybeNoForm, requestWithX402, resolveGasLimit, resolveNfcShopLinks, resolveRpcUrl, resolveRpcUrls, resolveTokenPriceUSD, roundTickToSpacing, rpcCall, setRpcOverrides, spendableNative, swapProviderFactory, swapRouterRegistry, tickToPrice, toEventSelector, toFunctionSelector, toPantographChain, toPlainDecimal, valueYieldTokens, weiToHuman };
|
|
13460
|
+
export { AI_AGENT_TOOL_NAMES, type Abi, type AbiItem, type AbiParameter, AbortError, type AddLiquidityFormProps, type AddLiquiditySummary, type Address, type AffiliateFee, type AgentConfig, AgentCore, type AgentResponse, type ApprovalTx, ApproveTokenTool, type ApyPoint, BaseNftAiTool, BaseSwapProvider, BaseTool, BaseWalletActionTool, type BlockParameters, type BlockTag, type BuildApprovalsParams, type BuyTokenSide, BuyTokenTool, CachedResource, type CallParameters, type Chain, type ChainMeta, type ChainRef, type ChainSelector, ChatHistory, type ChatMessage, type ChatOptions, type ChatRole, type CheckApprovalParams, type CheckApprovalResult, type Client, type ClientBatchConfig, CoinpoolConfigApi, type ConfirmAddLiquidityTxProps, type ContractFunctionParameters, type CortexResponse, DEFAULT_CHAIN, DEFAULT_PROVIDER, DEFAULT_RPC_BY_CHAIN, DEFILLAMA_EXTRA_SIGNALS, DEFILLAMA_POOL_CHAIN_HEXES, DEFILLAMA_POOL_CHAIN_PARAM_DESCRIPTION, DebridgeProvider, type DecodedCall, type DecodedEvent, type DecodedParam, type DefaultSubagentName, DefiLlamaEstimatePoolYieldTool, type DefiLlamaEstimatePoolYieldToolConfig, type DefiLlamaPool, DefiLlamaPoolByAddressTool, type DefiLlamaPoolByAddressToolConfig, DefiLlamaPoolCandidateResolver, DefiLlamaPoolDetailTool, type DefiLlamaPoolDetailToolConfig, DefiLlamaPoolSearchTool, type DefiLlamaPoolSearchToolConfig, DefiLlamaPoolService, type DefiLlamaPoolServiceConfig, type DefiLlamaProtocolVersion, type DefiLlamaServiceResponse, type DefiLlamaSortBy, DefiLlamaTopPoolsTool, type DefiLlamaTopPoolsToolConfig, type DefiPosition, type DefiPositionDetails, type DefiPositionToken, type DefiProtocolSummary, type EIP1193RequestFn, EstimatePoolYieldTool, type EstimatePoolYieldToolConfig, type FeeContext, type FormattedDefiLlamaPool, GeminiProvider, GeminiSearchAiTool, type GeminiSearchAiToolConfig, HEX_TO_PANTOGRAPH, type Hex, type HolderChangePeriod, type HolderSupplyTier, type HttpMethod, type IngestKnowledgeBaseInput, type IngestKnowledgeBaseResult, type InputTokenInfo, type KBSearchResult, KeyringSettingApi, KnowledgeBase, type KnowledgeBaseEntry, type KnowledgeBaseProvider, type LLMProvider, type LLMProviderConfig, type LLMResponse, type LLMToolCall, type LendingMarket, type LendingMarketCardProps, LendingMarketDetailTool, type LendingMarketDetailToolConfig, type LendingMarketListProps, type LendingMarketOverview, LendingMarketsTool, type LendingMarketsToolConfig, type LendingProtocolType, LendingReadService, LendingService, type LendingServiceConfig, type LendingSupplyPosition, LendingSupplyService, MULTICALL3_ADDRESS, ManageLiquidityRedirectTool, type MarketplaceLink, type MoralisApiResponse, MoralisService, type MoralisServiceConfig, type MulticallParameters, type MulticallRawParameters, type MulticallResult, NATIVE_GAS_LIMIT, NFC_AGENT_TOOL_NAMES, NFC_AMAZON_DEFAULT_DOMAIN, NFC_AMAZON_DOMAINS, type NFTCollectionItem, NFTContractInfoTool, type NFTContractMetadata, type NFTItem, type NFTLastSale, type NFTMetadata, NFTMetadataTool, NFT_AGENT_TOOL_NAMES, type NativeActionKind, type NativeGasGap, type NativeTokenInfo, NfcBuyTool, NfcInfoTool, type NftTransferLastSale, NoFormTool, type NoFormToolMessages, OpenAddLiquidityFormTool, type OpenAddLiquidityFormToolConfig, OpenSupplyFormTool, type OpenSupplyFormToolConfig, POOL_UNISWAP_AGENT_TOOL_NAMES, PantographService, type PantographServiceConfig, type PantographYieldIdentity, type PaymentToken, PoolByAddressTool, type PoolByAddressToolConfig, PoolDetailTool, type PoolDetailToolConfig, type PoolDisplayInfo, PoolFallbackAiTool, type PoolFallbackAiToolConfig, type PoolOnchainInfo, PoolPriceRangesTool, type PoolPriceRangesToolConfig, PoolSearchTool, type PoolSearchToolConfig, PoolService, type PoolServiceConfig, PoolSwapRouter, type PresetInputs, PreviewAddLiquidityTool, type PreviewAddLiquidityToolConfig, type PriceBounds, type PriceRangePrefill, type ProviderName, PublicClient, type PublicClientConfig, type QuickRate, type QuoteGas, type RangePreset, type ReActPhase, type ReActStep, type ReActTrace, type ReadContractParameters, RelayProvider, type ResolvedRange, Router, type RouterAssignment, type RouterDecision, SUPPLIABLE_TYPES, SUPPORTED_CHAINS, SUPPORTED_CHAINS_LABEL, SWAP_PROVIDER_CONFIG, SendNativeTool, SendNftTool, SendTokenTool, type SpendableBalance, type StateOverride, type StorageProvider, Subagent, type SubagentCard, type SubagentOptions, type SubagentParams, type SubagentResult, type SubagentTask, type SubagentToggles, SubgraphAddPoolTool, type SubgraphAddPoolToolConfig, SubgraphCoinPoolPairsTool, type SubgraphCoinPoolPairsToolConfig, SubgraphPoolByAddressTool, type SubgraphPoolByAddressToolConfig, SubgraphPoolByPositionIdTool, type SubgraphPoolByPositionIdToolConfig, SubgraphPoolSearchTool, type SubgraphPoolSearchToolConfig, SubgraphPositionDetailTool, type SubgraphPositionDetailToolConfig, SubgraphTrendingPoolsTool, type SubgraphTrendingPoolsToolConfig, type SuggestedAction, Summarizer, type SuppliableMarket, type SupplyProtocolType, type SupplyUsdcProps, type SupportedChainId, type SupportedChainName, type SwapProviderConfig, type SwapProviderConfigMap, SwapProviderFactory, type SwapQuoteParams, type SwapQuoteResult, type SwapRoute, type SwapRouteRequest, SwapRouter, SwapRouterRegistry, type SwapTokenFormProps, SwapTokenTool, type SwapTxData, Synthesizer, TOKEN_AGENT_TOOL_NAMES, TRANSFER_TOPIC, TRENDING_DEFAULT_BY_HEX_CHAIN, type TokenAnalyticsResponse, type TokenAnalyticsTimeframeBuckets, TokenAnalyticsTool, type TokenAnalyticsToolConfig, type TokenApproval, type TokenApprovalSpender, type TokenApprovalToken, type TokenBalance, type TokenDisplay, type TokenHoldersResponse, TokenHoldersTool, type TokenHoldersToolConfig, TokenInfoTool, type TokenInfoToolConfig, type TokenMetadata, type TokenScoreMetrics, type TokenScoreResponse, type TokenScoreSupply, type TokenScoreTimeframeBuckets, TokenScoreTool, type TokenScoreToolConfig, type Tool, type ToolDefinition, type ToolKind, type ToolParameter, ToolRegistry, type ToolResult, type TopGainerTimeFrames, type TopGainerToken, type TopGainersTimeFrame, TopGainersTool, type TopGainersToolConfig, TopPoolsTool, type TopPoolsToolConfig, type TrackStatus, type TrackTransactionParams, type TrackTransactionResult, type TransactionByHashResponse, TransactionByHashTool, type TransactionByHashToolConfig, type TransactionLog, type TransactionReceipt, type TransactionReceiptLog, type Transport, type TransportConfig, type TrendingToken, type TrendingTokenTimeframeBuckets, TrendingTokensTool, type TrendingTokensToolConfig, type UIPayload, UNISWAP_CHAIN_SLUG, UNRESOLVED_ASSET, type UnsignedTx, type UpstashEmbedStrategy, type UpstashFusionAlgorithm, type UpstashKBUpsertEntry, UpstashKnowledgeBase, type UpstashKnowledgeBaseConfig, type UserContext, UserSwapRouter, type VectorKBConfig, WALLET_ACTION_AGENT_TOOL_NAMES, WALLET_AGENT_TOOL_NAMES, type WalletActionProps, type WalletActionType, type WalletApprovalsResponse, WalletApprovalsTool, type WalletApprovalsToolConfig, type WalletDefiPositionSummary, WalletDefiPositionsTool, type WalletDefiPositionsToolConfig, type WalletDefiPositionsV1Response, type WalletDefiProtocolPositionsResponse, WalletDefiProtocolPositionsTool, type WalletDefiProtocolPositionsToolConfig, type WalletDefiProtocolPositionsV1Response, type WalletDefiSummaryResponse, type WalletDefiSummaryV1Response, type WalletHistoryCategory, type WalletHistoryContractInteraction, type WalletHistoryErc20Transfer, type WalletHistoryItem, type WalletHistoryNativeTransfer, type WalletHistoryNftTransfer, type WalletHistoryResponse, WalletHistoryTool, type WalletHistoryToolConfig, WalletLendingPositionsTool, type WalletLendingPositionsToolConfig, WalletNFTsTool, type WalletNFTsToolConfig, type WalletNftCardProps, type WalletNftListProps, type WalletNftTransferItem, type WalletNftTransfersResponse, WalletNftTransfersTool, type WalletNftTransfersToolConfig, type WalletPnlDaysWindow, type WalletPnlResponse, type WalletPnlSummaryResponse, WalletPnlSummaryTool, type WalletPnlSummaryToolConfig, type WalletPnlTokenItem, WalletPnlTool, type WalletPnlToolConfig, WalletTokenBalancesTool, type WalletTokenBalancesToolConfig, type WalletTokenTransferItem, type WalletTokenTransfersResponse, WalletTokenTransfersTool, type WalletTokenTransfersToolConfig, type WebsiteTrustExtraData, type WebsiteTrustInput, WebsiteTrustKeyringAgent, type WebsiteTrustKeyringAgentConfig, type WebsiteTrustResult, type X402Authorization, type X402Challenge, type X402Display, type X402Outcome, type X402PaymentRequiredProps, type X402Receipt, type X402RequestSpec, type X402Requirements, type X402SignRequest, type X402Signer, type X402TypedData, type X402Version, type YieldConversionCall, type YieldConversionPlan, type YieldPricingOptions, type YieldPricingToken, type YieldTokenInput, type YieldTokenValue, ZERO_ADDRESS, amazonDomainForLanguage, apiClient, applyYieldConversions, buildApprovals, buildChallenge, buildRangePresets, buildUniswapPoolUrl, call, canDeriveV3PoolAddress, chains, checkNativeGasAffordable, checksumAddress, clampTick, clearPublicClientCache, coinpoolConfigApi, compareDecimal, completeX402, configureSupportedChains, configureSwapProvider, convertSusdsShares, createAiAgent, createDefaultSubagents, createNfcAgent, createNftAgent, createPoolUniswapAgent, createPublicClient, createTokenAgent, createTransport, createWalletActionAgent, createWalletAgent, createX402SignatureProvider, decodeAbiParameters, decodeErrorResult, decodeFunctionData, decodeFunctionResult, defiLlamaPoolInfoScope, defiLlamaPoolSupportsLabel, deriveV3PoolAddress, displayFromChallenge, effectivePriceUSD, encodeAbiParameters, encodeApprove, encodeErrorResult, encodeFunctionData, encodeSignedHeader, erc1155Abi, erc20Abi, erc20Abi_bytes32, erc721Abi, estimateGas, estimateNativeGasReserveWei, estimateTransactionFeeWei, ethCallAt, ethCallByChain, exactAmountString, extractOutRaw, extractQuoteError, fallback, feeWeiToNative, fetchTopMarketplaces, floorToDecimals, formatDefiLlamaPool, getAbiItem, getAddress, getBalance, getBlock, getBlockNumber, getChain, getChainContractAddress, getChainId, getChainMeta, getCode, getDefaultRpcUrl, getGasPrice, getNativeTokenInfo, getPublicClient, getRevertReason, getRpcOverrides, getStorageAt, getTokenPriceUSD, getTransactionCount, http, humanToWei, ingestKnowledgeBase, isAbortError, isAddress, isAddressEqual, isPaymentRequired, isShareBasedProtocol, isShareBasedYieldToken, isSupplyChain, keyringSettingApi, listCandidateChains, listSupplyChains, mulDivFloor, multicall, multicall3Abi, multicallRaw, nativeGasShortfall, nfcAmazonSearchUrl, normaliseCountry, normalizeDecimal, normalizePriceRangeToPool, parseAbi, parseAbiItem, parseAbiParameters, pickLogo, planYieldTokenConversions, priceToTick, protocolLabelFor, psm3For, readContract, readPaymentError, readPaymentRequired, readProtocolFeeWei, readReceipt, readSpendableBalance, registerMaybeNoForm, requestWithX402, resolveGasLimit, resolveNfcShopLinks, resolveRpcUrl, resolveRpcUrls, resolveTokenPriceUSD, roundTickToSpacing, rpcCall, setRpcOverrides, spendableNative, swapProviderFactory, swapRouterRegistry, tickToPrice, toEventSelector, toFunctionSelector, toPantographChain, toPlainDecimal, valueYieldTokens, weiToHuman };
|