keyring-agent-core 0.3.18 → 0.3.19

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
@@ -8770,6 +8770,16 @@ declare class PreviewAddLiquidityTool extends BaseTool {
8770
8770
  /** Forward `ui` from run() into the ToolResult envelope. */
8771
8771
  execute(args: Record<string, unknown>, userContext?: UserContext): Promise<ToolResult>;
8772
8772
  protected run(args: Record<string, unknown>, userContext?: UserContext): Promise<Record<string, unknown>>;
8773
+ /**
8774
+ * Display metadata for the pool's tokens. The chain is the source of truth:
8775
+ * `symbol()` is read from each contract and `decimals` are the values the
8776
+ * range math already used. The Pantograph index only adds name + logo, and
8777
+ * stands in for the symbol when the contract read fails. Long-tail tokens are
8778
+ * often missing from the index, and cosmetic data must never fail a preview
8779
+ * whose pool, range and swap legs are all valid — so every field degrades
8780
+ * (last resort: the shortened address) instead of throwing.
8781
+ */
8782
+ private resolveTokenDisplays;
8773
8783
  }
8774
8784
 
8775
8785
  type EstimatePoolYieldToolConfig = UniswapServiceConfig;
@@ -10292,7 +10302,16 @@ declare abstract class BaseWalletActionTool extends BaseTool {
10292
10302
  usdPrice?: number;
10293
10303
  balanceFormatted?: string;
10294
10304
  symbol?: string;
10305
+ decimals?: number;
10295
10306
  } | undefined>;
10307
+ /**
10308
+ * Floor a balance-derived amount to the TOKEN's own decimals. Float maths
10309
+ * (`held − gasReserve`, `balance × 50%`) can leave more digits than the token
10310
+ * has; a sub-unit tail is not spendable, and handing it to the form lets its
10311
+ * percentage maths round UP past the balance. Native falls back to the chain's
10312
+ * coin decimals; an ERC-20 with unknown decimals is left as-is.
10313
+ */
10314
+ protected floorToTokenDecimals(value: string, tokenAddress: string, chain?: string, decimals?: number): string;
10296
10315
  /**
10297
10316
  * Sanitize an amount STRING from an external source (e.g. Moralis
10298
10317
  * `balance_formatted`): expand e-notation to a plain decimal; otherwise pass