@logswap/sdk 0.5.42 → 0.5.44

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/admin.d.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  /**
2
- * admin — the protocol's (feeCollector's) writes: the fee rates, the harvest-fee exemption, and
3
- * the two-step collector handover, on both managers. Plain writes to the managers; no router.
2
+ * admin — the protocol's (feeCollector's) writes: the protocol's cuts, the harvest-cut exemption,
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
6
  */
5
7
  import type { Address, Hash, Hex } from "viem";
6
8
  import type { LogswapClient } from "./client.js";
7
9
  export declare function setProtocolFeeCut(c: LogswapClient, cutWad: bigint): Promise<Hash>;
8
- export declare function setFeeParams(c: LogswapClient, mintFeeProtocolCutWad: bigint, harvestFeeWad: bigint): Promise<Hash>;
9
- export declare function setHarvestFeeExempt(c: LogswapClient, poolId: Hex, exempt: boolean): Promise<Hash>;
10
+ export declare function setFeeParams(c: LogswapClient, mintFeeProtocolCutWad: bigint, harvestProtocolCutWad: bigint): Promise<Hash>;
11
+ /** Waive the protocol's cut of harvested income for one pool (`HARVEST_PROTOCOL_CUT`; F version 13 — `setHarvestFeeExempt` before). */
12
+ export declare function setHarvestCutExempt(c: LogswapClient, poolId: Hex, exempt: boolean): Promise<Hash>;
10
13
  export declare function proposeCollector(c: LogswapClient, side: "C" | "F", next: Address): Promise<Hash>;
11
14
  export declare function acceptCollector(c: LogswapClient, side: "C" | "F"): Promise<Hash>;
package/dist/admin.js CHANGED
@@ -1,6 +1,8 @@
1
1
  /**
2
- * admin — the protocol's (feeCollector's) writes: the fee rates, the harvest-fee exemption, and
3
- * the two-step collector handover, on both managers. Plain writes to the managers; no router.
2
+ * admin — the protocol's (feeCollector's) writes: the protocol's cuts, the harvest-cut exemption,
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
6
  */
5
7
  import { cPoolManagerAbi, fPoolManagerAbi } from "./generated.js";
6
8
  function wallet(c) {
@@ -11,11 +13,12 @@ function wallet(c) {
11
13
  export async function setProtocolFeeCut(c, cutWad) {
12
14
  return wallet(c).writeContract({ address: c.addresses.cPoolManager, abi: cPoolManagerAbi, functionName: "setProtocolFeeCut", args: [cutWad], chain: c.wallet.chain, account: c.wallet.account });
13
15
  }
14
- export async function setFeeParams(c, mintFeeProtocolCutWad, harvestFeeWad) {
15
- return wallet(c).writeContract({ address: c.addresses.fPoolManager, abi: fPoolManagerAbi, functionName: "setFeeParams", args: [mintFeeProtocolCutWad, harvestFeeWad], chain: c.wallet.chain, account: c.wallet.account });
16
+ export async function setFeeParams(c, mintFeeProtocolCutWad, harvestProtocolCutWad) {
17
+ return wallet(c).writeContract({ address: c.addresses.fPoolManager, abi: fPoolManagerAbi, functionName: "setFeeParams", args: [mintFeeProtocolCutWad, harvestProtocolCutWad], chain: c.wallet.chain, account: c.wallet.account });
16
18
  }
17
- export async function setHarvestFeeExempt(c, poolId, exempt) {
18
- return wallet(c).writeContract({ address: c.addresses.fPoolManager, abi: fPoolManagerAbi, functionName: "setHarvestFeeExempt", args: [poolId, exempt], chain: c.wallet.chain, account: c.wallet.account });
19
+ /** Waive the protocol's cut of harvested income for one pool (`HARVEST_PROTOCOL_CUT`; F version 13 — `setHarvestFeeExempt` before). */
20
+ export async function setHarvestCutExempt(c, poolId, exempt) {
21
+ return wallet(c).writeContract({ address: c.addresses.fPoolManager, abi: fPoolManagerAbi, functionName: "setHarvestCutExempt", args: [poolId, exempt], chain: c.wallet.chain, account: c.wallet.account });
19
22
  }
20
23
  export async function proposeCollector(c, side, next) {
21
24
  const address = side === "C" ? c.addresses.cPoolManager : c.addresses.fPoolManager;
package/dist/client.d.ts CHANGED
@@ -64,5 +64,5 @@ export declare const EXPECTED_VERSION = 3n;
64
64
  * passes it; when one lands, raise this constant in the same change, which is the discipline
65
65
  * `EXPECTED_VERSION` enforces mechanically and this one asks for.
66
66
  */
67
- export declare const EXPECTED_F_VERSION = 11n;
67
+ export declare const EXPECTED_F_VERSION = 13n;
68
68
  export declare function assertVersion(c: LogswapClient, expected?: bigint): Promise<void>;
package/dist/client.js CHANGED
@@ -57,7 +57,16 @@ export const EXPECTED_VERSION = 3n;
57
57
  // `Pool.pendingOperator`); `setLegL`/`admitLeg` are gone, `setLegs` edits the next generation's
58
58
  // table while unseeded; `fPoolRelaunch` takes `legs`.
59
59
  // `getPool` decodes one field fewer, so a 9 deployment's struct no longer matches this SDK.
60
- export const EXPECTED_F_VERSION = 11n;
60
+ // 12 (2026-09-17): one contract (decisions 039) — the sponsor facet is folded back into the
61
+ // manager; `sponsor()` and the fallback are gone, every entry, error and event unchanged, so
62
+ // `fPoolManagerAbi` is the manager's own ABI and no longer a union. Layout unchanged.
63
+ // 13 (2026-09-18): one vocabulary (decisions 040) — `HARVEST_FEE` is `HARVEST_PROTOCOL_CUT` (a
64
+ // cut of harvested income, not a fee on the harvest) and the exemption is `harvestCutExempt` /
65
+ // `setHarvestCutExempt`; `acceptAuthority` clears the operator, pending and accepted (a mandate
66
+ // is voided by the handover of the role that granted it); `setLegs` needs a generation to have
67
+ // lived (`gen > 0`); `initialize` refuses a codeless base and `mint` refuses `to = address(0)`
68
+ // on both managers. Layout unchanged.
69
+ export const EXPECTED_F_VERSION = 13n;
61
70
  export async function assertVersion(c, expected = EXPECTED_VERSION) {
62
71
  const { cPoolManagerAbi } = await import("./generated.js");
63
72
  const got = await c.public.readContract({