@whetstone-research/doppler-sdk 1.0.4 → 1.0.6
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 +11 -0
- package/dist/evm/index.cjs +917 -354
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +674 -8
- package/dist/evm/index.d.ts +674 -8
- package/dist/evm/index.js +917 -356
- package/dist/evm/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,6 +88,13 @@ const params = new StaticAuctionBuilder()
|
|
|
88
88
|
// Optional: specify multiple recipients and amounts
|
|
89
89
|
// recipients: ['0xTeam...', '0xAdvisor...'],
|
|
90
90
|
// amounts: [parseEther('50000000'), parseEther('50000000')]
|
|
91
|
+
// Optional: define per-beneficiary schedules on the DERC20 V2 path
|
|
92
|
+
// schedules: [
|
|
93
|
+
// { duration: BigInt(180 * 24 * 60 * 60), cliffDuration: 30 * 24 * 60 * 60 },
|
|
94
|
+
// { duration: BigInt(365 * 24 * 60 * 60), cliffDuration: 90 * 24 * 60 * 60 },
|
|
95
|
+
// ],
|
|
96
|
+
// Optional: if omitted, one schedule is assigned per recipient in order
|
|
97
|
+
// scheduleIds: [0, 1]
|
|
91
98
|
})
|
|
92
99
|
.withMigration({ type: 'uniswapV2' })
|
|
93
100
|
.withUserAddress('0x...')
|
|
@@ -98,6 +105,10 @@ console.log('Pool address:', result.poolAddress);
|
|
|
98
105
|
console.log('Token address:', result.tokenAddress);
|
|
99
106
|
```
|
|
100
107
|
|
|
108
|
+
If you set `cliffDuration > 0` or provide `schedules`, the SDK automatically uses the DERC20 V2 factory and exposes schedule-aware token reads via `sdk.getDerc20V2(tokenAddress)`. When `schedules` is provided, omit `scheduleIds` to assign one schedule per recipient in order, or provide `scheduleIds` to reuse schedules across beneficiaries.
|
|
109
|
+
|
|
110
|
+
For a runnable example, see [examples/multicurve-per-beneficiary-vesting.ts](./examples/multicurve-per-beneficiary-vesting.ts).
|
|
111
|
+
|
|
101
112
|
> **Tick spacing reminder:** When you provide ticks manually via `poolByTicks`, make sure both `startTick` and `endTick` are exact multiples of the fee tier's tick spacing (100→1, 500→10, 3000→60, 10000→200). The SDK now validates this locally and will fail fast if the ticks are misaligned.
|
|
102
113
|
|
|
103
114
|
### Static Auction with Lockable Beneficiaries (V3)
|