keyring-agent-core 0.4.15 → 0.4.16
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/CHANGELOG.md +207 -0
- package/README.md +7 -7
- package/dist/index.d.ts +206 -44
- package/dist/index.js +84 -84
- package/dist/index.native.js +192 -192
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ class FaqTool extends BaseTool {
|
|
|
65
65
|
const agent = new AgentCore({
|
|
66
66
|
llm: {
|
|
67
67
|
apiKey: process.env.GEMINI_API_KEY!,
|
|
68
|
-
model: 'gemini-
|
|
68
|
+
model: 'gemini-3.5-flash-lite',
|
|
69
69
|
},
|
|
70
70
|
maxIterations: 8,
|
|
71
71
|
maxHistoryMessages: 40,
|
|
@@ -150,9 +150,9 @@ agent.restoreHistory(saved);
|
|
|
150
150
|
secretKey?: string; // required unless llm.apiKey is set
|
|
151
151
|
llm: {
|
|
152
152
|
apiKey?: string; // your own Gemini key → calls Google directly
|
|
153
|
-
model?: string; // default: 'gemini-
|
|
153
|
+
model?: string; // default: 'gemini-3.5-flash-lite'
|
|
154
154
|
maxTokens?: number; // default: 4096
|
|
155
|
-
|
|
155
|
+
thinkingLevel?: 'minimal' | 'low' | 'medium' | 'high' | null; // default: 'minimal'
|
|
156
156
|
baseUrl?: string; // override the endpoint
|
|
157
157
|
};
|
|
158
158
|
maxIterations?: number; // default: 10
|
|
@@ -164,10 +164,10 @@ agent.restoreHistory(saved);
|
|
|
164
164
|
|
|
165
165
|
### LLM access: two modes
|
|
166
166
|
|
|
167
|
-
| Mode | Config | Endpoint
|
|
168
|
-
| ---------------------- | ---------------- |
|
|
169
|
-
| **Bring your own key** | `llm.apiKey` set | `https://generativelanguage.googleapis.com` — called directly with your key. `secretKey` is not required.
|
|
170
|
-
| **Keyring proxy** | no `llm.apiKey` | `https://nft.keyring.app/api/gemini-stable` — we authenticate for you. Requires a valid `secretKey`; the first `chat()` throws otherwise. |
|
|
167
|
+
| Mode | Config | Endpoint |
|
|
168
|
+
| ---------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
169
|
+
| **Bring your own key** | `llm.apiKey` set | `https://generativelanguage.googleapis.com` — called directly with your key. `secretKey` is not required. |
|
|
170
|
+
| **Keyring proxy** | no `llm.apiKey` | `https://nft.keyring.app/api/gemini-stable-v2` — we authenticate for you. Requires a valid `secretKey`; the first `chat()` throws otherwise. |
|
|
171
171
|
|
|
172
172
|
`llm.baseUrl` overrides the endpoint in either mode.
|
|
173
173
|
|
package/dist/index.d.ts
CHANGED
|
@@ -240,6 +240,74 @@ declare class DebridgeProvider extends BaseSwapProvider {
|
|
|
240
240
|
private get;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
+
/** An amount in a `/requests/v3` route: `{ currency, amount, amountFormatted, amountUsd }`. */
|
|
244
|
+
interface RelayRouteAmount {
|
|
245
|
+
currency?: {
|
|
246
|
+
chainId?: number;
|
|
247
|
+
address?: string;
|
|
248
|
+
symbol?: string;
|
|
249
|
+
decimals?: number;
|
|
250
|
+
};
|
|
251
|
+
amount?: string;
|
|
252
|
+
amountFormatted?: string;
|
|
253
|
+
amountUsd?: string | null;
|
|
254
|
+
}
|
|
255
|
+
interface RelayRouteSide {
|
|
256
|
+
inputCurrency?: RelayRouteAmount;
|
|
257
|
+
outputCurrency?: RelayRouteAmount;
|
|
258
|
+
}
|
|
259
|
+
interface RelayRequestTx {
|
|
260
|
+
txHash?: string;
|
|
261
|
+
chainId?: number;
|
|
262
|
+
status?: string;
|
|
263
|
+
}
|
|
264
|
+
/** One entry of `GET /requests/v3` → `requests[]`, the fields read here. */
|
|
265
|
+
interface RelayRequestItem {
|
|
266
|
+
id?: string;
|
|
267
|
+
status?: string;
|
|
268
|
+
data?: {
|
|
269
|
+
failReason?: string | null;
|
|
270
|
+
route?: {
|
|
271
|
+
quoted?: {
|
|
272
|
+
origin?: RelayRouteSide;
|
|
273
|
+
destination?: RelayRouteSide;
|
|
274
|
+
};
|
|
275
|
+
actual?: {
|
|
276
|
+
origin?: RelayRouteSide;
|
|
277
|
+
destination?: RelayRouteSide;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
inTxs?: RelayRequestTx[];
|
|
281
|
+
outTxs?: RelayRequestTx[];
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
/** Lookup key for {@link RelayProvider.getRequestDetail}: the request id, or any tx hash of it. */
|
|
285
|
+
interface RelayRequestDetailParams {
|
|
286
|
+
requestId?: string;
|
|
287
|
+
txHash?: string;
|
|
288
|
+
}
|
|
289
|
+
/** What a settled (or still running) Relay request delivered. */
|
|
290
|
+
interface RelayRequestDetail {
|
|
291
|
+
success: boolean;
|
|
292
|
+
/** Relay's status mapped onto the tracker's: `success`/`refund` → COMPLETED, `failure` → FAILED. */
|
|
293
|
+
status: TrackStatus;
|
|
294
|
+
/** Relay's own status string (`success`, `pending`, `refund`, …). */
|
|
295
|
+
relayStatus?: string;
|
|
296
|
+
requestId?: string;
|
|
297
|
+
/**
|
|
298
|
+
* What the user RECEIVED, in the out token's smallest units — read from
|
|
299
|
+
* `route.actual`, so it is the executed figure, not the quote. Only set when
|
|
300
|
+
* Relay's status is `success`: before that `actual` mirrors the quote, and a
|
|
301
|
+
* `refund` (COMPLETED too) never delivered the out token.
|
|
302
|
+
*/
|
|
303
|
+
amountOut?: string;
|
|
304
|
+
amountOutFormatted?: string;
|
|
305
|
+
amountOutUsd?: string | null;
|
|
306
|
+
currencyOut?: RelayRouteAmount['currency'];
|
|
307
|
+
failReason?: string | null;
|
|
308
|
+
raw?: RelayRequestItem;
|
|
309
|
+
error?: string;
|
|
310
|
+
}
|
|
243
311
|
/**
|
|
244
312
|
* Relay.link adapter. Relay bundles approval + swap into a single quote, so
|
|
245
313
|
* `hasIntegratedApproval` is true.
|
|
@@ -267,6 +335,21 @@ declare class RelayProvider extends BaseSwapProvider {
|
|
|
267
335
|
*/
|
|
268
336
|
checkApproval(params: CheckApprovalParams): Promise<CheckApprovalResult>;
|
|
269
337
|
trackTransaction(params: TrackTransactionParams): Promise<TrackTransactionResult>;
|
|
338
|
+
/**
|
|
339
|
+
* One request's executed result from `GET /requests/v3` — above all what the
|
|
340
|
+
* user actually RECEIVED (`route.actual`), which can differ from the quote.
|
|
341
|
+
* Looks up by `requestId` when given, then (nothing found) by any of its tx
|
|
342
|
+
* hashes (`term`). `/requests/v2` (and its `hash` filter) was retired on 2026-11-24.
|
|
343
|
+
* @param params `{ requestId?, txHash? }`.
|
|
344
|
+
* @returns The request's status and received amount; never throws.
|
|
345
|
+
*/
|
|
346
|
+
getRequestDetail(params: RelayRequestDetailParams): Promise<RelayRequestDetail>;
|
|
347
|
+
/**
|
|
348
|
+
* `GET /requests/v3` with one filter, pending requests included.
|
|
349
|
+
* @param filter `{ id }` or `{ term }`.
|
|
350
|
+
* @returns `requests[]`, empty when none matched.
|
|
351
|
+
*/
|
|
352
|
+
private findRequests;
|
|
270
353
|
private request;
|
|
271
354
|
}
|
|
272
355
|
|
|
@@ -889,10 +972,10 @@ declare class PoolService {
|
|
|
889
972
|
* value1_in_t1 = amount1_raw / 10^d1
|
|
890
973
|
* ratio0 = value0_in_t1 / (value0 + value1)
|
|
891
974
|
*
|
|
892
|
-
* Note: this
|
|
893
|
-
*
|
|
894
|
-
*
|
|
895
|
-
*
|
|
975
|
+
* Note: this values both legs at the POOL price. When the market the swap
|
|
976
|
+
* legs trade at disagrees with it, the caller re-splits with the quoted
|
|
977
|
+
* rates (`rebalanceSplitForRates`). `amount0PerL` / `amount1PerL` are
|
|
978
|
+
* returned for that.
|
|
896
979
|
*/
|
|
897
980
|
splitNativeAmountForRange(args: {
|
|
898
981
|
nativeAmountWei: bigint;
|
|
@@ -906,14 +989,43 @@ declare class PoolService {
|
|
|
906
989
|
ratio1: number;
|
|
907
990
|
amountInFor0Wei: bigint;
|
|
908
991
|
amountInFor1Wei: bigint;
|
|
992
|
+
amount0PerL: number;
|
|
993
|
+
amount1PerL: number;
|
|
909
994
|
};
|
|
995
|
+
/**
|
|
996
|
+
* Re-split a native deposit with the rates the swap quotes actually gave.
|
|
997
|
+
*
|
|
998
|
+
* `splitNativeAmountForRange` values both legs at the POOL price. When the
|
|
999
|
+
* market (what the swap legs pay) disagrees with the pool — an illiquid pool
|
|
1000
|
+
* left behind the market — the legs come back off the pool's ratio and the
|
|
1001
|
+
* mint uses only part of one side. Solving with the quoted rates instead:
|
|
1002
|
+
* in0·r0·k = in1·r1, in0 + in1 = N → in0 = N·r1 / (r1 + k·r0)
|
|
1003
|
+
* where k = amount1PerL / amount0PerL (raw token1 per raw token0 the range needs).
|
|
1004
|
+
*
|
|
1005
|
+
* @param args.nativeAmountWei Total native input (wei).
|
|
1006
|
+
* @param args.amount0PerL Raw token0 per unit of liquidity (from the pool split).
|
|
1007
|
+
* @param args.amount1PerL Raw token1 per unit of liquidity (from the pool split).
|
|
1008
|
+
* @param args.rate0 Raw token0 out per wei in (from the token0 leg's quote).
|
|
1009
|
+
* @param args.rate1 Raw token1 out per wei in (from the token1 leg's quote).
|
|
1010
|
+
* @returns The new wei split, or null when the rates can't be used.
|
|
1011
|
+
*/
|
|
1012
|
+
rebalanceSplitForRates(args: {
|
|
1013
|
+
nativeAmountWei: bigint;
|
|
1014
|
+
amount0PerL: number;
|
|
1015
|
+
amount1PerL: number;
|
|
1016
|
+
rate0: number;
|
|
1017
|
+
rate1: number;
|
|
1018
|
+
}): {
|
|
1019
|
+
amountInFor0Wei: bigint;
|
|
1020
|
+
amountInFor1Wei: bigint;
|
|
1021
|
+
} | null;
|
|
910
1022
|
/**
|
|
911
1023
|
* Fetches a single-leg same-chain swap quote (native → token) used to mix
|
|
912
1024
|
* the user's native input into pool token0 / token1 before minting.
|
|
913
1025
|
*
|
|
914
1026
|
* Provider is picked by `SwapProviderFactory` on the `'pool'` route: the
|
|
915
1027
|
* coinpool `bridgeProviderByChain` config, keyed on the chain id. The return
|
|
916
|
-
* shape is normalised: `{ to, data, value, minAmountOut }`, regardless of
|
|
1028
|
+
* shape is normalised: `{ to, data, value, minAmountOut, amountOut? }`, regardless of
|
|
917
1029
|
* provider.
|
|
918
1030
|
*
|
|
919
1031
|
* Throws on failure; caller decides whether to surface or skip.
|
|
@@ -938,6 +1050,8 @@ declare class PoolService {
|
|
|
938
1050
|
data: string;
|
|
939
1051
|
value: string;
|
|
940
1052
|
minAmountOut: string;
|
|
1053
|
+
/** Expected out (before slippage), when the provider gives it. */
|
|
1054
|
+
amountOut?: string;
|
|
941
1055
|
}>;
|
|
942
1056
|
}
|
|
943
1057
|
|
|
@@ -1382,6 +1496,13 @@ interface ChatMessage {
|
|
|
1382
1496
|
* don't appear as duplicate model turns alongside the synthesised answer.
|
|
1383
1497
|
*/
|
|
1384
1498
|
_intermediate?: boolean;
|
|
1499
|
+
/**
|
|
1500
|
+
* Raw model parts of an assistant turn that made function calls (from
|
|
1501
|
+
* {@link LLMResponse.modelParts}). Replayed verbatim so each
|
|
1502
|
+
* `thoughtSignature` stays on its original part. Absent on history saved by
|
|
1503
|
+
* older versions: the turn is then rebuilt from `toolCalls`.
|
|
1504
|
+
*/
|
|
1505
|
+
modelParts?: ModelPart[];
|
|
1385
1506
|
timestamp: number;
|
|
1386
1507
|
}
|
|
1387
1508
|
/**
|
|
@@ -2571,12 +2692,10 @@ interface VectorKBConfig {
|
|
|
2571
2692
|
provider?: KnowledgeBaseProvider;
|
|
2572
2693
|
}
|
|
2573
2694
|
interface LLMProviderConfig {
|
|
2574
|
-
/** Model name
|
|
2695
|
+
/** Model name. Only "gemini-3.5-flash-lite" (the default) is supported. */
|
|
2575
2696
|
model?: string;
|
|
2576
2697
|
/** Max tokens for generation */
|
|
2577
2698
|
maxTokens?: number;
|
|
2578
|
-
/** Temperature (0-2) */
|
|
2579
|
-
temperature?: number;
|
|
2580
2699
|
/**
|
|
2581
2700
|
* Bring-your-own Gemini API key. When set, the core talks DIRECTLY to
|
|
2582
2701
|
* `https://generativelanguage.googleapis.com` with this key instead of
|
|
@@ -2587,21 +2706,18 @@ interface LLMProviderConfig {
|
|
|
2587
2706
|
apiKey?: string;
|
|
2588
2707
|
/**
|
|
2589
2708
|
* Base URL override. Defaults to the Keyring proxy
|
|
2590
|
-
* ("https://nft.keyring.app/api/gemini-stable"), or to
|
|
2709
|
+
* ("https://nft.keyring.app/api/gemini-stable-v2"), or to
|
|
2591
2710
|
* "https://generativelanguage.googleapis.com" when {@link apiKey} is set.
|
|
2592
2711
|
*/
|
|
2593
2712
|
baseUrl?: string;
|
|
2594
2713
|
/**
|
|
2595
|
-
* Provider-wide default
|
|
2596
|
-
*
|
|
2597
|
-
* (
|
|
2598
|
-
*
|
|
2599
|
-
*
|
|
2600
|
-
* no-thinking (the Flash-Lite default). `null` omits `thinkingConfig` entirely
|
|
2601
|
-
* (the model's native default); a positive number sets a fixed budget. Models
|
|
2602
|
-
* whose thinking cannot be disabled (e.g. 2.5 Pro, floor 128) need a value here.
|
|
2714
|
+
* Provider-wide default thinking level, used by every call that does not pass
|
|
2715
|
+
* its own {@link ChatOptions.thinkingLevel}. Defaults to `'minimal'`
|
|
2716
|
+
* (near-off): thinking tokens are generated before any visible output and
|
|
2717
|
+
* count against `maxOutputTokens`, so they are pure latency on calls that
|
|
2718
|
+
* don't need them. `null` omits `thinkingConfig` (the model's own default).
|
|
2603
2719
|
*/
|
|
2604
|
-
|
|
2720
|
+
thinkingLevel?: ThinkingLevel | null;
|
|
2605
2721
|
}
|
|
2606
2722
|
interface AgentConfig {
|
|
2607
2723
|
/**
|
|
@@ -2634,7 +2750,9 @@ interface AgentConfig {
|
|
|
2634
2750
|
* runs, so quotes taken through the agent carry the same key (rate limits,
|
|
2635
2751
|
* attribution) as the ones the app takes directly.
|
|
2636
2752
|
*
|
|
2637
|
-
* Omit it and the providers fall back to their built-in public endpoints
|
|
2753
|
+
* Omit it and the providers fall back to their built-in public endpoints —
|
|
2754
|
+
* except Relay: `/quote/v3` and `/requests/v3` require an API key, so without
|
|
2755
|
+
* `relay.apiKey` every Relay quote fails with 401.
|
|
2638
2756
|
*/
|
|
2639
2757
|
swapProviders?: Partial<Record<'debridge' | 'relay', {
|
|
2640
2758
|
apiKey?: string;
|
|
@@ -2899,15 +3017,32 @@ interface LLMToolCall {
|
|
|
2899
3017
|
args: Record<string, unknown>;
|
|
2900
3018
|
callId: string;
|
|
2901
3019
|
}
|
|
3020
|
+
/**
|
|
3021
|
+
* One raw Gemini content part (`text`, `functionCall`, `thoughtSignature`, …),
|
|
3022
|
+
* kept opaque so it can be replayed exactly as the API returned it.
|
|
3023
|
+
*/
|
|
3024
|
+
type ModelPart = Record<string, unknown>;
|
|
3025
|
+
/**
|
|
3026
|
+
* Gemini thinking level. `minimal` is near-off (the gemini-3.5-flash-lite
|
|
3027
|
+
* default); thinking cannot be turned fully off.
|
|
3028
|
+
*/
|
|
3029
|
+
type ThinkingLevel = 'minimal' | 'low' | 'medium' | 'high';
|
|
2902
3030
|
interface LLMResponse {
|
|
2903
3031
|
text: string;
|
|
2904
3032
|
toolCalls: LLMToolCall[];
|
|
3033
|
+
/**
|
|
3034
|
+
* The model turn's parts exactly as returned. Store them on the assistant
|
|
3035
|
+
* message ({@link ChatMessage.modelParts}) when it is replayed in history:
|
|
3036
|
+
* Gemini validates the `thoughtSignature` on function calls and requires it
|
|
3037
|
+
* back in the exact part it came in.
|
|
3038
|
+
*/
|
|
3039
|
+
modelParts?: ModelPart[];
|
|
2905
3040
|
/** Raw usage stats from the provider */
|
|
2906
3041
|
usage?: {
|
|
2907
3042
|
promptTokens: number;
|
|
2908
3043
|
completionTokens: number;
|
|
2909
3044
|
totalTokens: number;
|
|
2910
|
-
/** Reasoning tokens spent before the visible output (Gemini
|
|
3045
|
+
/** Reasoning tokens spent before the visible output (Gemini thinking). */
|
|
2911
3046
|
thoughtsTokens?: number;
|
|
2912
3047
|
/** Prompt tokens served from Gemini's (implicit) context cache. */
|
|
2913
3048
|
cachedTokens?: number;
|
|
@@ -2936,17 +3071,14 @@ interface ChatOptions {
|
|
|
2936
3071
|
*/
|
|
2937
3072
|
maxOutputTokens?: number;
|
|
2938
3073
|
/**
|
|
2939
|
-
*
|
|
2940
|
-
*
|
|
2941
|
-
*
|
|
2942
|
-
*
|
|
2943
|
-
*
|
|
2944
|
-
*
|
|
2945
|
-
* forces it off, `-1` dynamic, a positive number a fixed budget, and `null`
|
|
2946
|
-
* omits `thinkingConfig` so the model's native default applies. Leave unset to
|
|
2947
|
-
* use the provider default.
|
|
3074
|
+
* Thinking level for this call, overriding
|
|
3075
|
+
* {@link LLMProviderConfig.thinkingLevel}. Thinking tokens count AGAINST
|
|
3076
|
+
* `maxOutputTokens`, so a tight cap can be consumed entirely by reasoning
|
|
3077
|
+
* (`MAX_TOKENS` with no output): raise the cap with the level. `null` omits
|
|
3078
|
+
* `thinkingConfig` so the model's own default applies. Leave unset to use the
|
|
3079
|
+
* provider default.
|
|
2948
3080
|
*/
|
|
2949
|
-
|
|
3081
|
+
thinkingLevel?: ThinkingLevel | null;
|
|
2950
3082
|
/**
|
|
2951
3083
|
* Force the model to call one of the supplied `tools` instead of answering in
|
|
2952
3084
|
* text (Gemini `functionCallingConfig.mode = "ANY"`). Used by action subagents
|
|
@@ -3548,7 +3680,7 @@ declare class AgentCore {
|
|
|
3548
3680
|
*/
|
|
3549
3681
|
interface WebsiteTrustKeyringAgentConfig {
|
|
3550
3682
|
/**
|
|
3551
|
-
* Gemini LLM config (model / baseUrl /
|
|
3683
|
+
* Gemini LLM config (model / baseUrl / apiKey). Omit to use the default
|
|
3552
3684
|
* proxy. Ignored when an explicit `provider` is supplied.
|
|
3553
3685
|
*/
|
|
3554
3686
|
llm?: LLMProviderConfig;
|
|
@@ -3795,13 +3927,13 @@ declare class WebsiteTrustKeyringAgent {
|
|
|
3795
3927
|
* sized just above the real output keeps latency from the odd rambling turn
|
|
3796
3928
|
* without ever truncating a valid reply. Omit to fall back to the provider
|
|
3797
3929
|
* default (4096).
|
|
3798
|
-
* - `
|
|
3799
|
-
*
|
|
3800
|
-
* formatting/extraction call spends its
|
|
3801
|
-
*
|
|
3802
|
-
*
|
|
3803
|
-
*
|
|
3804
|
-
*
|
|
3930
|
+
* - `thinkingLevel` controls Gemini reasoning (thinking tokens count AGAINST
|
|
3931
|
+
* `maxOutputTokens`). The provider defaults it to `minimal` (near-off), so a
|
|
3932
|
+
* formatting/extraction call spends its whole budget on real output. The one
|
|
3933
|
+
* call that needs real reasoning — {@link investigate}, which must correctly
|
|
3934
|
+
* judge official vs. look-alike — passes a higher level AND a cap wide enough
|
|
3935
|
+
* to hold thinking + JSON, so accuracy is preserved without re-triggering
|
|
3936
|
+
* MAX_TOKENS.
|
|
3805
3937
|
*/
|
|
3806
3938
|
private askJson;
|
|
3807
3939
|
/**
|
|
@@ -3916,7 +4048,7 @@ declare class WebsiteTrustKeyringAgent {
|
|
|
3916
4048
|
* pipeline needed. Construct once and call {@link TranslateKeyringAgent.chat}.
|
|
3917
4049
|
*/
|
|
3918
4050
|
interface TranslateKeyringAgentConfig {
|
|
3919
|
-
/** Gemini LLM config (model / baseUrl /
|
|
4051
|
+
/** Gemini LLM config (model / baseUrl / apiKey). Ignored when `provider` is supplied. */
|
|
3920
4052
|
llm?: LLMProviderConfig;
|
|
3921
4053
|
/** Bring your own LLM provider (e.g. a shared instance). Overrides `llm`. */
|
|
3922
4054
|
provider?: LLMProvider;
|
|
@@ -4111,9 +4243,8 @@ declare function createDefaultSubagents(llm: LLMProvider, registry: ToolRegistry
|
|
|
4111
4243
|
declare class GeminiProvider implements LLMProvider {
|
|
4112
4244
|
private model;
|
|
4113
4245
|
private maxTokens;
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
private thinkingBudget;
|
|
4246
|
+
/** Default thinking level for calls that don't set one. `null` = model default. */
|
|
4247
|
+
private thinkingLevel;
|
|
4117
4248
|
private baseUrl;
|
|
4118
4249
|
/** Caller's own Gemini key. Empty when running through the proxy. */
|
|
4119
4250
|
private apiKey;
|
|
@@ -4125,6 +4256,21 @@ declare class GeminiProvider implements LLMProvider {
|
|
|
4125
4256
|
/** @see LLMProvider.setRequestSignal */
|
|
4126
4257
|
setRequestSignal(signal?: AbortSignal): void;
|
|
4127
4258
|
chat(messages: ChatMessage[], tools?: ToolDefinition[], options?: ChatOptions): Promise<LLMResponse>;
|
|
4259
|
+
/**
|
|
4260
|
+
* Convert the chat history into Gemini `contents`.
|
|
4261
|
+
*
|
|
4262
|
+
* - System messages become `systemInstruction`.
|
|
4263
|
+
* - A model turn that called functions is replayed from its raw parts, so
|
|
4264
|
+
* every `thoughtSignature` stays on the part it came in (required for
|
|
4265
|
+
* function calls). History without raw parts is rebuilt from `toolCalls`
|
|
4266
|
+
* with the documented skip signature on the first call.
|
|
4267
|
+
* - Tool results become one 'user' turn of functionResponse parts per step,
|
|
4268
|
+
* right after the model turn that made the calls.
|
|
4269
|
+
* - Turns that would break the order rules are dropped rather than failing
|
|
4270
|
+
* the request: responses with no call before them, calls with no
|
|
4271
|
+
* responses after them, leading non-user turns, and trailing model turns
|
|
4272
|
+
* (a request ending with a model turn is a 400).
|
|
4273
|
+
*/
|
|
4128
4274
|
private toContents;
|
|
4129
4275
|
private toFunctionDeclarations;
|
|
4130
4276
|
}
|
|
@@ -5973,7 +6119,7 @@ declare class MoralisService {
|
|
|
5973
6119
|
}
|
|
5974
6120
|
|
|
5975
6121
|
interface TokenInfoToolConfig extends MoralisServiceConfig {
|
|
5976
|
-
/** LLM config (model,
|
|
6122
|
+
/** LLM config (model, apiKey, …) for the token-research call. */
|
|
5977
6123
|
llm?: LLMProviderConfig;
|
|
5978
6124
|
}
|
|
5979
6125
|
/**
|
|
@@ -12702,6 +12848,22 @@ declare class PreviewAddLiquidityTool extends BaseTool {
|
|
|
12702
12848
|
/** Forward `ui` from run() into the ToolResult envelope. */
|
|
12703
12849
|
execute(args: Record<string, unknown>, userContext?: UserContext): Promise<ToolResult>;
|
|
12704
12850
|
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<Record<string, unknown>>;
|
|
12851
|
+
/**
|
|
12852
|
+
* Quote both swap legs (native → token0, native → token1). A leg whose token
|
|
12853
|
+
* is native, or that spends nothing, needs no swap.
|
|
12854
|
+
* @param args Chain, wallet, gateway (swap recipient), pool tokens, slippage and the wei split.
|
|
12855
|
+
* @returns The two legs, token0 first.
|
|
12856
|
+
*/
|
|
12857
|
+
private fetchLegs;
|
|
12858
|
+
/**
|
|
12859
|
+
* amount0Min / amount1Min for the mint: `mintMinPercent` of what the mint will
|
|
12860
|
+
* use from each leg's min-out, given the range's token ratio.
|
|
12861
|
+
* @param legs The two swap legs, token0 first.
|
|
12862
|
+
* @param amount0PerL Raw token0 per unit of liquidity.
|
|
12863
|
+
* @param amount1PerL Raw token1 per unit of liquidity.
|
|
12864
|
+
* @returns The two mins (raw units).
|
|
12865
|
+
*/
|
|
12866
|
+
private mintMins;
|
|
12705
12867
|
/**
|
|
12706
12868
|
* Display metadata for the pool's tokens. The chain is the source of truth:
|
|
12707
12869
|
* `symbol()` is read from each contract and `decimals` are the values the
|
|
@@ -16410,4 +16572,4 @@ declare class AbortError extends Error {
|
|
|
16410
16572
|
*/
|
|
16411
16573
|
declare function isAbortError(err: unknown): boolean;
|
|
16412
16574
|
|
|
16413
|
-
export { AI_AGENT_TOOL_NAMES, type Abi, type AbiItem, type AbiParameter, AbortError, type AccountActionOptions, type AddLiquidityFormProps, type AddLiquiditySummary, type Address, type AffiliateFee, type AgentConfig, AgentCore, type AgentResponse, type ApprovalTx, ApproveTokenTool, type ApyPoint, BRIDGE_MIN_BUFFER_USD, BRIDGE_NON_EVM_CHAIN_FAMILY, BRIDGE_STATUS_POLL_MS, BRIDGE_SUPPORT_URL, BUILDER_CODE, BaseNftAiTool, BaseSwapProvider, BaseTool, BaseWalletActionTool, type BlockParameters, type BlockTag, type BookLevel, type BookStreamStatus, type BridgeAddresses, type BridgeAsset, type BridgeQuote, type BridgeTransfer, type BuildApprovalsParams, type BuilderAuthRequest, type BuilderAuthorization, type BuyTokenSide, BuyTokenTool, CONDITIONAL_TOKENS, 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, type ClobCredentials, CoinpoolConfigApi, type ConfirmAddLiquidityTxProps, type ContractFunctionParameters, type CortexResponse, type CryptoPriceTick, DEFAULT_CHAIN, DEFAULT_PROVIDER, DEFAULT_RPC_BY_CHAIN, DEFILLAMA_EXTRA_SIGNALS, DEFILLAMA_POOL_CHAIN_HEXES, DEFILLAMA_POOL_CHAIN_PARAM_DESCRIPTION, DELAYED_ORDER, DEPOSIT_REFERENCE_USD, 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 DeployDepositWalletResult, type DepositQuote, type EIP1193RequestFn, ERC1967_INIT_CODE, EstimatePoolYieldTool, type EstimatePoolYieldToolConfig, type EvmDepositAsset, type FeeContext, type FormattedDefiLlamaPool, GAMES_TAG_ID, GeminiProvider, GeminiSearchAiTool, type GeminiSearchAiToolConfig, HEX_TO_PANTOGRAPH, HIDE_FROM_NEW_TAG_ID, 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, MARKET_ORDER, MARKET_STREAM, MULTICALL3_ADDRESS, ManageLiquidityRedirectTool, type MarketFee, type MarketOrder, type MarketOrderInput, type MarketQuote, type MarketTradeInfo, type MarketplaceLink, type MoralisApiResponse, MoralisService, type MoralisServiceConfig, type MulticallParameters, type MulticallRawParameters, type MulticallResult, NATIVE_GAS_LIMIT, NATIVE_TOKEN_PLACEHOLDER, NEG_RISK_ADAPTER, 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, ONBOARDING_STEP, ONBOARDING_TRACKING, ORDER_INPUT_ERROR, type OnboardingResult, type OnboardingSnapshot, type OnboardingStep, OpenAddLiquidityFormTool, type OpenAddLiquidityFormToolConfig, OpenSupplyFormTool, type OpenSupplyFormToolConfig, type OrderBookSnapshot, type OrderBookWatch, type OrderInputError, PERPS_DEPOSIT_CONTRACT, POLYGON_CHAIN_ID, POLYGON_HEX_CHAIN_ID, POLYGON_NATIVE_PRECOMPILE, POLYMARKET_API, POLYMARKET_LIVE_DATA_WS, POLYMARKET_WEB_URL, POOL_UNISWAP_AGENT_TOOL_NAMES, POSITION_DUST_SHARES, PREDICTION_ACTIVITY_TYPES, PREDICTION_AGENT_TOOL_NAMES, PREDICTION_CATEGORIES, PREDICTION_SORTS, PUSD_ADDRESS, PUSD_DECIMALS, PantographService, type PantographServiceConfig, type PantographYieldIdentity, type PaymentToken, type PlaceOrderOptions, type PlacedOrder, type PolymarketAccount, PolymarketApiError, type PolymarketBuilderAuth, type PolymarketBuilderCredentials, PolymarketOnboardingError, PolymarketRedeemError, type PolymarketSdkSigner, PolymarketService, type PolymarketServiceConfig, type PolymarketSignerBridge, PolymarketTradeError, type PolymarketTypedData, PolymarketWithdrawError, PoolByAddressTool, type PoolByAddressToolConfig, PoolDetailTool, type PoolDetailToolConfig, type PoolDisplayInfo, PoolFallbackAiTool, type PoolFallbackAiToolConfig, type PoolOnchainInfo, PoolPriceRangesTool, type PoolPriceRangesToolConfig, PoolSearchTool, type PoolSearchToolConfig, PoolService, type PoolServiceConfig, PoolSwapRouter, type PredictionActivityItem, type PredictionActivityItemProps, type PredictionActivityProps, PredictionActivityTool, type PredictionCategoryKey, type PredictionDepositAssetProps, type PredictionDepositNetworkProps, type PredictionDepositOptionProps, type PredictionDepositProps, PredictionDepositTool, type PredictionEvent, type PredictionEventCardProps, type PredictionHeadline, type PredictionMarket, type PredictionMarketDetailProps, PredictionMarketDetailTool, type PredictionMarketListProps, type PredictionMarketRowProps, PredictionMarketsTool, type PredictionOutcome, type PredictionOutcomeProps, type PredictionPortfolioProps, PredictionPortfolioTool, type PredictionPosition, type PredictionPositionProps, type PredictionSetupProps, PredictionSetupTool, type PredictionSortKey, type PredictionTradeMarketProps, type PredictionTradeProps, PredictionTradeTool, type PredictionWithdrawDestinationProps, type PredictionWithdrawProps, PredictionWithdrawTool, type PreparedOrder, type PresetInputs, PreviewAddLiquidityTool, type PreviewAddLiquidityToolConfig, type PriceBounds, type PriceRangePrefill, type ProtocolVersion, type ProviderName, PublicClient, type PublicClientConfig, type QuickRate, type QuoteGas, REDEEM, RELAYER_DEPLOY_POLL, RELAYER_SUBMIT_PATH, type RangePreset, type RawYieldIdentityRow, type ReActPhase, type ReActStep, type ReActTrace, type ReadContractParameters, type RedeemErrorCode, type RedeemOptions, type RedeemResult, RelayProvider, type RemoteBuilderSigningConfig, type ResolvedRange, Router, type RouterAssignment, type RouterDecision, type RunOnboardingOptions, 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, TRADE_ERROR, TRADING_APPROVALS_METADATA, 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 TradeErrorCode, type TradingApprovalsStatus, type TransactionByHashResponse, TransactionByHashTool, type TransactionByHashToolConfig, type TransactionLog, type TransactionReceipt, type TransactionReceiptLog, type TranslateInput, TranslateKeyringAgent, type TranslateKeyringAgentConfig, type TranslateResult, type Transport, type TransportConfig, type TrendingToken, type TrendingTokenTimeframeBuckets, TrendingTokensTool, type TrendingTokensToolConfig, type UIPayload, UNISWAP_CHAIN_SLUG, UNRESOLVED_ASSET, UP_OR_DOWN_TAG_ID, type UnsignedTx, type UpDownPrices, type UpDownWindow, type UpstashEmbedStrategy, type UpstashFusionAlgorithm, type UpstashKBUpsertEntry, UpstashKnowledgeBase, type UpstashKnowledgeBaseConfig, type UserContext, UserSwapRouter, type VectorKBConfig, WALLET_ACTION_AGENT_TOOL_NAMES, WALLET_AGENT_TOOL_NAMES, WALLET_DERIVATION, WITHDRAW, 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 WalletDepositOption, 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 WatchOrderBooksOptions, type WebsiteTrustExtraData, type WebsiteTrustInput, WebsiteTrustKeyringAgent, type WebsiteTrustKeyringAgentConfig, type WebsiteTrustResult, type WithdrawDestination, type WithdrawErrorCode, type WithdrawOptions, type WithdrawQuote, type WithdrawResult, type WithdrawTarget, 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 YieldAssetInfo, type YieldConversionCall, type YieldConversionPlan, type YieldPricingOptions, type YieldPricingToken, type YieldTokenInput, type YieldTokenValue, ZERO_ADDRESS, adjustBuyAmountForFees, allInBuyNotional, amazonDomainForLanguage, apiClient, applyMarketEvent, applyYieldConversions, bestPrice, bridgeMinUsd, buildApprovalCalls, buildApprovals, buildBuilderSignature, buildChallenge, buildRangePresets, buildUniswapPoolUrl, builderApiKey, buyFeePrice, buyNotional, buyNotionalAfterFee, buyNotionalForCash, call, canDeriveV3PoolAddress, ceil2, chains, checkNativeGasAffordable, checksumAddress, clampTick, classifyTradeError, classifyWithdrawError, clearPublicClientCache, coinpoolConfigApi, compareBridgeTokens, compareDecimal, completeX402, configureSupportedChains, configureSwapProvider, convertSusdsShares, createAiAgent, createDefaultSubagents, createNfcAgent, createNftAgent, createPolymarketSigner, createPoolUniswapAgent, createPredictionAgent, createPublicClient, createTokenAgent, createTransport, createWalletActionAgent, createWalletAgent, createX402SignatureProvider, decodeAbiParameters, decodeErrorResult, decodeFunctionData, decodeFunctionResult, defiLlamaPoolInfoScope, defiLlamaPoolSupportsLabel, deployDepositWallet, depositPriceImpact, deriveBeaconDepositWallet, deriveDepositWallet, deriveSafeWallet, deriveUupsDepositWallet, deriveV3PoolAddress, displayFromChallenge, effectivePriceUSD, encodeAbiParameters, encodeApprove, encodeErrorResult, encodeFunctionData, encodeSignedHeader, erc1155Abi, erc20Abi, erc20Abi_bytes32, erc721Abi, estimateGas, estimateNativeGasReserveWei, estimateTransactionFeeWei, ethCallAt, ethCallByChain, eventHeadline, eventUrl, evmDepositAssets, exactAmountString, extractOutRaw, extractQuoteError, fallback, feePerShare, feeWeiToNative, fetchOnboardingSnapshot, fetchTopMarketplaces, fetchTradingApprovalsStatus, fetchUnderlyingPricesUSD, findWalletDepositOptions, floor2, floorToDecimals, formatDefiLlamaPool, getAbiItem, getAddress, getBalance, getBlock, getBlockNumber, getCashBalance, getCashBalanceBaseUnits, getChain, getChainContractAddress, getChainId, getChainMeta, getCode, getDefaultRpcUrl, getGasPrice, getNativeTokenInfo, getPolymarketBuilderCode, getPublicClient, getRevertReason, getRpcOverrides, getShareBalances, getStorageAt, getTokenPriceUSD, getTransactionCount, http, humanToWei, ingestKnowledgeBase, isAbortError, isAddress, isAddressEqual, isBelowWithdrawMinimum, isEvmAddress, isMarketOpen, isPaymentRequired, isShareBasedProtocol, isShareBasedYieldToken, isSupplyChain, keyringSettingApi, listCandidateChains, listSupplyChains, mapEvent, mapMarket, marketFee, marketProtocol, moneylineMarket, mulDivFloor, multicall, multicall3Abi, multicallRaw, nativeGasShortfall, nfcAmazonSearchUrl, normaliseCountry, normalizeDecimal, normalizeLevels, normalizePriceRangeToPool, normalizeText, onboardingStep, openSecureClient, parseAbi, parseAbiItem, parseAbiParameters, parsePolymarketUrl, parsePredictionHint, pickLogo, placePredictionOrder, planYieldTokenConversions, predictionHint, prepareMarketOrder, priceToTick, protocolLabelFor, psm3For, pusdFromBaseUnits, pusdToBaseUnits, quoteBuyAsPolymarket, quoteBuyUsd, quoteDeposit, quoteMarketOrder, quoteSellShares, quoteWithdrawal, readContract, readPaymentError, readPaymentRequired, readProtocolFeeWei, readReceipt, readSpendableBalance, readTokenUsdPrice, redeemPredictionPositions, registerMaybeNoForm, remoteBuilderSigning, requestWithX402, resolveAccountWallet, resolveCategory, resolveGasLimit, resolveNfcShopLinks, resolveRawYieldAsset, resolveRawYieldIdentity, resolveRawYieldProtocol, resolveRpcUrl, resolveRpcUrls, resolveTokenPriceUSD, roundTickToSpacing, rpcCall, runPolymarketOnboarding, setPolymarketBuilderCode, setRpcOverrides, slippagePrice, spendableNative, swapProviderFactory, swapRouterRegistry, tickToPrice, ticketFee, toBuilderAuthorization, toEventSelector, toFunctionSelector, toPantographChain, toPlainDecimal, unitPriceUSD, upDownWindow, valueYieldTokens, walletDepositAssets, watchCryptoPrice, watchOrderBooks, weiToHuman, withdrawDestinations, withdrawFromPolymarket };
|
|
16575
|
+
export { AI_AGENT_TOOL_NAMES, type Abi, type AbiItem, type AbiParameter, AbortError, type AccountActionOptions, type AddLiquidityFormProps, type AddLiquiditySummary, type Address, type AffiliateFee, type AgentConfig, AgentCore, type AgentResponse, type ApprovalTx, ApproveTokenTool, type ApyPoint, BRIDGE_MIN_BUFFER_USD, BRIDGE_NON_EVM_CHAIN_FAMILY, BRIDGE_STATUS_POLL_MS, BRIDGE_SUPPORT_URL, BUILDER_CODE, BaseNftAiTool, BaseSwapProvider, BaseTool, BaseWalletActionTool, type BlockParameters, type BlockTag, type BookLevel, type BookStreamStatus, type BridgeAddresses, type BridgeAsset, type BridgeQuote, type BridgeTransfer, type BuildApprovalsParams, type BuilderAuthRequest, type BuilderAuthorization, type BuyTokenSide, BuyTokenTool, CONDITIONAL_TOKENS, 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, type ClobCredentials, CoinpoolConfigApi, type ConfirmAddLiquidityTxProps, type ContractFunctionParameters, type CortexResponse, type CryptoPriceTick, DEFAULT_CHAIN, DEFAULT_PROVIDER, DEFAULT_RPC_BY_CHAIN, DEFILLAMA_EXTRA_SIGNALS, DEFILLAMA_POOL_CHAIN_HEXES, DEFILLAMA_POOL_CHAIN_PARAM_DESCRIPTION, DELAYED_ORDER, DEPOSIT_REFERENCE_USD, 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 DeployDepositWalletResult, type DepositQuote, type EIP1193RequestFn, ERC1967_INIT_CODE, EstimatePoolYieldTool, type EstimatePoolYieldToolConfig, type EvmDepositAsset, type FeeContext, type FormattedDefiLlamaPool, GAMES_TAG_ID, GeminiProvider, GeminiSearchAiTool, type GeminiSearchAiToolConfig, HEX_TO_PANTOGRAPH, HIDE_FROM_NEW_TAG_ID, 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, MARKET_ORDER, MARKET_STREAM, MULTICALL3_ADDRESS, ManageLiquidityRedirectTool, type MarketFee, type MarketOrder, type MarketOrderInput, type MarketQuote, type MarketTradeInfo, type MarketplaceLink, type ModelPart, type MoralisApiResponse, MoralisService, type MoralisServiceConfig, type MulticallParameters, type MulticallRawParameters, type MulticallResult, NATIVE_GAS_LIMIT, NATIVE_TOKEN_PLACEHOLDER, NEG_RISK_ADAPTER, 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, ONBOARDING_STEP, ONBOARDING_TRACKING, ORDER_INPUT_ERROR, type OnboardingResult, type OnboardingSnapshot, type OnboardingStep, OpenAddLiquidityFormTool, type OpenAddLiquidityFormToolConfig, OpenSupplyFormTool, type OpenSupplyFormToolConfig, type OrderBookSnapshot, type OrderBookWatch, type OrderInputError, PERPS_DEPOSIT_CONTRACT, POLYGON_CHAIN_ID, POLYGON_HEX_CHAIN_ID, POLYGON_NATIVE_PRECOMPILE, POLYMARKET_API, POLYMARKET_LIVE_DATA_WS, POLYMARKET_WEB_URL, POOL_UNISWAP_AGENT_TOOL_NAMES, POSITION_DUST_SHARES, PREDICTION_ACTIVITY_TYPES, PREDICTION_AGENT_TOOL_NAMES, PREDICTION_CATEGORIES, PREDICTION_SORTS, PUSD_ADDRESS, PUSD_DECIMALS, PantographService, type PantographServiceConfig, type PantographYieldIdentity, type PaymentToken, type PlaceOrderOptions, type PlacedOrder, type PolymarketAccount, PolymarketApiError, type PolymarketBuilderAuth, type PolymarketBuilderCredentials, PolymarketOnboardingError, PolymarketRedeemError, type PolymarketSdkSigner, PolymarketService, type PolymarketServiceConfig, type PolymarketSignerBridge, PolymarketTradeError, type PolymarketTypedData, PolymarketWithdrawError, PoolByAddressTool, type PoolByAddressToolConfig, PoolDetailTool, type PoolDetailToolConfig, type PoolDisplayInfo, PoolFallbackAiTool, type PoolFallbackAiToolConfig, type PoolOnchainInfo, PoolPriceRangesTool, type PoolPriceRangesToolConfig, PoolSearchTool, type PoolSearchToolConfig, PoolService, type PoolServiceConfig, PoolSwapRouter, type PredictionActivityItem, type PredictionActivityItemProps, type PredictionActivityProps, PredictionActivityTool, type PredictionCategoryKey, type PredictionDepositAssetProps, type PredictionDepositNetworkProps, type PredictionDepositOptionProps, type PredictionDepositProps, PredictionDepositTool, type PredictionEvent, type PredictionEventCardProps, type PredictionHeadline, type PredictionMarket, type PredictionMarketDetailProps, PredictionMarketDetailTool, type PredictionMarketListProps, type PredictionMarketRowProps, PredictionMarketsTool, type PredictionOutcome, type PredictionOutcomeProps, type PredictionPortfolioProps, PredictionPortfolioTool, type PredictionPosition, type PredictionPositionProps, type PredictionSetupProps, PredictionSetupTool, type PredictionSortKey, type PredictionTradeMarketProps, type PredictionTradeProps, PredictionTradeTool, type PredictionWithdrawDestinationProps, type PredictionWithdrawProps, PredictionWithdrawTool, type PreparedOrder, type PresetInputs, PreviewAddLiquidityTool, type PreviewAddLiquidityToolConfig, type PriceBounds, type PriceRangePrefill, type ProtocolVersion, type ProviderName, PublicClient, type PublicClientConfig, type QuickRate, type QuoteGas, REDEEM, RELAYER_DEPLOY_POLL, RELAYER_SUBMIT_PATH, type RangePreset, type RawYieldIdentityRow, type ReActPhase, type ReActStep, type ReActTrace, type ReadContractParameters, type RedeemErrorCode, type RedeemOptions, type RedeemResult, RelayProvider, type RelayRequestDetail, type RelayRequestDetailParams, type RemoteBuilderSigningConfig, type ResolvedRange, Router, type RouterAssignment, type RouterDecision, type RunOnboardingOptions, 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, TRADE_ERROR, TRADING_APPROVALS_METADATA, TRANSFER_TOPIC, TRENDING_DEFAULT_BY_HEX_CHAIN, type ThinkingLevel, 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 TradeErrorCode, type TradingApprovalsStatus, type TransactionByHashResponse, TransactionByHashTool, type TransactionByHashToolConfig, type TransactionLog, type TransactionReceipt, type TransactionReceiptLog, type TranslateInput, TranslateKeyringAgent, type TranslateKeyringAgentConfig, type TranslateResult, type Transport, type TransportConfig, type TrendingToken, type TrendingTokenTimeframeBuckets, TrendingTokensTool, type TrendingTokensToolConfig, type UIPayload, UNISWAP_CHAIN_SLUG, UNRESOLVED_ASSET, UP_OR_DOWN_TAG_ID, type UnsignedTx, type UpDownPrices, type UpDownWindow, type UpstashEmbedStrategy, type UpstashFusionAlgorithm, type UpstashKBUpsertEntry, UpstashKnowledgeBase, type UpstashKnowledgeBaseConfig, type UserContext, UserSwapRouter, type VectorKBConfig, WALLET_ACTION_AGENT_TOOL_NAMES, WALLET_AGENT_TOOL_NAMES, WALLET_DERIVATION, WITHDRAW, 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 WalletDepositOption, 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 WatchOrderBooksOptions, type WebsiteTrustExtraData, type WebsiteTrustInput, WebsiteTrustKeyringAgent, type WebsiteTrustKeyringAgentConfig, type WebsiteTrustResult, type WithdrawDestination, type WithdrawErrorCode, type WithdrawOptions, type WithdrawQuote, type WithdrawResult, type WithdrawTarget, 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 YieldAssetInfo, type YieldConversionCall, type YieldConversionPlan, type YieldPricingOptions, type YieldPricingToken, type YieldTokenInput, type YieldTokenValue, ZERO_ADDRESS, adjustBuyAmountForFees, allInBuyNotional, amazonDomainForLanguage, apiClient, applyMarketEvent, applyYieldConversions, bestPrice, bridgeMinUsd, buildApprovalCalls, buildApprovals, buildBuilderSignature, buildChallenge, buildRangePresets, buildUniswapPoolUrl, builderApiKey, buyFeePrice, buyNotional, buyNotionalAfterFee, buyNotionalForCash, call, canDeriveV3PoolAddress, ceil2, chains, checkNativeGasAffordable, checksumAddress, clampTick, classifyTradeError, classifyWithdrawError, clearPublicClientCache, coinpoolConfigApi, compareBridgeTokens, compareDecimal, completeX402, configureSupportedChains, configureSwapProvider, convertSusdsShares, createAiAgent, createDefaultSubagents, createNfcAgent, createNftAgent, createPolymarketSigner, createPoolUniswapAgent, createPredictionAgent, createPublicClient, createTokenAgent, createTransport, createWalletActionAgent, createWalletAgent, createX402SignatureProvider, decodeAbiParameters, decodeErrorResult, decodeFunctionData, decodeFunctionResult, defiLlamaPoolInfoScope, defiLlamaPoolSupportsLabel, deployDepositWallet, depositPriceImpact, deriveBeaconDepositWallet, deriveDepositWallet, deriveSafeWallet, deriveUupsDepositWallet, deriveV3PoolAddress, displayFromChallenge, effectivePriceUSD, encodeAbiParameters, encodeApprove, encodeErrorResult, encodeFunctionData, encodeSignedHeader, erc1155Abi, erc20Abi, erc20Abi_bytes32, erc721Abi, estimateGas, estimateNativeGasReserveWei, estimateTransactionFeeWei, ethCallAt, ethCallByChain, eventHeadline, eventUrl, evmDepositAssets, exactAmountString, extractOutRaw, extractQuoteError, fallback, feePerShare, feeWeiToNative, fetchOnboardingSnapshot, fetchTopMarketplaces, fetchTradingApprovalsStatus, fetchUnderlyingPricesUSD, findWalletDepositOptions, floor2, floorToDecimals, formatDefiLlamaPool, getAbiItem, getAddress, getBalance, getBlock, getBlockNumber, getCashBalance, getCashBalanceBaseUnits, getChain, getChainContractAddress, getChainId, getChainMeta, getCode, getDefaultRpcUrl, getGasPrice, getNativeTokenInfo, getPolymarketBuilderCode, getPublicClient, getRevertReason, getRpcOverrides, getShareBalances, getStorageAt, getTokenPriceUSD, getTransactionCount, http, humanToWei, ingestKnowledgeBase, isAbortError, isAddress, isAddressEqual, isBelowWithdrawMinimum, isEvmAddress, isMarketOpen, isPaymentRequired, isShareBasedProtocol, isShareBasedYieldToken, isSupplyChain, keyringSettingApi, listCandidateChains, listSupplyChains, mapEvent, mapMarket, marketFee, marketProtocol, moneylineMarket, mulDivFloor, multicall, multicall3Abi, multicallRaw, nativeGasShortfall, nfcAmazonSearchUrl, normaliseCountry, normalizeDecimal, normalizeLevels, normalizePriceRangeToPool, normalizeText, onboardingStep, openSecureClient, parseAbi, parseAbiItem, parseAbiParameters, parsePolymarketUrl, parsePredictionHint, pickLogo, placePredictionOrder, planYieldTokenConversions, predictionHint, prepareMarketOrder, priceToTick, protocolLabelFor, psm3For, pusdFromBaseUnits, pusdToBaseUnits, quoteBuyAsPolymarket, quoteBuyUsd, quoteDeposit, quoteMarketOrder, quoteSellShares, quoteWithdrawal, readContract, readPaymentError, readPaymentRequired, readProtocolFeeWei, readReceipt, readSpendableBalance, readTokenUsdPrice, redeemPredictionPositions, registerMaybeNoForm, remoteBuilderSigning, requestWithX402, resolveAccountWallet, resolveCategory, resolveGasLimit, resolveNfcShopLinks, resolveRawYieldAsset, resolveRawYieldIdentity, resolveRawYieldProtocol, resolveRpcUrl, resolveRpcUrls, resolveTokenPriceUSD, roundTickToSpacing, rpcCall, runPolymarketOnboarding, setPolymarketBuilderCode, setRpcOverrides, slippagePrice, spendableNative, swapProviderFactory, swapRouterRegistry, tickToPrice, ticketFee, toBuilderAuthorization, toEventSelector, toFunctionSelector, toPantographChain, toPlainDecimal, unitPriceUSD, upDownWindow, valueYieldTokens, walletDepositAssets, watchCryptoPrice, watchOrderBooks, weiToHuman, withdrawDestinations, withdrawFromPolymarket };
|