@logswap/sdk 0.5.37 → 0.5.39

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/generated.js CHANGED
@@ -1161,6 +1161,20 @@ export const fPoolManagerAbi = [
1161
1161
  outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
1162
1162
  stateMutability: 'view',
1163
1163
  },
1164
+ {
1165
+ type: 'function',
1166
+ inputs: [
1167
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1168
+ { name: 'gen', internalType: 'uint256', type: 'uint256' },
1169
+ ],
1170
+ name: 'bundleOf',
1171
+ outputs: [
1172
+ { name: 'supply', internalType: 'uint256', type: 'uint256' },
1173
+ { name: 'quote', internalType: 'uint256', type: 'uint256' },
1174
+ { name: 'base', internalType: 'uint256[]', type: 'uint256[]' },
1175
+ ],
1176
+ stateMutability: 'view',
1177
+ },
1164
1178
  {
1165
1179
  type: 'function',
1166
1180
  inputs: [
@@ -1225,6 +1239,7 @@ export const fPoolManagerAbi = [
1225
1239
  type: 'function',
1226
1240
  inputs: [
1227
1241
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1242
+ { name: 'gen', internalType: 'uint256', type: 'uint256' },
1228
1243
  { name: 'holder', internalType: 'address', type: 'address' },
1229
1244
  ],
1230
1245
  name: 'dividendOf',
@@ -1274,7 +1289,7 @@ export const fPoolManagerAbi = [
1274
1289
  { name: 'authority', internalType: 'address', type: 'address' },
1275
1290
  { name: 'lockStrike', internalType: 'bool', type: 'bool' },
1276
1291
  { name: 'seeded', internalType: 'bool', type: 'bool' },
1277
- { name: 'dissolved', internalType: 'bool', type: 'bool' },
1292
+ { name: 'gen', internalType: 'uint16', type: 'uint16' },
1278
1293
  { name: 'n', internalType: 'uint8', type: 'uint8' },
1279
1294
  { name: 'restructureBlock', internalType: 'uint32', type: 'uint32' },
1280
1295
  { name: 'gateMint', internalType: 'bool', type: 'bool' },
@@ -1294,7 +1309,6 @@ export const fPoolManagerAbi = [
1294
1309
  { name: 'minBuffer', internalType: 'uint96', type: 'uint96' },
1295
1310
  { name: 'incomeTaken', internalType: 'uint256', type: 'uint256' },
1296
1311
  { name: 'name', internalType: 'bytes32', type: 'bytes32' },
1297
- { name: 'successor', internalType: 'bytes32', type: 'bytes32' },
1298
1312
  ],
1299
1313
  },
1300
1314
  ],
@@ -1480,6 +1494,18 @@ export const fPoolManagerAbi = [
1480
1494
  outputs: [],
1481
1495
  stateMutability: 'nonpayable',
1482
1496
  },
1497
+ {
1498
+ type: 'function',
1499
+ inputs: [
1500
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1501
+ { name: 'gen', internalType: 'uint256', type: 'uint256' },
1502
+ { name: 'owner', internalType: 'address', type: 'address' },
1503
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
1504
+ ],
1505
+ name: 'redeem',
1506
+ outputs: [{ name: 'quoteOut', internalType: 'uint256', type: 'uint256' }],
1507
+ stateMutability: 'nonpayable',
1508
+ },
1483
1509
  {
1484
1510
  type: 'function',
1485
1511
  inputs: [
@@ -1521,7 +1547,10 @@ export const fPoolManagerAbi = [
1521
1547
  },
1522
1548
  {
1523
1549
  type: 'function',
1524
- inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
1550
+ inputs: [
1551
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
1552
+ { name: 'gen', internalType: 'uint256', type: 'uint256' },
1553
+ ],
1525
1554
  name: 'shareIdOf',
1526
1555
  outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1527
1556
  stateMutability: 'pure',
@@ -1846,11 +1875,18 @@ export const fPoolManagerAbi = [
1846
1875
  type: 'bytes32',
1847
1876
  indexed: true,
1848
1877
  },
1878
+ { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
1849
1879
  {
1850
- name: 'successor',
1851
- internalType: 'bytes32',
1852
- type: 'bytes32',
1853
- indexed: true,
1880
+ name: 'supply',
1881
+ internalType: 'uint256',
1882
+ type: 'uint256',
1883
+ indexed: false,
1884
+ },
1885
+ {
1886
+ name: 'quote',
1887
+ internalType: 'uint256',
1888
+ type: 'uint256',
1889
+ indexed: false,
1854
1890
  },
1855
1891
  ],
1856
1892
  name: 'Dissolve',
@@ -2185,6 +2221,39 @@ export const fPoolManagerAbi = [
2185
2221
  type: 'bytes32',
2186
2222
  indexed: true,
2187
2223
  },
2224
+ { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
2225
+ {
2226
+ name: 'owner',
2227
+ internalType: 'address',
2228
+ type: 'address',
2229
+ indexed: true,
2230
+ },
2231
+ {
2232
+ name: 'shares',
2233
+ internalType: 'uint256',
2234
+ type: 'uint256',
2235
+ indexed: false,
2236
+ },
2237
+ {
2238
+ name: 'quoteOut',
2239
+ internalType: 'uint256',
2240
+ type: 'uint256',
2241
+ indexed: false,
2242
+ },
2243
+ ],
2244
+ name: 'Redeem',
2245
+ },
2246
+ {
2247
+ type: 'event',
2248
+ anonymous: false,
2249
+ inputs: [
2250
+ {
2251
+ name: 'poolId',
2252
+ internalType: 'bytes32',
2253
+ type: 'bytes32',
2254
+ indexed: true,
2255
+ },
2256
+ { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
2188
2257
  { name: 'L0', internalType: 'uint256', type: 'uint256', indexed: false },
2189
2258
  { name: 'Q0', internalType: 'uint256', type: 'uint256', indexed: false },
2190
2259
  {
@@ -2292,9 +2361,7 @@ export const fPoolManagerAbi = [
2292
2361
  { type: 'error', inputs: [], name: 'AlreadyUnlocked' },
2293
2362
  { type: 'error', inputs: [], name: 'BadLeg' },
2294
2363
  { type: 'error', inputs: [], name: 'BadParam' },
2295
- { type: 'error', inputs: [], name: 'BadSuccessor' },
2296
2364
  { type: 'error', inputs: [], name: 'BalanceOverflow' },
2297
- { type: 'error', inputs: [], name: 'Dissolved_' },
2298
2365
  { type: 'error', inputs: [], name: 'InsufficientBalance' },
2299
2366
  { type: 'error', inputs: [], name: 'InsufficientPermission' },
2300
2367
  { type: 'error', inputs: [], name: 'InsufficientQuote' },
@@ -2314,6 +2381,7 @@ export const fPoolManagerAbi = [
2314
2381
  { type: 'error', inputs: [], name: 'NotCollector' },
2315
2382
  { type: 'error', inputs: [], name: 'NotDissolvable' },
2316
2383
  { type: 'error', inputs: [], name: 'NotOperator' },
2384
+ { type: 'error', inputs: [], name: 'NotRetired' },
2317
2385
  { type: 'error', inputs: [], name: 'NotSeeded' },
2318
2386
  { type: 'error', inputs: [], name: 'NotSoleLP' },
2319
2387
  { type: 'error', inputs: [], name: 'PoolAlreadyInitialized' },
@@ -2332,6 +2400,7 @@ export const fPoolManagerAbi = [
2332
2400
  { type: 'error', inputs: [], name: 'StrikeLocked' },
2333
2401
  { type: 'error', inputs: [], name: 'SyncAlreadyOpen' },
2334
2402
  { type: 'error', inputs: [], name: 'TokensNotSettled' },
2403
+ { type: 'error', inputs: [], name: 'TooManyGenerations' },
2335
2404
  { type: 'error', inputs: [], name: 'TooManyLegs' },
2336
2405
  { type: 'error', inputs: [], name: 'TransferShortfall' },
2337
2406
  { type: 'error', inputs: [], name: 'ZeroAmount' },
@@ -2457,6 +2526,20 @@ export const fPoolSponsorAbi = [
2457
2526
  outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
2458
2527
  stateMutability: 'view',
2459
2528
  },
2529
+ {
2530
+ type: 'function',
2531
+ inputs: [
2532
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
2533
+ { name: 'gen', internalType: 'uint256', type: 'uint256' },
2534
+ ],
2535
+ name: 'bundleOf',
2536
+ outputs: [
2537
+ { name: 'supply', internalType: 'uint256', type: 'uint256' },
2538
+ { name: 'quote', internalType: 'uint256', type: 'uint256' },
2539
+ { name: 'base', internalType: 'uint256[]', type: 'uint256[]' },
2540
+ ],
2541
+ stateMutability: 'view',
2542
+ },
2460
2543
  {
2461
2544
  type: 'function',
2462
2545
  inputs: [
@@ -2471,6 +2554,7 @@ export const fPoolSponsorAbi = [
2471
2554
  type: 'function',
2472
2555
  inputs: [
2473
2556
  { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
2557
+ { name: 'gen', internalType: 'uint256', type: 'uint256' },
2474
2558
  { name: 'to', internalType: 'address', type: 'address' },
2475
2559
  ],
2476
2560
  name: 'claim',
@@ -2527,10 +2611,7 @@ export const fPoolSponsorAbi = [
2527
2611
  },
2528
2612
  {
2529
2613
  type: 'function',
2530
- inputs: [
2531
- { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
2532
- { name: 'successor', internalType: 'bytes32', type: 'bytes32' },
2533
- ],
2614
+ inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
2534
2615
  name: 'dissolve',
2535
2616
  outputs: [],
2536
2617
  stateMutability: 'nonpayable',
@@ -2753,7 +2834,10 @@ export const fPoolSponsorAbi = [
2753
2834
  },
2754
2835
  {
2755
2836
  type: 'function',
2756
- inputs: [{ name: 'poolId', internalType: 'bytes32', type: 'bytes32' }],
2837
+ inputs: [
2838
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
2839
+ { name: 'gen', internalType: 'uint256', type: 'uint256' },
2840
+ ],
2757
2841
  name: 'shareIdOf',
2758
2842
  outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
2759
2843
  stateMutability: 'pure',
@@ -3029,11 +3113,18 @@ export const fPoolSponsorAbi = [
3029
3113
  type: 'bytes32',
3030
3114
  indexed: true,
3031
3115
  },
3116
+ { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
3032
3117
  {
3033
- name: 'successor',
3034
- internalType: 'bytes32',
3035
- type: 'bytes32',
3036
- indexed: true,
3118
+ name: 'supply',
3119
+ internalType: 'uint256',
3120
+ type: 'uint256',
3121
+ indexed: false,
3122
+ },
3123
+ {
3124
+ name: 'quote',
3125
+ internalType: 'uint256',
3126
+ type: 'uint256',
3127
+ indexed: false,
3037
3128
  },
3038
3129
  ],
3039
3130
  name: 'Dissolve',
@@ -3368,6 +3459,39 @@ export const fPoolSponsorAbi = [
3368
3459
  type: 'bytes32',
3369
3460
  indexed: true,
3370
3461
  },
3462
+ { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
3463
+ {
3464
+ name: 'owner',
3465
+ internalType: 'address',
3466
+ type: 'address',
3467
+ indexed: true,
3468
+ },
3469
+ {
3470
+ name: 'shares',
3471
+ internalType: 'uint256',
3472
+ type: 'uint256',
3473
+ indexed: false,
3474
+ },
3475
+ {
3476
+ name: 'quoteOut',
3477
+ internalType: 'uint256',
3478
+ type: 'uint256',
3479
+ indexed: false,
3480
+ },
3481
+ ],
3482
+ name: 'Redeem',
3483
+ },
3484
+ {
3485
+ type: 'event',
3486
+ anonymous: false,
3487
+ inputs: [
3488
+ {
3489
+ name: 'poolId',
3490
+ internalType: 'bytes32',
3491
+ type: 'bytes32',
3492
+ indexed: true,
3493
+ },
3494
+ { name: 'gen', internalType: 'uint256', type: 'uint256', indexed: true },
3371
3495
  { name: 'L0', internalType: 'uint256', type: 'uint256', indexed: false },
3372
3496
  { name: 'Q0', internalType: 'uint256', type: 'uint256', indexed: false },
3373
3497
  {
@@ -3475,9 +3599,7 @@ export const fPoolSponsorAbi = [
3475
3599
  { type: 'error', inputs: [], name: 'AlreadyUnlocked' },
3476
3600
  { type: 'error', inputs: [], name: 'BadLeg' },
3477
3601
  { type: 'error', inputs: [], name: 'BadParam' },
3478
- { type: 'error', inputs: [], name: 'BadSuccessor' },
3479
3602
  { type: 'error', inputs: [], name: 'BalanceOverflow' },
3480
- { type: 'error', inputs: [], name: 'Dissolved_' },
3481
3603
  { type: 'error', inputs: [], name: 'InsufficientBalance' },
3482
3604
  { type: 'error', inputs: [], name: 'InsufficientPermission' },
3483
3605
  { type: 'error', inputs: [], name: 'InsufficientQuote' },
@@ -3493,6 +3615,7 @@ export const fPoolSponsorAbi = [
3493
3615
  { type: 'error', inputs: [], name: 'NotDelegated' },
3494
3616
  { type: 'error', inputs: [], name: 'NotDissolvable' },
3495
3617
  { type: 'error', inputs: [], name: 'NotOperator' },
3618
+ { type: 'error', inputs: [], name: 'NotRetired' },
3496
3619
  { type: 'error', inputs: [], name: 'NotSeeded' },
3497
3620
  { type: 'error', inputs: [], name: 'NotSoleLP' },
3498
3621
  { type: 'error', inputs: [], name: 'PoolAlreadyInitialized' },
@@ -3511,6 +3634,7 @@ export const fPoolSponsorAbi = [
3511
3634
  { type: 'error', inputs: [], name: 'StrikeLocked' },
3512
3635
  { type: 'error', inputs: [], name: 'SyncAlreadyOpen' },
3513
3636
  { type: 'error', inputs: [], name: 'TokensNotSettled' },
3637
+ { type: 'error', inputs: [], name: 'TooManyGenerations' },
3514
3638
  { type: 'error', inputs: [], name: 'TooManyLegs' },
3515
3639
  { type: 'error', inputs: [], name: 'TransferShortfall' },
3516
3640
  { type: 'error', inputs: [], name: 'ZeroAmount' },
@@ -3586,6 +3710,29 @@ export const logswapLensAbi = [
3586
3710
  outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
3587
3711
  stateMutability: 'view',
3588
3712
  },
3713
+ {
3714
+ type: 'function',
3715
+ inputs: [
3716
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
3717
+ { name: 'owner', internalType: 'address', type: 'address' },
3718
+ ],
3719
+ name: 'fClaimsOf',
3720
+ outputs: [
3721
+ {
3722
+ name: 'out',
3723
+ internalType: 'struct LogswapLens.FClaim[]',
3724
+ type: 'tuple[]',
3725
+ components: [
3726
+ { name: 'gen', internalType: 'uint256', type: 'uint256' },
3727
+ { name: 'shares', internalType: 'uint256', type: 'uint256' },
3728
+ { name: 'base', internalType: 'uint256[]', type: 'uint256[]' },
3729
+ { name: 'quote', internalType: 'uint256', type: 'uint256' },
3730
+ { name: 'dividend', internalType: 'uint256', type: 'uint256' },
3731
+ ],
3732
+ },
3733
+ ],
3734
+ stateMutability: 'view',
3735
+ },
3589
3736
  {
3590
3737
  type: 'function',
3591
3738
  inputs: [
@@ -3666,7 +3813,7 @@ export const logswapLensAbi = [
3666
3813
  { name: 'authority', internalType: 'address', type: 'address' },
3667
3814
  { name: 'lockStrike', internalType: 'bool', type: 'bool' },
3668
3815
  { name: 'seeded', internalType: 'bool', type: 'bool' },
3669
- { name: 'dissolved', internalType: 'bool', type: 'bool' },
3816
+ { name: 'gen', internalType: 'uint16', type: 'uint16' },
3670
3817
  { name: 'n', internalType: 'uint8', type: 'uint8' },
3671
3818
  { name: 'restructureBlock', internalType: 'uint32', type: 'uint32' },
3672
3819
  { name: 'gateMint', internalType: 'bool', type: 'bool' },
@@ -3686,7 +3833,6 @@ export const logswapLensAbi = [
3686
3833
  { name: 'minBuffer', internalType: 'uint96', type: 'uint96' },
3687
3834
  { name: 'incomeTaken', internalType: 'uint256', type: 'uint256' },
3688
3835
  { name: 'name', internalType: 'bytes32', type: 'bytes32' },
3689
- { name: 'successor', internalType: 'bytes32', type: 'bytes32' },
3690
3836
  ],
3691
3837
  },
3692
3838
  ],
@@ -4007,8 +4153,8 @@ export const logswapLensAbi = [
4007
4153
  {
4008
4154
  type: 'function',
4009
4155
  inputs: [
4010
- { name: 'fromPool', internalType: 'bytes32', type: 'bytes32' },
4011
- { name: 'toPool', internalType: 'bytes32', type: 'bytes32' },
4156
+ { name: 'poolId', internalType: 'bytes32', type: 'bytes32' },
4157
+ { name: 'gen', internalType: 'uint256', type: 'uint256' },
4012
4158
  { name: 'holder', internalType: 'address', type: 'address' },
4013
4159
  { name: 'shares', internalType: 'uint256', type: 'uint256' },
4014
4160
  ],
@@ -4659,7 +4805,7 @@ export const logswapRouterAbi = [
4659
4805
  type: 'function',
4660
4806
  inputs: [
4661
4807
  { name: '', internalType: 'bytes32', type: 'bytes32' },
4662
- { name: '', internalType: 'bytes32', type: 'bytes32' },
4808
+ { name: '', internalType: 'uint256', type: 'uint256' },
4663
4809
  { name: '', internalType: 'uint256', type: 'uint256' },
4664
4810
  { name: '', internalType: 'uint256', type: 'uint256' },
4665
4811
  { name: '', internalType: 'uint256', type: 'uint256' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logswap/sdk",
3
- "version": "0.5.37",
3
+ "version": "0.5.39",
4
4
  "description": "TypeScript SDK for Logswap, the liquidity primitive introducing the logarithmic invariant — typed wrappers over the CPoolManager / FPoolManager / Router / Lens surface.",
5
5
  "license": "GPL-2.0-or-later",
6
6
  "type": "module",
package/src/client.ts CHANGED
@@ -73,9 +73,12 @@ export const EXPECTED_VERSION = 3n;
73
73
  */
74
74
  // 7 (2026-09-15): the reserves are the state and the marks derived, `lockStrike`, the dividend
75
75
  // harvest, the relaunch (`dissolve(poolId, successor)`, `rollIn`), the reserve-named seed, the
76
- // sponsor facet — decisions 025–031. A 5 or 6 deployment reads with this SDK but every F write
77
- // below `seed` / `dissolve` / `setLegL` / `admitLeg` has moved its signature.
78
- export const EXPECTED_F_VERSION = 7n;
76
+ // sponsor facet — decisions 025–031.
77
+ // 8 (2026-09-15): the relaunch is in place (decisions 032) — every share id carries the
78
+ // generation (`fPoolShareId(poolId, gen)`), `dissolve(poolId)`, `redeem`, `claim` / `dividendOf`
79
+ // / `rollIn` / `previewRollIn` take the generation, `Pool.gen` replaces `dissolved` and
80
+ // `successor`. A 7 deployment's share ids do not even resolve with this SDK.
81
+ export const EXPECTED_F_VERSION = 8n;
79
82
 
80
83
  export async function assertVersion(c: LogswapClient, expected = EXPECTED_VERSION): Promise<void> {
81
84
  const { cPoolManagerAbi } = await import("./generated.js");