keyring-agent-core 0.4.6 → 0.4.8

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
@@ -8748,6 +8748,19 @@ declare const POLYGON_CHAIN_ID = "137";
8748
8748
  * the field. https://docs.polymarket.com/perps/fund-your-account
8749
8749
  */
8750
8750
  declare const PERPS_DEPOSIT_CONTRACT = "0xDCa4af75705dbB50f62437045afF9921947917d2";
8751
+ /**
8752
+ * The Neg Risk Adapter. Polymarket's contracts page: "The CLOB still checks pUSD
8753
+ * and Conditional Tokens approvals for the Neg Risk Adapter on orders in CTF
8754
+ * negative-risk markets. Grant them with the other trading approvals."
8755
+ * (https://docs.polymarket.com/resources/contracts). The SDK's trading-approval
8756
+ * list (@polymarket/client 0.12.0) leaves both out; without the pUSD allowance a
8757
+ * neg-risk BUY is refused with "the allowance is not enough -> spender:
8758
+ * 0xd91E80…, allowance: 0". Account setup adds both. Read from the SDK
8759
+ * environment (`contracts.negRiskAdapter`); this is the fallback.
8760
+ */
8761
+ declare const NEG_RISK_ADAPTER = "0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296";
8762
+ /** Gnosis ConditionalTokens (the outcome positions); fallback for `contracts.conditionalTokens`. */
8763
+ declare const CONDITIONAL_TOKENS = "0x4D97DCd97eC945f40cF65F87097ACe5EA0476045";
8751
8764
  /** Relayer label of the approval batch (the SDK's own label for it). */
8752
8765
  declare const TRADING_APPROVALS_METADATA = "Trading setup approvals";
8753
8766
  /** Account-setup steps, in the order they run. */
@@ -9115,6 +9128,11 @@ declare class PolymarketService {
9115
9128
  */
9116
9129
  resolveAccount(address: string): Promise<PolymarketAccount>;
9117
9130
  getCash(wallet: string): Promise<number>;
9131
+ /**
9132
+ * Shares held of each v1 outcome token, on-chain (see getShareBalances) — up to
9133
+ * date the moment a fill settles, unlike `getPositions`. Never cached.
9134
+ */
9135
+ getShares(wallet: string, tokenIds: string[]): Promise<Record<string, number>>;
9118
9136
  /** Value of the open positions (`/v2/value`); cash is not included. */
9119
9137
  getPositionsValue(wallet: string): Promise<number>;
9120
9138
  /**
@@ -10573,6 +10591,15 @@ declare function deriveDepositWallet(owner: string, client?: PublicClient): Prom
10573
10591
  declare function resolveAccountWallet(address: string, profileWallet: string | null, client?: PublicClient): Promise<PolymarketAccount>;
10574
10592
  /** pUSD held by the account wallet, in base units (6 decimals) — exact, for amounts that are sent. */
10575
10593
  declare function getCashBalanceBaseUnits(wallet: string, client?: PublicClient): Promise<bigint>;
10594
+ /**
10595
+ * Shares of each v1 outcome token (`clobTokenIds`) the account wallet holds, read
10596
+ * from ConditionalTokens on Polygon: `{ [tokenId]: shares }`. One call. The
10597
+ * chain is the source of truth the moment a fill settles; the Data API's
10598
+ * positions are an index of it and can lag behind. Shares have 6 decimals, like
10599
+ * pUSD. Not for v2 markets: their positions live in the PositionManager
10600
+ * ("PositionManager owns the ERC-1155 balances", docs.polymarket.com/resources/contracts).
10601
+ */
10602
+ declare function getShareBalances(wallet: string, tokenIds: string[], client?: PublicClient): Promise<Record<string, number>>;
10576
10603
  /** pUSD held by the account wallet — the cash available to trade. */
10577
10604
  declare function getCashBalance(wallet: string, client?: PublicClient): Promise<number>;
10578
10605
 
@@ -10700,6 +10727,10 @@ declare function createPolymarketSigner(bridge: PolymarketSignerBridge): Polymar
10700
10727
  * (`/v2/approvals` files it under `feature: "perps"`), which prediction trading
10701
10728
  * never uses. Counting it would show the setup card to every polymarket.com
10702
10729
  * account that never touched Perps and ask them to sign for it.
10730
+ *
10731
+ * It also leaves out the NegRiskAdapter, which the CLOB still checks on every
10732
+ * neg-risk market — those two approvals are read here and added (see
10733
+ * {@link NEG_RISK_ADAPTER}).
10703
10734
  */
10704
10735
  declare function fetchTradingApprovalsStatus(wallet: string): Promise<TradingApprovalsStatus>;
10705
10736
  interface OnboardingSnapshot {
@@ -16203,4 +16234,4 @@ declare class AbortError extends Error {
16203
16234
  */
16204
16235
  declare function isAbortError(err: unknown): boolean;
16205
16236
 
16206
- 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_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, 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, DEPOSIT_STABLE_SYMBOLS, 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, 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, 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 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, buildApprovalCalls, buildApprovals, buildBuilderSignature, buildChallenge, buildRangePresets, buildUniswapPoolUrl, builderApiKey, buyNotional, buyNotionalAfterFee, call, canDeriveV3PoolAddress, ceil2, chains, checkNativeGasAffordable, checksumAddress, clampTick, classifyTradeError, classifyWithdrawError, clearPublicClientCache, coinpoolConfigApi, 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, 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 };
16237
+ 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_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, DEPOSIT_STABLE_SYMBOLS, 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, 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 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, buildApprovalCalls, buildApprovals, buildBuilderSignature, buildChallenge, buildRangePresets, buildUniswapPoolUrl, builderApiKey, buyNotional, buyNotionalAfterFee, call, canDeriveV3PoolAddress, ceil2, chains, checkNativeGasAffordable, checksumAddress, clampTick, classifyTradeError, classifyWithdrawError, clearPublicClientCache, coinpoolConfigApi, 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 };