keyring-agent-core 0.2.20 → 0.2.21

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
@@ -3544,20 +3544,42 @@ declare class WalletTokenBalancesTool extends BaseTool {
3544
3544
  */
3545
3545
  private truncateUsd;
3546
3546
  protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<{
3547
- error: string;
3548
- _instructions?: undefined;
3549
- walletAddress?: undefined;
3550
- chain?: undefined;
3551
- totalUsdValue?: undefined;
3552
- tokens?: undefined;
3553
- } | {
3554
3547
  _instructions: string;
3555
3548
  walletAddress: string;
3556
3549
  chain: string;
3557
3550
  totalUsdValue: string;
3558
3551
  tokens: string[];
3559
- error?: undefined;
3552
+ } | {
3553
+ _instructions: string;
3554
+ walletAddress: string;
3555
+ chain: string;
3556
+ totalUsdValue: string;
3557
+ chains: {
3558
+ chain: string;
3559
+ totalUsdValue: string;
3560
+ tokens: string[];
3561
+ }[];
3562
+ } | {
3563
+ error: string;
3560
3564
  }>;
3565
+ /** One pre-rendered bullet "- name: amount symbol ($value)" for a holding.
3566
+ * Amount is shown in FULL (never shortened/rounded); USD value is truncated to
3567
+ * 2 decimals — built here so the numbers reach the user verbatim. */
3568
+ private toTokenLine;
3569
+ /**
3570
+ * SINGLE-chain render: a flat bullet list in the API's order, plus the chain
3571
+ * total. Used when the user (or their connected wallet) named one chain.
3572
+ */
3573
+ private renderBalances;
3574
+ /**
3575
+ * ALL-CHAINS render: balances GROUPED BY CHAIN. Each group carries its chain
3576
+ * name, that chain's subtotal, and its token bullets (sorted by USD value,
3577
+ * largest first). Empty chains are dropped; groups are ordered by subtotal so
3578
+ * the chain holding the most leads. The synthesizer renders one section per
3579
+ * chain (chain name → its bullets), so the user sees their holdings organised
3580
+ * per network rather than one undifferentiated list.
3581
+ */
3582
+ private renderBalancesByChain;
3561
3583
  }
3562
3584
 
3563
3585
  type WalletHistoryToolConfig = MoralisServiceConfig;