@skate-org/amm-evm-v2 2.0.0-beta.2 → 2.0.0-beta.20
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/CHANGELOG.md +45 -119
- package/README.md +56 -4
- package/dist/chain-clients.d.ts.map +1 -1
- package/dist/client.d.ts +7361 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/devConfig.d.ts +0 -2
- package/dist/devConfig.d.ts.map +1 -1
- package/dist/index.cjs +513 -116
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +513 -116
- package/dist/index.js.map +1 -1
- package/dist/kernel/lens.d.ts +20 -4
- package/dist/kernel/lens.d.ts.map +1 -1
- package/dist/kernel/reader.d.ts +42 -8
- package/dist/kernel/reader.d.ts.map +1 -1
- package/dist/periphery/calldata.d.ts +87 -0
- package/dist/periphery/calldata.d.ts.map +1 -0
- package/dist/periphery/index.d.ts +1 -0
- package/dist/periphery/index.d.ts.map +1 -1
- package/dist/periphery/reader.d.ts +29 -28
- package/dist/periphery/reader.d.ts.map +1 -1
- package/dist/skate-amm.d.ts +7373 -0
- package/dist/skate-amm.d.ts.map +1 -0
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/periphery/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/periphery/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import type { PublicClient } from "viem";
|
|
2
2
|
import { CHAIN, type EnvModeWithConfig } from "@skate-org/amm-core-v2";
|
|
3
|
-
/**
|
|
4
|
-
* Decoded `balancesAvailable()` tuple on a periphery pool — per the
|
|
5
|
-
* `PeripheryPoolABI` this returns `(uint256 amount0Available, uint256 amount1Available)`.
|
|
6
|
-
*/
|
|
7
|
-
export interface PeripheryBalancesAvailable {
|
|
8
|
-
amount0Available: bigint;
|
|
9
|
-
amount1Available: bigint;
|
|
10
|
-
}
|
|
11
3
|
/**
|
|
12
4
|
* Decoded periphery-pool state assembled by {@link readPeripheryPool}.
|
|
13
5
|
*
|
|
@@ -31,12 +23,24 @@ export interface PeripheryPoolState {
|
|
|
31
23
|
/** Address of the paired kernel pool on MegaETH. */
|
|
32
24
|
kernelPool: `0x${string}`;
|
|
33
25
|
/** Aggregate in-pool balances available for settlement. */
|
|
34
|
-
balancesAvailable:
|
|
26
|
+
balancesAvailable: {
|
|
27
|
+
amount0Available: bigint;
|
|
28
|
+
amount1Available: bigint;
|
|
29
|
+
};
|
|
35
30
|
/** token0 dust accumulator. */
|
|
36
31
|
dustAmount0: bigint;
|
|
37
32
|
/** token1 dust accumulator. */
|
|
38
33
|
dustAmount1: bigint;
|
|
39
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Decoded user per-pool in-flight token balances.
|
|
37
|
+
*
|
|
38
|
+
* Returned by `PeripheryPool.usersData(user)` as `(uint256 amount0, uint256 amount1)`.
|
|
39
|
+
*/
|
|
40
|
+
export interface UserPoolBalances {
|
|
41
|
+
amount0: bigint;
|
|
42
|
+
amount1: bigint;
|
|
43
|
+
}
|
|
40
44
|
/**
|
|
41
45
|
* Read the assembled periphery-pool state on a source chain.
|
|
42
46
|
*
|
|
@@ -48,28 +52,25 @@ export interface PeripheryPoolState {
|
|
|
48
52
|
*
|
|
49
53
|
* All sub-reads are fired in parallel and normalized to named fields.
|
|
50
54
|
*/
|
|
51
|
-
export declare function readPeripheryPool(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
export interface UserPoolBalances {
|
|
59
|
-
amount0: bigint;
|
|
60
|
-
amount1: bigint;
|
|
61
|
-
}
|
|
55
|
+
export declare function readPeripheryPool(p: {
|
|
56
|
+
chain: CHAIN;
|
|
57
|
+
kernelPool: `0x${string}`;
|
|
58
|
+
mode: EnvModeWithConfig;
|
|
59
|
+
client?: PublicClient;
|
|
60
|
+
}): Promise<PeripheryPoolState>;
|
|
62
61
|
/**
|
|
63
62
|
* Read a user's per-pool in-flight balances on a source chain.
|
|
64
63
|
*
|
|
65
|
-
* Resolves the periphery pool address via
|
|
66
|
-
*
|
|
67
|
-
*
|
|
64
|
+
* Resolves the periphery pool address via AmmCore.getPoolInfoByKey +
|
|
65
|
+
* peripheryInfo[chain].address (no hardcoded addresses) and calls
|
|
66
|
+
* `PeripheryPool.usersData(user)` which returns
|
|
68
67
|
* `(uint256 amount0, uint256 amount1)`.
|
|
69
|
-
*
|
|
70
|
-
* Replaces the previous `readEscrowBalance(chain, user, token)` stub,
|
|
71
|
-
* whose `(user, token)` keying did not match any available ABI view —
|
|
72
|
-
* escrow state is keyed per-(pool, user), not per-(user, token).
|
|
73
68
|
*/
|
|
74
|
-
export declare function readUserPoolBalances(
|
|
69
|
+
export declare function readUserPoolBalances(p: {
|
|
70
|
+
user: `0x${string}`;
|
|
71
|
+
poolKey: string;
|
|
72
|
+
chain: CHAIN;
|
|
73
|
+
mode: EnvModeWithConfig;
|
|
74
|
+
client?: PublicClient;
|
|
75
|
+
}): Promise<UserPoolBalances>;
|
|
75
76
|
//# sourceMappingURL=reader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../src/periphery/reader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,
|
|
1
|
+
{"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../src/periphery/reader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,Y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