keyring-agent-core 0.2.50 → 0.2.52
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 +15 -7
- package/dist/index.js +26 -26
- package/dist/index.native.js +75 -75
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8621,8 +8621,13 @@ declare function createX402SignatureProvider(opts: {
|
|
|
8621
8621
|
* underlying (their decimals match it) and yield arrives as a growing
|
|
8622
8622
|
* `balanceOf`. Converting these would be a bug, so they are left untouched.
|
|
8623
8623
|
*
|
|
8624
|
-
*
|
|
8625
|
-
*
|
|
8624
|
+
* Which side a token falls on is decided by an explicit allow-list of
|
|
8625
|
+
* share-based protocols, mirroring the wallet app's own `LENDING_PLATFORMS`.
|
|
8626
|
+
* The protocol classes encode the same split as `balanceIsUnderlying`, but that
|
|
8627
|
+
* flag is reached through `protocolFor`, which falls back to an ERC-4626
|
|
8628
|
+
* protocol for types it doesn't recognise — a safe default for listing lending
|
|
8629
|
+
* markets, and the wrong one here, where a mistaken conversion silently
|
|
8630
|
+
* corrupts a balance. An allow-list fails closed instead.
|
|
8626
8631
|
*
|
|
8627
8632
|
* ## Why this returns calls instead of making them
|
|
8628
8633
|
*
|
|
@@ -8704,12 +8709,15 @@ interface YieldTokenValue {
|
|
|
8704
8709
|
/**
|
|
8705
8710
|
* True when a token's balance is ERC-4626 shares that must be converted.
|
|
8706
8711
|
*
|
|
8707
|
-
*
|
|
8708
|
-
*
|
|
8709
|
-
* lending markets, but not here, where guessing wrong silently corrupts a
|
|
8710
|
-
* balance. Conversion requires ALL of:
|
|
8712
|
+
* These are the same three conditions the wallet app (`coinpool-v2`) gates its
|
|
8713
|
+
* own portfolio conversion on, in the same order:
|
|
8711
8714
|
*
|
|
8712
|
-
* 1. a known share-based protocol
|
|
8715
|
+
* 1. a known share-based protocol — its `LENDING_PLATFORMS` allow-list. Note
|
|
8716
|
+
* this is deliberately stricter than {@link protocolFor} alone, which falls
|
|
8717
|
+
* back to an ERC-4626 protocol for unrecognised types: the right default when
|
|
8718
|
+
* listing lending markets, but not here, where guessing wrong silently
|
|
8719
|
+
* corrupts a balance. Rebasing receipts (`aave-v3`, `compound-v3`) are
|
|
8720
|
+
* already underlying and are excluded by the list, exactly as they are there.
|
|
8713
8721
|
* 2. `yieldAsset.decimals`, the scale the returned assets must be read at —
|
|
8714
8722
|
* without it the result is an unscaled integer, not an amount;
|
|
8715
8723
|
* 3. a usable `priceUSD` (finite and > 0). The conversion's whole purpose is to
|