keyring-agent-core 0.2.46 → 0.2.47
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 +13 -0
- package/dist/index.js +39 -39
- package/dist/index.native.js +162 -162
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6755,6 +6755,19 @@ declare abstract class BaseWalletActionTool extends BaseTool {
|
|
|
6755
6755
|
protected cleanAmountString(s: string): string;
|
|
6756
6756
|
/** Format a number as a plain decimal string, expanding any e-notation. */
|
|
6757
6757
|
protected toPlainDecimal(n: number): string;
|
|
6758
|
+
/**
|
|
6759
|
+
* The USD value of a spendable balance as a plain decimal STRING, from the
|
|
6760
|
+
* token amount and its unit price — the RAW `amount × usdPrice`, with NO
|
|
6761
|
+
* rounding or truncation. The FE owns all display formatting (rounding to
|
|
6762
|
+
* cents, "$", thousands separators); the core just hands over the full-
|
|
6763
|
+
* precision number so nothing is thrown away before the app decides.
|
|
6764
|
+
*
|
|
6765
|
+
* Returns `undefined` — meaning "no dollar figure to show" — whenever either
|
|
6766
|
+
* input is missing or unusable (no price, unparseable amount, non-positive
|
|
6767
|
+
* value), so the form falls back to showing just the token amount. Never
|
|
6768
|
+
* throws; a best-effort adornment, not a gate.
|
|
6769
|
+
*/
|
|
6770
|
+
protected formatSpendableUsd(spendable: string | undefined, usdPrice: number | undefined): string | undefined;
|
|
6758
6771
|
/**
|
|
6759
6772
|
* Override `execute` so the `ui` payload we return from `run()` is lifted
|
|
6760
6773
|
* onto the ToolResult envelope (BaseTool only copies `data`).
|