@whetstone-research/doppler-sdk 1.0.2 → 1.0.4
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 +23 -19
- package/dist/chunk-BXATWUGJ.cjs +1111 -0
- package/dist/chunk-BXATWUGJ.cjs.map +1 -0
- package/dist/chunk-DPKVNI6Q.cjs +351 -0
- package/dist/chunk-DPKVNI6Q.cjs.map +1 -0
- package/dist/chunk-Q7SFCCGT.cjs +11 -0
- package/dist/chunk-Q7SFCCGT.cjs.map +1 -0
- package/dist/evm/index.cjs +15410 -0
- package/dist/evm/index.cjs.map +1 -0
- package/dist/evm/index.d.cts +8533 -0
- package/dist/oracle-CU-nZnja.d.cts +826 -0
- package/dist/pda-ZZMBZSFU.cjs +53 -0
- package/dist/pda-ZZMBZSFU.cjs.map +1 -0
- package/dist/solana/index.cjs +4981 -0
- package/dist/solana/index.cjs.map +1 -0
- package/dist/solana/index.d.cts +4584 -0
- package/dist/solana/react/index.cjs +1465 -0
- package/dist/solana/react/index.cjs.map +1 -0
- package/dist/solana/react/index.d.cts +1046 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -26,10 +26,14 @@ yarn add @whetstone-research/doppler-sdk viem
|
|
|
26
26
|
pnpm add @whetstone-research/doppler-sdk viem
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
Import EVM APIs from `@whetstone-research/doppler-sdk/evm`. Solana APIs live under
|
|
30
|
+
`@whetstone-research/doppler-sdk/solana` and React bindings under
|
|
31
|
+
`@whetstone-research/doppler-sdk/solana/react`.
|
|
32
|
+
|
|
29
33
|
## Quick Start
|
|
30
34
|
|
|
31
35
|
```typescript
|
|
32
|
-
import { DopplerSDK } from '@whetstone-research/doppler-sdk';
|
|
36
|
+
import { DopplerSDK } from '@whetstone-research/doppler-sdk/evm';
|
|
33
37
|
import { createPublicClient, createWalletClient, http } from 'viem';
|
|
34
38
|
import { base } from 'viem/chains';
|
|
35
39
|
|
|
@@ -60,7 +64,7 @@ const sdk = new DopplerSDK({
|
|
|
60
64
|
Static auctions use Uniswap V3 pools with concentrated liquidity in a fixed price range. They're ideal for simple, predictable price discovery.
|
|
61
65
|
|
|
62
66
|
```typescript
|
|
63
|
-
import { StaticAuctionBuilder } from '@whetstone-research/doppler-sdk';
|
|
67
|
+
import { StaticAuctionBuilder } from '@whetstone-research/doppler-sdk/evm';
|
|
64
68
|
|
|
65
69
|
const params = new StaticAuctionBuilder()
|
|
66
70
|
.tokenConfig({
|
|
@@ -105,7 +109,7 @@ import {
|
|
|
105
109
|
StaticAuctionBuilder,
|
|
106
110
|
WAD,
|
|
107
111
|
getAirlockOwner,
|
|
108
|
-
} from '@whetstone-research/doppler-sdk';
|
|
112
|
+
} from '@whetstone-research/doppler-sdk/evm';
|
|
109
113
|
import { parseEther } from 'viem';
|
|
110
114
|
|
|
111
115
|
// Get the protocol owner (required beneficiary with min 5%)
|
|
@@ -164,7 +168,7 @@ Dynamic auctions use Uniswap V4 hooks to implement gradual Dutch auctions where
|
|
|
164
168
|
import {
|
|
165
169
|
DynamicAuctionBuilder,
|
|
166
170
|
DAY_SECONDS,
|
|
167
|
-
} from '@whetstone-research/doppler-sdk';
|
|
171
|
+
} from '@whetstone-research/doppler-sdk/evm';
|
|
168
172
|
|
|
169
173
|
const params = new DynamicAuctionBuilder()
|
|
170
174
|
.tokenConfig({
|
|
@@ -299,7 +303,7 @@ Multicurve auctions use a Uniswap V4-style initializer that seeds liquidity acro
|
|
|
299
303
|
**Standard Multicurve with Migration:**
|
|
300
304
|
|
|
301
305
|
```typescript
|
|
302
|
-
import { MulticurveBuilder } from '@whetstone-research/doppler-sdk';
|
|
306
|
+
import { MulticurveBuilder } from '@whetstone-research/doppler-sdk/evm';
|
|
303
307
|
import { parseEther } from 'viem';
|
|
304
308
|
import { base } from 'viem/chains';
|
|
305
309
|
|
|
@@ -346,7 +350,7 @@ console.log('Token address:', result.tokenAddress);
|
|
|
346
350
|
**Market Cap Presets (Low / Medium / High):**
|
|
347
351
|
|
|
348
352
|
```typescript
|
|
349
|
-
import { MulticurveBuilder, FEE_TIERS } from '@whetstone-research/doppler-sdk';
|
|
353
|
+
import { MulticurveBuilder, FEE_TIERS } from '@whetstone-research/doppler-sdk/evm';
|
|
350
354
|
import { parseEther } from 'viem';
|
|
351
355
|
import { base } from 'viem/chains';
|
|
352
356
|
|
|
@@ -387,7 +391,7 @@ Pass `presets` to pick a subset (e.g. `['medium', 'high']`) or provide `override
|
|
|
387
391
|
**Scheduled Multicurve Launch:**
|
|
388
392
|
|
|
389
393
|
```typescript
|
|
390
|
-
import { MulticurveBuilder } from '@whetstone-research/doppler-sdk';
|
|
394
|
+
import { MulticurveBuilder } from '@whetstone-research/doppler-sdk/evm';
|
|
391
395
|
import { parseEther } from 'viem';
|
|
392
396
|
import { base } from 'viem/chains';
|
|
393
397
|
|
|
@@ -438,7 +442,7 @@ Ensure the target chain has the scheduled multicurve initializer whitelisted. If
|
|
|
438
442
|
**Decay Multicurve Launch (Dynamic Fee):**
|
|
439
443
|
|
|
440
444
|
```typescript
|
|
441
|
-
import { MulticurveBuilder } from '@whetstone-research/doppler-sdk';
|
|
445
|
+
import { MulticurveBuilder } from '@whetstone-research/doppler-sdk/evm';
|
|
442
446
|
import { parseEther } from 'viem';
|
|
443
447
|
import { baseSepolia } from 'viem/chains';
|
|
444
448
|
|
|
@@ -495,7 +499,7 @@ For decay pools, `pool.fee` is always the terminal fee (`endFee`) of the schedul
|
|
|
495
499
|
When you want fee revenue to flow to specific addresses without migrating liquidity after the auction, use lockable beneficiaries with NoOp migration:
|
|
496
500
|
|
|
497
501
|
```typescript
|
|
498
|
-
import { WAD } from '@whetstone-research/doppler-sdk';
|
|
502
|
+
import { WAD } from '@whetstone-research/doppler-sdk/evm';
|
|
499
503
|
|
|
500
504
|
// Define beneficiaries with shares that sum to WAD (1e18 = 100%)
|
|
501
505
|
// IMPORTANT: Protocol owner must be included with at least 5% shares
|
|
@@ -575,7 +579,7 @@ Prefer using the builders to construct `CreateStaticAuctionParams` and `CreateDy
|
|
|
575
579
|
import {
|
|
576
580
|
StaticAuctionBuilder,
|
|
577
581
|
DynamicAuctionBuilder,
|
|
578
|
-
} from '@whetstone-research/doppler-sdk';
|
|
582
|
+
} from '@whetstone-research/doppler-sdk/evm';
|
|
579
583
|
import { parseEther } from 'viem';
|
|
580
584
|
|
|
581
585
|
// Dynamic auction via builder
|
|
@@ -807,7 +811,7 @@ await token.release();
|
|
|
807
811
|
Alternatively, you can instantiate directly if needed:
|
|
808
812
|
|
|
809
813
|
```typescript
|
|
810
|
-
import { Derc20 } from '@whetstone-research/doppler-sdk';
|
|
814
|
+
import { Derc20 } from '@whetstone-research/doppler-sdk/evm';
|
|
811
815
|
const tokenDirect = new Derc20(publicClient, walletClient, tokenAddress);
|
|
812
816
|
```
|
|
813
817
|
|
|
@@ -818,7 +822,7 @@ DERC20 extends OpenZeppelin's ERC20Votes. Voting power is tracked via checkpoint
|
|
|
818
822
|
Basics:
|
|
819
823
|
|
|
820
824
|
```ts
|
|
821
|
-
import { Derc20 } from '@whetstone-research/doppler-sdk';
|
|
825
|
+
import { Derc20 } from '@whetstone-research/doppler-sdk/evm';
|
|
822
826
|
|
|
823
827
|
const token = sdk.getDerc20(tokenAddress);
|
|
824
828
|
|
|
@@ -924,7 +928,7 @@ Notes
|
|
|
924
928
|
The SDK also provides an ETH wrapper with ERC20-like interface:
|
|
925
929
|
|
|
926
930
|
```typescript
|
|
927
|
-
import { Eth } from '@whetstone-research/doppler-sdk';
|
|
931
|
+
import { Eth } from '@whetstone-research/doppler-sdk/evm';
|
|
928
932
|
|
|
929
933
|
const eth = new Eth(publicClient, walletClient);
|
|
930
934
|
const balance = await eth.getBalanceOf(address);
|
|
@@ -1138,7 +1142,7 @@ import {
|
|
|
1138
1142
|
DopplerSDK,
|
|
1139
1143
|
createAirlockBeneficiary,
|
|
1140
1144
|
getAirlockOwner,
|
|
1141
|
-
} from '@whetstone-research/doppler-sdk';
|
|
1145
|
+
} from '@whetstone-research/doppler-sdk/evm';
|
|
1142
1146
|
import { parseEther } from 'viem';
|
|
1143
1147
|
|
|
1144
1148
|
const sdk = new DopplerSDK({ publicClient, chainId });
|
|
@@ -1177,7 +1181,7 @@ import {
|
|
|
1177
1181
|
isSupportedChainId,
|
|
1178
1182
|
type SupportedChainId,
|
|
1179
1183
|
type ChainAddresses,
|
|
1180
|
-
} from '@whetstone-research/doppler-sdk';
|
|
1184
|
+
} from '@whetstone-research/doppler-sdk/evm';
|
|
1181
1185
|
|
|
1182
1186
|
// Validate and narrow a chain ID
|
|
1183
1187
|
function ensureSupported(id: number): SupportedChainId {
|
|
@@ -1228,7 +1232,7 @@ import {
|
|
|
1228
1232
|
StaticAuctionBuilder,
|
|
1229
1233
|
mineTokenAddress,
|
|
1230
1234
|
getAddresses,
|
|
1231
|
-
} from '@whetstone-research/doppler-sdk';
|
|
1235
|
+
} from '@whetstone-research/doppler-sdk/evm';
|
|
1232
1236
|
import { parseEther } from 'viem';
|
|
1233
1237
|
import { base } from 'viem/chains';
|
|
1234
1238
|
|
|
@@ -1296,7 +1300,7 @@ import {
|
|
|
1296
1300
|
getAddresses,
|
|
1297
1301
|
DopplerBytecode,
|
|
1298
1302
|
DAY_SECONDS,
|
|
1299
|
-
} from '@whetstone-research/doppler-sdk';
|
|
1303
|
+
} from '@whetstone-research/doppler-sdk/evm';
|
|
1300
1304
|
import { parseEther, keccak256, encodePacked, encodeAbiParameters } from 'viem';
|
|
1301
1305
|
import { base } from 'viem/chains';
|
|
1302
1306
|
|
|
@@ -1391,7 +1395,7 @@ import {
|
|
|
1391
1395
|
MulticurveBuilder,
|
|
1392
1396
|
mineTokenAddress,
|
|
1393
1397
|
getAddresses,
|
|
1394
|
-
} from '@whetstone-research/doppler-sdk';
|
|
1398
|
+
} from '@whetstone-research/doppler-sdk/evm';
|
|
1395
1399
|
import { parseEther } from 'viem';
|
|
1396
1400
|
import { base } from 'viem/chains';
|
|
1397
1401
|
|
|
@@ -1521,7 +1525,7 @@ import type {
|
|
|
1521
1525
|
PoolInfo,
|
|
1522
1526
|
HookInfo,
|
|
1523
1527
|
VestingConfig,
|
|
1524
|
-
} from '@whetstone-research/doppler-sdk';
|
|
1528
|
+
} from '@whetstone-research/doppler-sdk/evm';
|
|
1525
1529
|
```
|
|
1526
1530
|
|
|
1527
1531
|
## Development
|