@flaunch/sdk 0.9.16 → 0.9.19

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 CHANGED
@@ -244,6 +244,53 @@ await flaunchWrite.flaunchIPFSWithSplitManager({
244
244
  });
245
245
  ```
246
246
 
247
+ ### Flaunch with Dynamic Address Fee Splits
248
+
249
+ Use the dynamic split manager when recipient weights need to be updated after deployment.
250
+ Unlike the static split manager, recipient shares are mutable and do not need to be modeled as a fixed 100% distribution in SDK inputs.
251
+ `creatorShare + managerOwnerShare` must be less than or equal to `100_00000` (`VALID_SHARE_TOTAL`).
252
+
253
+ ```ts
254
+ await flaunchWrite.flaunchIPFSWithDynamicSplitManager({
255
+ name: "...",
256
+ symbol: "...",
257
+ metadata: {
258
+ base64Image: "...",
259
+ },
260
+ fairLaunchPercent: 0,
261
+ fairLaunchDuration: 30 * 60, // 30 mins
262
+ initialMarketCapUSD: 1_000,
263
+ creator: "0x...",
264
+ creatorFeeAllocationPercent: 100,
265
+ // Dynamic split manager params (raw share weights)
266
+ creatorShare: 10_00000n, // 10%
267
+ managerOwnerShare: 20_00000n, // 20%
268
+ moderator: "0xmoderator...",
269
+ splitReceivers: [
270
+ { address: "0x123...", share: 2_000_000n },
271
+ { address: "0xabc...", share: 1_000_000n },
272
+ ],
273
+ });
274
+ ```
275
+
276
+ You can update recipient distribution after deployment:
277
+
278
+ ```ts
279
+ import { ReadWriteDynamicAddressFeeSplitManager } from "@flaunch/sdk";
280
+
281
+ const manager = new ReadWriteDynamicAddressFeeSplitManager(
282
+ "0xmanagerAddress...",
283
+ flaunchWrite.drift
284
+ );
285
+
286
+ // share = 0 removes recipient; non-zero adds/updates recipient share
287
+ await manager.updateRecipients([
288
+ { recipient: "0x123...", share: 1_500_000n },
289
+ { recipient: "0xdef...", share: 500_000n },
290
+ { recipient: "0xabc...", share: 0n },
291
+ ]);
292
+ ```
293
+
247
294
  ### Buying a Flaunch coin
248
295
 
249
296
  ```ts