@steerprotocol/sdk 4.0.0-next.7 → 4.0.0-next.9
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/README.md +56 -11
- package/dist/index.cjs +8488 -7314
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +8489 -7315
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,7 +90,8 @@ interface VaultMetadata {
|
|
|
90
90
|
readonly beaconName: string;
|
|
91
91
|
readonly createdAt: string;
|
|
92
92
|
readonly state: string | null;
|
|
93
|
-
|
|
93
|
+
/** Contract address or 32-byte V4 pool ID. */
|
|
94
|
+
readonly pool: Hex | null;
|
|
94
95
|
readonly poolKey?: string | null;
|
|
95
96
|
readonly token0: Address | null;
|
|
96
97
|
readonly token1: Address | null;
|
|
@@ -102,6 +103,7 @@ interface VaultMetadata {
|
|
|
102
103
|
This replaces address-only pages. Use `item.id` when passing a listed result to a vault getter.
|
|
103
104
|
`decimals` and `createdAt` retain their indexed string representation. Null fields remain null;
|
|
104
105
|
Unavailable indexed pool/token address fields represented by empty strings become `null`; the native zero address remains unchanged.
|
|
106
|
+
`pool` preserves either a contract address or a 32-byte V4 pool ID.
|
|
105
107
|
`poolKey` is omitted when the subgraph schema does not expose it. Only an explicit rejection of
|
|
106
108
|
that optional field permits querying without it; other GraphQL and transport errors propagate.
|
|
107
109
|
|
|
@@ -1274,9 +1276,9 @@ resolution for both declaration formats, and a Next.js production build with ser
|
|
|
1274
1276
|
components. It also checks the rendered SDK chain metadata. The fixture has its own pinned
|
|
1275
1277
|
dependencies and lockfile; it does not use the legacy SDK or repository module resolution.
|
|
1276
1278
|
This command requires npm registry access to install consumer dependencies, but no RPC or indexer
|
|
1277
|
-
credentials. The dedicated Next SDK CI workflow runs both commands on Node 22.23.4, 24.22.
|
|
1279
|
+
credentials. The dedicated Next SDK CI workflow runs both commands on Node 22.23.4, 24.22.2 and 26.13.0.
|
|
1278
1280
|
|
|
1279
|
-
Use `nvm install` and `nvm use` from the repository root to select the default Node 24.22.
|
|
1281
|
+
Use `nvm install` and `nvm use` from the repository root to select the default Node 24.22.2 runtime.
|
|
1280
1282
|
Both consumer and tooling requirements accept Node ^22.23.4, ^24.22.1 or ^26.12.1; older patches
|
|
1281
1283
|
and unsupported major lines fall outside the declared runtime support. These minimums follow the
|
|
1282
1284
|
[October 21, 2026 Node security release](https://nodejs.org/en/blog/vulnerability/october-2026-security-releases),
|
|
@@ -1750,10 +1752,24 @@ This initial family implementation uses original contract reads and the existing
|
|
|
1750
1752
|
reader with its deployless/override/Multicall fallback. A pinned resolved snapshot takes
|
|
1751
1753
|
16 RPCs normally or 19 through compatibility; latest adds one. Bulk reads use bounded
|
|
1752
1754
|
compatibility orchestration, not the optimized two-RPC V3/Algebra vault readers. BNB AMM
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1755
|
+
pool browsing and token filtering use the configured Uniswap V4 subgraph with the client's
|
|
1756
|
+
Graph API key or proxy. ID-only reads retain the onchain key resolver independently of indexer
|
|
1757
|
+
availability; missing historical key-index entries need archival RPC. Indexed keys whose mutable
|
|
1758
|
+
fees no longer match their IDs require RPC initialization logs to recover the original key.
|
|
1759
|
+
Steer indexed V4 token metadata is populated, and ERC-20 address, symbol and name searches are
|
|
1760
|
+
live-verified for the registered Reserve vaults. Direct address-based reads remain independently verified.
|
|
1761
|
+
|
|
1762
|
+
```ts
|
|
1763
|
+
const amm = steer.getAmm({
|
|
1764
|
+
chainId: ChainId.BSC,
|
|
1765
|
+
protocol: AmmProtocol.Uniswap,
|
|
1766
|
+
version: UniswapVersion.V4,
|
|
1767
|
+
});
|
|
1768
|
+
const pools = await amm.listPools({ token: { symbol: "USDC" }, limit: 25 });
|
|
1769
|
+
const nextPools = pools.nextCursor
|
|
1770
|
+
? await amm.listPools({ cursor: pools.nextCursor, limit: 25 })
|
|
1771
|
+
: undefined;
|
|
1772
|
+
```
|
|
1757
1773
|
See [deployment qualification and budgets](src/vault/adapters/uniswap-v4/qualification.md).
|
|
1758
1774
|
|
|
1759
1775
|
### Aerodrome Slipstream on Base
|
|
@@ -1902,7 +1918,8 @@ Pools absent from that contract's key index are recovered from their original in
|
|
|
1902
1918
|
event using historical RPC state. Recovery searches recent history first; older pools require
|
|
1903
1919
|
an archival provider. Missing history
|
|
1904
1920
|
is an error, not a fabricated key. Pool browsing remains separate and requires an indexed adapter.
|
|
1905
|
-
Base retains its existing indexed adapter by default. BNB
|
|
1921
|
+
Base retains its existing indexed adapter by default. BNB combines indexed browsing with RPC key
|
|
1922
|
+
resolution; Robinhood uses RPC key resolution without indexed pool browsing.
|
|
1906
1923
|
|
|
1907
1924
|
|
|
1908
1925
|
### BSC PancakeSwap V3 vault snapshots
|
|
@@ -1915,8 +1932,9 @@ are checked at the operation block. Only the exact qualified deployment is suppo
|
|
|
1915
1932
|
This implementation reserves accrued Steer and strategist fees separately and takes a fixed
|
|
1916
1933
|
30% cut of earned fees. Its fee cut is rounded once over all ranges, matching original
|
|
1917
1934
|
`poke()` followed by `getTotalAmounts()` in a single read-only simulation. Other V3 deployments
|
|
1918
|
-
keep their existing rounding policy. BSC bulk
|
|
1919
|
-
|
|
1935
|
+
keep their existing rounding policy. BSC now uses optimized bulk resolution and snapshot readers
|
|
1936
|
+
for both Pancake V3 and Reserve V4, with bounded compatibility only after an explicit
|
|
1937
|
+
unsupported-override response. See the bulk execution matrix below.
|
|
1920
1938
|
|
|
1921
1939
|
See [Pancake vault qualification](src/vault/adapters/uniswap-v3/pancake-qualification.md) for
|
|
1922
1940
|
identities, funded fixtures, retained-response regressions and live test coverage. Separate funded user-flow qualification now covers deposit quotes/preparation, partial/full
|
|
@@ -1935,7 +1953,8 @@ A directional override reader preserves both pool swap fees and community shares
|
|
|
1935
1953
|
reusing existing position/fee accounting. Vault fees are fixed at 15% with aggregate rounding.
|
|
1936
1954
|
Normal resolved snapshots take two RPC calls. Unsupported overrides use original-contract
|
|
1937
1955
|
compatibility reads and the AMM's existing pool-reader fallbacks. Live checks cover funded
|
|
1938
|
-
three-range and five-range vaults. Bulk snapshots use
|
|
1956
|
+
three-range and five-range vaults. Bulk resolution and snapshots now use the shared coordinator
|
|
1957
|
+
with a directional family reader; compatibility remains bounded after explicit feature rejection.
|
|
1939
1958
|
See [Camelot qualification](src/vault/adapters/algebra-legacy/camelot-qualification.md).
|
|
1940
1959
|
Funded simulations now also verify deposit quotes/preparation, partial/full withdrawals, user
|
|
1941
1960
|
positions and wallet discovery. Arbitrum deposit accounting uses the verified Multicall3 deployment.
|
|
@@ -1995,6 +2014,32 @@ repeats actual-contract deposits/withdrawals and balance-based discovery at reta
|
|
|
1995
2014
|
It uses pinned public indexer responses and paces live RPC calls by 1.5 seconds. No Graph API
|
|
1996
2015
|
credentials or Base RPC are needed for this isolated runner. Full historical state and temporary
|
|
1997
2016
|
EOA code overrides must be supported. Native BNB/ETH wrapping helpers remain separate work.
|
|
2017
|
+
### Bulk vault execution coverage
|
|
2018
|
+
|
|
2019
|
+
Accepting an array does not imply optimized execution. In `4.0.0-next.8`, BSC and Arbitrum
|
|
2020
|
+
accepted both bulk methods but used individual-vault reads with concurrency four. This change
|
|
2021
|
+
adds native bulk readers for their exact qualified deployments.
|
|
2022
|
+
|
|
2023
|
+
| Chain / qualified vaults | Bulk API | Efficient execution in `4.0.0-next.8` | Efficient execution after this change |
|
|
2024
|
+
| --- | --- | --- | --- |
|
|
2025
|
+
| Base: V3, Integral, Aerodrome | Yes | Yes | Yes |
|
|
2026
|
+
| Polygon: registered V3, Legacy, Integral | Yes | Yes | Yes |
|
|
2027
|
+
| BSC: Pancake V3 and Reserve V4 | Yes | No | Yes |
|
|
2028
|
+
| Arbitrum: Camelot legacy | Yes | No | Yes |
|
|
2029
|
+
| Robinhood: NoOracle V4 | Yes | No | Bounded individual reads |
|
|
2030
|
+
| Avalanche: Blackhole | Yes | No | Bounded individual reads |
|
|
2031
|
+
|
|
2032
|
+
On providers supporting code-only overrides, optimized resolution uses two pinned RPC calls per
|
|
2033
|
+
64-vault page. Snapshots use one original-code/position-count preflight per 16-vault page and one
|
|
2034
|
+
execution call per position-budget chunk (soft budget: 128 ranges). Latest reads add one shared
|
|
2035
|
+
head lookup. These are operating limits, not protocol vault limits. Metadata HTTP requests are
|
|
2036
|
+
separate. Explicit override rejection selects compatibility; provider failures do not select
|
|
2037
|
+
fallback or become individual failed vaults.
|
|
2038
|
+
|
|
2039
|
+
The read-only [BSC/Arbitrum benchmark](tests/integration/benchmarks/vault-bulk.bsc-arbitrum.test.ts)
|
|
2040
|
+
retains RPC/HTTP counts, payload sizes, failures, pinned blocks and sampled single-reader parity.
|
|
2041
|
+
See [benchmark results](benchmarks/README.md#bsc-and-arbitrum-vault-bulk-execution).
|
|
2042
|
+
|
|
1998
2043
|
### Partial vault loading and pool reads
|
|
1999
2044
|
|
|
2000
2045
|
Strict calls still reject the whole batch. Opt in to ordered, immutable per-input outcomes:
|