keyring-agent-core 0.2.35 → 0.2.37

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 CHANGED
@@ -1,3 +1,5 @@
1
+ import { Method, AxiosRequestConfig } from 'axios';
2
+
1
3
  /** tick → price of token0 in terms of token1, decimal-adjusted */
2
4
  declare function tickToPrice(tick: number, token0Decimals: number, token1Decimals: number): number;
3
5
  /** price (token1 per token0, decimal-adjusted) → tick */
@@ -806,6 +808,75 @@ interface WalletActionProps {
806
808
  */
807
809
  parameters: Record<string, string>;
808
810
  }
811
+ /**
812
+ * Props for the FE `X402PaymentRequired` component — a GENERIC paywall card for
813
+ * any x402-gated API (HTTP 402 "pay-per-call"). The core already made the call,
814
+ * hit a 402, and built the payment; it does NOT hold a private key, so it asks
815
+ * the FE only to SIGN `typedData` (EIP-712) with the connected wallet. The FE
816
+ * returns the signature to `AgentCore.submitX402Payment(challenge, signature)`,
817
+ * which re-calls the API with the `PAYMENT-SIGNATURE` header and synthesizes the
818
+ * answer.
819
+ *
820
+ * Mirrors the `WalletActionProps` contract: BE emits a structured intent, FE
821
+ * owns the wallet interaction (here: a single typed-data signature).
822
+ */
823
+ interface X402PaymentRequiredProps {
824
+ /** EIP-712 typed data the FE must sign with the connected wallet. */
825
+ typedData: {
826
+ domain: {
827
+ name?: string;
828
+ version?: string;
829
+ chainId: number;
830
+ verifyingContract: string;
831
+ };
832
+ types: Record<string, Array<{
833
+ name: string;
834
+ type: string;
835
+ }>>;
836
+ primaryType: string;
837
+ message: Record<string, string>;
838
+ };
839
+ /** Human-readable fields for the card (display only). */
840
+ display: {
841
+ /** Amount in smallest unit, e.g. "10000". */
842
+ amount: string;
843
+ /** Asset symbol, e.g. "USDC". */
844
+ asset: string;
845
+ /** CAIP-2 network id, e.g. "eip155:84532". */
846
+ network: string;
847
+ /** Network name, e.g. "Base Sepolia". */
848
+ networkLabel: string;
849
+ /** Address receiving the payment. */
850
+ payTo: string;
851
+ /** Resource description from the 402 (what is being unlocked). */
852
+ description?: string;
853
+ /** The resource URL the payment unlocks. */
854
+ resourceUrl?: string;
855
+ };
856
+ /**
857
+ * Opaque challenge blob — the FE round-trips it back VERBATIM alongside the
858
+ * signature to `submitX402Payment`. Shape is `X402Challenge` from the core's
859
+ * x402 client; the FE must not interpret it beyond `typedData`.
860
+ */
861
+ challenge: unknown;
862
+ }
863
+ /** What the host's x402 signer is asked to sign. */
864
+ interface X402SignRequest {
865
+ /** EIP-712 typed data to sign with the connected wallet. */
866
+ typedData: X402PaymentRequiredProps['typedData'];
867
+ /** Human-readable payment details for a confirmation UI. */
868
+ display: X402PaymentRequiredProps['display'];
869
+ }
870
+ /**
871
+ * Host-provided async signer for the inline x402 flow. Registered via
872
+ * `AgentCore.setX402Signer`. When the core calls an x402-gated API and gets a
873
+ * 402, it AWAITS this function: the host shows a confirmation UI, signs the
874
+ * typed data with the user's wallet, and resolves with the signature hex. The
875
+ * core then re-calls the API and answers — all within one `chat()` turn.
876
+ *
877
+ * Resolve with `null`/`undefined` (or reject) if the user declines.
878
+ */
879
+ type X402Signer = (request: X402SignRequest) => Promise<string | null | undefined>;
809
880
  /** Unsigned EVM transaction the FE will pass to the connected wallet. */
810
881
  interface UnsignedTx {
811
882
  /** Hex chain id */
@@ -1066,6 +1137,14 @@ interface UserContext {
1066
1137
  walletAddress?: string | null;
1067
1138
  /** Current chain the wallet is on (e.g. "ethereum", "arbitrum", "base"). */
1068
1139
  chain?: string | null;
1140
+ /**
1141
+ * ISO 3166-1 alpha-2 country of the user's device region (e.g. "VN", "JP",
1142
+ * "US"), provided by the UI when the user consents to share their region. Used
1143
+ * to pick the largest local shopping marketplaces (e.g. for "where to buy an
1144
+ * NFC tag"). Omitted/empty when the user declined — tools then fall back to the
1145
+ * language-based link.
1146
+ */
1147
+ country?: string | null;
1069
1148
  /**
1070
1149
  * The raw user query for this turn (verbatim phrasing). Tools that need to
1071
1150
  * disambiguate LLM-extracted args against what the user actually typed read it
@@ -1532,8 +1611,9 @@ interface RewriteResult {
1532
1611
  * CANONICAL name (see prompt RULE 6). The LLM resolves messy signals — explorer
1533
1612
  * URLs/domains ("optimistic.etherscan.io"), aliases, native coins, any language
1534
1613
  * — down to one of the supported canonical names (ethereum, optimism, bsc,
1535
- * polygon, base, arbitrum, avalanche, linea), or the plain common name for an
1536
- * unsupported EVM chain (e.g. "unichain"). Empty when the turn names no chain.
1614
+ * polygon, base, arbitrum, avalanche, linea, gnosis, hyperevm, mantle, monad),
1615
+ * or the plain common name for an unsupported EVM chain (e.g. "unichain").
1616
+ * Empty when the turn names no chain.
1537
1617
  *
1538
1618
  * Pushing chain resolution into the LLM keeps the deterministic alias table
1539
1619
  * lean (it only needs canonical names + a few common aliases as a safety net)
@@ -1629,6 +1709,8 @@ declare class AgentCore {
1629
1709
  private storage;
1630
1710
  private storageKey;
1631
1711
  private persistHistoryEnabled;
1712
+ /** Host-provided inline signer for x402; the core awaits it on a 402. */
1713
+ private x402Signer;
1632
1714
  /** Active KB used at search time. May be the legacy LLM matcher or a vector backend. */
1633
1715
  private kb;
1634
1716
  /** Always-present in-memory KB that holds the original entries (used for autoIngest + as fallback). */
@@ -1693,6 +1775,27 @@ declare class AgentCore {
1693
1775
  invokeTool(name: string, args: Record<string, unknown>, options?: {
1694
1776
  userMessage?: string;
1695
1777
  }): Promise<AgentResponse>;
1778
+ /**
1779
+ * Register the host's inline x402 signer and turn on transparent x402. When
1780
+ * set, ANY ApiClient call (every service/tool uses it) that returns 402 makes
1781
+ * the core AWAIT this function (the host shows a confirm UI + signs the typed
1782
+ * data with the user's wallet); the core then retries the request paid and
1783
+ * returns the data, within the same `chat()` turn. Pass `null` to turn it off.
1784
+ */
1785
+ setX402Signer(signer: X402Signer | null): void;
1786
+ /**
1787
+ * Two-turn fallback resume: complete an x402 payment with a signature the FE
1788
+ * collected for an `X402PaymentRequired` card, re-call the API, and synthesize
1789
+ * the answer with the LLM. Use this when no inline signer is registered.
1790
+ *
1791
+ * `challenge` is the opaque blob from `X402PaymentRequiredProps.challenge`.
1792
+ */
1793
+ submitX402Payment(challenge: unknown, signature: string, options?: {
1794
+ generateSuggestions?: boolean;
1795
+ userQuery?: string;
1796
+ }): Promise<AgentResponse>;
1797
+ /** Turn paid-API data into a natural-language answer for the original question. */
1798
+ private synthesizeFromPaidData;
1696
1799
  /**
1697
1800
  * Register a custom subagent. Replaces any existing subagent with the same name.
1698
1801
  * Advanced: most consumers should rely on the default wallet/token/nft/ai agents.
@@ -4932,16 +5035,19 @@ declare class NfcInfoTool extends BaseTool {
4932
5035
  category: string;
4933
5036
  description: string;
4934
5037
  parameters: ToolParameter[];
4935
- protected run(args: Record<string, unknown>): Promise<unknown>;
5038
+ private llm?;
5039
+ constructor(llmConfig?: LLMProviderConfig);
5040
+ protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<unknown>;
4936
5041
  }
4937
5042
 
4938
5043
  /**
4939
5044
  * Tool: nfc-buy-link
4940
5045
  *
4941
- * Points the user to a country-appropriate Amazon "NFC Tag" search page. The
4942
- * storefront is chosen from the user's language (e.g. ja → amazon.co.jp,
4943
- * de → amazon.de), defaulting to amazon.com. The subagent knows the current
4944
- * turn's BCP-47 language and passes it as `language`.
5046
+ * Points the user to where to buy an NFC tag. When the UI has shared the user's
5047
+ * device country (UserContext.country), it returns the LARGEST e-commerce
5048
+ * platforms of that country (up to 3) with a pre-built "NFC Tag" search — one
5049
+ * tap lands on the products. With no country it falls back to a language-based
5050
+ * Amazon storefront. The subagent passes the current turn's BCP-47 `language`.
4945
5051
  */
4946
5052
  declare class NfcBuyTool extends BaseTool {
4947
5053
  kind: ToolKind;
@@ -4950,7 +5056,9 @@ declare class NfcBuyTool extends BaseTool {
4950
5056
  noSuggestions: boolean;
4951
5057
  description: string;
4952
5058
  parameters: ToolParameter[];
4953
- protected run(args: Record<string, unknown>): Promise<unknown>;
5059
+ private llm?;
5060
+ constructor(llmConfig?: LLMProviderConfig);
5061
+ protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<unknown>;
4954
5062
  }
4955
5063
 
4956
5064
  /**
@@ -4978,6 +5086,42 @@ declare function amazonDomainForLanguage(language?: string | null): string;
4978
5086
  */
4979
5087
  declare function nfcAmazonSearchUrl(language?: string | null): string;
4980
5088
 
5089
+ /**
5090
+ * Shared types/helpers for the NFC "where to buy" links.
5091
+ *
5092
+ * The actual list of a country's largest e-commerce platforms is NOT hardcoded
5093
+ * here — it is fetched at runtime from a Google-Search-grounded AI model (see
5094
+ * {@link ./marketplaceSearch}). This module only holds the link shape and the
5095
+ * country-code normaliser that both the fetcher and the Amazon fallback share.
5096
+ */
5097
+ /** One marketplace the user can tap to buy NFC tags. */
5098
+ interface MarketplaceLink {
5099
+ /** Human brand name shown in the answer (e.g. "Shopee", "Amazon"). */
5100
+ label: string;
5101
+ /** Final, query-encoded "NFC Tag" search URL for that storefront. */
5102
+ url: string;
5103
+ }
5104
+ /** Normalise a country code (or BCP-47-ish region) to its uppercase alpha-2. */
5105
+ declare function normaliseCountry(country?: string | null): string;
5106
+
5107
+ /**
5108
+ * The top marketplaces for a country, fetched via the search-grounded model and
5109
+ * cached. Returns `null` when the country is unknown, no model is available, or
5110
+ * the model gives nothing usable — callers then fall back.
5111
+ */
5112
+ declare function fetchTopMarketplaces(country: string | null | undefined, llm: GeminiProvider | undefined): Promise<MarketplaceLink[] | null>;
5113
+ /**
5114
+ * Single source of truth for the NFC "where to buy" links, used by both NFC
5115
+ * tools. Prefers the country's largest local marketplaces (resolved live by the
5116
+ * AI); otherwise falls back to the language-based Amazon storefront so behaviour
5117
+ * is unchanged when no region/model is available or the lookup fails.
5118
+ */
5119
+ declare function resolveNfcShopLinks(opts: {
5120
+ country?: string | null;
5121
+ language?: string | null;
5122
+ llm?: GeminiProvider;
5123
+ }): Promise<MarketplaceLink[]>;
5124
+
4981
5125
  type GeminiSearchAiToolConfig = LLMProviderConfig;
4982
5126
  /**
4983
5127
  * Tool: gemini-search-ai
@@ -7207,6 +7351,187 @@ declare function ethCallAt(rpcUrl: string, to: string, data: string): Promise<st
7207
7351
  */
7208
7352
  declare function ethCallByChain(chainId: string, to: string, data: string): Promise<string | null>;
7209
7353
 
7354
+ /** Normalized, `fetch`-like response. `data` is the parsed body (JSON when possible). */
7355
+ interface ApiResponse<T = unknown> {
7356
+ /** True when the HTTP status is in the 2xx range. */
7357
+ ok: boolean;
7358
+ status: number;
7359
+ statusText: string;
7360
+ /** Parsed response body (JSON object/array, or raw string for non-JSON). */
7361
+ data: T;
7362
+ /** Response headers with lowercased keys. */
7363
+ headers: Record<string, string>;
7364
+ }
7365
+ interface ApiClientConfig {
7366
+ /** Optional base URL prepended to relative request paths. */
7367
+ baseURL?: string;
7368
+ /** Default headers merged into every request. */
7369
+ headers?: Record<string, string>;
7370
+ /** Per-request timeout in ms. Defaults to 30000. */
7371
+ timeout?: number;
7372
+ /** Override the default bot User-Agent. */
7373
+ userAgent?: string;
7374
+ }
7375
+ /** Original request details, so the handler can build the payment. */
7376
+ interface X402RetryContext {
7377
+ url: string;
7378
+ method: string;
7379
+ body?: unknown;
7380
+ headers?: Record<string, string>;
7381
+ }
7382
+ /**
7383
+ * Resolve a 402 challenge into the header(s) to retry with (e.g.
7384
+ * `{ 'PAYMENT-SIGNATURE': '…' }`), or `null` to give up (caller sees the 402).
7385
+ */
7386
+ type X402RetryHandler = (response: ApiResponse, ctx: X402RetryContext) => Promise<Record<string, string> | null>;
7387
+ type RequestOptions = Omit<AxiosRequestConfig, 'url' | 'method' | 'data' | 'baseURL'>;
7388
+ declare class ApiClient {
7389
+ private readonly instance;
7390
+ constructor(config?: ApiClientConfig);
7391
+ /** Low-level request used by the REST helpers below. */
7392
+ request<T = unknown>(method: Method, url: string, data?: unknown, options?: RequestOptions): Promise<ApiResponse<T>>;
7393
+ get<T = unknown>(url: string, options?: RequestOptions): Promise<ApiResponse<T>>;
7394
+ post<T = unknown>(url: string, body?: unknown, options?: RequestOptions): Promise<ApiResponse<T>>;
7395
+ put<T = unknown>(url: string, body?: unknown, options?: RequestOptions): Promise<ApiResponse<T>>;
7396
+ patch<T = unknown>(url: string, body?: unknown, options?: RequestOptions): Promise<ApiResponse<T>>;
7397
+ delete<T = unknown>(url: string, options?: RequestOptions): Promise<ApiResponse<T>>;
7398
+ }
7399
+ /** Shared default client (bot User-Agent, no base URL) for ad-hoc absolute-URL calls. */
7400
+ declare const apiClient: ApiClient;
7401
+
7402
+ /**
7403
+ * Generic x402 (HTTP 402 "pay-per-call") client for the agent core.
7404
+ *
7405
+ * The core makes the outbound HTTP call. When a resource answers `402` with a
7406
+ * `PAYMENT-REQUIRED` header, the core does NOT hold a private key, so it builds
7407
+ * the payment authorization + the EIP-712 typed data and hands the typed data to
7408
+ * the FE to SIGN. The FE returns just the signature; the core then re-issues the
7409
+ * request with the `PAYMENT-SIGNATURE` header and returns the unlocked result.
7410
+ *
7411
+ * Supports the x402 v2 "exact" EVM scheme (EIP-3009 `TransferWithAuthorization`),
7412
+ * which covers USDC-style assets. No crypto library is needed here — signing
7413
+ * happens on the FE; the core only does JSON + base64 + a random nonce.
7414
+ */
7415
+ type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
7416
+ /** A request the core wants to make (and replay after payment). */
7417
+ interface X402RequestSpec {
7418
+ url: string;
7419
+ method?: HttpMethod;
7420
+ /** Query params appended to `url` (string-encoded values). */
7421
+ query?: Record<string, string>;
7422
+ /** JSON body for non-GET requests. */
7423
+ body?: unknown;
7424
+ /** Extra request headers (the payment header is added on retry). */
7425
+ headers?: Record<string, string>;
7426
+ }
7427
+ /** Selected payment requirement from the 402 challenge (accepts[0]). */
7428
+ interface X402Requirements {
7429
+ scheme: string;
7430
+ network: string;
7431
+ amount: string;
7432
+ asset: string;
7433
+ payTo: string;
7434
+ maxTimeoutSeconds?: number;
7435
+ extra?: {
7436
+ name?: string;
7437
+ version?: string;
7438
+ [k: string]: unknown;
7439
+ };
7440
+ }
7441
+ /** EIP-712 typed data the FE must sign with the connected wallet. */
7442
+ interface X402TypedData {
7443
+ domain: {
7444
+ name?: string;
7445
+ version?: string;
7446
+ chainId: number;
7447
+ verifyingContract: string;
7448
+ };
7449
+ types: Record<string, Array<{
7450
+ name: string;
7451
+ type: string;
7452
+ }>>;
7453
+ primaryType: string;
7454
+ message: Record<string, string>;
7455
+ }
7456
+ /** EIP-3009 authorization fields (also the typed-data message). */
7457
+ interface X402Authorization {
7458
+ from: string;
7459
+ to: string;
7460
+ value: string;
7461
+ validAfter: string;
7462
+ validBefore: string;
7463
+ nonce: string;
7464
+ }
7465
+ /**
7466
+ * Everything needed to (a) ask the FE to sign and (b) replay the paid request.
7467
+ * Round-tripped through the FE verbatim — opaque to it except `typedData`.
7468
+ */
7469
+ interface X402Challenge {
7470
+ request: {
7471
+ url: string;
7472
+ method: HttpMethod;
7473
+ body?: unknown;
7474
+ headers?: Record<string, string>;
7475
+ };
7476
+ requirements: X402Requirements;
7477
+ authorization: X402Authorization;
7478
+ typedData: X402TypedData;
7479
+ /** The signed wire payload, missing only `payload.signature`. */
7480
+ paymentDraft: {
7481
+ x402Version: number;
7482
+ payload: {
7483
+ authorization: X402Authorization;
7484
+ };
7485
+ resource?: unknown;
7486
+ accepted: X402Requirements;
7487
+ extensions?: unknown;
7488
+ };
7489
+ /** The user's original question, so phase 2 can synthesize an answer. */
7490
+ userQuery?: string;
7491
+ }
7492
+ type X402Outcome = {
7493
+ status: 'ok';
7494
+ data: unknown;
7495
+ } | {
7496
+ status: 'payment_required';
7497
+ challenge: X402Challenge;
7498
+ };
7499
+ /** Build the challenge (authorization + typed data + replay payload) from a 402. */
7500
+ declare function buildChallenge(res: ApiResponse, req: X402RequestSpec, payer: string, userQuery?: string): X402Challenge;
7501
+ /**
7502
+ * Make the request. Returns the data when free/already-paid, or a challenge to
7503
+ * sign when the resource answers 402. Throws on other non-2xx statuses.
7504
+ */
7505
+ declare function requestWithX402(client: ApiClient, req: X402RequestSpec, payer: string, userQuery?: string): Promise<X402Outcome>;
7506
+ /**
7507
+ * Replay the request with the signed payment (`PAYMENT-SIGNATURE` header) and
7508
+ * return the unlocked data. Throws with the facilitator's reason on failure.
7509
+ */
7510
+ declare function completeX402(client: ApiClient, challenge: X402Challenge, signature: string): Promise<unknown>;
7511
+ /** Encode the signed payment as the `PAYMENT-SIGNATURE` retry header. */
7512
+ declare function encodeSignedHeader(challenge: X402Challenge, signature: string): Record<string, string>;
7513
+ /** Human-readable payment details for a confirmation UI, derived from a challenge. */
7514
+ declare function displayFromChallenge(challenge: X402Challenge): {
7515
+ amount: string;
7516
+ asset: string;
7517
+ network: string;
7518
+ networkLabel: string;
7519
+ payTo: string;
7520
+ description?: string;
7521
+ resourceUrl?: string;
7522
+ };
7523
+ /**
7524
+ * Build a global {@link X402RetryHandler} for {@link setX402Handler}: on a 402 it
7525
+ * builds the challenge, asks the host signer to sign, and returns the
7526
+ * `PAYMENT-SIGNATURE` header so EVERY ApiClient call transparently retries paid.
7527
+ * Returns `null` (give up → caller sees the 402) when there is no wallet/signer
7528
+ * or the user declines.
7529
+ */
7530
+ declare function createX402SignatureProvider(opts: {
7531
+ getPayer: () => string | null | undefined;
7532
+ getSigner: () => X402Signer | null | undefined;
7533
+ }): X402RetryHandler;
7534
+
7210
7535
  /**
7211
7536
  * PantographService — Pantograph API client.
7212
7537
  *
@@ -7606,4 +7931,4 @@ declare class AbortError extends Error {
7606
7931
  */
7607
7932
  declare function isAbortError(err: unknown): boolean;
7608
7933
 
7609
- export { AI_AGENT_TOOL_NAMES, AbortError, type AddLiquidityFormProps, type AddLiquiditySummary, type AffiliateFee, type AgentConfig, AgentCore, type AgentResponse, ApproveTokenTool, BaseNftAiTool, BaseNftMessageTool, BaseSwapService, BaseTool, BaseWalletActionTool, type BuyTokenConfirmTxProps, type BuyTokenSide, BuyTokenTool, type ChainMeta, type ChainRef, type ChainSelector, ChatHistory, type ChatMessage, type ChatOptions, type ChatRole, type CheckApprovalParams, type CheckApprovalResult, type ConfirmAddLiquidityTxProps, type CortexResponse, DEFAULT_CHAIN, DEFAULT_PROVIDER, DEFAULT_RPC_BY_CHAIN, DebridgeAdapter, type DecodedCall, type DecodedEvent, type DecodedParam, type DefaultSubagentName, type DefiPosition, type DefiPositionDetails, type DefiPositionToken, type DefiProtocolSummary, EstimatePoolYieldTool, type EstimatePoolYieldToolConfig, type ExchangeProviderConfig, type ExecuteSwapParams, type ExecuteSwapResult, GeminiProvider, GeminiSearchAiTool, type GeminiSearchAiToolConfig, HEX_TO_PANTOGRAPH, type HolderChangePeriod, type HolderSupplyTier, type IngestKnowledgeBaseInput, type IngestKnowledgeBaseResult, type InputTokenInfo, type KBSearchResult, KnowledgeBase, type KnowledgeBaseEntry, type KnowledgeBaseProvider, type LLMProvider, type LLMProviderConfig, type LLMResponse, type LLMToolCall, ManageLiquidityRedirectTool, type MoralisApiResponse, MoralisService, type MoralisServiceConfig, NFC_AGENT_TOOL_NAMES, NFC_AMAZON_DEFAULT_DOMAIN, NFC_AMAZON_DOMAINS, NFTContractInfoTool, type NFTContractMetadata, type NFTItem, type NFTLastSale, type NFTMetadata, NFTMetadataTool, NFT_AGENT_TOOL_NAMES, type NativeTokenInfo, NfcBuyTool, NfcInfoTool, type NftMessageToolConfig, type NftTransferLastSale, OpenAddLiquidityFormTool, type OpenAddLiquidityFormToolConfig, POOL_AGENT_TOOL_NAMES, PantographService, type PantographServiceConfig, type PaymentToken, PoolByAddressTool, type PoolByAddressToolConfig, PoolDetailTool, type PoolDetailToolConfig, type PoolDisplayInfo, PoolFallbackAiTool, type PoolFallbackAiToolConfig, type PoolOnchainInfo, PoolPriceRangesTool, type PoolPriceRangesToolConfig, PoolSearchTool, type PoolSearchToolConfig, PoolService, type PoolServiceConfig, type PresetInputs, PreviewAddLiquidityTool, type PreviewAddLiquidityToolConfig, type PriceBounds, type PriceRangePrefill, type ProviderName, type QuickRate, type RangePreset, type ReActPhase, type ReActStep, type ReActTrace, RelayAdapter, type ResolvedRange, Router, type RouterAssignment, type RouterDecision, SUPPORTED_CHAINS, SUPPORTED_CHAINS_LABEL, SWAP_PROVIDER_CONFIG, SendNativeTool, SendNftTool, SendTokenTool, 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 SupportedChainId, type SupportedChainName, type SwapQuoteParams, type SwapQuoteResult, type SwapServiceConfig, SwapServiceFactory, type SwapTokenConfirmTxProps, 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 TrendingToken, type TrendingTokenTimeframeBuckets, TrendingTokensTool, type TrendingTokensToolConfig, type UIPayload, UNISWAP_CHAIN_SLUG, type UnsignedTx, type UpstashEmbedStrategy, type UpstashFusionAlgorithm, type UpstashKBUpsertEntry, UpstashKnowledgeBase, type UpstashKnowledgeBaseConfig, type UserContext, type VectorKBConfig, WALLET_ACTION_AGENT_TOOL_NAMES, WALLET_AGENT_TOOL_NAMES, WalletActionAppTool, type WalletActionAppToolConfig, 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, WalletDefiSummaryTool, type WalletDefiSummaryToolConfig, type WalletHistoryCategory, type WalletHistoryContractInteraction, type WalletHistoryErc20Transfer, type WalletHistoryItem, type WalletHistoryNativeTransfer, type WalletHistoryNftTransfer, type WalletHistoryResponse, WalletHistoryTool, type WalletHistoryToolConfig, WalletNFTsTool, type WalletNFTsToolConfig, 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, ZERO_ADDRESS, amazonDomainForLanguage, buildRangePresets, buildUniswapPoolUrl, clampTick, configureSupportedChains, createAiAgent, createDefaultSubagents, createNfcAgent, createNftAgent, createPoolAgent, createTokenAgent, createWalletActionAgent, createWalletActionAppTools, createWalletAgent, ethCallAt, ethCallByChain, getAffiliateFee, getChainMeta, getDefaultRpcUrl, getGatewayAddress, getGatewayChains, getNativeTokenInfo, getPositionManagerAddress, getProviderByChain, ingestKnowledgeBase, isAbortError, nfcAmazonSearchUrl, normalizePriceRangeToPool, priceToTick, resolveRpcUrl, roundTickToSpacing, rpcCall, setRpcOverrides, swapServiceFactory, tickToPrice, toPantographChain };
7934
+ export { AI_AGENT_TOOL_NAMES, AbortError, type AddLiquidityFormProps, type AddLiquiditySummary, type AffiliateFee, type AgentConfig, AgentCore, type AgentResponse, ApproveTokenTool, BaseNftAiTool, BaseNftMessageTool, BaseSwapService, BaseTool, BaseWalletActionTool, type BuyTokenConfirmTxProps, type BuyTokenSide, BuyTokenTool, type ChainMeta, type ChainRef, type ChainSelector, ChatHistory, type ChatMessage, type ChatOptions, type ChatRole, type CheckApprovalParams, type CheckApprovalResult, type ConfirmAddLiquidityTxProps, type CortexResponse, DEFAULT_CHAIN, DEFAULT_PROVIDER, DEFAULT_RPC_BY_CHAIN, DebridgeAdapter, type DecodedCall, type DecodedEvent, type DecodedParam, type DefaultSubagentName, type DefiPosition, type DefiPositionDetails, type DefiPositionToken, type DefiProtocolSummary, EstimatePoolYieldTool, type EstimatePoolYieldToolConfig, type ExchangeProviderConfig, type ExecuteSwapParams, type ExecuteSwapResult, GeminiProvider, GeminiSearchAiTool, type GeminiSearchAiToolConfig, HEX_TO_PANTOGRAPH, type HolderChangePeriod, type HolderSupplyTier, type HttpMethod, type IngestKnowledgeBaseInput, type IngestKnowledgeBaseResult, type InputTokenInfo, type KBSearchResult, KnowledgeBase, type KnowledgeBaseEntry, type KnowledgeBaseProvider, type LLMProvider, type LLMProviderConfig, type LLMResponse, type LLMToolCall, ManageLiquidityRedirectTool, type MarketplaceLink, type MoralisApiResponse, MoralisService, type MoralisServiceConfig, NFC_AGENT_TOOL_NAMES, NFC_AMAZON_DEFAULT_DOMAIN, NFC_AMAZON_DOMAINS, NFTContractInfoTool, type NFTContractMetadata, type NFTItem, type NFTLastSale, type NFTMetadata, NFTMetadataTool, NFT_AGENT_TOOL_NAMES, type NativeTokenInfo, NfcBuyTool, NfcInfoTool, type NftMessageToolConfig, type NftTransferLastSale, OpenAddLiquidityFormTool, type OpenAddLiquidityFormToolConfig, POOL_AGENT_TOOL_NAMES, PantographService, type PantographServiceConfig, type PaymentToken, PoolByAddressTool, type PoolByAddressToolConfig, PoolDetailTool, type PoolDetailToolConfig, type PoolDisplayInfo, PoolFallbackAiTool, type PoolFallbackAiToolConfig, type PoolOnchainInfo, PoolPriceRangesTool, type PoolPriceRangesToolConfig, PoolSearchTool, type PoolSearchToolConfig, PoolService, type PoolServiceConfig, type PresetInputs, PreviewAddLiquidityTool, type PreviewAddLiquidityToolConfig, type PriceBounds, type PriceRangePrefill, type ProviderName, type QuickRate, type RangePreset, type ReActPhase, type ReActStep, type ReActTrace, RelayAdapter, type ResolvedRange, Router, type RouterAssignment, type RouterDecision, SUPPORTED_CHAINS, SUPPORTED_CHAINS_LABEL, SWAP_PROVIDER_CONFIG, SendNativeTool, SendNftTool, SendTokenTool, 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 SupportedChainId, type SupportedChainName, type SwapQuoteParams, type SwapQuoteResult, type SwapServiceConfig, SwapServiceFactory, type SwapTokenConfirmTxProps, 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 TrendingToken, type TrendingTokenTimeframeBuckets, TrendingTokensTool, type TrendingTokensToolConfig, type UIPayload, UNISWAP_CHAIN_SLUG, type UnsignedTx, type UpstashEmbedStrategy, type UpstashFusionAlgorithm, type UpstashKBUpsertEntry, UpstashKnowledgeBase, type UpstashKnowledgeBaseConfig, type UserContext, type VectorKBConfig, WALLET_ACTION_AGENT_TOOL_NAMES, WALLET_AGENT_TOOL_NAMES, WalletActionAppTool, type WalletActionAppToolConfig, 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, WalletDefiSummaryTool, type WalletDefiSummaryToolConfig, type WalletHistoryCategory, type WalletHistoryContractInteraction, type WalletHistoryErc20Transfer, type WalletHistoryItem, type WalletHistoryNativeTransfer, type WalletHistoryNftTransfer, type WalletHistoryResponse, WalletHistoryTool, type WalletHistoryToolConfig, WalletNFTsTool, type WalletNFTsToolConfig, 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 X402Outcome, type X402PaymentRequiredProps, type X402RequestSpec, type X402Requirements, type X402SignRequest, type X402Signer, type X402TypedData, ZERO_ADDRESS, amazonDomainForLanguage, apiClient, buildChallenge, buildRangePresets, buildUniswapPoolUrl, clampTick, completeX402, configureSupportedChains, createAiAgent, createDefaultSubagents, createNfcAgent, createNftAgent, createPoolAgent, createTokenAgent, createWalletActionAgent, createWalletActionAppTools, createWalletAgent, createX402SignatureProvider, displayFromChallenge, encodeSignedHeader, ethCallAt, ethCallByChain, fetchTopMarketplaces, getAffiliateFee, getChainMeta, getDefaultRpcUrl, getGatewayAddress, getGatewayChains, getNativeTokenInfo, getPositionManagerAddress, getProviderByChain, ingestKnowledgeBase, isAbortError, nfcAmazonSearchUrl, normaliseCountry, normalizePriceRangeToPool, priceToTick, requestWithX402, resolveNfcShopLinks, resolveRpcUrl, roundTickToSpacing, rpcCall, setRpcOverrides, swapServiceFactory, tickToPrice, toPantographChain };