@logswap/sdk 0.5.90 → 0.5.91

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.
Files changed (59) hide show
  1. package/README.md +74 -12
  2. package/dist/actions.js +4 -3
  3. package/dist/admin.d.ts +213 -219
  4. package/dist/admin.js +118 -144
  5. package/dist/chains.d.ts +13 -4
  6. package/dist/chains.js +23 -9
  7. package/dist/claims.d.ts +1 -1
  8. package/dist/claims.js +11 -9
  9. package/dist/client.d.ts +43 -20
  10. package/dist/client.js +75 -26
  11. package/dist/fees.d.ts +1 -1
  12. package/dist/fees.js +5 -4
  13. package/dist/fpool.d.ts +170 -460
  14. package/dist/fpool.js +175 -218
  15. package/dist/generated.d.ts +5549 -6027
  16. package/dist/generated.js +2580 -3153
  17. package/dist/history.js +13 -11
  18. package/dist/index.d.ts +5 -7
  19. package/dist/index.js +5 -7
  20. package/dist/indexer.d.ts +2 -2
  21. package/dist/indexer.js +12 -9
  22. package/dist/keys.d.ts +15 -3
  23. package/dist/keys.js +5 -1
  24. package/dist/liquidity.d.ts +1 -1
  25. package/dist/liquidity.js +16 -9
  26. package/dist/onboard.d.ts +16 -11
  27. package/dist/onboard.js +27 -21
  28. package/dist/pools.d.ts +2 -0
  29. package/dist/pools.js +21 -13
  30. package/dist/positions.d.ts +1 -1
  31. package/dist/positions.js +18 -17
  32. package/dist/quote.d.ts +15 -0
  33. package/dist/quote.js +36 -0
  34. package/dist/swap.d.ts +7 -9
  35. package/dist/swap.js +40 -25
  36. package/dist/views.d.ts +1 -1
  37. package/dist/write.d.ts +7 -2
  38. package/dist/write.js +10 -7
  39. package/package.json +3 -3
  40. package/src/actions.ts +4 -3
  41. package/src/admin.ts +168 -171
  42. package/src/chains.ts +33 -13
  43. package/src/claims.ts +11 -10
  44. package/src/client.ts +101 -39
  45. package/src/fees.ts +6 -6
  46. package/src/fpool.ts +240 -272
  47. package/src/generated.ts +2525 -3094
  48. package/src/history.ts +11 -9
  49. package/src/index.ts +5 -7
  50. package/src/indexer.ts +13 -11
  51. package/src/keys.ts +19 -3
  52. package/src/liquidity.ts +16 -10
  53. package/src/onboard.ts +29 -21
  54. package/src/pools.ts +23 -15
  55. package/src/positions.ts +18 -18
  56. package/src/quote.ts +36 -0
  57. package/src/swap.ts +46 -25
  58. package/src/views.ts +1 -2
  59. package/src/write.ts +11 -10
package/dist/fpool.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
- * fpool.ts — the `FPoolManager` surface: n bases, one quote, one shared floor.
2
+ * fpool.ts — the `ManagerF` surface: n bases, one quote, one shared floor.
3
3
  *
4
- * The other primitive. `CPoolManager` gives every position its own floor on a tick ladder;
5
- * `FPoolManager` gives every share the SAME floor and deletes the ladder, the accumulators and the
4
+ * The other primitive. `ManagerC` gives every position its own floor on a tick ladder;
5
+ * `ManagerF` gives every share the SAME floor and deletes the ladder, the accumulators and the
6
6
  * per-position accounting with it. Reading the two side by side is the fastest way to understand
7
7
  * either.
8
8
  *
@@ -19,73 +19,54 @@
19
19
  * which shape a given pool is, because a UI has to decide what to render.
20
20
  *
21
21
  * **The roles are the policy's, not the manager's** (F version 15). The manager holds no
22
- * authority, operator, gate or list: it asks the pool's policy `may(who, action)` and acts on the
23
- * answer. So `getFPool` carries the policy and what it declared, {@link getFPoolRoles} reads the
24
- * roles FROM the policy, and every role write — the handover, the operator, the gates, the list —
25
- * is a write to the policy ({@link fPoolProposeAuthority}, {@link fPoolSetGates}, …).
22
+ * authority, gate or list: it asks the pool's policy `may(who, action)` and acts on the answer (the
23
+ * one thing it caches is the operator the gates admit with no call, F 40). So `getFPool` carries the
24
+ * policy and what it declared (`flags`), {@link getFPoolRoles} reads the roles FROM the policy, and
25
+ * every setting — the operator, the gate modes, the whitelist — is a write to the policy
26
+ * ({@link fPoolAppointOperator}, {@link fPoolSetSwapMode}, {@link fPoolSetListed}, …). Since decision 098
27
+ * the authority is `key.creator` for life (no handover) and a policy has no setter of its own: its numbers
28
+ * are constructor immutables, and a change is a new policy the LOG moves a pool to ({@link fPoolMigrate}).
26
29
  *
27
- * **Zaps live on the ROUTER, not here.** Permit2 is AllowanceTransfer mode, whose standing
28
- * allowance is keyed by spender, so a second router would cost the user an allowance per token
29
- * twice, forever. One router is one spender — see `fPoolZapIn`/`fPoolZapOut` below, which target
30
- * `addresses.router`.
30
+ * **Zaps live on the ROUTER, not here.** `RouterF` is F's own router and its own Permit2 spender (decision 096: one
31
+ * router per manager; a second spender is a second signature, not a second on-chain approval). See
32
+ * `fPoolZapIn`/`fPoolZapOut` below, which target `addresses.routerF`; a wallet's Permit2 allowance for it is
33
+ * `onboardToken(c, "F", token, need)`.
31
34
  */
32
35
  import { type Address, type Hash, type Hex } from "viem";
33
- import { fPoolManagerAbi, padPolicyAbi, polPolicyAbi, privatePolicyAbi, publicPolicyAbi } from "./generated.js";
36
+ import { managerFAbi, orphanPolicyFAbi, padPolicyAbi, polPolicyAbi, sponsorPolicyFAbi } from "./generated.js";
34
37
  /**
35
- * One contract, one ABI (F version 12): `harvest`, `claim`, `retire`, `regenerate`,
36
- * `setLegs`, the names, the fee parameters are `FPoolManager`'s own code. The roles left it for
37
- * the policies in F version 15: {@link fPolicyBaseAbi} is what every policy shares,
38
- * {@link privatePolicyAbi} the desk's, {@link padPolicyAbi} / {@link polPolicyAbi} / {@link publicPolicyAbi}
39
- * the kinds'.
38
+ * One contract, one ABI (F version 12): `harvest`, `claim`, `regenerate`, `close`, `deployLiquidity`,
39
+ * the fee parameters are `ManagerF`'s own code. The roles left it for the policies in F version 15:
40
+ * {@link fPolicyBaseAbi} is what the policies share, {@link sponsorPolicyFAbi} the sponsored one (kind
41
+ * `"sponsor"`, decision 098), {@link padPolicyAbi} / {@link polPolicyAbi} the other kinds', and
42
+ * {@link orphanPolicyFAbi} the neutral policy of a pool the LOG orphaned.
40
43
  */
41
- export { fPoolManagerAbi, padPolicyAbi, polPolicyAbi, privatePolicyAbi, publicPolicyAbi };
44
+ export { managerFAbi, orphanPolicyFAbi, padPolicyAbi, polPolicyAbi, sponsorPolicyFAbi };
42
45
  /**
43
- * What every protocol policy shares (`FPolicyBase`): the roles and their handover and the
44
- * `maxHarvest` readout (a harvest has no cut, decisions 056). `polPolicyAbi` is a superset of it and carries nothing that collides, so it stands
45
- * in for the base — a call through it to any of the four policies decodes the base's functions.
46
+ * What the protocol's policies share: `authority`, `nameOf` / `setName`, `kind`, `maxHarvest`
47
+ * (a harvest has no cut, decisions 056). `polPolicyAbi` is a superset of it, so it stands in for the base: a call
48
+ * through it to any F policy decodes the base's functions (`maxHarvest` is absent on the orphan policy, which refuses every harvest).
46
49
  */
47
50
  export declare const fPolicyBaseAbi: readonly [{
48
51
  readonly type: "constructor";
49
52
  readonly inputs: readonly [{
50
53
  readonly name: "manager_";
51
- readonly internalType: "contract FPoolManager";
54
+ readonly internalType: "contract ManagerF";
52
55
  readonly type: "address";
53
- }];
54
- readonly stateMutability: "nonpayable";
55
- }, {
56
- readonly type: "function";
57
- readonly inputs: readonly [{
58
- readonly name: "poolId";
59
- readonly internalType: "bytes32";
60
- readonly type: "bytes32";
61
- }];
62
- readonly name: "acceptAuthority";
63
- readonly outputs: readonly [];
64
- readonly stateMutability: "nonpayable";
65
- }, {
66
- readonly type: "function";
67
- readonly inputs: readonly [{
68
- readonly name: "";
69
- readonly internalType: "bytes32";
70
- readonly type: "bytes32";
71
- }];
72
- readonly name: "authority";
73
- readonly outputs: readonly [{
74
- readonly name: "";
75
- readonly internalType: "address";
76
- readonly type: "address";
77
- }];
78
- readonly stateMutability: "view";
79
- }, {
80
- readonly type: "function";
81
- readonly inputs: readonly [];
82
- readonly name: "cManager";
83
- readonly outputs: readonly [{
84
- readonly name: "";
56
+ }, {
57
+ readonly name: "sponsor_";
85
58
  readonly internalType: "address";
86
59
  readonly type: "address";
60
+ }, {
61
+ readonly name: "incomeTaxRate_";
62
+ readonly internalType: "uint256";
63
+ readonly type: "uint256";
64
+ }, {
65
+ readonly name: "minQuoteRatio_";
66
+ readonly internalType: "uint256";
67
+ readonly type: "uint256";
87
68
  }];
88
- readonly stateMutability: "view";
69
+ readonly stateMutability: "nonpayable";
89
70
  }, {
90
71
  readonly type: "function";
91
72
  readonly inputs: readonly [{
@@ -93,37 +74,13 @@ export declare const fPolicyBaseAbi: readonly [{
93
74
  readonly internalType: "bytes32";
94
75
  readonly type: "bytes32";
95
76
  }];
96
- readonly name: "creator";
77
+ readonly name: "authority";
97
78
  readonly outputs: readonly [{
98
79
  readonly name: "";
99
80
  readonly internalType: "address";
100
81
  readonly type: "address";
101
82
  }];
102
83
  readonly stateMutability: "view";
103
- }, {
104
- readonly type: "function";
105
- readonly inputs: readonly [];
106
- readonly name: "feeCurated";
107
- readonly outputs: readonly [{
108
- readonly name: "";
109
- readonly internalType: "bool";
110
- readonly type: "bool";
111
- }];
112
- readonly stateMutability: "view";
113
- }, {
114
- readonly type: "function";
115
- readonly inputs: readonly [{
116
- readonly name: "";
117
- readonly internalType: "uint256";
118
- readonly type: "uint256";
119
- }];
120
- readonly name: "feeListed";
121
- readonly outputs: readonly [{
122
- readonly name: "";
123
- readonly internalType: "bool";
124
- readonly type: "bool";
125
- }];
126
- readonly stateMutability: "view";
127
84
  }, {
128
85
  readonly type: "function";
129
86
  readonly inputs: readonly [{
@@ -166,20 +123,6 @@ export declare const fPolicyBaseAbi: readonly [{
166
123
  readonly type: "function";
167
124
  readonly inputs: readonly [];
168
125
  readonly name: "manager";
169
- readonly outputs: readonly [{
170
- readonly name: "";
171
- readonly internalType: "contract FPoolManager";
172
- readonly type: "address";
173
- }];
174
- readonly stateMutability: "view";
175
- }, {
176
- readonly type: "function";
177
- readonly inputs: readonly [{
178
- readonly name: "";
179
- readonly internalType: "bytes32";
180
- readonly type: "bytes32";
181
- }];
182
- readonly name: "managerOf";
183
126
  readonly outputs: readonly [{
184
127
  readonly name: "";
185
128
  readonly internalType: "address";
@@ -204,7 +147,7 @@ export declare const fPolicyBaseAbi: readonly [{
204
147
  readonly type: "function";
205
148
  readonly inputs: readonly [{
206
149
  readonly name: "a";
207
- readonly internalType: "struct IFPolicy.Ask";
150
+ readonly internalType: "struct IPolicy.Ask";
208
151
  readonly type: "tuple";
209
152
  readonly components: readonly [{
210
153
  readonly name: "poolId";
@@ -216,7 +159,7 @@ export declare const fPolicyBaseAbi: readonly [{
216
159
  readonly type: "uint256";
217
160
  }, {
218
161
  readonly name: "action";
219
- readonly internalType: "enum IFPolicy.Action";
162
+ readonly internalType: "enum IPolicy.Action";
220
163
  readonly type: "uint8";
221
164
  }, {
222
165
  readonly name: "who";
@@ -278,12 +221,16 @@ export declare const fPolicyBaseAbi: readonly [{
278
221
  }, {
279
222
  readonly type: "function";
280
223
  readonly inputs: readonly [{
224
+ readonly name: "";
225
+ readonly internalType: "bytes32";
226
+ readonly type: "bytes32";
227
+ }, {
281
228
  readonly name: "";
282
229
  readonly internalType: "address";
283
230
  readonly type: "address";
284
231
  }, {
285
232
  readonly name: "";
286
- readonly internalType: "struct CPoolKey";
233
+ readonly internalType: "struct PoolKeyC";
287
234
  readonly type: "tuple";
288
235
  readonly components: readonly [{
289
236
  readonly name: "base";
@@ -301,6 +248,14 @@ export declare const fPolicyBaseAbi: readonly [{
301
248
  readonly name: "policy";
302
249
  readonly internalType: "address";
303
250
  readonly type: "address";
251
+ }, {
252
+ readonly name: "creator";
253
+ readonly internalType: "address";
254
+ readonly type: "address";
255
+ }, {
256
+ readonly name: "salt";
257
+ readonly internalType: "bytes32";
258
+ readonly type: "bytes32";
304
259
  }, {
305
260
  readonly name: "swapFee";
306
261
  readonly internalType: "uint256";
@@ -311,7 +266,7 @@ export declare const fPolicyBaseAbi: readonly [{
311
266
  readonly type: "uint256";
312
267
  }];
313
268
  }];
314
- readonly name: "onCInitialize";
269
+ readonly name: "onInitialize";
315
270
  readonly outputs: readonly [{
316
271
  readonly name: "";
317
272
  readonly internalType: "uint8";
@@ -320,17 +275,25 @@ export declare const fPolicyBaseAbi: readonly [{
320
275
  readonly name: "";
321
276
  readonly internalType: "uint256";
322
277
  readonly type: "uint256";
278
+ }, {
279
+ readonly name: "";
280
+ readonly internalType: "address";
281
+ readonly type: "address";
323
282
  }];
324
- readonly stateMutability: "pure";
283
+ readonly stateMutability: "nonpayable";
325
284
  }, {
326
285
  readonly type: "function";
327
286
  readonly inputs: readonly [{
328
287
  readonly name: "poolId";
329
288
  readonly internalType: "bytes32";
330
289
  readonly type: "bytes32";
290
+ }, {
291
+ readonly name: "";
292
+ readonly internalType: "address";
293
+ readonly type: "address";
331
294
  }, {
332
295
  readonly name: "key";
333
- readonly internalType: "struct FPoolKey";
296
+ readonly internalType: "struct PoolKeyF";
334
297
  readonly type: "tuple";
335
298
  readonly components: readonly [{
336
299
  readonly name: "quote";
@@ -367,6 +330,14 @@ export declare const fPolicyBaseAbi: readonly [{
367
330
  readonly name: "";
368
331
  readonly internalType: "uint8";
369
332
  readonly type: "uint8";
333
+ }, {
334
+ readonly name: "";
335
+ readonly internalType: "uint256";
336
+ readonly type: "uint256";
337
+ }, {
338
+ readonly name: "";
339
+ readonly internalType: "address";
340
+ readonly type: "address";
370
341
  }];
371
342
  readonly stateMutability: "nonpayable";
372
343
  }, {
@@ -380,7 +351,7 @@ export declare const fPolicyBaseAbi: readonly [{
380
351
  readonly internalType: "address";
381
352
  readonly type: "address";
382
353
  }, {
383
- readonly name: "creator_";
354
+ readonly name: "";
384
355
  readonly internalType: "address";
385
356
  readonly type: "address";
386
357
  }, {
@@ -403,7 +374,7 @@ export declare const fPolicyBaseAbi: readonly [{
403
374
  readonly type: "function";
404
375
  readonly inputs: readonly [{
405
376
  readonly name: "a";
406
- readonly internalType: "struct IFPolicy.Ask";
377
+ readonly internalType: "struct IPolicy.Ask";
407
378
  readonly type: "tuple";
408
379
  readonly components: readonly [{
409
380
  readonly name: "poolId";
@@ -415,7 +386,7 @@ export declare const fPolicyBaseAbi: readonly [{
415
386
  readonly type: "uint256";
416
387
  }, {
417
388
  readonly name: "action";
418
- readonly internalType: "enum IFPolicy.Action";
389
+ readonly internalType: "enum IPolicy.Action";
419
390
  readonly type: "uint8";
420
391
  }, {
421
392
  readonly name: "who";
@@ -446,7 +417,7 @@ export declare const fPolicyBaseAbi: readonly [{
446
417
  readonly name: "onRegenerate";
447
418
  readonly outputs: readonly [{
448
419
  readonly name: "t";
449
- readonly internalType: "struct IFPolicy.Terms";
420
+ readonly internalType: "struct IPolicy.Terms";
450
421
  readonly type: "tuple";
451
422
  readonly components: readonly [{
452
423
  readonly name: "payee";
@@ -467,112 +438,16 @@ export declare const fPolicyBaseAbi: readonly [{
467
438
  }];
468
439
  }];
469
440
  readonly stateMutability: "nonpayable";
470
- }, {
471
- readonly type: "function";
472
- readonly inputs: readonly [{
473
- readonly name: "";
474
- readonly internalType: "bytes32";
475
- readonly type: "bytes32";
476
- }];
477
- readonly name: "pendingAuthority";
478
- readonly outputs: readonly [{
479
- readonly name: "";
480
- readonly internalType: "address";
481
- readonly type: "address";
482
- }];
483
- readonly stateMutability: "view";
484
- }, {
485
- readonly type: "function";
486
- readonly inputs: readonly [{
487
- readonly name: "poolId";
488
- readonly internalType: "bytes32";
489
- readonly type: "bytes32";
490
- }, {
491
- readonly name: "next";
492
- readonly internalType: "address";
493
- readonly type: "address";
494
- }];
495
- readonly name: "proposeAuthority";
496
- readonly outputs: readonly [];
497
- readonly stateMutability: "nonpayable";
498
441
  }, {
499
442
  readonly type: "function";
500
443
  readonly inputs: readonly [];
501
- readonly name: "quoteCurated";
444
+ readonly name: "registry";
502
445
  readonly outputs: readonly [{
503
- readonly name: "";
504
- readonly internalType: "bool";
505
- readonly type: "bool";
506
- }];
507
- readonly stateMutability: "view";
508
- }, {
509
- readonly type: "function";
510
- readonly inputs: readonly [{
511
446
  readonly name: "";
512
447
  readonly internalType: "address";
513
448
  readonly type: "address";
514
449
  }];
515
- readonly name: "quoteListed";
516
- readonly outputs: readonly [{
517
- readonly name: "";
518
- readonly internalType: "bool";
519
- readonly type: "bool";
520
- }];
521
450
  readonly stateMutability: "view";
522
- }, {
523
- readonly type: "function";
524
- readonly inputs: readonly [{
525
- readonly name: "cManager_";
526
- readonly internalType: "address";
527
- readonly type: "address";
528
- }];
529
- readonly name: "setCManager";
530
- readonly outputs: readonly [];
531
- readonly stateMutability: "nonpayable";
532
- }, {
533
- readonly type: "function";
534
- readonly inputs: readonly [{
535
- readonly name: "curated";
536
- readonly internalType: "bool";
537
- readonly type: "bool";
538
- }];
539
- readonly name: "setFeeCurated";
540
- readonly outputs: readonly [];
541
- readonly stateMutability: "nonpayable";
542
- }, {
543
- readonly type: "function";
544
- readonly inputs: readonly [{
545
- readonly name: "fee";
546
- readonly internalType: "uint256";
547
- readonly type: "uint256";
548
- }, {
549
- readonly name: "listed";
550
- readonly internalType: "bool";
551
- readonly type: "bool";
552
- }];
553
- readonly name: "setFeeListed";
554
- readonly outputs: readonly [];
555
- readonly stateMutability: "nonpayable";
556
- }, {
557
- readonly type: "function";
558
- readonly inputs: readonly [{
559
- readonly name: "rate";
560
- readonly internalType: "uint256";
561
- readonly type: "uint256";
562
- }];
563
- readonly name: "setIncomeTaxRate";
564
- readonly outputs: readonly [];
565
- readonly stateMutability: "nonpayable";
566
- }, {
567
- readonly type: "function";
568
- readonly inputs: readonly [{
569
- readonly name: "ratio";
570
- readonly internalType: "uint256";
571
- readonly type: "uint256";
572
- }];
573
- readonly name: "setMinQuoteRatio";
574
- readonly outputs: readonly [];
575
- readonly stateMutability: "nonpayable";
576
451
  }, {
577
452
  readonly type: "function";
578
453
  readonly inputs: readonly [{
@@ -587,30 +462,6 @@ export declare const fPolicyBaseAbi: readonly [{
587
462
  readonly name: "setName";
588
463
  readonly outputs: readonly [];
589
464
  readonly stateMutability: "nonpayable";
590
- }, {
591
- readonly type: "function";
592
- readonly inputs: readonly [{
593
- readonly name: "curated";
594
- readonly internalType: "bool";
595
- readonly type: "bool";
596
- }];
597
- readonly name: "setQuoteCurated";
598
- readonly outputs: readonly [];
599
- readonly stateMutability: "nonpayable";
600
- }, {
601
- readonly type: "function";
602
- readonly inputs: readonly [{
603
- readonly name: "quote";
604
- readonly internalType: "address";
605
- readonly type: "address";
606
- }, {
607
- readonly name: "listed";
608
- readonly internalType: "bool";
609
- readonly type: "bool";
610
- }];
611
- readonly name: "setQuoteListed";
612
- readonly outputs: readonly [];
613
- readonly stateMutability: "nonpayable";
614
465
  }, {
615
466
  readonly type: "function";
616
467
  readonly inputs: readonly [];
@@ -621,26 +472,6 @@ export declare const fPolicyBaseAbi: readonly [{
621
472
  readonly type: "address";
622
473
  }];
623
474
  readonly stateMutability: "view";
624
- }, {
625
- readonly type: "event";
626
- readonly anonymous: false;
627
- readonly inputs: readonly [{
628
- readonly name: "poolId";
629
- readonly internalType: "bytes32";
630
- readonly type: "bytes32";
631
- readonly indexed: true;
632
- }, {
633
- readonly name: "current";
634
- readonly internalType: "address";
635
- readonly type: "address";
636
- readonly indexed: true;
637
- }, {
638
- readonly name: "proposed";
639
- readonly internalType: "address";
640
- readonly type: "address";
641
- readonly indexed: true;
642
- }];
643
- readonly name: "AuthorityProposed";
644
475
  }, {
645
476
  readonly type: "event";
646
477
  readonly anonymous: false;
@@ -661,61 +492,6 @@ export declare const fPolicyBaseAbi: readonly [{
661
492
  readonly indexed: true;
662
493
  }];
663
494
  readonly name: "AuthoritySet";
664
- }, {
665
- readonly type: "event";
666
- readonly anonymous: false;
667
- readonly inputs: readonly [{
668
- readonly name: "manager";
669
- readonly internalType: "address";
670
- readonly type: "address";
671
- readonly indexed: true;
672
- }];
673
- readonly name: "CManagerSet";
674
- }, {
675
- readonly type: "event";
676
- readonly anonymous: false;
677
- readonly inputs: readonly [{
678
- readonly name: "curated";
679
- readonly internalType: "bool";
680
- readonly type: "bool";
681
- readonly indexed: false;
682
- }];
683
- readonly name: "FeeCuratedSet";
684
- }, {
685
- readonly type: "event";
686
- readonly anonymous: false;
687
- readonly inputs: readonly [{
688
- readonly name: "fee";
689
- readonly internalType: "uint256";
690
- readonly type: "uint256";
691
- readonly indexed: true;
692
- }, {
693
- readonly name: "listed";
694
- readonly internalType: "bool";
695
- readonly type: "bool";
696
- readonly indexed: false;
697
- }];
698
- readonly name: "FeeListed";
699
- }, {
700
- readonly type: "event";
701
- readonly anonymous: false;
702
- readonly inputs: readonly [{
703
- readonly name: "rate";
704
- readonly internalType: "uint256";
705
- readonly type: "uint256";
706
- readonly indexed: false;
707
- }];
708
- readonly name: "IncomeTaxRateSet";
709
- }, {
710
- readonly type: "event";
711
- readonly anonymous: false;
712
- readonly inputs: readonly [{
713
- readonly name: "ratio";
714
- readonly internalType: "uint256";
715
- readonly type: "uint256";
716
- readonly indexed: false;
717
- }];
718
- readonly name: "MinQuoteRatioSet";
719
495
  }, {
720
496
  readonly type: "event";
721
497
  readonly anonymous: false;
@@ -731,47 +507,14 @@ export declare const fPolicyBaseAbi: readonly [{
731
507
  readonly indexed: false;
732
508
  }];
733
509
  readonly name: "NameSet";
734
- }, {
735
- readonly type: "event";
736
- readonly anonymous: false;
737
- readonly inputs: readonly [{
738
- readonly name: "curated";
739
- readonly internalType: "bool";
740
- readonly type: "bool";
741
- readonly indexed: false;
742
- }];
743
- readonly name: "QuoteCuratedSet";
744
- }, {
745
- readonly type: "event";
746
- readonly anonymous: false;
747
- readonly inputs: readonly [{
748
- readonly name: "quote";
749
- readonly internalType: "address";
750
- readonly type: "address";
751
- readonly indexed: true;
752
- }, {
753
- readonly name: "listed";
754
- readonly internalType: "bool";
755
- readonly type: "bool";
756
- readonly indexed: false;
757
- }];
758
- readonly name: "QuoteListed";
759
510
  }, {
760
511
  readonly type: "error";
761
512
  readonly inputs: readonly [];
762
- readonly name: "BadFee";
513
+ readonly name: "AlreadyHeld";
763
514
  }, {
764
515
  readonly type: "error";
765
516
  readonly inputs: readonly [];
766
517
  readonly name: "BadRate";
767
- }, {
768
- readonly type: "error";
769
- readonly inputs: readonly [{
770
- readonly name: "fee";
771
- readonly internalType: "uint256";
772
- readonly type: "uint256";
773
- }];
774
- readonly name: "FeeNotListed";
775
518
  }, {
776
519
  readonly type: "error";
777
520
  readonly inputs: readonly [];
@@ -780,10 +523,6 @@ export declare const fPolicyBaseAbi: readonly [{
780
523
  readonly type: "error";
781
524
  readonly inputs: readonly [];
782
525
  readonly name: "NotAuthority";
783
- }, {
784
- readonly type: "error";
785
- readonly inputs: readonly [];
786
- readonly name: "NotLogAuthority";
787
526
  }, {
788
527
  readonly type: "error";
789
528
  readonly inputs: readonly [];
@@ -792,22 +531,10 @@ export declare const fPolicyBaseAbi: readonly [{
792
531
  readonly type: "error";
793
532
  readonly inputs: readonly [];
794
533
  readonly name: "NotRegistry";
795
- }, {
796
- readonly type: "error";
797
- readonly inputs: readonly [];
798
- readonly name: "NotSponsor";
799
534
  }, {
800
535
  readonly type: "error";
801
536
  readonly inputs: readonly [];
802
537
  readonly name: "OneBase";
803
- }, {
804
- readonly type: "error";
805
- readonly inputs: readonly [{
806
- readonly name: "quote";
807
- readonly internalType: "address";
808
- readonly type: "address";
809
- }];
810
- readonly name: "QuoteNotListed";
811
538
  }, {
812
539
  readonly type: "error";
813
540
  readonly inputs: readonly [];
@@ -818,9 +545,14 @@ export declare const fPolicyBaseAbi: readonly [{
818
545
  readonly name: "Refused";
819
546
  }];
820
547
  import { type LogswapClient } from "./client.js";
821
- /** The optional questions a policy declared at birth, as bits of `Pool.asks`. */
822
- export declare const ASK_SWAP = 1;
823
- export declare const ASK_MINT = 2;
548
+ /**
549
+ * The bits a policy declares at birth, in `Pool.flags` (decision 098; `ASK_SWAP` / `ASK_MINT` before): with a gate bit off nothing is
550
+ * asked; with it on the manager admits the cached operator with no policy call and asks the policy about everyone else.
551
+ */
552
+ export declare const GATE_SWAP = 1;
553
+ export declare const GATE_MINT = 2;
554
+ /** `GATE_SWAP | GATE_MINT`: the bits `setGates` carries (`SEED_TO_DEAD` is the birth's alone). */
555
+ export declare const GATES: number;
824
556
  /** Everything scalar about a basket pool, in one round trip's worth of reads. */
825
557
  export interface FPoolState {
826
558
  /** The pool's id — the hash of its key. There is no per-pool address. */
@@ -861,8 +593,13 @@ export interface FPoolState {
861
593
  * {@link getFPoolRoles}; one of the deployment's four ({@link fPoolPolicyFor}) on every protocol pool.
862
594
  */
863
595
  policy: Address;
864
- /** Whether the policy asked to be consulted on swaps ({@link ASK_SWAP}) and mints ({@link ASK_MINT}) — the desk's policy does, no other. */
865
- asks: number;
596
+ /**
597
+ * What the policy declared for the pool (`Pool.flags`, decision 098): the gate bits {@link GATE_SWAP} and {@link GATE_MINT} (changed
598
+ * later by the policy's `setGates`) and the birth bit {@link SEED_TO_DEAD} (a pad's, the pool's for life).
599
+ */
600
+ flags: number;
601
+ /** The operator the manager caches for the gates (`Pool.operator`): admitted by a gated swap or mint with no policy call. Zero with no gate on. */
602
+ operator: Address;
866
603
  /** The sponsor's own label for this pool — the policy's word, mutable and never identity. "" when unnamed. */
867
604
  name: string;
868
605
  /** The time (unix seconds) of the last harvest / composition action: no swap runs at that timestamp (F version 29; a block number before). */
@@ -889,20 +626,20 @@ export interface FPoolState {
889
626
  /** κ_j = e^{−μ_j}, WAD: each leg's phantom reserve per unit of its liquidity. 0 uncapped. */
890
627
  kappa: bigint[];
891
628
  }
892
- /** Read a basket pool whole: one lens call (`fPool`, F version 25) plus the policy's kind and name. */
629
+ /** Read a basket pool whole: one lens call (`pool`, F version 25) plus the policy's kind and name. */
893
630
  export declare function getFPool(c: LogswapClient, poolId: Hex): Promise<FPoolState>;
894
631
  /**
895
632
  * The kind of pool — the POLICY's self-description (the manager knows no kind; the
896
- * policy the key names is the kind, and what it promises is its code). `public`: the protocol's
897
- * own pool — its policy requires the LOG Authority as creator; no gate, no operator. `private`, the
898
- * desk: the one whose policy may gate swaps and mints, with an operator that reshapes the legs
899
- * between generations. `pol`, a treasury's pool, one base: composition and access fixed at
900
- * birth. `pad`, a launch, one base: its policy answers income only at every harvest and declared
901
- * its seed the pool's at birth (`SEED_TO_DEAD`) — open to all. private → pol → pad is the ladder
902
- * of rigidity; public is a pol held by the protocol. Every rate, role and gate is the policy's.
633
+ * policy the key names is the kind, and what it promises is its code). `sponsor`: the sponsored policy (decision 098),
634
+ * one kind for the LOG's own instances (sponsor = the LOG: the open canonical one, or one with gates) and a third party's
635
+ * (the sponsor creates under it): its authority is `key.creator`, an optional operator, and the gate modes where the
636
+ * policy offers them. `pol`, a treasury's pool, one base: composition and access fixed at birth. `pad`, a launch,
637
+ * one base: its policy answers income only at every harvest and declared its seed the pool's at birth
638
+ * (`SEED_TO_DEAD`) — open to all. `orphan`: the pool the LOG moved off a rogue or lost sponsor, no owner and no
639
+ * setting (`PolicyRegistry.orphan`): swap and mint stay open, holders burn, claim and redeem. Every rate, role and gate is the policy's.
903
640
  */
904
- export type FPoolKind = "public" | "private" | "pol" | "pad";
905
- /** The policy's birth-time declaration that the seed's shares are the pool's (a pad's), in `asks`. */
641
+ export type FPoolKind = "sponsor" | "pol" | "pad" | "orphan";
642
+ /** The policy's birth-time declaration that the seed's shares are the pool's (a pad's), in `flags`. */
906
643
  export declare const SEED_TO_DEAD = 4;
907
644
  /**
908
645
  * What a policy IS — its `kind()` tag, read once per policy address and cached for the client's
@@ -912,35 +649,36 @@ export declare const SEED_TO_DEAD = 4;
912
649
  export declare function fPoolKindOfPolicy(c: LogswapClient, policy: Address): Promise<FPoolKind>;
913
650
  /** The pool's label, as its policy holds it. "" when unnamed. */
914
651
  export declare function fPoolNameOf(c: LogswapClient, poolId: Hex, policy?: Address): Promise<string>;
915
- /** The deployment's policy for a kind: the protocol's policy that IS that kind. */
916
- export declare function fPoolPolicyFor(c: LogswapClient, kind: FPoolKind): Address;
652
+ /**
653
+ * The deployment's named policies (its artifact keys): the LOG's open sponsored instance (`public`: canonical, no gate available),
654
+ * its gated sponsored instance (`private`: gates available, born gated), `pol`, `pad`. The first two are both of kind `"sponsor"`.
655
+ */
656
+ export type FPolicySlot = "public" | "private" | "pol" | "pad";
657
+ /** The deployment's policy for a slot — the one a key names when no `policy` is given. */
658
+ export declare function fPoolPolicyFor(c: LogswapClient, slot: FPolicySlot): Address;
917
659
  /** The policy a pool named in its key — one read; {@link getFPool} carries it too. */
918
660
  export declare function fPoolPolicyOf(c: LogswapClient, poolId: Hex): Promise<Address>;
919
661
  /**
920
- * A pool's roles, as its POLICY holds them. `creator` is immutable identity —
921
- * who was born holding the pool; `authority` is the cold key that owns it now, the creator until
922
- * a two-step handover; on the desk's kind the `operator` runs it (zero = the authority itself,
923
- * {@link fPoolOperatorOf}) and the two gates and the list are its. Every other kind has no
924
- * operator and no gate: those fields read zero / false.
662
+ * A pool's roles, as its POLICY holds them (decision 098). `authority` is the pool's `key.creator` for life — no handover — and zero on an
663
+ * orphaned pool. A sponsored policy also holds the pool's `operator` (appointed by the authority, admitted by the gates with no call and a runner
664
+ * of the pool), its two gates and its whitelist; every other kind has none of them: those fields read zero / false / `"open"`.
925
665
  */
926
666
  export interface FPoolRoles {
927
667
  policy: Address;
928
- creator: Address;
929
668
  authority: Address;
930
- /** The proposed next authority, until it accepts — zero when nothing is pending. */
931
- pendingAuthority: Address;
932
- /** The desk's optional pool operator (decision 073): one delegate besides the authority, zero when none. */
669
+ /** The sponsored policy's per-pool operator (`appointOperator`): zero when none, and on every other kind. */
933
670
  operator: Address;
671
+ /** The mint gate (sponsored policies, where gates are available): on, only the authority and the operator mint. */
934
672
  gateMint: boolean;
935
- /** The desk's swap admission (decision 073): open to all, listed takers/minters only, or one cached executor. */
673
+ /** Swap admission (sponsored policies, where gates are available): everyone, the operator only, or the whitelist (the operator always passes). */
936
674
  swapMode: FPoolSwapMode;
937
- /** The executor in `executor` mode, zero otherwise. */
938
- swapExecutor: Address;
939
- /** The policy's own ceiling on a harvest now — the bid ({@link FPoolDescription.harvestable}) narrowed by the policy's rule. */
675
+ /** The policy's own ceiling on a harvest now — the bid ({@link FPoolDescription.harvestable}) narrowed by the policy's rule. Zero on an orphaned pool. */
940
676
  maxHarvest: bigint;
941
677
  }
942
- /** `PrivatePolicy.SwapMode`: Open = 0, Listed = 1, Executor = 2. */
943
- export type FPoolSwapMode = "open" | "listed" | "executor";
678
+ /** `SponsorPolicyBase.SwapMode`: Open = 0, Operator = 1, Listed = 2. */
679
+ export type FPoolSwapMode = "open" | "operator" | "listed";
680
+ /** The swap modes in `SponsorPolicyBase.SwapMode` order — the index is the on-chain ordinal. */
681
+ export declare const fPoolSwapModes: readonly FPoolSwapMode[];
944
682
  /** Read a pool's roles from its policy. `state` saves the `getPool` round trip when already in hand. */
945
683
  export declare function getFPoolRoles(c: LogswapClient, poolId: Hex, state?: Pick<FPoolState, "policy" | "kind">): Promise<FPoolRoles>;
946
684
  /** 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. */
@@ -1294,18 +1032,17 @@ export interface FPoolCreateArgs {
1294
1032
  */
1295
1033
  mintFee?: bigint;
1296
1034
  /**
1297
- * Which of the protocol's four the pool is — see {@link FPoolKind}. NOT a key field (decisions
1298
- * 049: the manager knows no kind): it selects the deployment's policy of that kind when `policy`
1299
- * is not named ({@link fPoolPolicyFor}), and it is what the policy will say it is.
1035
+ * Which of the deployment's policies the key names when `policy` is not given ({@link fPoolPolicyFor}). NOT a key
1036
+ * field (decisions 049: the manager knows no kind): the policy is, and it says what it is ({@link FPoolKind}).
1300
1037
  */
1301
- kind: FPoolKind;
1038
+ kind: FPolicySlot;
1302
1039
  /**
1303
- * The pool's policy: the contract the key names, approved by the
1304
- * registry, and the pool's kind. Defaults to the deployment's policy for `kind`
1305
- * ({@link fPoolPolicyFor}) — the one every protocol pool names.
1040
+ * The pool's policy: the contract the key names, approved by the registry — the pool's kind. Defaults to the
1041
+ * deployment's policy for `kind` ({@link fPoolPolicyFor}). A sponsored policy admits creation by its sponsor only
1042
+ * (`SponsorOnly`), and the initializer must be `creator` (`NotCreator`).
1306
1043
  */
1307
1044
  policy?: Address;
1308
- /** Who is born holding the pool: immutable identity, the pool's first authority (the policy records it). */
1045
+ /** Who is born holding the pool: immutable identity, the pool's authority for life (the policy records it) and the initializer (`NotCreator`). */
1309
1046
  creator: Address;
1310
1047
  /**
1311
1048
  * The differentiator, and nothing else. Identity is the key's hash, so one sponsor cannot run
@@ -1526,8 +1263,8 @@ export declare function fPoolEmptyingHarvests(c: LogswapClient, poolId: Hex): Pr
1526
1263
  * - the income released (`IncomeReleased`), all in quote: `toPayee` to the payee and the rest into the bid
1527
1264
  * (the floor down). No share is minted; L does not move. The book keeps its reserves, marks and cap.
1528
1265
  *
1529
- * A pad's gate is `threshold(poolId, gen)`, in its quote (`PadPolicy.NotGraduated` below it); POL and private carry the
1530
- * authority and send it the whole income; a public pool refuses (`Refused`). A carried holder with no
1266
+ * A pad's gate is `threshold(poolId, gen)`, in its quote (`PadPolicy.NotGraduated` below it); POL and a non-canonical sponsored pool carry the
1267
+ * authority and send it the whole income; a canonical sponsored pool (the LOG's open instance) refuses (`Refused`). A carried holder with no
1531
1268
  * share is `BadTerms`. Whoever runs the pool. To change the book (reserves, prices, cap) use {@link fPoolDeploy}.
1532
1269
  */
1533
1270
  export declare function fPoolRegenerate(c: LogswapClient, a: {
@@ -1602,7 +1339,7 @@ export interface FPoolLaunchArgs extends Omit<FPoolCreateArgs, "account"> {
1602
1339
  * out: the key is a pure function of the arguments and a second `initialize` can only revert.
1603
1340
  */
1604
1341
  initialized?: boolean;
1605
- /** Anything else, pre-encoded against {@link fPoolManagerAbi}, appended after the above. */
1342
+ /** Anything else, pre-encoded against {@link managerFAbi}, appended after the above. */
1606
1343
  extra?: Hex[];
1607
1344
  account: Address;
1608
1345
  }
@@ -1644,9 +1381,9 @@ export declare function fPoolSendGenesisTransfers(c: LogswapClient, a: {
1644
1381
  /** Whether the wallet runs a batch of calls atomically (EIP-5792 `atomic` capability), on the client's chain. A wallet without it, or one that errors, says no. */
1645
1382
  export declare function fPoolWalletBatchesAtomically(c: LogswapClient, account: Address): Promise<boolean>;
1646
1383
  /**
1647
- * The desk's opening posture, on its policy: gated minting, the creator a
1648
- * minter. No appointment: the authority is the operator until one is appointed.
1649
- * Two writes to `PrivatePolicy`; the launch batch cannot carry them (they are not manager calls).
1384
+ * The desk's opening posture, on its sponsored policy: gated minting (only the authority and the operator mint). The swap gate is
1385
+ * the policy's own birth (the gated instance is born with `GATE_SWAP` and the creator its operator, decision 098); this is the one write
1386
+ * that cannot ride in the launch batch (it is not a manager call).
1650
1387
  */
1651
1388
  export declare function fPoolDeskOpening(c: LogswapClient, a: {
1652
1389
  poolId: Hex;
@@ -1655,13 +1392,12 @@ export declare function fPoolDeskOpening(c: LogswapClient, a: {
1655
1392
  }): Promise<Hash[]>;
1656
1393
  /**
1657
1394
  * Create a pool as ONE transaction: `initialize`, `seed`, the seed lock, the opening buy, the
1658
- * name, the private-pool gates — the manager's `multicall`, the creator as sender throughout.
1395
+ * name — the manager's `multicall`, the creator as sender throughout (the creator is the initializer, `NotCreator`).
1659
1396
  * Either every call lands or none does; there is no half-built pool to resume.
1660
1397
  *
1661
1398
  * Why the manager and not the router: every one of these entries authenticates by `msg.sender`
1662
1399
  * (`seed` is authority-only, so is everything after it). Routed, the router would be the sender
1663
- * — the authority, the holder of the seed shares — and the handover back is two-step, so it
1664
- * could not even close in the same transaction. `multicall` is delegatecall-to-self, so the
1400
+ * — the authority, the holder of the seed shares — and `initialize` would refuse it (`NotCreator`). `multicall` is delegatecall-to-self, so the
1665
1401
  * sender survives, which is what the manager's own doc says a router cannot do.
1666
1402
  *
1667
1403
  * What the batch PULLS, by plain allowance to the manager (never Permit2): `r0[j]` of each base,
@@ -1681,39 +1417,26 @@ export declare function fPoolLaunch(c: LogswapClient, a: FPoolLaunchArgs & ({
1681
1417
  delivered: boolean;
1682
1418
  }>;
1683
1419
  /**
1684
- * Propose the next authority — step one of two, on the pool's policy. Nothing moves
1685
- * until `next` accepts; proposing again (the zero address included) cancels a pending proposal.
1686
- * Indexed on-chain via the policy's AuthorityProposed.
1420
+ * Appoint the pool's operator (the authority's; zero revokes, refused in `operator` swap mode): admitted by the gates with no policy call and a
1421
+ * runner of the pool; it may be a contract (an executor). Immediate, with no acceptance step, so check the address. Stamps the block.
1687
1422
  */
1688
- export declare function fPoolProposeAuthority(c: LogswapClient, a: {
1689
- poolId: Hex;
1690
- next: Address;
1691
- account: Address;
1692
- policy?: Address;
1693
- }): Promise<`0x${string}`>;
1694
- /**
1695
- * Accept a pending proposal — step two; only the proposed address can. Indexed via the policy's
1696
- * AuthoritySet. On the desk's policy this clears the operator (pending and accepted) and voids the
1697
- * seller's list.
1698
- */
1699
- export declare function fPoolAcceptAuthority(c: LogswapClient, a: {
1423
+ export declare function fPoolAppointOperator(c: LogswapClient, a: {
1700
1424
  poolId: Hex;
1425
+ operator: Address;
1701
1426
  account: Address;
1702
1427
  policy?: Address;
1703
1428
  }): Promise<`0x${string}`>;
1704
1429
  /**
1705
- * Set the desk's swap admission (the authority, on the desk's policy; decision 073): `open`, `listed` (the minters and takers
1706
- * lists) or `executor` (one address, cached on the manager, no policy call per swap). `executor` is required in `executor` mode
1707
- * and must be omitted otherwise. Preserves mint admission. `burn` is never gated.
1430
+ * Set swap admission (the authority's, where the policy offers gates): `open`, `operator` (only the operator swaps — needs one appointed) or
1431
+ * `listed` (the whitelist, {@link fPoolSetListed}; the operator always passes). `burn` is never gated.
1708
1432
  */
1709
1433
  export declare function fPoolSetSwapMode(c: LogswapClient, a: {
1710
1434
  poolId: Hex;
1711
1435
  mode: FPoolSwapMode;
1712
- executor?: Address;
1713
1436
  account: Address;
1714
1437
  policy?: Address;
1715
1438
  }): Promise<`0x${string}`>;
1716
- /** Turn mint admission on or off (the authority, on the desk's policy), preserving the swap mode and its executor. */
1439
+ /** Turn the mint gate on or off (the authority's, where the policy offers gates): on, only the authority and the operator mint. */
1717
1440
  export declare function fPoolSetMintGate(c: LogswapClient, a: {
1718
1441
  poolId: Hex;
1719
1442
  gated: boolean;
@@ -1721,32 +1444,18 @@ export declare function fPoolSetMintGate(c: LogswapClient, a: {
1721
1444
  policy?: Address;
1722
1445
  }): Promise<`0x${string}`>;
1723
1446
  /**
1724
- * Add to or remove from the pool's MINTERS — who may mint, and swap (a zap in is both under one
1725
- * lock) — in one call (the authority, on the desk's policy). The list is keyed by
1726
- * the authority that granted it: a handover starts the buyer with an empty one. Stamps the
1727
- * block: no swap lands in it (047).
1447
+ * Add to or remove from the pool's swap WHITELIST in one call (the authority's, where the policy offers gates; consulted in `listed` mode).
1448
+ * The one list: the free-form minter and taker lists are gone. Stamps the block: no swap lands in it (047).
1728
1449
  */
1729
- export declare function fPoolSetMinters(c: LogswapClient, a: {
1730
- poolId: Hex;
1731
- who: readonly Address[];
1732
- allowed: boolean;
1733
- account: Address;
1734
- policy?: Address;
1735
- }): Promise<`0x${string}`>;
1736
- /** Add to or remove from the pool's TAKERS — who may swap only — in one call (the authority). Stamps the block. */
1737
- export declare function fPoolSetTakers(c: LogswapClient, a: {
1450
+ export declare function fPoolSetListed(c: LogswapClient, a: {
1738
1451
  poolId: Hex;
1739
1452
  who: readonly Address[];
1740
- allowed: boolean;
1453
+ listed: boolean;
1741
1454
  account: Address;
1742
1455
  policy?: Address;
1743
1456
  }): Promise<`0x${string}`>;
1744
- /** On the pool's minters under its current authority: may mint, and swap. */
1745
- export declare function fPoolIsMinter(c: LogswapClient, poolId: Hex, who: Address, policy?: Address): Promise<boolean>;
1746
- /** On the pool's takers under its current authority: may swap only. */
1747
- export declare function fPoolIsTaker(c: LogswapClient, poolId: Hex, who: Address, policy?: Address): Promise<boolean>;
1748
- /** May swap: a minter or a taker (consulted only while the swap gate is on). */
1749
- export declare function fPoolIsAllowed(c: LogswapClient, poolId: Hex, who: Address, policy?: Address): Promise<boolean>;
1457
+ /** On the pool's swap whitelist now (the sponsored policy's `listed`). */
1458
+ export declare function fPoolIsListed(c: LogswapClient, poolId: Hex, who: Address, policy?: Address): Promise<boolean>;
1750
1459
  /** Label the pool — the authority's own words on the pool's POLICY, mutable, never identity. At most 31 bytes of UTF-8. */
1751
1460
  export declare function fPoolSetName(c: LogswapClient, a: {
1752
1461
  poolId: Hex;
@@ -1770,17 +1479,6 @@ export declare function fPoolSponsorName(c: LogswapClient, who: Address): Promis
1770
1479
  export declare function fPoolRegistryOf(c: LogswapClient): Promise<Address>;
1771
1480
  /** Who may run the pool (decision 073): the authority always, and the optional delegate. */
1772
1481
  export declare function fPoolRunners(s: Pick<FPoolRoles, "authority" | "operator">): Address[];
1773
- /**
1774
- * Grant, replace or revoke the pool operator (the authority, on the desk's policy; decision 073): one optional delegate who may
1775
- * `harvest`, `retire`, `regenerate` and `setLegs` besides the authority. Immediate, with no acceptance step, so check the
1776
- * address; the zero address revokes. A handover or a policy move clears it.
1777
- */
1778
- export declare function fPoolSetPoolOperator(c: LogswapClient, a: {
1779
- poolId: Hex;
1780
- operator: Address;
1781
- account: Address;
1782
- policy?: Address;
1783
- }): Promise<`0x${string}`>;
1784
1482
  /**
1785
1483
  * Move shares (ERC-6909 `transfer`) — to another holder, or to `0xdead` to lock them for good.
1786
1484
  * Burning to the dead address is a sponsor's way to make its liquidity permanent: the shares can
@@ -1807,7 +1505,7 @@ export interface DiscoveredFPool {
1807
1505
  kind: FPoolKind;
1808
1506
  /** The pool's policy AT BIRTH — the contract the key names. The LIVE one is {@link getFPool}'s `policy`: the registry's owner may have moved the pool (046, `PolicyMigrated`). */
1809
1507
  policy: Address;
1810
- /** Who was born holding the pool (immutable). The LIVE authority is the policy's — {@link getFPoolRoles}. */
1508
+ /** Who was born holding the pool: the key's creator, its authority for life (098) unless the LOG orphans it ({@link getFPoolRoles}). */
1811
1509
  creator: Address;
1812
1510
  /** The block the pool was initialized in — its age, for annualising realized income. */
1813
1511
  block: bigint;
@@ -1840,7 +1538,7 @@ export interface FPoolControlled {
1840
1538
  pool: DiscoveredFPool;
1841
1539
  roles: FPoolRoles;
1842
1540
  state: FPoolState;
1843
- /** The policy's numbers for this pool's kind — a pad's gen (its rung) and threshold, a POL's floors, the desk's list flags. */
1541
+ /** The policy's numbers for this pool's kind — a pad's gen (its rung) and threshold, a POL's floors, a sponsored policy's immutables and the pool's gates. */
1844
1542
  rules: FPoolRules;
1845
1543
  }
1846
1544
  /** What a pool's policy says about it, by kind: the terms a buyer reads before entering. */
@@ -1865,13 +1563,25 @@ export type FPoolRules = {
1865
1563
  minQuoteRatio: bigint; /** The income tax the pool's authority pays on its own new income dividend (decisions 073, 085), WAD. */
1866
1564
  incomeTaxRate: bigint;
1867
1565
  } | {
1868
- kind: "public";
1869
- } | {
1870
- kind: "private";
1566
+ kind: "sponsor";
1567
+ /** The sponsor (`sponsor()`): the account allowed to create under the policy (the LOG's own instances: the LOG Authority of the day). */
1568
+ sponsor: Address;
1569
+ /** `salt` must be zero and the book uncapped (`NotCanonical`): the LOG's open instance. */
1570
+ canonical: boolean;
1571
+ /** The authority may gate swaps and mints (false on the open instance: a public pool can never be gated). */
1572
+ gatesAvailable: boolean;
1573
+ /** The pool is born with `GATE_SWAP` and its creator as operator. */
1574
+ bornGated: boolean;
1575
+ /** The swap-fee tiers a pool may be born with, a mask over the family's table (0: any fee in the manager's domain). */
1576
+ swapTiers: bigint;
1577
+ /** The mint-fee tiers, the same (0: any). */
1578
+ mintTiers: bigint;
1579
+ /** The pool's own state: the mint gate, the swap mode and the operator. */
1871
1580
  gateMint: boolean;
1872
1581
  swapMode: FPoolSwapMode;
1873
- swapExecutor: Address;
1874
1582
  operator: Address;
1583
+ } | {
1584
+ kind: "orphan";
1875
1585
  };
1876
1586
  /** The LOG Authority's range on a pad's creator choice (`PadPolicy`, decisions 056, 067), WAD fractions of the income released. */
1877
1587
  export interface PadRanges {
@@ -1899,9 +1609,9 @@ export declare function padSplitOfSalt(salt: Hex): {
1899
1609
  /** The policy's terms for one pool, by its kind. */
1900
1610
  export declare function getFPoolRules(c: LogswapClient, s: Pick<FPoolState, "poolId" | "policy" | "kind" | "gen">, roles?: FPoolRoles): Promise<FPoolRules>;
1901
1611
  /**
1902
- * Every F pool `who` is the AUTHORITY of, across the four policies — the policy page's list. Pools
1903
- * `who` created and handed over are not here (the buyer's page shows them); pools handed TO
1904
- * `who` are. `pools` may be passed (from the indexer, say) to skip the log scan.
1612
+ * Every F pool `who` is the AUTHORITY of, across the policies — the policy page's list. The authority is `key.creator` for
1613
+ * life (decision 098), so these are the pools `who` created, minus any the LOG orphaned. `pools` may be passed (from the
1614
+ * indexer, say) to skip the log scan.
1905
1615
  */
1906
1616
  export declare function fPoolsControlledBy(c: LogswapClient, who: Address, opts?: {
1907
1617
  pools?: DiscoveredFPool[];
@@ -1933,7 +1643,7 @@ export interface FPolicyTerms {
1933
1643
  protocolCut: bigint;
1934
1644
  carried: Address;
1935
1645
  }
1936
- /** Every F pool's raw state in one lens call (the manager's `Pool` struct: quote, swapFee, policy, seeded, gen, n, restructureTime, asks, lnCapOverSeed, Q, realizedVariance, L, shares, refLogFloor). */
1646
+ /** Every F pool's raw state in one lens call (the manager's `Pool` struct: quote, swapFee, restructureTime, flags, policy, seeded, gen, n, lnCapOverSeed, Q, realizedVariance, L, shares, refLogFloor, operator, mintFee). */
1937
1647
  export declare function getFPoolsRaw(c: LogswapClient, poolIds: Hex[]): Promise<readonly unknown[]>;
1938
1648
  /** Share value from the lens — (L + Q)/shares, WAD per share — the same figure as `fPoolShareValue`, from one source. */
1939
1649
  export declare function shareValueOnChain(c: LogswapClient, poolId: Hex): Promise<bigint>;