@logswap/sdk 0.5.44 → 0.5.45

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
@@ -85,9 +85,9 @@ runs once and explicitly rather than being chained into both.
85
85
  - **The SDK hides the manager/router/lens split.** Which contract hosts which action is currently
86
86
  decided by EIP-170 headroom, not by design — so a future re-homing must be an SDK patch, not a
87
87
  breaking change for consumers.
88
- - **Zero is not the default.** `phiMin` and `alpha` of `0n` resolve to their defaults at *read* time,
89
- so a key carrying `0n` and one carrying the resolved value are **different markets with different
90
- ids**. Always address a market by the key it was initialized with.
88
+ - **Zero is not the default.** A `phi` of `0n` resolves to `DEFAULT_FEE` at *read* time, so a key
89
+ carrying `0n` and one carrying the resolved value are **different markets with different ids**.
90
+ Always address a market by the key it was initialized with.
91
91
  - **Split every ERC-6909 `Transfer` on bit 255.** Clear means a token claim, not a position; an
92
92
  indexer that ignores this reports phantom LP positions for market makers parking inventory.
93
93
 
package/dist/admin.d.ts CHANGED
@@ -1,12 +1,15 @@
1
1
  /**
2
2
  * admin — the protocol's (feeCollector's) writes: the protocol's cuts, the harvest-cut exemption,
3
3
  * and the two-step collector handover, on both managers. Plain writes to the managers; no router.
4
- * One vocabulary (decisions 040): the C manager's `setProtocolFeeCut` / `PROTOCOL_FEE_CUT` are the
5
- * same words as F's `setFeeParams` / `MINT_FEE_PROTOCOL_CUT` until C version 4 renames them.
4
+ * One vocabulary (decisions 040): both managers call the protocol's cut of the mint fee
5
+ * `MINT_FEE_PROTOCOL_CUT` and set it through `setFeeParams` — one cut on C (since version 4,
6
+ * decisions 042; `setProtocolFeeCut` / `PROTOCOL_FEE_CUT` before), two on F.
6
7
  */
7
8
  import type { Address, Hash, Hex } from "viem";
8
9
  import type { LogswapClient } from "./client.js";
9
- export declare function setProtocolFeeCut(c: LogswapClient, cutWad: bigint): Promise<Hash>;
10
+ /** The C manager's `setFeeParams(mintFeeProtocolCut)` — one cut. */
11
+ export declare function setFeeParamsC(c: LogswapClient, mintFeeProtocolCutWad: bigint): Promise<Hash>;
12
+ /** The F manager's `setFeeParams(mintFeeProtocolCut, harvestProtocolCut)` — two cuts. */
10
13
  export declare function setFeeParams(c: LogswapClient, mintFeeProtocolCutWad: bigint, harvestProtocolCutWad: bigint): Promise<Hash>;
11
14
  /** Waive the protocol's cut of harvested income for one pool (`HARVEST_PROTOCOL_CUT`; F version 13 — `setHarvestFeeExempt` before). */
12
15
  export declare function setHarvestCutExempt(c: LogswapClient, poolId: Hex, exempt: boolean): Promise<Hash>;
package/dist/admin.js CHANGED
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * admin — the protocol's (feeCollector's) writes: the protocol's cuts, the harvest-cut exemption,
3
3
  * and the two-step collector handover, on both managers. Plain writes to the managers; no router.
4
- * One vocabulary (decisions 040): the C manager's `setProtocolFeeCut` / `PROTOCOL_FEE_CUT` are the
5
- * same words as F's `setFeeParams` / `MINT_FEE_PROTOCOL_CUT` until C version 4 renames them.
4
+ * One vocabulary (decisions 040): both managers call the protocol's cut of the mint fee
5
+ * `MINT_FEE_PROTOCOL_CUT` and set it through `setFeeParams` — one cut on C (since version 4,
6
+ * decisions 042; `setProtocolFeeCut` / `PROTOCOL_FEE_CUT` before), two on F.
6
7
  */
7
8
  import { cPoolManagerAbi, fPoolManagerAbi } from "./generated.js";
8
9
  function wallet(c) {
@@ -10,9 +11,11 @@ function wallet(c) {
10
11
  throw new Error("a wallet client is required");
11
12
  return c.wallet;
12
13
  }
13
- export async function setProtocolFeeCut(c, cutWad) {
14
- return wallet(c).writeContract({ address: c.addresses.cPoolManager, abi: cPoolManagerAbi, functionName: "setProtocolFeeCut", args: [cutWad], chain: c.wallet.chain, account: c.wallet.account });
14
+ /** The C manager's `setFeeParams(mintFeeProtocolCut)` — one cut. */
15
+ export async function setFeeParamsC(c, mintFeeProtocolCutWad) {
16
+ return wallet(c).writeContract({ address: c.addresses.cPoolManager, abi: cPoolManagerAbi, functionName: "setFeeParams", args: [mintFeeProtocolCutWad], chain: c.wallet.chain, account: c.wallet.account });
15
17
  }
18
+ /** The F manager's `setFeeParams(mintFeeProtocolCut, harvestProtocolCut)` — two cuts. */
16
19
  export async function setFeeParams(c, mintFeeProtocolCutWad, harvestProtocolCutWad) {
17
20
  return wallet(c).writeContract({ address: c.addresses.fPoolManager, abi: fPoolManagerAbi, functionName: "setFeeParams", args: [mintFeeProtocolCutWad, harvestProtocolCutWad], chain: c.wallet.chain, account: c.wallet.account });
18
21
  }
package/dist/client.d.ts CHANGED
@@ -51,8 +51,13 @@ export declare function createLogswapClient(args: {
51
51
  * **3** since 2026-09-03 (contracts `d8406fb`): `burnById` and `update` take an `owner`, `update`
52
52
  * mints to `to`, `positions()` returns `aps` as uint128 — and a returned quote flow now carries the
53
53
  * swept fees (decisions 018), which is why `exit`'s settle-to-one-asset math changed with it.
54
+ *
55
+ * **4** since 2026-09-18 (decisions 042 + 040): `PoolKey` is `(base, quote, tickSpacing, phi)` —
56
+ * the variance kernel and its two key fields are gone, so every pool id changed; `phiEff` is
57
+ * `phiOf`; `getPool` lost `sigma2Ema`; `Initialize` lost two fields; the cut is
58
+ * `MINT_FEE_PROTOCOL_CUT` / `setFeeParams`.
54
59
  */
55
- export declare const EXPECTED_VERSION = 3n;
60
+ export declare const EXPECTED_VERSION = 4n;
56
61
  /**
57
62
  * The F manager's own tag (contracts 25a7bcf: 5 — the key's salt, pool names, the sponsor registry;
58
63
  * 4 was the income-only harvest cut).
package/dist/client.js CHANGED
@@ -27,8 +27,13 @@ export function createLogswapClient(args) {
27
27
  * **3** since 2026-09-03 (contracts `d8406fb`): `burnById` and `update` take an `owner`, `update`
28
28
  * mints to `to`, `positions()` returns `aps` as uint128 — and a returned quote flow now carries the
29
29
  * swept fees (decisions 018), which is why `exit`'s settle-to-one-asset math changed with it.
30
+ *
31
+ * **4** since 2026-09-18 (decisions 042 + 040): `PoolKey` is `(base, quote, tickSpacing, phi)` —
32
+ * the variance kernel and its two key fields are gone, so every pool id changed; `phiEff` is
33
+ * `phiOf`; `getPool` lost `sigma2Ema`; `Initialize` lost two fields; the cut is
34
+ * `MINT_FEE_PROTOCOL_CUT` / `setFeeParams`.
30
35
  */
31
- export const EXPECTED_VERSION = 3n;
36
+ export const EXPECTED_VERSION = 4n;
32
37
  /**
33
38
  * The F manager's own tag (contracts 25a7bcf: 5 — the key's salt, pool names, the sponsor registry;
34
39
  * 4 was the income-only harvest cut).