keyring-agent-core 0.2.23 → 0.2.25
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 +243 -98
- package/dist/index.js +80 -69
- package/dist/index.native.js +182 -170
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1437,11 +1437,18 @@ interface RewriteResult {
|
|
|
1437
1437
|
*/
|
|
1438
1438
|
language: string;
|
|
1439
1439
|
/**
|
|
1440
|
-
* The blockchain network
|
|
1441
|
-
*
|
|
1442
|
-
*
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1440
|
+
* The blockchain network THIS turn refers to, NORMALIZED by the rewriter to a
|
|
1441
|
+
* CANONICAL name (see prompt RULE 6). The LLM resolves messy signals — explorer
|
|
1442
|
+
* URLs/domains ("optimistic.etherscan.io"), aliases, native coins, any language
|
|
1443
|
+
* — down to one of the supported canonical names (ethereum, optimism, bsc,
|
|
1444
|
+
* polygon, base, arbitrum, avalanche, linea), or the plain common name for an
|
|
1445
|
+
* unsupported EVM chain (e.g. "unichain"). Empty when the turn names no chain.
|
|
1446
|
+
*
|
|
1447
|
+
* Pushing chain resolution into the LLM keeps the deterministic alias table
|
|
1448
|
+
* lean (it only needs canonical names + a few common aliases as a safety net)
|
|
1449
|
+
* instead of enumerating every explorer/alias variant per chain. Lets the
|
|
1450
|
+
* orchestrator detect a request targeting an UNsupported chain even while the
|
|
1451
|
+
* wallet is connected to a supported one ("show my balance on Unichain").
|
|
1445
1452
|
*/
|
|
1446
1453
|
mentionedChain: string;
|
|
1447
1454
|
/**
|
|
@@ -1811,7 +1818,7 @@ declare class Synthesizer {
|
|
|
1811
1818
|
synthesise(userQuery: string, trace: ReActTrace, conversationHistory: ChatMessage[], language?: string): Promise<string>;
|
|
1812
1819
|
}
|
|
1813
1820
|
|
|
1814
|
-
declare const WALLET_AGENT_TOOL_NAMES: readonly ["get-wallet-token-balances", "get-wallet-history", "get-wallet-token-transfers", "get-wallet-nft-transfers", "get-wallet-
|
|
1821
|
+
declare const WALLET_AGENT_TOOL_NAMES: readonly ["get-wallet-token-balances", "get-wallet-history", "get-wallet-token-transfers", "get-wallet-nft-transfers", "get-wallet-pnl-summary", "get-wallet-pnl", "get-wallet-approvals", "get-wallet-defi-summary", "get-wallet-defi-positions", "get-wallet-defi-protocol-positions", "get-transaction-by-hash", "gemini-search-ai"];
|
|
1815
1822
|
declare function createWalletAgent(llm: LLMProvider, registry: ToolRegistry, options?: SubagentOptions): Subagent;
|
|
1816
1823
|
|
|
1817
1824
|
declare const TOKEN_AGENT_TOOL_NAMES: readonly ["get-token-info", "get-token-holders", "get-token-analytics", "get-token-score", "get-trending-tokens", "get-top-gainers", "gemini-search-ai"];
|
|
@@ -2209,23 +2216,6 @@ interface WalletHistoryResponse {
|
|
|
2209
2216
|
interface CortexResponse {
|
|
2210
2217
|
text: string;
|
|
2211
2218
|
}
|
|
2212
|
-
interface WalletNetWorthChainBreakdown {
|
|
2213
|
-
chain: string;
|
|
2214
|
-
native_balance: string;
|
|
2215
|
-
native_balance_formatted: string;
|
|
2216
|
-
native_balance_usd: string;
|
|
2217
|
-
token_balance_usd: string;
|
|
2218
|
-
networth_usd: string;
|
|
2219
|
-
}
|
|
2220
|
-
interface WalletNetWorthUnavailableChain {
|
|
2221
|
-
chain_id: string;
|
|
2222
|
-
}
|
|
2223
|
-
interface WalletNetWorthResponse {
|
|
2224
|
-
total_networth_usd: string;
|
|
2225
|
-
chains: WalletNetWorthChainBreakdown[];
|
|
2226
|
-
unsupported_chain_ids?: string[];
|
|
2227
|
-
unavailable_chains?: WalletNetWorthUnavailableChain[];
|
|
2228
|
-
}
|
|
2229
2219
|
type WalletPnlDaysWindow = 'all' | '7' | '30' | '60' | '90';
|
|
2230
2220
|
interface WalletPnlSummaryResponse {
|
|
2231
2221
|
total_count_of_trades: number;
|
|
@@ -2997,23 +2987,6 @@ declare class MoralisService {
|
|
|
2997
2987
|
address: string;
|
|
2998
2988
|
chain?: string;
|
|
2999
2989
|
}): Promise<MoralisApiResponse<TokenHoldersResponse>>;
|
|
3000
|
-
/**
|
|
3001
|
-
* Get a wallet's total net worth in USD, broken down per chain.
|
|
3002
|
-
*
|
|
3003
|
-
* URL: GET /api/moralis/proxy/wallets/{address}/net-worth
|
|
3004
|
-
*
|
|
3005
|
-
* Use to answer questions like:
|
|
3006
|
-
* - "What's my total wallet value?"
|
|
3007
|
-
* - "How much is my portfolio worth on each chain?"
|
|
3008
|
-
*/
|
|
3009
|
-
getWalletNetWorth(params: {
|
|
3010
|
-
address: string;
|
|
3011
|
-
chains?: string[];
|
|
3012
|
-
excludeSpam?: boolean;
|
|
3013
|
-
excludeUnverifiedContracts?: boolean;
|
|
3014
|
-
maxTokenInactivity?: number;
|
|
3015
|
-
minPairSideLiquidityUsd?: number;
|
|
3016
|
-
}): Promise<MoralisApiResponse<WalletNetWorthResponse>>;
|
|
3017
2990
|
/**
|
|
3018
2991
|
* Get aggregate profit-and-loss summary for a wallet.
|
|
3019
2992
|
*
|
|
@@ -3592,12 +3565,14 @@ declare class WalletHistoryTool extends BaseTool {
|
|
|
3592
3565
|
constructor(config?: WalletHistoryToolConfig);
|
|
3593
3566
|
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
3594
3567
|
error: string;
|
|
3568
|
+
_instructions?: undefined;
|
|
3595
3569
|
walletAddress?: undefined;
|
|
3596
3570
|
chain?: undefined;
|
|
3597
3571
|
pagination?: undefined;
|
|
3598
3572
|
transactionCount?: undefined;
|
|
3599
3573
|
transactions?: undefined;
|
|
3600
3574
|
} | {
|
|
3575
|
+
_instructions: string;
|
|
3601
3576
|
walletAddress: string;
|
|
3602
3577
|
chain: string;
|
|
3603
3578
|
pagination: {
|
|
@@ -3605,7 +3580,44 @@ declare class WalletHistoryTool extends BaseTool {
|
|
|
3605
3580
|
hasMore: boolean;
|
|
3606
3581
|
};
|
|
3607
3582
|
transactionCount: number;
|
|
3608
|
-
transactions: WalletHistoryItem
|
|
3583
|
+
transactions: (WalletHistoryItem | {
|
|
3584
|
+
explorerUrl: string;
|
|
3585
|
+
hash: string;
|
|
3586
|
+
nonce?: string;
|
|
3587
|
+
transaction_index?: string;
|
|
3588
|
+
from_address: string;
|
|
3589
|
+
from_address_label?: string;
|
|
3590
|
+
to_address?: string;
|
|
3591
|
+
to_address_label?: string;
|
|
3592
|
+
value: string;
|
|
3593
|
+
gas?: string;
|
|
3594
|
+
gas_price?: string;
|
|
3595
|
+
receipt_cumulative_gas_used?: string;
|
|
3596
|
+
receipt_gas_used?: string;
|
|
3597
|
+
receipt_status?: string;
|
|
3598
|
+
receipt_contract_address?: string | null;
|
|
3599
|
+
block_timestamp: string;
|
|
3600
|
+
block_number: string;
|
|
3601
|
+
block_hash?: string;
|
|
3602
|
+
transaction_fee?: string;
|
|
3603
|
+
method_label?: string;
|
|
3604
|
+
category: WalletHistoryCategory | string;
|
|
3605
|
+
summary?: string;
|
|
3606
|
+
possible_spam?: boolean;
|
|
3607
|
+
native_transfers?: WalletHistoryNativeTransfer[];
|
|
3608
|
+
erc20_transfers?: WalletHistoryErc20Transfer[];
|
|
3609
|
+
nft_transfers?: WalletHistoryNftTransfer[];
|
|
3610
|
+
contract_interactions?: WalletHistoryContractInteraction;
|
|
3611
|
+
internal_transactions?: Array<{
|
|
3612
|
+
from: string;
|
|
3613
|
+
to: string;
|
|
3614
|
+
value: string;
|
|
3615
|
+
gas?: string;
|
|
3616
|
+
type?: string;
|
|
3617
|
+
input?: string;
|
|
3618
|
+
output?: string;
|
|
3619
|
+
}>;
|
|
3620
|
+
})[];
|
|
3609
3621
|
error?: undefined;
|
|
3610
3622
|
}>;
|
|
3611
3623
|
}
|
|
@@ -3797,47 +3809,6 @@ declare class WalletNftTransfersTool extends BaseTool {
|
|
|
3797
3809
|
private parseBlock;
|
|
3798
3810
|
}
|
|
3799
3811
|
|
|
3800
|
-
type WalletNetWorthToolConfig = MoralisServiceConfig;
|
|
3801
|
-
/**
|
|
3802
|
-
* Tool: get-wallet-net-worth
|
|
3803
|
-
*
|
|
3804
|
-
* Queries `GET /wallets/{address}/net-worth` to return a wallet's total USD
|
|
3805
|
-
* value across one or more chains. Response includes per-chain breakdown
|
|
3806
|
-
* (native + token USD value) plus a grand total.
|
|
3807
|
-
*/
|
|
3808
|
-
declare class WalletNetWorthTool extends BaseTool {
|
|
3809
|
-
name: string;
|
|
3810
|
-
description: string;
|
|
3811
|
-
category: string;
|
|
3812
|
-
parameters: ToolParameter[];
|
|
3813
|
-
private service;
|
|
3814
|
-
constructor(config?: WalletNetWorthToolConfig);
|
|
3815
|
-
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
3816
|
-
error: string;
|
|
3817
|
-
walletAddress?: undefined;
|
|
3818
|
-
chainsQueried?: undefined;
|
|
3819
|
-
filters?: undefined;
|
|
3820
|
-
totalNetWorthUsd?: undefined;
|
|
3821
|
-
chains?: undefined;
|
|
3822
|
-
unsupportedChainIds?: undefined;
|
|
3823
|
-
unavailableChains?: undefined;
|
|
3824
|
-
} | {
|
|
3825
|
-
walletAddress: string;
|
|
3826
|
-
chainsQueried: string[];
|
|
3827
|
-
filters: {
|
|
3828
|
-
excludeSpam: boolean;
|
|
3829
|
-
excludeUnverifiedContracts: boolean | null;
|
|
3830
|
-
maxTokenInactivity: number | null;
|
|
3831
|
-
minPairSideLiquidityUsd: number | null;
|
|
3832
|
-
};
|
|
3833
|
-
totalNetWorthUsd: string;
|
|
3834
|
-
chains: WalletNetWorthChainBreakdown[];
|
|
3835
|
-
unsupportedChainIds: string[];
|
|
3836
|
-
unavailableChains: WalletNetWorthUnavailableChain[];
|
|
3837
|
-
error?: undefined;
|
|
3838
|
-
}>;
|
|
3839
|
-
}
|
|
3840
|
-
|
|
3841
3812
|
type WalletPnlSummaryToolConfig = MoralisServiceConfig;
|
|
3842
3813
|
/**
|
|
3843
3814
|
* Tool: get-wallet-pnl-summary
|
|
@@ -3860,6 +3831,8 @@ declare class WalletPnlSummaryTool extends BaseTool {
|
|
|
3860
3831
|
chain?: undefined;
|
|
3861
3832
|
days?: undefined;
|
|
3862
3833
|
summary?: undefined;
|
|
3834
|
+
_instructions?: undefined;
|
|
3835
|
+
chains?: undefined;
|
|
3863
3836
|
} | {
|
|
3864
3837
|
walletAddress: string;
|
|
3865
3838
|
chain: string;
|
|
@@ -3875,7 +3848,40 @@ declare class WalletPnlSummaryTool extends BaseTool {
|
|
|
3875
3848
|
totalSoldVolumeUsd: string;
|
|
3876
3849
|
};
|
|
3877
3850
|
error?: undefined;
|
|
3851
|
+
_instructions?: undefined;
|
|
3852
|
+
chains?: undefined;
|
|
3853
|
+
} | {
|
|
3854
|
+
_instructions: string;
|
|
3855
|
+
walletAddress: string;
|
|
3856
|
+
chain: string;
|
|
3857
|
+
days: WalletPnlDaysWindow;
|
|
3858
|
+
summary: {
|
|
3859
|
+
totalCountOfTrades: number;
|
|
3860
|
+
totalTradeVolume: number;
|
|
3861
|
+
totalRealizedProfitUsd: number;
|
|
3862
|
+
totalRealizedProfitPercentage: number;
|
|
3863
|
+
totalBuys: number;
|
|
3864
|
+
totalSells: number;
|
|
3865
|
+
totalBoughtVolumeUsd: number;
|
|
3866
|
+
totalSoldVolumeUsd: number;
|
|
3867
|
+
};
|
|
3868
|
+
chains: {
|
|
3869
|
+
chain: string;
|
|
3870
|
+
summary: {
|
|
3871
|
+
totalCountOfTrades: number;
|
|
3872
|
+
totalTradeVolume: string;
|
|
3873
|
+
totalRealizedProfitUsd: string;
|
|
3874
|
+
totalRealizedProfitPercentage: number;
|
|
3875
|
+
totalBuys: number;
|
|
3876
|
+
totalSells: number;
|
|
3877
|
+
totalBoughtVolumeUsd: string;
|
|
3878
|
+
totalSoldVolumeUsd: string;
|
|
3879
|
+
};
|
|
3880
|
+
}[];
|
|
3881
|
+
error?: undefined;
|
|
3878
3882
|
}>;
|
|
3883
|
+
/** Map a single chain's raw PnL summary into the tool's camelCase output. */
|
|
3884
|
+
private mapSummary;
|
|
3879
3885
|
}
|
|
3880
3886
|
|
|
3881
3887
|
type WalletPnlToolConfig = MoralisServiceConfig;
|
|
@@ -3894,6 +3900,8 @@ declare class WalletPnlTool extends BaseTool {
|
|
|
3894
3900
|
filters?: undefined;
|
|
3895
3901
|
tokenCount?: undefined;
|
|
3896
3902
|
tokens?: undefined;
|
|
3903
|
+
_instructions?: undefined;
|
|
3904
|
+
chains?: undefined;
|
|
3897
3905
|
} | {
|
|
3898
3906
|
walletAddress: string;
|
|
3899
3907
|
chain: string;
|
|
@@ -3905,11 +3913,41 @@ declare class WalletPnlTool extends BaseTool {
|
|
|
3905
3913
|
address: string;
|
|
3906
3914
|
}[] | null;
|
|
3907
3915
|
unresolvedSymbols: string[] | null;
|
|
3916
|
+
requestedSymbols?: undefined;
|
|
3917
|
+
requestedAddresses?: undefined;
|
|
3908
3918
|
};
|
|
3909
3919
|
tokenCount: number;
|
|
3910
3920
|
tokens: WalletPnlTokenItem[];
|
|
3911
3921
|
error?: undefined;
|
|
3922
|
+
_instructions?: undefined;
|
|
3923
|
+
chains?: undefined;
|
|
3924
|
+
} | {
|
|
3925
|
+
_instructions: string;
|
|
3926
|
+
walletAddress: string;
|
|
3927
|
+
chain: string;
|
|
3928
|
+
days: WalletPnlDaysWindow;
|
|
3929
|
+
filters: {
|
|
3930
|
+
requestedSymbols: string[] | null;
|
|
3931
|
+
requestedAddresses: string[] | null;
|
|
3932
|
+
tokenAddresses?: undefined;
|
|
3933
|
+
resolvedSymbols?: undefined;
|
|
3934
|
+
unresolvedSymbols?: undefined;
|
|
3935
|
+
};
|
|
3936
|
+
tokenCount: number;
|
|
3937
|
+
chains: {
|
|
3938
|
+
chain: string;
|
|
3939
|
+
tokenCount: number;
|
|
3940
|
+
tokens: WalletPnlTokenItem[];
|
|
3941
|
+
}[];
|
|
3942
|
+
error?: undefined;
|
|
3943
|
+
tokens?: undefined;
|
|
3912
3944
|
}>;
|
|
3945
|
+
/**
|
|
3946
|
+
* Fetch one chain's per-token PnL: resolve any token symbols to addresses ON
|
|
3947
|
+
* THAT chain, merge with raw addresses (capped), and call the API. Returns the
|
|
3948
|
+
* tokens plus the resolution detail (for the single-chain `filters` block).
|
|
3949
|
+
*/
|
|
3950
|
+
private fetchChainPnl;
|
|
3913
3951
|
/**
|
|
3914
3952
|
* Resolve a contract address from a token symbol.
|
|
3915
3953
|
* 1. Wallet balances (if wallet address available — most reliable)
|
|
@@ -4041,16 +4079,13 @@ declare class WalletDefiSummaryTool extends BaseTool {
|
|
|
4041
4079
|
constructor(config?: WalletDefiSummaryToolConfig);
|
|
4042
4080
|
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
4043
4081
|
error: string;
|
|
4082
|
+
_instructions?: undefined;
|
|
4044
4083
|
walletAddress?: undefined;
|
|
4045
4084
|
chain?: undefined;
|
|
4046
|
-
activeProtocols?: undefined;
|
|
4047
|
-
totalPositions?: undefined;
|
|
4048
4085
|
totalUsdValue?: undefined;
|
|
4049
4086
|
totalUnclaimedUsdValue?: undefined;
|
|
4050
|
-
|
|
4087
|
+
chains?: undefined;
|
|
4051
4088
|
} | {
|
|
4052
|
-
walletAddress: string;
|
|
4053
|
-
chain: string;
|
|
4054
4089
|
activeProtocols: number;
|
|
4055
4090
|
totalPositions: number;
|
|
4056
4091
|
totalUsdValue: number;
|
|
@@ -4065,8 +4100,38 @@ declare class WalletDefiSummaryTool extends BaseTool {
|
|
|
4065
4100
|
totalUnclaimedUsdValue: number;
|
|
4066
4101
|
accountHealthFactor: number | null;
|
|
4067
4102
|
}[];
|
|
4103
|
+
walletAddress: string;
|
|
4104
|
+
chain: string;
|
|
4105
|
+
error?: undefined;
|
|
4106
|
+
_instructions?: undefined;
|
|
4107
|
+
chains?: undefined;
|
|
4108
|
+
} | {
|
|
4109
|
+
_instructions: string;
|
|
4110
|
+
walletAddress: string;
|
|
4111
|
+
chain: string;
|
|
4112
|
+
totalUsdValue: number;
|
|
4113
|
+
totalUnclaimedUsdValue: number;
|
|
4114
|
+
chains: {
|
|
4115
|
+
activeProtocols: number;
|
|
4116
|
+
totalPositions: number;
|
|
4117
|
+
totalUsdValue: number;
|
|
4118
|
+
totalUnclaimedUsdValue: number;
|
|
4119
|
+
protocols: {
|
|
4120
|
+
protocolName: string | undefined;
|
|
4121
|
+
protocolId: string | undefined;
|
|
4122
|
+
protocolUrl: string | undefined;
|
|
4123
|
+
protocolLogo: string | undefined;
|
|
4124
|
+
positions: number;
|
|
4125
|
+
totalUsdValue: number;
|
|
4126
|
+
totalUnclaimedUsdValue: number;
|
|
4127
|
+
accountHealthFactor: number | null;
|
|
4128
|
+
}[];
|
|
4129
|
+
chain: string;
|
|
4130
|
+
}[];
|
|
4068
4131
|
error?: undefined;
|
|
4069
4132
|
}>;
|
|
4133
|
+
/** Map a single chain's raw summary into the tool's camelCase output fields. */
|
|
4134
|
+
private summaryFields;
|
|
4070
4135
|
}
|
|
4071
4136
|
|
|
4072
4137
|
type WalletDefiPositionsToolConfig = MoralisServiceConfig;
|
|
@@ -4092,6 +4157,8 @@ declare class WalletDefiPositionsTool extends BaseTool {
|
|
|
4092
4157
|
chain?: undefined;
|
|
4093
4158
|
positionCount?: undefined;
|
|
4094
4159
|
positions?: undefined;
|
|
4160
|
+
_instructions?: undefined;
|
|
4161
|
+
chains?: undefined;
|
|
4095
4162
|
} | {
|
|
4096
4163
|
walletAddress: string;
|
|
4097
4164
|
chain: string;
|
|
@@ -4124,6 +4191,46 @@ declare class WalletDefiPositionsTool extends BaseTool {
|
|
|
4124
4191
|
};
|
|
4125
4192
|
}[];
|
|
4126
4193
|
error?: undefined;
|
|
4194
|
+
_instructions?: undefined;
|
|
4195
|
+
chains?: undefined;
|
|
4196
|
+
} | {
|
|
4197
|
+
_instructions: string;
|
|
4198
|
+
walletAddress: string;
|
|
4199
|
+
chain: string;
|
|
4200
|
+
positionCount: number;
|
|
4201
|
+
chains: {
|
|
4202
|
+
chain: string;
|
|
4203
|
+
positionCount: number;
|
|
4204
|
+
positions: {
|
|
4205
|
+
protocolName: string;
|
|
4206
|
+
protocolId: string;
|
|
4207
|
+
protocolUrl: string;
|
|
4208
|
+
protocolLogo: string;
|
|
4209
|
+
accountHealthFactor: number | null;
|
|
4210
|
+
position: {
|
|
4211
|
+
label: string;
|
|
4212
|
+
address: string | undefined;
|
|
4213
|
+
balanceUsd: number;
|
|
4214
|
+
totalUnclaimedUsdValue: number;
|
|
4215
|
+
tokens: {
|
|
4216
|
+
tokenType: string;
|
|
4217
|
+
name: string;
|
|
4218
|
+
symbol: string;
|
|
4219
|
+
contractAddress: string;
|
|
4220
|
+
decimals: number;
|
|
4221
|
+
logo: string | undefined;
|
|
4222
|
+
thumbnail: string | undefined;
|
|
4223
|
+
balance: string;
|
|
4224
|
+
balanceFormatted: string;
|
|
4225
|
+
usdPrice: number | undefined;
|
|
4226
|
+
usdValue: number | undefined;
|
|
4227
|
+
}[];
|
|
4228
|
+
details: DefiPositionDetails | null;
|
|
4229
|
+
};
|
|
4230
|
+
}[];
|
|
4231
|
+
}[];
|
|
4232
|
+
error?: undefined;
|
|
4233
|
+
positions?: undefined;
|
|
4127
4234
|
}>;
|
|
4128
4235
|
}
|
|
4129
4236
|
|
|
@@ -4146,20 +4253,13 @@ declare class WalletDefiProtocolPositionsTool extends BaseTool {
|
|
|
4146
4253
|
constructor(config?: WalletDefiProtocolPositionsToolConfig);
|
|
4147
4254
|
protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
|
|
4148
4255
|
error: string;
|
|
4256
|
+
_instructions?: undefined;
|
|
4149
4257
|
walletAddress?: undefined;
|
|
4150
4258
|
chain?: undefined;
|
|
4151
|
-
|
|
4152
|
-
protocolId?: undefined;
|
|
4153
|
-
protocolUrl?: undefined;
|
|
4154
|
-
protocolLogo?: undefined;
|
|
4259
|
+
protocol?: undefined;
|
|
4155
4260
|
totalUsdValue?: undefined;
|
|
4156
|
-
|
|
4157
|
-
accountHealthFactor?: undefined;
|
|
4158
|
-
positionCount?: undefined;
|
|
4159
|
-
positions?: undefined;
|
|
4261
|
+
chains?: undefined;
|
|
4160
4262
|
} | {
|
|
4161
|
-
walletAddress: string;
|
|
4162
|
-
chain: string;
|
|
4163
4263
|
protocolName: string;
|
|
4164
4264
|
protocolId: string;
|
|
4165
4265
|
protocolUrl: string;
|
|
@@ -4188,8 +4288,53 @@ declare class WalletDefiProtocolPositionsTool extends BaseTool {
|
|
|
4188
4288
|
}[];
|
|
4189
4289
|
details: DefiPositionDetails | null;
|
|
4190
4290
|
}[];
|
|
4291
|
+
walletAddress: string;
|
|
4292
|
+
chain: string;
|
|
4293
|
+
error?: undefined;
|
|
4294
|
+
_instructions?: undefined;
|
|
4295
|
+
protocol?: undefined;
|
|
4296
|
+
chains?: undefined;
|
|
4297
|
+
} | {
|
|
4298
|
+
_instructions: string;
|
|
4299
|
+
walletAddress: string;
|
|
4300
|
+
chain: string;
|
|
4301
|
+
protocol: string;
|
|
4302
|
+
totalUsdValue: number;
|
|
4303
|
+
chains: {
|
|
4304
|
+
protocolName: string;
|
|
4305
|
+
protocolId: string;
|
|
4306
|
+
protocolUrl: string;
|
|
4307
|
+
protocolLogo: string;
|
|
4308
|
+
totalUsdValue: number;
|
|
4309
|
+
totalUnclaimedUsdValue: number | null;
|
|
4310
|
+
accountHealthFactor: number | null;
|
|
4311
|
+
positionCount: number;
|
|
4312
|
+
positions: {
|
|
4313
|
+
label: string;
|
|
4314
|
+
address: string | undefined;
|
|
4315
|
+
balanceUsd: number;
|
|
4316
|
+
totalUnclaimedUsdValue: number;
|
|
4317
|
+
tokens: {
|
|
4318
|
+
tokenType: string;
|
|
4319
|
+
name: string;
|
|
4320
|
+
symbol: string;
|
|
4321
|
+
contractAddress: string;
|
|
4322
|
+
decimals: number;
|
|
4323
|
+
logo: string | undefined;
|
|
4324
|
+
thumbnail: string | undefined;
|
|
4325
|
+
balance: string;
|
|
4326
|
+
balanceFormatted: string;
|
|
4327
|
+
usdPrice: number | undefined;
|
|
4328
|
+
usdValue: number | undefined;
|
|
4329
|
+
}[];
|
|
4330
|
+
details: DefiPositionDetails | null;
|
|
4331
|
+
}[];
|
|
4332
|
+
chain: string;
|
|
4333
|
+
}[];
|
|
4191
4334
|
error?: undefined;
|
|
4192
4335
|
}>;
|
|
4336
|
+
/** Map a single chain's raw protocol-positions response into output fields. */
|
|
4337
|
+
private protocolFields;
|
|
4193
4338
|
}
|
|
4194
4339
|
|
|
4195
4340
|
type TransactionByHashToolConfig = MoralisServiceConfig;
|
|
@@ -7141,4 +7286,4 @@ declare class Summarizer {
|
|
|
7141
7286
|
summarize(messages: ChatMessage[]): Promise<string>;
|
|
7142
7287
|
}
|
|
7143
7288
|
|
|
7144
|
-
export { AI_AGENT_TOOL_NAMES, 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, type MoralisApiResponse, MoralisService, type MoralisServiceConfig, NFTContractInfoTool, type NFTContractMetadata, type NFTItem, type NFTLastSale, type NFTMetadata, NFTMetadataTool, NFT_AGENT_TOOL_NAMES, type NativeTokenInfo, 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, 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, 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
|
|
7289
|
+
export { AI_AGENT_TOOL_NAMES, 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, type MoralisApiResponse, MoralisService, type MoralisServiceConfig, NFTContractInfoTool, type NFTContractMetadata, type NFTItem, type NFTLastSale, type NFTMetadata, NFTMetadataTool, NFT_AGENT_TOOL_NAMES, type NativeTokenInfo, 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, 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, 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, ZERO_ADDRESS, buildRangePresets, buildUniswapPoolUrl, clampTick, configureSupportedChains, createAiAgent, createDefaultSubagents, createNftAgent, createPoolAgent, createTokenAgent, createWalletActionAgent, createWalletAgent, ethCallAt, ethCallByChain, getAffiliateFee, getChainMeta, getDefaultRpcUrl, getGatewayAddress, getNativeTokenInfo, getPositionManagerAddress, getProviderByChain, ingestKnowledgeBase, priceToTick, resolveRpcUrl, roundTickToSpacing, rpcCall, setRpcOverrides, swapServiceFactory, tickToPrice, toPantographChain };
|