@logswap/sdk 0.5.40 → 0.5.41

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/dist/fpool.d.ts CHANGED
@@ -61,16 +61,6 @@ export declare const fPoolManagerAbi: readonly [{
61
61
  readonly type: "uint256";
62
62
  }];
63
63
  readonly stateMutability: "view";
64
- }, {
65
- readonly type: "function";
66
- readonly inputs: readonly [];
67
- readonly name: "LEVER_FLOOR";
68
- readonly outputs: readonly [{
69
- readonly name: "";
70
- readonly internalType: "uint256";
71
- readonly type: "uint256";
72
- }];
73
- readonly stateMutability: "view";
74
64
  }, {
75
65
  readonly type: "function";
76
66
  readonly inputs: readonly [];
@@ -416,9 +406,9 @@ export declare const fPoolManagerAbi: readonly [{
416
406
  readonly internalType: "address";
417
407
  readonly type: "address";
418
408
  }, {
419
- readonly name: "lockStrike";
420
- readonly internalType: "bool";
421
- readonly type: "bool";
409
+ readonly name: "kind";
410
+ readonly internalType: "enum Kind";
411
+ readonly type: "uint8";
422
412
  }, {
423
413
  readonly name: "seeded";
424
414
  readonly internalType: "bool";
@@ -476,9 +466,9 @@ export declare const fPoolManagerAbi: readonly [{
476
466
  readonly internalType: "address";
477
467
  readonly type: "address";
478
468
  }, {
479
- readonly name: "minBuffer";
480
- readonly internalType: "uint96";
481
- readonly type: "uint96";
469
+ readonly name: "pendingOperator";
470
+ readonly internalType: "address";
471
+ readonly type: "address";
482
472
  }, {
483
473
  readonly name: "incomeTaken";
484
474
  readonly internalType: "uint256";
@@ -527,9 +517,9 @@ export declare const fPoolManagerAbi: readonly [{
527
517
  readonly internalType: "uint256";
528
518
  readonly type: "uint256";
529
519
  }, {
530
- readonly name: "lockStrike";
531
- readonly internalType: "bool";
532
- readonly type: "bool";
520
+ readonly name: "kind";
521
+ readonly internalType: "enum Kind";
522
+ readonly type: "uint8";
533
523
  }, {
534
524
  readonly name: "authority";
535
525
  readonly internalType: "address";
@@ -570,9 +560,9 @@ export declare const fPoolManagerAbi: readonly [{
570
560
  readonly internalType: "uint256";
571
561
  readonly type: "uint256";
572
562
  }, {
573
- readonly name: "lockStrike";
574
- readonly internalType: "bool";
575
- readonly type: "bool";
563
+ readonly name: "kind";
564
+ readonly internalType: "enum Kind";
565
+ readonly type: "uint8";
576
566
  }, {
577
567
  readonly name: "authority";
578
568
  readonly internalType: "address";
@@ -1516,9 +1506,9 @@ export declare const fPoolManagerAbi: readonly [{
1516
1506
  readonly type: "uint256";
1517
1507
  readonly indexed: false;
1518
1508
  }, {
1519
- readonly name: "lockStrike";
1520
- readonly internalType: "bool";
1521
- readonly type: "bool";
1509
+ readonly name: "kind";
1510
+ readonly internalType: "enum Kind";
1511
+ readonly type: "uint8";
1522
1512
  readonly indexed: false;
1523
1513
  }];
1524
1514
  readonly name: "Initialize";
@@ -1531,62 +1521,22 @@ export declare const fPoolManagerAbi: readonly [{
1531
1521
  readonly type: "bytes32";
1532
1522
  readonly indexed: true;
1533
1523
  }, {
1534
- readonly name: "j";
1524
+ readonly name: "gen";
1535
1525
  readonly internalType: "uint256";
1536
1526
  readonly type: "uint256";
1537
1527
  readonly indexed: true;
1538
1528
  }, {
1539
- readonly name: "base";
1540
- readonly internalType: "address";
1541
- readonly type: "address";
1542
- readonly indexed: false;
1543
- }, {
1544
- readonly name: "newLj";
1545
- readonly internalType: "uint256";
1546
- readonly type: "uint256";
1547
- readonly indexed: false;
1548
- }, {
1549
- readonly name: "reserve";
1550
- readonly internalType: "uint256";
1551
- readonly type: "uint256";
1552
- readonly indexed: false;
1553
- }, {
1554
- readonly name: "L";
1555
- readonly internalType: "uint256";
1556
- readonly type: "uint256";
1557
- readonly indexed: false;
1558
- }, {
1559
- readonly name: "theta0";
1560
- readonly internalType: "int256";
1561
- readonly type: "int256";
1562
- readonly indexed: false;
1563
- }, {
1564
- readonly name: "dReserve";
1565
- readonly internalType: "int256";
1566
- readonly type: "int256";
1567
- readonly indexed: false;
1568
- }, {
1569
- readonly name: "dShares";
1570
- readonly internalType: "int256";
1571
- readonly type: "int256";
1529
+ readonly name: "bases";
1530
+ readonly internalType: "address[]";
1531
+ readonly type: "address[]";
1572
1532
  readonly indexed: false;
1573
- }];
1574
- readonly name: "LegSet";
1575
- }, {
1576
- readonly type: "event";
1577
- readonly anonymous: false;
1578
- readonly inputs: readonly [{
1579
- readonly name: "poolId";
1580
- readonly internalType: "bytes32";
1581
- readonly type: "bytes32";
1582
- readonly indexed: true;
1583
1533
  }, {
1584
- readonly name: "minBuffer";
1585
- readonly internalType: "uint256";
1586
- readonly type: "uint256";
1534
+ readonly name: "weights";
1535
+ readonly internalType: "uint256[]";
1536
+ readonly type: "uint256[]";
1587
1537
  readonly indexed: false;
1588
1538
  }];
1589
- readonly name: "MinBufferRaised";
1539
+ readonly name: "LegsSet";
1590
1540
  }, {
1591
1541
  readonly type: "event";
1592
1542
  readonly anonymous: false;
@@ -1632,6 +1582,26 @@ export declare const fPoolManagerAbi: readonly [{
1632
1582
  readonly indexed: false;
1633
1583
  }];
1634
1584
  readonly name: "NameSet";
1585
+ }, {
1586
+ readonly type: "event";
1587
+ readonly anonymous: false;
1588
+ readonly inputs: readonly [{
1589
+ readonly name: "poolId";
1590
+ readonly internalType: "bytes32";
1591
+ readonly type: "bytes32";
1592
+ readonly indexed: true;
1593
+ }, {
1594
+ readonly name: "current";
1595
+ readonly internalType: "address";
1596
+ readonly type: "address";
1597
+ readonly indexed: true;
1598
+ }, {
1599
+ readonly name: "proposed";
1600
+ readonly internalType: "address";
1601
+ readonly type: "address";
1602
+ readonly indexed: true;
1603
+ }];
1604
+ readonly name: "OperatorProposed";
1635
1605
  }, {
1636
1606
  readonly type: "event";
1637
1607
  readonly anonymous: false;
@@ -1866,35 +1836,35 @@ export declare const fPoolManagerAbi: readonly [{
1866
1836
  }, {
1867
1837
  readonly type: "error";
1868
1838
  readonly inputs: readonly [];
1869
- readonly name: "BalanceOverflow";
1839
+ readonly name: "BadWeights";
1870
1840
  }, {
1871
1841
  readonly type: "error";
1872
1842
  readonly inputs: readonly [];
1873
- readonly name: "InsufficientBalance";
1843
+ readonly name: "BalanceOverflow";
1874
1844
  }, {
1875
1845
  readonly type: "error";
1876
1846
  readonly inputs: readonly [];
1877
- readonly name: "InsufficientPermission";
1847
+ readonly name: "FloorLocked";
1878
1848
  }, {
1879
1849
  readonly type: "error";
1880
1850
  readonly inputs: readonly [];
1881
- readonly name: "InsufficientQuote";
1851
+ readonly name: "InsufficientBalance";
1882
1852
  }, {
1883
1853
  readonly type: "error";
1884
1854
  readonly inputs: readonly [];
1885
- readonly name: "InvalidToken";
1855
+ readonly name: "InsufficientPermission";
1886
1856
  }, {
1887
1857
  readonly type: "error";
1888
1858
  readonly inputs: readonly [];
1889
- readonly name: "LegHeld";
1859
+ readonly name: "InsufficientQuote";
1890
1860
  }, {
1891
1861
  readonly type: "error";
1892
1862
  readonly inputs: readonly [];
1893
- readonly name: "LegLive";
1863
+ readonly name: "InvalidToken";
1894
1864
  }, {
1895
1865
  readonly type: "error";
1896
1866
  readonly inputs: readonly [];
1897
- readonly name: "MinBuffer";
1867
+ readonly name: "LegHeld";
1898
1868
  }, {
1899
1869
  readonly type: "error";
1900
1870
  readonly inputs: readonly [{
@@ -1934,15 +1904,15 @@ export declare const fPoolManagerAbi: readonly [{
1934
1904
  }, {
1935
1905
  readonly type: "error";
1936
1906
  readonly inputs: readonly [];
1937
- readonly name: "NotRetired";
1907
+ readonly name: "NotPrivate";
1938
1908
  }, {
1939
1909
  readonly type: "error";
1940
1910
  readonly inputs: readonly [];
1941
- readonly name: "NotSeeded";
1911
+ readonly name: "NotRetired";
1942
1912
  }, {
1943
1913
  readonly type: "error";
1944
1914
  readonly inputs: readonly [];
1945
- readonly name: "NotSoleLP";
1915
+ readonly name: "NotSeeded";
1946
1916
  }, {
1947
1917
  readonly type: "error";
1948
1918
  readonly inputs: readonly [];
@@ -1983,10 +1953,6 @@ export declare const fPoolManagerAbi: readonly [{
1983
1953
  readonly type: "error";
1984
1954
  readonly inputs: readonly [];
1985
1955
  readonly name: "Slippage";
1986
- }, {
1987
- readonly type: "error";
1988
- readonly inputs: readonly [];
1989
- readonly name: "StrikeLocked";
1990
1956
  }, {
1991
1957
  readonly type: "error";
1992
1958
  readonly inputs: readonly [];
@@ -2035,16 +2001,6 @@ export declare const fPoolManagerAbi: readonly [{
2035
2001
  readonly type: "uint256";
2036
2002
  }];
2037
2003
  readonly stateMutability: "view";
2038
- }, {
2039
- readonly type: "function";
2040
- readonly inputs: readonly [];
2041
- readonly name: "LEVER_FLOOR";
2042
- readonly outputs: readonly [{
2043
- readonly name: "";
2044
- readonly internalType: "uint256";
2045
- readonly type: "uint256";
2046
- }];
2047
- readonly stateMutability: "view";
2048
2004
  }, {
2049
2005
  readonly type: "function";
2050
2006
  readonly inputs: readonly [];
@@ -2087,29 +2043,9 @@ export declare const fPoolManagerAbi: readonly [{
2087
2043
  readonly name: "poolId";
2088
2044
  readonly internalType: "bytes32";
2089
2045
  readonly type: "bytes32";
2090
- }, {
2091
- readonly name: "base";
2092
- readonly internalType: "address";
2093
- readonly type: "address";
2094
- }, {
2095
- readonly name: "Lj";
2096
- readonly internalType: "uint256";
2097
- readonly type: "uint256";
2098
- }, {
2099
- readonly name: "R";
2100
- readonly internalType: "uint256";
2101
- readonly type: "uint256";
2102
- }];
2103
- readonly name: "admitLeg";
2104
- readonly outputs: readonly [{
2105
- readonly name: "dReserve";
2106
- readonly internalType: "int256";
2107
- readonly type: "int256";
2108
- }, {
2109
- readonly name: "dShares";
2110
- readonly internalType: "int256";
2111
- readonly type: "int256";
2112
2046
  }];
2047
+ readonly name: "acceptOperator";
2048
+ readonly outputs: readonly [];
2113
2049
  readonly stateMutability: "nonpayable";
2114
2050
  }, {
2115
2051
  readonly type: "function";
@@ -2539,20 +2475,6 @@ export declare const fPoolManagerAbi: readonly [{
2539
2475
  readonly name: "proposeCollector";
2540
2476
  readonly outputs: readonly [];
2541
2477
  readonly stateMutability: "nonpayable";
2542
- }, {
2543
- readonly type: "function";
2544
- readonly inputs: readonly [{
2545
- readonly name: "poolId";
2546
- readonly internalType: "bytes32";
2547
- readonly type: "bytes32";
2548
- }, {
2549
- readonly name: "minBuffer";
2550
- readonly internalType: "uint256";
2551
- readonly type: "uint256";
2552
- }];
2553
- readonly name: "raiseMinBuffer";
2554
- readonly outputs: readonly [];
2555
- readonly stateMutability: "nonpayable";
2556
2478
  }, {
2557
2479
  readonly type: "function";
2558
2480
  readonly inputs: readonly [{
@@ -2624,28 +2546,16 @@ export declare const fPoolManagerAbi: readonly [{
2624
2546
  readonly internalType: "bytes32";
2625
2547
  readonly type: "bytes32";
2626
2548
  }, {
2627
- readonly name: "j";
2628
- readonly internalType: "uint256";
2629
- readonly type: "uint256";
2630
- }, {
2631
- readonly name: "newLj";
2632
- readonly internalType: "uint256";
2633
- readonly type: "uint256";
2634
- }, {
2635
- readonly name: "rIfNew";
2636
- readonly internalType: "uint256";
2637
- readonly type: "uint256";
2638
- }];
2639
- readonly name: "setLegL";
2640
- readonly outputs: readonly [{
2641
- readonly name: "dReserve";
2642
- readonly internalType: "int256";
2643
- readonly type: "int256";
2549
+ readonly name: "weights";
2550
+ readonly internalType: "uint256[]";
2551
+ readonly type: "uint256[]";
2644
2552
  }, {
2645
- readonly name: "dShares";
2646
- readonly internalType: "int256";
2647
- readonly type: "int256";
2553
+ readonly name: "newBases";
2554
+ readonly internalType: "address[]";
2555
+ readonly type: "address[]";
2648
2556
  }];
2557
+ readonly name: "setLegs";
2558
+ readonly outputs: readonly [];
2649
2559
  readonly stateMutability: "nonpayable";
2650
2560
  }, {
2651
2561
  readonly type: "function";
@@ -3195,9 +3105,9 @@ export declare const fPoolManagerAbi: readonly [{
3195
3105
  readonly type: "uint256";
3196
3106
  readonly indexed: false;
3197
3107
  }, {
3198
- readonly name: "lockStrike";
3199
- readonly internalType: "bool";
3200
- readonly type: "bool";
3108
+ readonly name: "kind";
3109
+ readonly internalType: "enum Kind";
3110
+ readonly type: "uint8";
3201
3111
  readonly indexed: false;
3202
3112
  }];
3203
3113
  readonly name: "Initialize";
@@ -3210,62 +3120,22 @@ export declare const fPoolManagerAbi: readonly [{
3210
3120
  readonly type: "bytes32";
3211
3121
  readonly indexed: true;
3212
3122
  }, {
3213
- readonly name: "j";
3123
+ readonly name: "gen";
3214
3124
  readonly internalType: "uint256";
3215
3125
  readonly type: "uint256";
3216
3126
  readonly indexed: true;
3217
3127
  }, {
3218
- readonly name: "base";
3219
- readonly internalType: "address";
3220
- readonly type: "address";
3221
- readonly indexed: false;
3222
- }, {
3223
- readonly name: "newLj";
3224
- readonly internalType: "uint256";
3225
- readonly type: "uint256";
3226
- readonly indexed: false;
3227
- }, {
3228
- readonly name: "reserve";
3229
- readonly internalType: "uint256";
3230
- readonly type: "uint256";
3231
- readonly indexed: false;
3232
- }, {
3233
- readonly name: "L";
3234
- readonly internalType: "uint256";
3235
- readonly type: "uint256";
3236
- readonly indexed: false;
3237
- }, {
3238
- readonly name: "theta0";
3239
- readonly internalType: "int256";
3240
- readonly type: "int256";
3241
- readonly indexed: false;
3242
- }, {
3243
- readonly name: "dReserve";
3244
- readonly internalType: "int256";
3245
- readonly type: "int256";
3246
- readonly indexed: false;
3247
- }, {
3248
- readonly name: "dShares";
3249
- readonly internalType: "int256";
3250
- readonly type: "int256";
3128
+ readonly name: "bases";
3129
+ readonly internalType: "address[]";
3130
+ readonly type: "address[]";
3251
3131
  readonly indexed: false;
3252
- }];
3253
- readonly name: "LegSet";
3254
- }, {
3255
- readonly type: "event";
3256
- readonly anonymous: false;
3257
- readonly inputs: readonly [{
3258
- readonly name: "poolId";
3259
- readonly internalType: "bytes32";
3260
- readonly type: "bytes32";
3261
- readonly indexed: true;
3262
3132
  }, {
3263
- readonly name: "minBuffer";
3264
- readonly internalType: "uint256";
3265
- readonly type: "uint256";
3133
+ readonly name: "weights";
3134
+ readonly internalType: "uint256[]";
3135
+ readonly type: "uint256[]";
3266
3136
  readonly indexed: false;
3267
3137
  }];
3268
- readonly name: "MinBufferRaised";
3138
+ readonly name: "LegsSet";
3269
3139
  }, {
3270
3140
  readonly type: "event";
3271
3141
  readonly anonymous: false;
@@ -3311,6 +3181,26 @@ export declare const fPoolManagerAbi: readonly [{
3311
3181
  readonly indexed: false;
3312
3182
  }];
3313
3183
  readonly name: "NameSet";
3184
+ }, {
3185
+ readonly type: "event";
3186
+ readonly anonymous: false;
3187
+ readonly inputs: readonly [{
3188
+ readonly name: "poolId";
3189
+ readonly internalType: "bytes32";
3190
+ readonly type: "bytes32";
3191
+ readonly indexed: true;
3192
+ }, {
3193
+ readonly name: "current";
3194
+ readonly internalType: "address";
3195
+ readonly type: "address";
3196
+ readonly indexed: true;
3197
+ }, {
3198
+ readonly name: "proposed";
3199
+ readonly internalType: "address";
3200
+ readonly type: "address";
3201
+ readonly indexed: true;
3202
+ }];
3203
+ readonly name: "OperatorProposed";
3314
3204
  }, {
3315
3205
  readonly type: "event";
3316
3206
  readonly anonymous: false;
@@ -3545,35 +3435,35 @@ export declare const fPoolManagerAbi: readonly [{
3545
3435
  }, {
3546
3436
  readonly type: "error";
3547
3437
  readonly inputs: readonly [];
3548
- readonly name: "BalanceOverflow";
3438
+ readonly name: "BadWeights";
3549
3439
  }, {
3550
3440
  readonly type: "error";
3551
3441
  readonly inputs: readonly [];
3552
- readonly name: "InsufficientBalance";
3442
+ readonly name: "BalanceOverflow";
3553
3443
  }, {
3554
3444
  readonly type: "error";
3555
3445
  readonly inputs: readonly [];
3556
- readonly name: "InsufficientPermission";
3446
+ readonly name: "FloorLocked";
3557
3447
  }, {
3558
3448
  readonly type: "error";
3559
3449
  readonly inputs: readonly [];
3560
- readonly name: "InsufficientQuote";
3450
+ readonly name: "InsufficientBalance";
3561
3451
  }, {
3562
3452
  readonly type: "error";
3563
3453
  readonly inputs: readonly [];
3564
- readonly name: "InvalidToken";
3454
+ readonly name: "InsufficientPermission";
3565
3455
  }, {
3566
3456
  readonly type: "error";
3567
3457
  readonly inputs: readonly [];
3568
- readonly name: "LegHeld";
3458
+ readonly name: "InsufficientQuote";
3569
3459
  }, {
3570
3460
  readonly type: "error";
3571
3461
  readonly inputs: readonly [];
3572
- readonly name: "LegLive";
3462
+ readonly name: "InvalidToken";
3573
3463
  }, {
3574
3464
  readonly type: "error";
3575
3465
  readonly inputs: readonly [];
3576
- readonly name: "MinBuffer";
3466
+ readonly name: "LegHeld";
3577
3467
  }, {
3578
3468
  readonly type: "error";
3579
3469
  readonly inputs: readonly [];
@@ -3609,15 +3499,15 @@ export declare const fPoolManagerAbi: readonly [{
3609
3499
  }, {
3610
3500
  readonly type: "error";
3611
3501
  readonly inputs: readonly [];
3612
- readonly name: "NotRetired";
3502
+ readonly name: "NotPrivate";
3613
3503
  }, {
3614
3504
  readonly type: "error";
3615
3505
  readonly inputs: readonly [];
3616
- readonly name: "NotSeeded";
3506
+ readonly name: "NotRetired";
3617
3507
  }, {
3618
3508
  readonly type: "error";
3619
3509
  readonly inputs: readonly [];
3620
- readonly name: "NotSoleLP";
3510
+ readonly name: "NotSeeded";
3621
3511
  }, {
3622
3512
  readonly type: "error";
3623
3513
  readonly inputs: readonly [];
@@ -3658,10 +3548,6 @@ export declare const fPoolManagerAbi: readonly [{
3658
3548
  readonly type: "error";
3659
3549
  readonly inputs: readonly [];
3660
3550
  readonly name: "Slippage";
3661
- }, {
3662
- readonly type: "error";
3663
- readonly inputs: readonly [];
3664
- readonly name: "StrikeLocked";
3665
3551
  }, {
3666
3552
  readonly type: "error";
3667
3553
  readonly inputs: readonly [];
@@ -3712,28 +3598,27 @@ export interface FPoolState {
3712
3598
  compositeX: bigint;
3713
3599
  /** Σ = ∫ Σ_j w_j (dx_j)², accrued even though the fee is fixed — the kernel stays calculable. */
3714
3600
  bigSigma: bigint;
3715
- /** Creator (private) or a governance contract (public). Holds the floor lever. */
3601
+ /** The cold key (decisions 037): seeds the pool, hands it over, names it, gates it (private). A creator, a treasury, a governance contract. */
3716
3602
  authority: Address;
3717
3603
  /** The proposed next authority, until it accepts — zero when nothing is pending (decisions 020). */
3718
3604
  pendingAuthority: Address;
3719
- /** The desk's hot key (`ma-private.md` §6): may reshape composition, never move value out. Zero when none. */
3605
+ /**
3606
+ * The hot key that RUNS the pool (decisions 037): `harvest`, `dissolve`, `setLegs`. Zero means
3607
+ * the authority itself — see {@link fPoolOperatorOf}. Appointed two-step on a private pool.
3608
+ */
3720
3609
  operator: Address;
3610
+ /** The proposed next operator, until it accepts — zero when nothing is pending. */
3611
+ pendingOperator: Address;
3721
3612
  /** The sponsor's own label for this pool, mutable and never identity. "" when unnamed. */
3722
3613
  name: string;
3723
- /** `harvest` may not take Q/L under this (WAD log-distance); raise-only (decisions 021). */
3724
- minBuffer: bigint;
3725
3614
  /** Only `allowed` accounts may receive minted shares. */
3726
3615
  gateMint: boolean;
3727
3616
  /** Only `allowed` takers may swap. */
3728
3617
  gateSwap: boolean;
3729
- /** The block of the last lever / composition action: no swap runs in it. */
3618
+ /** The block of the last harvest / composition action: no swap runs in it. */
3730
3619
  restructureBlock: number;
3731
- /**
3732
- * The strike is locked (decisions 027, formerly `feesOnly`): `harvest` resets the floor to θ₀
3733
- * and never past it, so only income can leave; and the pool cannot be dissolved while it bids.
3734
- * The pad's promise. Pairs with a locked seed (shares at 0xdead) — the class is the two bits.
3735
- */
3736
- lockStrike: boolean;
3620
+ /** The rung — see {@link FPoolKind}. */
3621
+ kind: FPoolKind;
3737
3622
  /** False before the first seed — and between a dissolve and the next one (decisions 032). */
3738
3623
  seeded: boolean;
3739
3624
  /**
@@ -3748,7 +3633,26 @@ export interface FPoolState {
3748
3633
  }
3749
3634
  /** Read a basket pool whole. Batched — viem multicalls these when the transport allows. */
3750
3635
  export declare function getFPool(c: LogswapClient, poolId: Hex): Promise<FPoolState>;
3751
- /** Which of the two products a pool is configured as. A UI has to choose what to render. */
3636
+ /**
3637
+ * The kind of pool (decisions 036, 038). `public`: the protocol's own pool — born with the fee
3638
+ * collector as its authority (which may hand it to a governance contract); no gates, no operator.
3639
+ * `private`, the desk: every entry — gates, a list, an operator that reshapes the legs between
3640
+ * generations, an unbounded harvest, the seed kept. `pol`, a treasury's pool or a basket: no
3641
+ * gates, no operator — composition and access fixed at birth; harvest unbounded, seed the
3642
+ * seeder's. `pad`, a launch: a POL whose harvest never lifts the floor above the seed floor and
3643
+ * whose seed the contract minted to 0xdead — one asset, open to all. private → pol → pad is the
3644
+ * ladder of rigidity; public is a pol held by the protocol.
3645
+ */
3646
+ export type FPoolKind = "public" | "private" | "pol" | "pad";
3647
+ /** The key's enum values. */
3648
+ export declare const F_KIND: {
3649
+ readonly public: 0;
3650
+ readonly private: 1;
3651
+ readonly pol: 2;
3652
+ readonly pad: 3;
3653
+ };
3654
+ export declare function fPoolKindOf(n: number | bigint): FPoolKind;
3655
+ /** Which of the two products a pool is configured as — a pad is a launch, anything else a basket/pool. A UI has to choose what to render. */
3752
3656
  export type FPoolShape = "launch" | "basket";
3753
3657
  export interface FPoolDescription {
3754
3658
  shape: FPoolShape;
@@ -3885,8 +3789,9 @@ export declare function fPoolPreviewRollIn(c: LogswapClient, poolId: Hex, gen: b
3885
3789
  * Remove quote, lifting θ — price-neutral, no base moves, and since decisions 028 a DIVIDEND to
3886
3790
  * every share: the amount goes into the pool's pot and each holder's slice is settled lazily on
3887
3791
  * their next transfer, mint or burn, or pulled with {@link fPoolClaim}. The sponsor's own slice —
3888
- * its shares' and the locked seed's at 0xdead — is pushed to `to` at once. Under `lockStrike`
3889
- * the lift stops at θ₀ (income only); on every live pool it stops at `LEVER_FLOOR` (Q/L ≥ ln 1.25).
3792
+ * its shares' and the locked seed's at 0xdead — is pushed to `to` at once. On a pad
3793
+ * the lift stops at the seed floor θ₀ (income only); nothing else bounds it (decisions 035) — an
3794
+ * unlocked pool's authority may take Q to zero.
3890
3795
  */
3891
3796
  export declare function fPoolHarvest(c: LogswapClient, a: {
3892
3797
  poolId: Hex;
@@ -3907,8 +3812,6 @@ export declare function fPoolClaim(c: LogswapClient, a: {
3907
3812
  }): Promise<`0x${string}`>;
3908
3813
  /** A holder's dividend as of now on generation `gen` (the live one by default) — banked plus pending on the current balance (decisions 028). */
3909
3814
  export declare function fPoolDividendOf(c: LogswapClient, poolId: Hex, holder: Address, gen?: bigint | number): Promise<bigint>;
3910
- /** The lever's floor: `harvest` may not take Q/L under ln 1.25 — the floor stays ≥ 20% below the mark (decisions 025). */
3911
- export declare const LEVER_FLOOR = 223143551314209755n;
3912
3815
  /** Plain ERC-20 approval to the F manager — the allowance every DIRECT call pulls against. */
3913
3816
  export declare function approveTokenForFPoolManager(c: LogswapClient, token: Address): Promise<Hash>;
3914
3817
  /** Does `owner` have enough allowance on `token` for the MANAGER to pull `need`? */
@@ -3988,8 +3891,8 @@ export interface FPoolCreateArgs {
3988
3891
  weights: bigint[];
3989
3892
  /** Fixed fee, WAD. The base-for-base fee is pinned at 2φ on-chain. */
3990
3893
  phi: bigint;
3991
- /** true: the strike is locked — harvest stops at θ₀ and the pool cannot be dissolved live (the pad's posture; decisions 027). */
3992
- lockStrike: boolean;
3894
+ /** The rung (decisions 036) — see {@link FPoolKind}. In the key: the pool's identity, never changed after. */
3895
+ kind: FPoolKind;
3993
3896
  authority: Address;
3994
3897
  /**
3995
3898
  * The differentiator, and nothing else. Identity is the key's hash, so one sponsor cannot run
@@ -4039,30 +3942,60 @@ export declare function fPoolSeed(c: LogswapClient, a: {
4039
3942
  weights: bigint[];
4040
3943
  })): Promise<`0x${string}`>;
4041
3944
  /**
4042
- * Retire the live generation (decisions 025, 032). Allowed at Q ≤ L/1e9 on every pool — the
4043
- * market filled the ask — and on a pool that is not strike-locked at any Q. The live (S, Q, R_j)
4044
- * become a frozen bundle every share of this generation redeems ({@link fPoolRedeem}) or rolls
4045
- * ({@link fPoolRollIn}), forever; the pool is unseeded until the next {@link fPoolSeed}, which
4046
- * opens generation `gen + 1` under the same id, gates, lists and promises.
3945
+ * Retire the live generation (decisions 025, 032, 035) — the raw entry. Allowed only at an empty
3946
+ * bid, Q ≤ L/1e9, on every pool: the market took it, or the authority harvested it out first
3947
+ * ({@link fPoolRetire} does both in one transaction). The live (S, Q, R_j) become a frozen bundle
3948
+ * every share of this generation redeems ({@link fPoolRedeem}) or rolls ({@link fPoolRollIn}),
3949
+ * forever; the pool is unseeded until the next {@link fPoolSeed}, which opens generation
3950
+ * `gen + 1` under the same id, gates and lists.
4047
3951
  */
4048
3952
  export declare function fPoolDissolve(c: LogswapClient, a: {
4049
3953
  poolId: Hex;
4050
3954
  account: Address;
4051
3955
  }): Promise<`0x${string}`>;
4052
3956
  /**
4053
- * The sponsor's relaunch as ONE transaction (decisions 025, 032): `dissolve` the live generation,
4054
- * `redeem` the sponsor's own shares of it (when `shares` > 0), `seed` the next generation with
4055
- * what came back — the manager's `multicall`, the sponsor as sender throughout, the same pool.
4056
- * Gates, allowlist, operator, `minBuffer` and names carry over; anything else goes in `extra`,
4057
- * pre-encoded against {@link fPoolManagerAbi}. The seed names reserves (decisions 029): `r0`
4058
- * outright, or `x0` marks against the key's `weights`.
3957
+ * Retire the live generation as ONE transaction: the harvests that empty the bid
3958
+ * ({@link fPoolEmptyingHarvests} — a dividend to every share; none when it is already empty),
3959
+ * then `dissolve` — the manager's `multicall`, the authority as sender. What a sponsor's
3960
+ * "dissolve" button should call. Throws before sending on a pad that still bids.
3961
+ */
3962
+ export declare function fPoolRetire(c: LogswapClient, a: {
3963
+ poolId: Hex;
3964
+ account: Address;
3965
+ }): Promise<`0x${string}`>;
3966
+ /**
3967
+ * The harvests that empty an unlocked pool's bid, in order — what a relaunch sends before its
3968
+ * `dissolve` (decisions 035: a dissolve needs an empty bid on every pool). One `harvest(Q)` when a
3969
+ * collector is set. With none, the cut on income STAYS in the pool as LP quote (decisions 002)
3970
+ * and reads as taken income, so a second harvest — capital, no cut — takes the rest; the
3971
+ * contract's own arithmetic, replayed. `[]` when the bid is already empty. Throws on a
3972
+ * pad that still bids (its bid empties only as the market sells it down), and in
3973
+ * the one shape two harvests cannot empty (no collector, income above Q — harvest by hand).
3974
+ */
3975
+ export declare function fPoolEmptyingHarvests(c: LogswapClient, poolId: Hex): Promise<bigint[]>;
3976
+ /**
3977
+ * The relaunch as ONE transaction (decisions 025, 032, 035, 037): `harvest` the bid out — a
3978
+ * dividend to every share, {@link fPoolEmptyingHarvests} — `dissolve` the live generation at the
3979
+ * empty bid, `redeem` the caller's own shares of it (when `shares` > 0), optionally `setLegs` the
3980
+ * next generation's composition (`legs`: a private pool's reshape — retire, admit, reweight), and
3981
+ * `seed` it with what came back — the manager's `multicall`, one sender throughout, the same
3982
+ * pool. The operator's when one is appointed and the seed's inventory is its own; by default the
3983
+ * authority's. Gates, allowlist and names carry over; anything else goes in `extra`, pre-encoded
3984
+ * against {@link fPoolManagerAbi}. The seed names reserves (decisions 029): `r0` outright — one
3985
+ * per leg of the NEXT table, 0 for a retired leg — or `x0` marks against the next table's
3986
+ * `weights`.
4059
3987
  */
4060
3988
  export declare function fPoolRelaunch(c: LogswapClient, a: {
4061
3989
  poolId: Hex;
4062
- /** the sponsor's shares of the retiring generation to redeem inside the batch — its whole balance, usually; 0 to keep the claim */
3990
+ /** the caller's shares of the retiring generation to redeem inside the batch — its whole balance, usually; 0 to keep the claim */
4063
3991
  shares: bigint;
4064
3992
  L0: bigint;
4065
3993
  Q0: bigint;
3994
+ /** the next generation's composition (decisions 037): one weight per existing leg (0 retires it), then one per new base */
3995
+ legs?: {
3996
+ weights: bigint[];
3997
+ newBases?: Address[];
3998
+ };
4066
3999
  extra?: Hex[];
4067
4000
  account: Address;
4068
4001
  } & ({
@@ -4071,20 +4004,14 @@ export declare function fPoolRelaunch(c: LogswapClient, a: {
4071
4004
  x0: bigint[];
4072
4005
  weights: bigint[];
4073
4006
  })): Promise<`0x${string}`>;
4074
- /** ERC-6909 shares sent here are locked for good — the seed's custody (custody.md §4(b)). */
4007
+ /** Where a pad's seed lives (decisions 036): `seed` mints every share of a pad here itself. */
4075
4008
  export declare const DEAD_ADDRESS: Address;
4076
- /** The manager's `MIN_SHARES`: the seed mints this much to 0xdead itself, the rest to the seeder. */
4009
+ /** The manager's `MIN_SHARES`: the seed mints this much to 0xdead on every pool, the rest to the seeder — or, on a pad, to 0xdead too. */
4077
4010
  export declare const F_MIN_SHARES = 1000n;
4078
4011
  export interface FPoolLaunchArgs extends Omit<FPoolCreateArgs, "account"> {
4079
4012
  L0: bigint;
4080
4013
  /** Quote the seed pulls. A pad seeds at 0 — pure float, a resting ask, nothing raised. */
4081
4014
  Q0: bigint;
4082
- /**
4083
- * Send every share the seed mints to the creator (`L0 − MIN_SHARES`) to 0xdead in the same
4084
- * batch: the float and the raise can never be burned out from under the buyers. The lever
4085
- * (harvest) is the authority's and survives it; the exit does not. A pad's default posture.
4086
- */
4087
- lockSeed?: boolean;
4088
4015
  /**
4089
4016
  * An opening buy of leg `j` (an index into `bases` AS GIVEN) for `amountIn` of quote, ON THE
4090
4017
  * MANAGER — the same sender, a plain allowance to the manager, the router nowhere near it. A
@@ -4099,8 +4026,6 @@ export interface FPoolLaunchArgs extends Omit<FPoolCreateArgs, "account"> {
4099
4026
  };
4100
4027
  /** The pool's label, set in the batch (≤ 31 bytes of UTF-8). */
4101
4028
  name?: string;
4102
- /** Gate minting, list the creator, appoint them operator (decisions 021) — three calls, in the batch. */
4103
- privatePool?: boolean;
4104
4029
  /**
4105
4030
  * The pool already exists (a previous launch got as far as `initialize` and no further — a seed
4106
4031
  * that reverted, a closed tab, before the launch was one transaction), so `initialize` is left
@@ -4195,47 +4120,41 @@ export declare function fPoolSetSponsorName(c: LogswapClient, a: {
4195
4120
  }): Promise<`0x${string}`>;
4196
4121
  /** The protocol's attestation for an address, or "" when unattested — which most addresses are. */
4197
4122
  export declare function fPoolSponsorName(c: LogswapClient, who: Address): Promise<string>;
4198
- /** Appoint (or clear, with the zero address) the operator — the hot key that reshapes and never moves value out. */
4123
+ /** Who runs the pool (decisions 037): the appointed operator, or the authority until one is. */
4124
+ export declare function fPoolOperatorOf(s: Pick<FPoolState, "authority" | "operator">): Address;
4125
+ /**
4126
+ * Propose the operator (authority; private pools only) — the hot key that runs the pool: `harvest`,
4127
+ * `dissolve`, `setLegs`. Two-step: the proposed address takes the role with
4128
+ * {@link fPoolAcceptOperator}. The zero address clears at once — the role returns to the authority.
4129
+ */
4199
4130
  export declare function fPoolAppointOperator(c: LogswapClient, a: {
4200
4131
  poolId: Hex;
4201
4132
  operator: Address;
4202
4133
  account: Address;
4203
4134
  }): Promise<`0x${string}`>;
4204
- /**
4205
- * Raise the floor guard: `harvest` may not take Q/L under `minBuffer` (WAD log-distance; 20% below
4206
- * spot is ln 1.25 ≈ 0.223e18). Raise-only — a commitment the authority cannot walk back.
4207
- */
4208
- export declare function fPoolRaiseMinBuffer(c: LogswapClient, a: {
4135
+ /** The proposed operator takes the role. */
4136
+ export declare function fPoolAcceptOperator(c: LogswapClient, a: {
4209
4137
  poolId: Hex;
4210
- minBuffer: bigint;
4211
4138
  account: Address;
4212
4139
  }): Promise<`0x${string}`>;
4213
4140
  /**
4214
- * Set leg `j`'s liquidity (operator, sole LP only): grow, shrink, retire (`newLj = 0`), or re-admit
4215
- * a retired leg holding `r` of the base (decisions 029 — the price follows, `p = newLj / r`; use
4216
- * {@link fPoolReserveAt} from a mark). For a live leg leave `r` undefined — its price is the
4217
- * market's, the reserve scales with the liquidity. Base moves single-sidedly through the lock;
4218
- * shares adjust to hold the share value.
4141
+ * The next generation's composition (operator; private pools only; ONLY while the pool is
4142
+ * unseeded — between a dissolve and the seed that prices it, decisions 037). `weights` has one
4143
+ * entry per leg the pool has ever had, in index order (0 retires a leg; indices are never reused),
4144
+ * then one per base in `newBases`, appended; they sum to 1e18 exactly. No value moves: the
4145
+ * following {@link fPoolSeed} names every reserve. A live reshape is {@link fPoolRelaunch} with
4146
+ * `legs` set.
4219
4147
  */
4220
- export declare function fPoolSetLegL(c: LogswapClient, a: {
4148
+ export declare function fPoolSetLegs(c: LogswapClient, a: {
4221
4149
  poolId: Hex;
4222
- j: number;
4223
- newLj: bigint;
4224
- r?: bigint;
4225
- account: Address;
4226
- }): Promise<`0x${string}`>;
4227
- /** Admit a base the pool has never held: `R` of it against liquidity `Lj`, so at `p = Lj / R` (operator, sole LP only). */
4228
- export declare function fPoolAdmitLeg(c: LogswapClient, a: {
4229
- poolId: Hex;
4230
- base: Address;
4231
- Lj: bigint;
4232
- R: bigint;
4150
+ weights: bigint[];
4151
+ newBases?: Address[];
4233
4152
  account: Address;
4234
4153
  }): Promise<`0x${string}`>;
4235
4154
  /**
4236
4155
  * Move shares (ERC-6909 `transfer`) — to another holder, or to `0xdead` to lock them for good.
4237
4156
  * Burning to the dead address is a sponsor's way to make its liquidity permanent: the shares can
4238
- * never be redeemed, and they never count against the sole-LP precondition.
4157
+ * never be redeemed.
4239
4158
  */
4240
4159
  export declare function fPoolTransferShares(c: LogswapClient, a: {
4241
4160
  poolId: Hex;
@@ -4250,7 +4169,7 @@ export interface DiscoveredFPool {
4250
4169
  bases: Address[];
4251
4170
  weights: bigint[];
4252
4171
  phi: bigint;
4253
- lockStrike: boolean;
4172
+ kind: FPoolKind;
4254
4173
  authority: Address;
4255
4174
  /** The block the pool was initialized in — its age, for annualising realized income. */
4256
4175
  block: bigint;
@@ -4268,7 +4187,7 @@ export interface DiscoveredFPool {
4268
4187
  }
4269
4188
  /**
4270
4189
  * Every F pool ever created, from `Initialize` logs alone. Possible only because the event
4271
- * carries the full key preimage (bases, weights, phi, lockStrike) — the poolId is a hash and could
4190
+ * carries the full key preimage (bases, weights, phi, pad) — the poolId is a hash and could
4272
4191
  * never be inverted; contracts PR #17 exists for exactly this call.
4273
4192
  */
4274
4193
  export declare function discoverFPools(c: LogswapClient, opts?: {
@@ -4287,7 +4206,7 @@ export declare function fPoolShareHolders(c: LogswapClient, poolIdHex: Hex, opts
4287
4206
  holder: Address;
4288
4207
  shares: bigint;
4289
4208
  }>>;
4290
- /** Every F pool's state in one lens call (the raw manager struct: quote, phi, authority, lockStrike, seeded, gen, n, Q, L, shares, theta0, bigSigma, harvestedTheta). */
4209
+ /** Every F pool's state in one lens call (the raw manager struct: quote, phi, authority, kind, seeded, gen, n, Q, L, shares, theta0, bigSigma, harvestedTheta). */
4291
4210
  export declare function getFPoolsRaw(c: LogswapClient, poolIds: Hex[]): Promise<readonly unknown[]>;
4292
4211
  /** Share value from the lens — (L + Q)/shares, WAD per share — the same figure as `fPoolShareValue`, from one source. */
4293
4212
  export declare function shareValueOnChain(c: LogswapClient, poolId: Hex): Promise<bigint>;