@logswap/sdk 0.5.76 → 0.5.77

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
@@ -66,8 +66,17 @@ Since logswap-contract #60 (decisions 064–065) creation is curated at launch,
66
66
  - **C reads**: `getPool` reads the lens's `getPools`; `getPositionClass` reads the class through
67
67
  `extsload` at `CPoolState`'s slot (the manager's typed views are gone).
68
68
  - **Creators are curated on every kind** at launch (onboarding under a service agreement); the
69
- collector's helpers: `policySetCreatorListed`, `policySetMintFeeListed`, `gateSetPairListed`,
69
+ LOG Authority's helpers: `policySetCreatorListed`, `policySetMintFeeListed`, `gateSetPairListed`,
70
70
  `gateSetSpacingListed`, `gateSetForwarderTrusted`, `setCGate`.
71
+ - **Two roles (decision 066, C 8 / F 27).** `logAuthority()` reads the LOG Authority (the
72
+ registry's `logAuthority`; `proposeLogAuthority` / `acceptLogAuthority`), which administers the
73
+ registry, both managers and every policy. `logTreasury(side)` reads a manager's treasury, which
74
+ only receives; `proposeTreasury` is the authority's, `acceptTreasury` the incoming treasury's own
75
+ call. `collectCProtocolFees(key)` may be sent by anyone and pays the treasury. The C swap-fee tax is each
76
+ market's from birth (`getPool(key).swapFeeTax`, `cMarketSwapFeeTax`); `setCSwapFeeTax` sets the
77
+ gate's level for markets born after it; the C gate is fixed (`setCGate` throws). `registryOwner`,
78
+ `registryProposeOwner` / `registryAcceptOwner` and `proposeCollector` / `acceptCollector` remain
79
+ as deprecated aliases.
71
80
 
72
81
  ## History from the indexer (indexer phase 1)
73
82
 
@@ -129,6 +138,55 @@ What stays a live read: a C position's value and every unclaimed fee or dividend
129
138
  now), `fPoolLienOf` (locker, amount, and the dividend the lien holds). The dividend the locked
130
139
  amount earns is held by the lien: a repaid loan gets it back, a seizer takes it.
131
140
 
141
+ ## Chains and deployments (F version 29)
142
+
143
+ log(swap) releases on Ethereum (1), Base (8453), Arbitrum One (42161) and Robinhood Chain (4663),
144
+ with Robinhood Chain Testnet (46630) for testing. The contracts are deployed through CreateX
145
+ (CREATE3, contracts decision 069) at the SAME addresses on every chain, so an address names a
146
+ contract only together with a chain id.
147
+
148
+ - **`LOGSWAP_CHAINS`** (`src/chains.ts`): one entry per chain — the viem `chain`, `network` (the
149
+ artifact's), `nativeCurrency`, `explorer`, `publicRpc` (rate-limited), `devnet`, `testnet`, the
150
+ verified `quotes` (symbol, address, decimals) and `padQuote`, and `maxLogRange`. Also 31337 (local
151
+ anvil) and 31339 (the devnet). `logswapChain(id)`, `quoteOf(id, "USDC")`, `RELEASE_CHAIN_IDS`.
152
+ - **`LogswapDeployment`** is the contracts' `deployments/<chainId>.json` (`DeployChain.s.sol`; the
153
+ local `DeployLocal` artifact has the same fields plus its devnet extras).
154
+ `deploymentFromArtifact(json, { chainId })` validates it and refuses an artifact for another chain;
155
+ `LOGSWAP_DEPLOYMENTS` / `deploymentFor(id)` hold the published ones (none yet: nothing is deployed
156
+ on the release chains).
157
+ - **`createLogswapClient({ public, deployment, indexerUrl })`** takes the addresses from the
158
+ deployment and keeps its `chainId` and `deployBlock`; `addresses` still works on its own.
159
+
160
+ ```ts
161
+ import { createPublicClient, http } from "viem";
162
+ import { createLogswapClient, deploymentFromArtifact, logswapChain } from "@logswap/sdk";
163
+
164
+ const chain = logswapChain(8453)!;
165
+ const c = createLogswapClient({
166
+ public: createPublicClient({ chain: chain.chain, transport: http(process.env.BASE_RPC_URL) }),
167
+ deployment: deploymentFromArtifact(artifactJson, { chainId: 8453 }),
168
+ indexerUrl: "https://…/graphql", // this chain's indexer
169
+ });
170
+ ```
171
+
172
+ What changes for readers:
173
+
174
+ - **Log scans start at `deployBlock`** where they started at block 0 (`discoverMarkets`,
175
+ `discoverFPools`, `fPoolKeyOfPool`, `holdingsOf`, `fPoolShareHolders`, `getEventLogs`,
176
+ `getEventsLogs`); an explicit `fromBlock` still wins.
177
+ - **The chain path is chunked**: `eth_getLogs` over spans of `maxLogRange` blocks (2 000 on the
178
+ release chains, per-client override), at most four in flight (`getLogsChunked`). Public RPCs refuse
179
+ an unbounded range.
180
+ - **The indexer is per chain**: `indexerUrl` on the client is the default `indexer` of every history
181
+ read and of `discoverMarketsBest`. Its rows are filtered by contract address, which is the same on
182
+ every chain, so one URL must serve one chain.
183
+ - **Caches key on the chain id**: the policy-kind cache asks the node for the chain id when the
184
+ client has none; `RESETTABLE_CHAINS` is every registry chain flagged `devnet` (plus 1337 and 31338),
185
+ extended with `addResettableChain`.
186
+ - **F version 29** (decision 068): `FPoolState.restructureTime` (unix seconds; was
187
+ `restructureBlock`), `registrySunset(c, policy, untilTime)` and `RegistryEntry.until` are
188
+ timestamps. `EXPECTED_F_VERSION` is 29.
189
+
132
190
  ## Conventions
133
191
 
134
192
  - **The SDK hides the manager/router/lens split.** Which contract hosts which action is currently
package/dist/admin.d.ts CHANGED
@@ -1,28 +1,34 @@
1
1
  /**
2
2
  * admin — the protocol's writes: the C swap-fee tax (decisions 060), the policies a pool may be
3
3
  * born with (the registry's), the policies' own numbers (the quote list, the fee tiers, a pad's
4
- * schedule, a POL's rules), and the two-step collector handover. Plain writes to the managers, the
4
+ * schedule, a POL's rules), and the two roles' two-step handovers (decision 066): the LOG Authority
5
+ * (the registry's `authority`) administers everything here; the LOG Treasury (`treasury` on each
6
+ * manager) only receives, and is replaced by the authority's `proposeTreasury`. Plain writes to the managers, the
5
7
  * registry and the policies; no router.
6
8
  *
7
9
  * The mint fee has no cut to set since C version 6 / F version 24 (decisions 058): the whole fee
8
10
  * is the protocol's on both managers. A harvest has no cut (056); a pad's protocol share of the pot
9
11
  * is the policy's (`PadPolicy.setSchedule`), capped by the manager at `POT_CUT_MAX`.
10
12
  */
11
- import type { Address, Hash } from "viem";
13
+ import type { Address, Hash, Hex } from "viem";
12
14
  import type { PoolKey } from "./keys.js";
13
15
  import type { LogswapClient } from "./client.js";
14
16
  import { type FPoolKey, type FPoolKind } from "./fpool.js";
15
17
  /**
16
- * The C manager's swap-fee tax (decisions 060): the protocol's share of every swap fee a C position
17
- * is paid (claims and the burn's auto-claim), WAD. 0 at deployment.
18
+ * The C swap-fee tax (decisions 060, 066): the protocol's share of every swap fee a C position is
19
+ * paid (claims and the burn's auto-claim), WAD. `tax` is the level the gate (`PublicPolicy`) gives a
20
+ * market born NOW; each market keeps the level of its birth for life — read it with
21
+ * {@link cMarketSwapFeeTax} or `getPool(key).swapFeeTax`. `max` is the manager's bound.
18
22
  */
19
23
  export declare function cSwapFeeTax(c: LogswapClient): Promise<{
20
24
  tax: bigint;
21
25
  max: bigint;
22
26
  }>;
27
+ /** One C market's swap-fee tax, recorded at its birth (066). */
28
+ export declare function cMarketSwapFeeTax(c: LogswapClient, key: PoolKey): Promise<bigint>;
23
29
  /**
24
- * `CPoolManager.setSwapFeeTax`: the collector's, at most `SWAP_FEE_TAX_MAX` (25%). Read at payout,
25
- * so a raise reaches fee income already earned and not yet claimed (decisions 060).
30
+ * `PublicPolicy.setSwapFeeTax`: the level a C market born after it is given (066), at most
31
+ * `SWAP_FEE_TAX_MAX` (25%). The LOG Authority's. A live market keeps the level of its birth.
26
32
  */
27
33
  export declare function setCSwapFeeTax(c: LogswapClient, taxWad: bigint): Promise<Hash>;
28
34
  /**
@@ -39,7 +45,7 @@ export interface RegistryEntry {
39
45
  /** The policy's own `kind()` tag — what a pool born under it is. */
40
46
  kind: FPoolKind;
41
47
  name: string;
42
- /** The block it closes to new pools from; 0 = open. */
48
+ /** The time (unix seconds) it closes to new pools from; 0 = open. A block number before F version 29. */
43
49
  until: bigint;
44
50
  /** Approved now: listed and not yet sunset. */
45
51
  approved: boolean;
@@ -50,27 +56,46 @@ export interface RegistryEntry {
50
56
  * with no registry.
51
57
  */
52
58
  export declare function registryPolicies(c: LogswapClient, kind?: FPoolKind): Promise<RegistryEntry[]>;
53
- /** The registry's owner — the LOG authority — and the proposed next one. */
59
+ /**
60
+ * The LOG Authority (decision 066) — the registry's `logAuthority`, which administers the registry, both
61
+ * managers and every protocol policy — and the proposed next one. Zero with no registry: nothing on
62
+ * the deployment can be administered.
63
+ */
64
+ export declare function logAuthority(c: LogswapClient): Promise<{
65
+ authority: Address;
66
+ pending: Address;
67
+ }>;
68
+ /** @deprecated F version 27 renamed the registry's `owner` to `authority`: use {@link logAuthority}. */
54
69
  export declare function registryOwner(c: LogswapClient): Promise<{
55
70
  owner: Address;
56
71
  pending: Address;
57
72
  }>;
58
- /** `PolicyRegistry.approve`: list `policy` under `name` (at most 31 bytes). Again renames it and clears its sunset. The owner's. */
73
+ /** `PolicyRegistry.approve`: list `policy` under `name` (at most 31 bytes). Again renames it and clears its sunset. The LOG Authority's. */
59
74
  export declare function registryApprove(c: LogswapClient, policy: Address, name: string): Promise<Hash>;
60
- /** `PolicyRegistry.sunset`: close `policy` to new pools from `untilBlock` on; 0 reopens. The owner's. */
61
- export declare function registrySunset(c: LogswapClient, policy: Address, untilBlock: bigint): Promise<Hash>;
62
- /** `PolicyRegistry.revoke`: remove `policy` from the list at once. Live pools are untouched. The owner's. */
75
+ /** `PolicyRegistry.sunset`: close `policy` to new pools from `untilTime` (unix seconds, F version 29) on; 0 reopens. The LOG Authority's. */
76
+ export declare function registrySunset(c: LogswapClient, policy: Address, untilTime: bigint): Promise<Hash>;
77
+ /** `PolicyRegistry.revoke`: remove `policy` from the list at once. Live pools are untouched. The LOG Authority's. */
63
78
  export declare function registryRevoke(c: LogswapClient, policy: Address): Promise<Hash>;
64
- /** The registry owner's two-step handover. */
65
- export declare function registryProposeOwner(c: LogswapClient, next: Address): Promise<Hash>;
66
- export declare function registryAcceptOwner(c: LogswapClient): Promise<Hash>;
79
+ /**
80
+ * The LOG Authority's two-step handover (066): the authority proposes, the proposed address accepts
81
+ * by its own call (a Safe or a timelock sends `acceptLogAuthority` itself). One handover moves the
82
+ * administration of the registry, both managers and every policy; the treasury is a separate role.
83
+ */
84
+ export declare function proposeLogAuthority(c: LogswapClient, next: Address): Promise<Hash>;
85
+ export declare function acceptLogAuthority(c: LogswapClient): Promise<Hash>;
86
+ /** @deprecated use {@link proposeLogAuthority}. */
87
+ export declare const registryProposeOwner: typeof proposeLogAuthority;
88
+ /** @deprecated use {@link acceptLogAuthority}. */
89
+ export declare const registryAcceptOwner: typeof acceptLogAuthority;
67
90
  /**
68
91
  * Approve or revoke, the F version 15–16 shape kept for callers: `approved` true is
69
92
  * {@link registryApprove} under the policy's own tag as its name, false is {@link registryRevoke}.
70
93
  */
71
94
  export declare function setPolicyApproved(c: LogswapClient, policy: Address, approved: boolean): Promise<Hash>;
72
95
  /**
73
- * Move a pool to another approved policy of the same kind: the registry owner's alone,
96
+ * Move a pool to another approved policy of the same kind: the LOG Authority's alone, a forced move
97
+ * (adoption at regeneration by the pool authority's consent is specified, not built — logswap-docs
98
+ * `specs/governance/policy-adoption.md`),
74
99
  * orchestrated on the registry — `migrate(manager, key, to)` since F version 20 (it took the
75
100
  * pool's id before). The registry checks the key against the manager (`NoPool`), checks the
76
101
  * manager is its own (`WrongManager`), and compares the two policies' tags recorded at approval
@@ -98,28 +123,49 @@ export declare function fPoolMigrate(c: LogswapClient, a: {
98
123
  */
99
124
  export declare function registryKindOf(c: LogswapClient, policy: Address): Promise<FPoolKind | "">;
100
125
  /**
101
- * `PadPolicy.setSchedule` (decisions 056, 057): `T(0)`, the rung's growth, the protocol's share of the pot (≤ `POT_CUT_MAX`,
102
- * recorded into each pad at birth), and the RANGES a creator chooses inside at creation — his cut of the pot and the burn, a
103
- * fraction of the pot spent buying the token and burning it. The burn's top plus the protocol's share is at most the pot,
104
- * and each pad's three shares together are. A change applies to pads born after it. The rung is the pool's generation.
126
+ * `PadPolicy.setSchedule` (decisions 056, 067, 070): the rung's growth, the protocol's share of the pot (≤ `POT_CUT_MAX`,
127
+ * recorded into each pad at birth), and the RANGE a creator chooses his cut of the pot inside at creation (its top ≤ the F
128
+ * manager's `PAYEE_CUT_MAX`). The creator's top plus the protocol's share is at most the pot; the rest deepens the bid — nothing
129
+ * is bought or burnt since F version 28. A change to the split applies to pads born after it; the growth moves every pad at its
130
+ * next rung. The rung is the pool's generation. `T(0)` is per quote since decision 070: {@link padSetThresholdBase}.
131
+ */
132
+ export declare function padSetSchedule(c: LogswapClient, policy: Address, s: PadSchedule): Promise<Hash>;
133
+ /**
134
+ * `PadPolicy.setThresholdBase(quote, base)` (decision 070): `T(0)` for pads quoted in `quote`, in that quote's units. A pad is
135
+ * born (or moved in) only on a quote that has one (`NoThreshold`). It moves every pad in that quote at its next rung. The LOG
136
+ * Authority's.
105
137
  */
106
- export declare function padSetSchedule(c: LogswapClient, policy: Address, s: {
107
- thresholdBase: bigint;
138
+ export declare function padSetThresholdBase(c: LogswapClient, policy: Address, quote: Address, base: bigint): Promise<Hash>;
139
+ /** A pad policy's `T(0)` in one quote (decision 070): `set` false means no pad can be born on that quote. */
140
+ export interface PadThresholdBase {
141
+ quote: Address;
142
+ set: boolean;
143
+ /** In the quote's units; 0 when not set. */
144
+ base: bigint;
145
+ }
146
+ /** `PadPolicy.thresholdSet(quote)` and `thresholdBaseOf(quote)` for each quote asked (decision 070). */
147
+ export declare function padThresholdBases(c: LogswapClient, policy: Address, quotes: readonly Address[]): Promise<PadThresholdBase[]>;
148
+ /** `PadPolicy.thresholdOf(quote, rung)` (decision 070): the pot a pad quoted in `quote` must bank to climb `rung` (0 reads `T(0)`). */
149
+ export declare function padThresholdOf(c: LogswapClient, policy: Address, quote: Address, rung?: bigint | number): Promise<bigint>;
150
+ /** `PadPolicy.threshold(poolId, rung)` (decision 070): the pot pad `poolId` must bank to climb `rung`, in its own quote. */
151
+ export declare function padThreshold(c: LogswapClient, policy: Address, poolId: Hex, rung: bigint | number): Promise<bigint>;
152
+ /** A pad policy's schedule (decision 070: without `T(0)`, which is per quote — {@link padThresholdBases}). WAD numbers. */
153
+ export interface PadSchedule {
108
154
  thresholdGrowth: bigint;
109
155
  protocolShare: bigint;
110
156
  creatorShareMin: bigint;
111
157
  creatorShareMax: bigint;
112
- burnMin: bigint;
113
- burnMax: bigint;
114
- }): Promise<Hash>;
158
+ }
159
+ /** Read {@link PadSchedule} off a pad policy. */
160
+ export declare function padScheduleOf(c: LogswapClient, policy: Address): Promise<PadSchedule>;
115
161
  /** `PolPolicy.setRules`: the reserve a harvest must leave in the bid (`may(Harvest)` refuses less) and what a relaunch's seed must bring, WAD fractions of the pool's L. */
116
162
  export declare function polSetRules(c: LogswapClient, policy: Address, s: {
117
163
  keepQuote: bigint;
118
164
  minQuoteAtSeed: bigint;
119
165
  }): Promise<Hash>;
120
- /** `setQuoteListed` on any protocol policy: a quote a pool of that kind may be born against while it curates quotes. The collector's. */
166
+ /** `setQuoteListed` on any protocol policy: a quote a pool of that kind may be born against while it curates quotes. The LOG Authority's. */
121
167
  export declare function policySetQuoteListed(c: LogswapClient, policy: Address, quote: Address, listed: boolean): Promise<Hash>;
122
- /** `setQuoteCurated` on any protocol policy: on, a birth against an unlisted quote is refused. The collector's. */
168
+ /** `setQuoteCurated` on any protocol policy: on, a birth against an unlisted quote is refused. The LOG Authority's. */
123
169
  export declare function policySetQuoteCurated(c: LogswapClient, policy: Address, curated: boolean): Promise<Hash>;
124
170
  /** Whether `quote` passes `policy`'s birth check now: listed, or the policy does not curate quotes. */
125
171
  export declare function policyQuoteAllowed(c: LogswapClient, policy: Address, quote: Address): Promise<{
@@ -130,10 +176,10 @@ export declare function policyQuoteAllowed(c: LogswapClient, policy: Address, qu
130
176
  /**
131
177
  * `setFeeListed` on any protocol policy (decisions 059): a swap-fee tier a pool of that kind may be
132
178
  * born with while the policy curates fees. Within the family's domain (`FEE_MIN` ≤ fee ≤ `FEE_MAX`).
133
- * The collector's.
179
+ * The LOG Authority's.
134
180
  */
135
181
  export declare function policySetFeeListed(c: LogswapClient, policy: Address, fee: bigint, listed: boolean): Promise<Hash>;
136
- /** `setFeeCurated` on any protocol policy: on, a birth with an unlisted swap fee is refused (`FeeNotListed`). The collector's. */
182
+ /** `setFeeCurated` on any protocol policy: on, a birth with an unlisted swap fee is refused (`FeeNotListed`). The LOG Authority's. */
137
183
  export declare function policySetFeeCurated(c: LogswapClient, policy: Address, curated: boolean): Promise<Hash>;
138
184
  /** Whether `fee` passes `policy`'s birth check now: listed, or the policy does not curate fees (the desk's never does). */
139
185
  export declare function policyFeeAllowed(c: LogswapClient, policy: Address, fee: bigint): Promise<{
@@ -141,7 +187,7 @@ export declare function policyFeeAllowed(c: LogswapClient, policy: Address, fee:
141
187
  listed: boolean;
142
188
  allowed: boolean;
143
189
  }>;
144
- /** `setMintFeeListed` on any protocol policy (065): an entry of its mint-fee menu. The collector's. */
190
+ /** `setMintFeeListed` on any protocol policy (065): an entry of its mint-fee menu. The LOG Authority's. */
145
191
  export declare function policySetMintFeeListed(c: LogswapClient, policy: Address, mintFee: bigint, listed: boolean): Promise<Hash>;
146
192
  /** `setMintFeeCurated` on any protocol policy: on, a birth proposing an unlisted mint fee is refused (`MintFeeNotListed`). */
147
193
  export declare function policySetMintFeeCurated(c: LogswapClient, policy: Address, curated: boolean): Promise<Hash>;
@@ -166,8 +212,11 @@ export declare function gateSetPairCurated(c: LogswapClient, policy: Address, cu
166
212
  export declare function gateSetSpacingListed(c: LogswapClient, policy: Address, tickSpacing: bigint, listed: boolean): Promise<Hash>;
167
213
  /** `PublicPolicy.setForwarderTrusted` (064): a router whose `user()` the gate takes as the creator. */
168
214
  export declare function gateSetForwarderTrusted(c: LogswapClient, policy: Address, forwarder: Address, trusted: boolean): Promise<Hash>;
169
- /** `CPoolManager.setGate` (064): name, change or lift (`address(0)`) the C gate. The C collector's. */
170
- export declare function setCGate(c: LogswapClient, gate: Address): Promise<Hash>;
215
+ /**
216
+ * @deprecated C version 8 fixes the gate at construction (066): there is no `setGate`. Open or close
217
+ * C through the gate's lists (`policySetCreatorCurated`, `gateSetPairCurated`, `gateSetSpacingListed`, …).
218
+ */
219
+ export declare function setCGate(_c: LogswapClient, _gate: Address): Promise<Hash>;
171
220
  /** The C manager's gate (`address(0)`: permissionless, a fee-free market then refused). */
172
221
  export declare function cGate(c: LogswapClient): Promise<Address>;
173
222
  export interface CGateRules {
@@ -196,9 +245,18 @@ export declare function cGateRules(c: LogswapClient, a: {
196
245
  }): Promise<CGateRules>;
197
246
  /**
198
247
  * Every refusal a birth can meet at the gate or a policy (064, 065), for `decodeErrorResult` on a
199
- * failed simulation: the public policy's errors plus the pad's `PadExists` (one pad per base).
248
+ * failed simulation: the public policy's errors plus the pad's `PadExists` (one pad per base) and `NoThreshold` (no `T(0)`
249
+ * in the pad's quote, decision 070).
200
250
  */
201
251
  export declare const gateErrorAbi: readonly ({
252
+ readonly type: "error";
253
+ readonly inputs: readonly [{
254
+ readonly name: "quote";
255
+ readonly internalType: "address";
256
+ readonly type: "address";
257
+ }];
258
+ readonly name: "NoThreshold";
259
+ } | {
202
260
  readonly type: "error";
203
261
  readonly inputs: readonly [{
204
262
  readonly name: "base";
@@ -278,10 +336,6 @@ export declare const gateErrorAbi: readonly ({
278
336
  readonly type: "error";
279
337
  readonly inputs: readonly [];
280
338
  readonly name: "NotCanonical";
281
- } | {
282
- readonly type: "error";
283
- readonly inputs: readonly [];
284
- readonly name: "NotCollector";
285
339
  } | {
286
340
  readonly type: "error";
287
341
  readonly inputs: readonly [{
@@ -290,6 +344,10 @@ export declare const gateErrorAbi: readonly ({
290
344
  readonly type: "address";
291
345
  }];
292
346
  readonly name: "NotListed";
347
+ } | {
348
+ readonly type: "error";
349
+ readonly inputs: readonly [];
350
+ readonly name: "NotLogAuthority";
293
351
  } | {
294
352
  readonly type: "error";
295
353
  readonly inputs: readonly [];
@@ -339,5 +397,24 @@ export declare const gateErrorAbi: readonly ({
339
397
  export declare function publicSetListed(c: LogswapClient, policy: Address, token: Address, listed: boolean): Promise<Hash>;
340
398
  /** `PublicPolicy.setCurated`: whether every public seed is checked against the list. */
341
399
  export declare function publicSetCurated(c: LogswapClient, policy: Address, curated: boolean): Promise<Hash>;
342
- export declare function proposeCollector(c: LogswapClient, side: "C" | "F", next: Address): Promise<Hash>;
343
- export declare function acceptCollector(c: LogswapClient, side: "C" | "F"): Promise<Hash>;
400
+ /** A manager's treasury — where its protocol revenue goes — and the proposed next one. */
401
+ export declare function logTreasury(c: LogswapClient, side: "C" | "F"): Promise<{
402
+ treasury: Address;
403
+ pending: Address;
404
+ }>;
405
+ /**
406
+ * Propose a manager's next treasury: the LOG Authority's call, never the treasury's own, so a
407
+ * treasury that can no longer act is replaced without it. Nothing the old treasury holds moves.
408
+ */
409
+ export declare function proposeTreasury(c: LogswapClient, side: "C" | "F", next: Address): Promise<Hash>;
410
+ /** The proposed treasury takes the role, sending from its own address. */
411
+ export declare function acceptTreasury(c: LogswapClient, side: "C" | "F"): Promise<Hash>;
412
+ /** @deprecated the collector became the treasury (066), proposed by the LOG Authority: use {@link proposeTreasury}. */
413
+ export declare const proposeCollector: typeof proposeTreasury;
414
+ /** @deprecated use {@link acceptTreasury}. */
415
+ export declare const acceptCollector: typeof acceptTreasury;
416
+ /**
417
+ * `CPoolManager.collectProtocolFees(key)`: pay one market's `protocolOwed` (mint fees and swap-fee
418
+ * tax) to the treasury. Anyone may send it (066); the destination is fixed.
419
+ */
420
+ export declare function collectCProtocolFees(c: LogswapClient, key: PoolKey): Promise<Hash>;