@whetstone-research/doppler-sdk 1.0.36 → 1.0.38
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 +37 -43
- package/dist/evm/index.cjs +1359 -665
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +679 -280
- package/dist/evm/index.d.ts +679 -280
- package/dist/evm/index.js +1360 -667
- package/dist/evm/index.js.map +1 -1
- package/dist/solana/index.cjs +433 -25
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.d.cts +204 -32
- package/dist/solana/index.d.ts +204 -32
- package/dist/solana/index.js +434 -26
- package/dist/solana/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ The Doppler SDK exposes network-specific entrypoints for creating, managing, and
|
|
|
15
15
|
- **Solana Clients and React**: Read clients, PDA helpers, generated codecs, and optional React bindings
|
|
16
16
|
- **Token Management**: Built-in EVM support for DERC20 tokens with vesting
|
|
17
17
|
- **Type Safety**: Full TypeScript support across EVM and Solana entrypoints
|
|
18
|
-
- **Network Support**: EVM deployments on Base, Unichain, Ink, and other supported chains; Solana/SVM support via explicit Solana program deployments
|
|
18
|
+
- **Network Support**: EVM deployments on Base, Arbitrum One, Unichain, Ink, and other supported chains; Solana/SVM support via explicit Solana program deployments
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
@@ -1180,53 +1180,43 @@ console.log('Expected output:', quote.amountOut);
|
|
|
1180
1180
|
console.log('Price after swap:', quote.sqrtPriceX96After);
|
|
1181
1181
|
```
|
|
1182
1182
|
|
|
1183
|
-
## Atomic
|
|
1183
|
+
## Atomic Multicurve Dev Buy
|
|
1184
1184
|
|
|
1185
|
-
|
|
1185
|
+
Multicurve dev buys create the market and execute one exact-input purchase through Bundler in the same transaction. They support DopplerHookInitializer and Rehype initializer families; standard, scheduled, and decay initializers reject them. Production use is intended for compatible Rehype launches with no-op governance and no-op migration.
|
|
1186
1186
|
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1187
|
+
```ts
|
|
1188
|
+
const params = sdk
|
|
1189
|
+
.buildMulticurveAuction()
|
|
1190
|
+
// Configure token, sale, curves, and Rehype initializer as usual.
|
|
1191
|
+
.withGovernance({ type: 'noOp' })
|
|
1192
|
+
.withMigration({ type: 'noOp' })
|
|
1193
|
+
.withDevBuy({
|
|
1194
|
+
exactAmountIn: parseEther('0.01'),
|
|
1195
|
+
recipient: user,
|
|
1196
|
+
vesting: {
|
|
1197
|
+
vestingDuration: 7n * 24n * 60n * 60n,
|
|
1198
|
+
cliffDuration: 24n * 60n * 60n,
|
|
1199
|
+
permissionlessClaim: false,
|
|
1200
|
+
},
|
|
1201
|
+
})
|
|
1202
|
+
.build();
|
|
1193
1203
|
|
|
1194
|
-
|
|
1204
|
+
const simulated = await sdk.factory.simulateCreateMulticurve(params);
|
|
1205
|
+
const result = await simulated.execute();
|
|
1195
1206
|
|
|
1196
|
-
|
|
1207
|
+
console.log('Simulated output:', simulated.devBuy?.simulatedAmountOut);
|
|
1208
|
+
console.log('Actual output:', result.devBuy?.amountOut);
|
|
1209
|
+
```
|
|
1197
1210
|
|
|
1198
|
-
|
|
1199
|
-
with multicurve support (selector check added in `0.0.1-alpha.47`). The SDK now verifies the bundler bytecode
|
|
1200
|
-
before attempting these flows; if you see
|
|
1201
|
-
`Bundler at <address> does not support multicurve bundling`, deploy or point at the latest bundler release.
|
|
1211
|
+
Omit `vesting` to deliver the purchased tokens directly to `recipient`. When vesting is configured, Bundler holds the output and releases it under the specified schedule; this is independent from `.withVesting(...)`, which configures token allocation vesting. `cliffDuration` defaults to zero and `permissionlessClaim` defaults to `false`.
|
|
1202
1212
|
|
|
1203
|
-
|
|
1204
|
-
// Prepare multicurve CreateParams up front
|
|
1205
|
-
const createParams = sdk.factory.encodeCreateMulticurveParams(multicurveConfig);
|
|
1206
|
-
|
|
1207
|
-
// Quote an exact-out bundle
|
|
1208
|
-
const exactOutQuote = await sdk.factory.simulateMulticurveBundleExactOut(
|
|
1209
|
-
createParams,
|
|
1210
|
-
{
|
|
1211
|
-
exactAmountOut: parseEther('100'),
|
|
1212
|
-
},
|
|
1213
|
-
);
|
|
1213
|
+
Native numeraire sends exactly `exactAmountIn` with the Bundler transaction. ERC-20 numeraire may require a separate exact approval transaction before the atomic create-and-buy transaction; the wallet must already hold the input token. Permit2 and Universal Router commands are not part of this flow.
|
|
1214
1214
|
|
|
1215
|
-
|
|
1216
|
-
const exactInQuote = await sdk.factory.simulateMulticurveBundleExactIn(
|
|
1217
|
-
createParams,
|
|
1218
|
-
{
|
|
1219
|
-
exactAmountIn: parseEther('25'),
|
|
1220
|
-
},
|
|
1221
|
-
);
|
|
1215
|
+
Use `.withBundler(address)` for a compatible custom deployment. Read custody with `sdk.getBundler(address).getVesting(asset)` and `getClaimable(asset)`, then submit a vested claim with `claim(asset)`. Claims always pay the recorded recipient, including when `permissionlessClaim` allows another account to trigger them.
|
|
1222
1216
|
|
|
1223
|
-
|
|
1224
|
-
console.log('PoolKey:', exactOutQuote.poolKey);
|
|
1225
|
-
console.log('Input required:', exactOutQuote.amountIn);
|
|
1226
|
-
```
|
|
1217
|
+
Bundler is exact-input only and provides no minimum output, deadline, or slippage guard. `simulateCreateMulticurve` returns the informational `simulatedAmountOut`; execution returns the amount verified from the Bundler receipt.
|
|
1227
1218
|
|
|
1228
|
-
|
|
1229
|
-
hash the result when collecting fees, so consumers no longer need to manually assemble the PoolId.
|
|
1219
|
+
See [docs/quotes-and-swaps.md](./docs/quotes-and-swaps.md) and [examples/multicurve-dev-buy-weth.ts](./examples/multicurve-dev-buy-weth.ts) for complete flows.
|
|
1230
1220
|
|
|
1231
1221
|
## Migration Configuration
|
|
1232
1222
|
|
|
@@ -1498,6 +1488,9 @@ for (const id of SUPPORTED_CHAIN_IDS) {
|
|
|
1498
1488
|
}
|
|
1499
1489
|
```
|
|
1500
1490
|
|
|
1491
|
+
Arbitrum One is available as `CHAIN_IDS.ARBITRUM` (`42161`) with a viem chain
|
|
1492
|
+
definition included in `SupportedChain`.
|
|
1493
|
+
|
|
1501
1494
|
Robinhood Chain is available as `CHAIN_IDS.ROBINHOOD` (`4663`). The SDK exposes
|
|
1502
1495
|
addresses and support checks for it, but does not export a viem chain definition;
|
|
1503
1496
|
use your application's chain/client setup when constructing clients.
|
|
@@ -1857,7 +1850,7 @@ pnpm dev
|
|
|
1857
1850
|
|
|
1858
1851
|
The SDK includes comprehensive tests covering:
|
|
1859
1852
|
|
|
1860
|
-
- **Airlock Whitelisting**: Verifies that all modules are properly whitelisted on Ethereum Mainnet, Monad Mainnet, Base Mainnet, Base Sepolia, and Robinhood Chain
|
|
1853
|
+
- **Airlock Whitelisting**: Verifies that all modules are properly whitelisted on Ethereum Mainnet, Arbitrum One, Monad Mainnet, Base Mainnet, Base Sepolia, and Robinhood Chain
|
|
1861
1854
|
- **Multicurve Functionality**: Tests multicurve auction creation and quoting
|
|
1862
1855
|
- **Token Address Mining**: Tests for generating optimized token addresses
|
|
1863
1856
|
|
|
@@ -1871,14 +1864,14 @@ pnpm test:whitelisting
|
|
|
1871
1864
|
ALCHEMY_API_KEY=your_key_here pnpm test:whitelisting
|
|
1872
1865
|
|
|
1873
1866
|
# Limit to specific whitelist-audit chains when needed
|
|
1874
|
-
TEST_CHAINS=mainnet,base,base-sepolia,monad-mainnet,robinhood pnpm test:whitelisting
|
|
1867
|
+
TEST_CHAINS=mainnet,base,base-sepolia,arbitrum,monad-mainnet,robinhood pnpm test:whitelisting
|
|
1875
1868
|
```
|
|
1876
1869
|
|
|
1877
|
-
The whitelisting suite is scoped to the release-audit chains: Ethereum Mainnet, Monad Mainnet, Base Mainnet, Base Sepolia, and Robinhood Chain.
|
|
1870
|
+
The whitelisting suite is scoped to the release-audit chains: Ethereum Mainnet, Arbitrum One, Monad Mainnet, Base Mainnet, Base Sepolia, and Robinhood Chain.
|
|
1878
1871
|
|
|
1879
1872
|
Whitelisting test RPC priority is:
|
|
1880
1873
|
|
|
1881
|
-
1. Chain-specific RPC URL env var (`ETH_MAINNET_RPC_URL`, `
|
|
1874
|
+
1. Chain-specific RPC URL env var (`ETH_MAINNET_RPC_URL`, `ARBITRUM_RPC_URL`, `BASE_RPC_URL`, `BASE_SEPOLIA_RPC_URL`)
|
|
1882
1875
|
2. `ALCHEMY_API_KEY` fallback for supported Alchemy networks, including Monad Mainnet
|
|
1883
1876
|
3. Public/default RPC URL
|
|
1884
1877
|
|
|
@@ -1899,6 +1892,7 @@ You can also provide chain-specific RPC URLs directly:
|
|
|
1899
1892
|
|
|
1900
1893
|
```bash
|
|
1901
1894
|
ETH_MAINNET_RPC_URL=https://... TEST_CHAIN=mainnet pnpm test:fork
|
|
1895
|
+
ARBITRUM_RPC_URL=https://... TEST_CHAIN=arbitrum pnpm test:fork
|
|
1902
1896
|
ETH_SEPOLIA_RPC_URL=https://... TEST_CHAIN=eth-sepolia pnpm test:fork
|
|
1903
1897
|
```
|
|
1904
1898
|
|