@skate-org/amm-core-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.
Files changed (53) hide show
  1. package/CHANGELOG.md +132 -190
  2. package/README.md +1 -1
  3. package/dist/client.d.ts +54 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/deployment/aggregated/dev.d.ts.map +1 -1
  6. package/dist/deployment/aggregated/index.d.ts +1 -4
  7. package/dist/deployment/aggregated/index.d.ts.map +1 -1
  8. package/dist/deployment/aggregated/production.d.ts +3 -0
  9. package/dist/deployment/aggregated/production.d.ts.map +1 -1
  10. package/dist/deployment/aggregated/retrieval.d.ts +6 -2
  11. package/dist/deployment/aggregated/retrieval.d.ts.map +1 -1
  12. package/dist/deployment/aggregated/staging.d.ts +3 -0
  13. package/dist/deployment/aggregated/staging.d.ts.map +1 -1
  14. package/dist/deployment/index.d.ts +3 -2
  15. package/dist/deployment/index.d.ts.map +1 -1
  16. package/dist/deployment/kernel.d.ts +9 -14
  17. package/dist/deployment/kernel.d.ts.map +1 -1
  18. package/dist/deployment/periphery.d.ts +1 -4
  19. package/dist/deployment/periphery.d.ts.map +1 -1
  20. package/dist/deployment/sui.d.ts +40 -0
  21. package/dist/deployment/sui.d.ts.map +1 -0
  22. package/dist/deployment/svm.d.ts +95 -6
  23. package/dist/deployment/svm.d.ts.map +1 -1
  24. package/dist/index.cjs +572 -61
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +1 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +557 -55
  30. package/dist/index.js.map +1 -1
  31. package/dist/math/index.d.ts +1 -0
  32. package/dist/math/index.d.ts.map +1 -1
  33. package/dist/math/kernel.d.ts +18 -0
  34. package/dist/math/kernel.d.ts.map +1 -0
  35. package/dist/math/liquidityMath.d.ts +10 -5
  36. package/dist/math/liquidityMath.d.ts.map +1 -1
  37. package/dist/math/sqrtPriceMath.d.ts +2 -0
  38. package/dist/math/sqrtPriceMath.d.ts.map +1 -1
  39. package/dist/math/tickMath.d.ts +15 -0
  40. package/dist/math/tickMath.d.ts.map +1 -1
  41. package/dist/types/chain-vm.d.ts +1 -1
  42. package/dist/types/chain-vm.d.ts.map +1 -1
  43. package/dist/types/chain.d.ts +0 -1
  44. package/dist/types/chain.d.ts.map +1 -1
  45. package/dist/types/index.d.ts +1 -0
  46. package/dist/types/index.d.ts.map +1 -1
  47. package/dist/types/vm-client.d.ts +28 -0
  48. package/dist/types/vm-client.d.ts.map +1 -0
  49. package/dist/types/vm.d.ts +0 -1
  50. package/dist/types/vm.d.ts.map +1 -1
  51. package/package.json +2 -1
  52. package/dist/deployment/_notDeployed.d.ts +0 -5
  53. package/dist/deployment/_notDeployed.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,193 +1,135 @@
1
1
  # @skate-org/amm-core-v2
2
2
 
3
- ## 2.0.0-beta.2 — 2026-05-17
4
-
5
- SVM-side periphery wired into the deployment catalog. Solana mainnet
6
- (chain_id 901) goes from "no deployment yet" to LIVE in DEV.
7
-
8
- - **`deployment/svm.ts` (new):** `SVM_DEPLOYMENT_DEV` table per
9
- `SvmChain` carrying deploy-wide pubkeys `periphery_pool` program,
10
- `action_box` program, `action_box state_v3` PDA, `task_ledger` PDA,
11
- manager — plus a `SvmDeploymentFor(chain, mode)` accessor that
12
- mirrors the kernel/periphery `…For(chain, mode)` pattern. Solana
13
- mainnet (chain_id 901) is populated; Eclipse still empty.
14
- STAGING / PRODUCTION throw `SdkError("not yet deployed")`.
15
- - **`SvmPeripheryInfo` extended:** now carries the per-pool PDAs
16
- (`peripheryPool`, `poolAuthority`, `dust`, `poolToken0Vault`,
17
- `poolToken1Vault`) plus `manager` so builders can populate
18
- `accountsStrict({...})` from the catalog without keypair math at
19
- call time. `tokenProgramId0/1` / `token0/1` / `chain` carry over
20
- from beta.1. Additive type change (existing fields kept).
21
- - **`POOL_INFO_Dev.USDC_USDT.peripheryInfo[CHAIN.SOLANA]`
22
- populated** with the deployed `usdc-usdt-1bps` pool PDAs and
23
- vaults verified on-chain 2026-05-15 against the handover repo at
24
- `/home/phil/works/handover/amm/solana_contracts/skate_amm/
25
- config/pools.deployment.json`. Same kernel route as Arbitrum
26
- peripherySolana joins as an additional periphery for the same
27
- kernel pool.
28
- - **Retrieval helpers** now report SOLANA alongside ARBITRUM:
29
- `getSupportedChains("DEV")` returns `[CHAIN.SOLANA, CHAIN.ARBITRUM]`,
30
- `findTokensBySymbol("USDC")` finds both the Arbitrum USDC ERC-20 and
31
- the Solana USDC mint. Unit tests updated accordingly.
32
- - **`svmBytes32Base58ToEvmAddress(value)` (new export)** in
33
- `adapter/skate.ts`. Composes `bytes32ToEvmAddress(base58ToBytes32(...))`
34
- for the common case of decoding an SVM-stored EVM address
35
- (`kernel_pool`, `kernel_factory`) back to its 0x-prefixed lowercase
36
- form. Used by `@skate-org/amm-svm-v2`'s `readPeripheryPool`.
37
-
38
- ## 2.0.0-beta.1 2026-05-07
39
-
40
- Two new token-lookup helpers in `deployment/aggregated/retrieval.ts`:
41
-
42
- - **`findTokensBySymbol(symbol, chainIds?, mode?)`** search the
43
- deployment catalog for tokens with a given symbol, optionally
44
- filtered to specific chains. Symbol comparison is case-insensitive;
45
- results are deduped by `(chainId, address)`. Pass `chainIds` as
46
- `undefined` (or omit) to search every supported chain.
47
- - **`getTokenSymbol(address, chainId, mode?)`** reverse lookup;
48
- returns the token symbol at `(address, chainId)`, or `null` if no
49
- supported token matches. Address comparison is case-insensitive.
50
-
51
- Both functions reuse the existing `getSupportedTokens` /
52
- `getSupportedChains` accessors so they automatically pick up new pools
53
- as the deployment table grows. 12 new unit tests covering case-
54
- insensitive matching, dedup behavior, mixed-valid/invalid `chainIds`,
55
- and unsupported-chain returns.
56
-
57
- ## 2.0.0-beta.0 2026-05-07
58
-
59
- First **beta**. Promoted under the `beta` dist-tag; `latest` stays at
60
- `1.0.0` (v1 line) per the policy in `CLAUDE.md`. **Loose beta** —
61
- documented breaking changes are still allowed within `2.0.0-beta.x`;
62
- `2.0.0` final is the strict surface freeze.
63
-
64
- **Breakinginternal-leak surface pulls.** Symbols that were exported in
65
- the alpha line but never intended to be load-bearing have moved to module-
66
- private. Internal SDK callsites all have sanctioned replacements:
67
-
68
- - `KERNEL_EXECUTOR_REGISTRY_Dev`, `KERNEL_MESSAGE_BOX_Dev`,
3
+ ## 2.0.0-beta.13 — 2026-05-30
4
+
5
+ Fix: `getLiquidityForAmount0` in `math/liquidityMath.ts` now uses the
6
+ canonical two-step `mulDiv` from Uniswap v3-periphery
7
+ `LiquidityAmounts.sol` (intermediate = `mulDiv(sqrtA, sqrtB, Q96)`, then
8
+ `mulDiv(amount0, intermediate, sqrtB - sqrtA)`). The previous
9
+ single-division form drifted by ~1 unit vs on-chain because the floor
10
+ was applied once at the end instead of compounded at each step.
11
+
12
+ `getLiquidityForAmount1` is unchanged its single-division form is
13
+ equivalent to `mulDiv` in BigInt (no overflow path needed).
14
+
15
+ ## 2.0.0-beta.12 2026-05-30
16
+
17
+ Hotfix: `normalizeAmount` / `deNormalizeAmount` now handle
18
+ `decimal > NORMALIZED_DECIMAL` instead of throwing `RangeError`
19
+ (was: `BigInt(NORMALIZED_DECIMAL - decimal)` negative exponent in
20
+ `10n ** ...`).
21
+
22
+ For `decimal > 18` (e.g. some SPL mints use 24), `normalizeAmount`
23
+ scales DOWN with truncation; `deNormalizeAmount` scales UP. Also
24
+ guards `decimal < 0` and non-integer inputs explicitly.
25
+
26
+ ## 2.0.0-beta.11 2026-05-30
27
+
28
+ Adds v1-compat math helpers to close the parity gap surfaced by the
29
+ backend v1 → v2 port of the quote lambdas. All new surface; no
30
+ breaking changes.
31
+
32
+ - `math/kernel.ts` (new module): `NORMALIZED_DECIMAL = 18`,
33
+ `normalizeAmount(amount, decimal)`, `deNormalizeAmount(amount, decimal)`.
34
+ Mirrors the kernel-side 18-decimal normalization done by every periphery
35
+ contract.
36
+ - `math/tickMath.ts`: `getPriceAtTick(tick)`, `getTickAtPrice(price)`,
37
+ `TICK_VALUE = 1.0001`, `PRICE_ZERO`, `PRICE_INF`, `MIN_SQRT_PRICE_X96`,
38
+ `MAX_SQRT_PRICE_X96` (the `_X96` consts alias `{MIN,MAX}_SQRT_PRICE_LIMIT`
39
+ for source compat with `@skate-org/skate-app-amm`).
40
+ - `math/liquidityMath.ts`: `getLiquidityForAmount0`,
41
+ `getLiquidityForAmount1` (uniswap-v3 periphery `LiquidityAmounts.sol`).
42
+ `Q96` is now exported (was module-private in `sqrtPriceMath.ts`).
43
+ - `math/kernel.ts` is re-exported from the public barrel via `math/index.ts`.
44
+
45
+ ## 2.0.0-beta.10 2026-05-29
46
+
47
+ Closes the remaining STAGING / PRODUCTION gap left in beta.9: kernel
48
+ manager / event-emitter and EVM periphery accessors now alias DEV
49
+ instead of throwing `SdkError("not yet deployed")`.
50
+
51
+ - `KernelManagerAddress(mode)` and `KernelEventEmitterAddress(mode)`
52
+ return the v2 MegaETH deploy for all three `EnvMode` values.
53
+ - `PeripheryDeploymentFor(chain, mode)` returns the v2 Arbitrum
54
+ periphery deploy for all three modes. New exports
55
+ `PERIPHERY_STAGING` and `PERIPHERY_PRODUCTION` (both alias
56
+ `PERIPHERY_DEV`).
57
+ - `_notDeployed.ts` is removed (no remaining callers in core).
58
+ - DEV addresses unchanged.
59
+
60
+ Behavioural caveat: consumers that caught the prior
61
+ `SdkError("not yet deployed")` as a STAGING/PRODUCTION guard will
62
+ silently start succeeding review any such try/catch.
63
+
64
+ ## 2.0.0-beta.9 2026-05-26
65
+
66
+ Added STAGING + PRODUCTION env support to SVM + Sui deployment maps.
67
+ `SvmDeploymentFor(chain, mode)` and `SuiDeploymentFor(chain, mode)`
68
+ now return data for all three `EnvMode` values (previously threw
69
+ `notDeployed` for anything other than `DEV`); STAGING and PRODUCTION
70
+ alias DEV until the deploys actually diverge. `POOL_INFO_Staging` and
71
+ `POOL_INFO_Production` likewise point at `POOL_INFO_Dev` instead of
72
+ `{}`. DEV data itself is byte-identical to beta.8 — verify with
73
+ `git diff 2.0.0-beta.8..HEAD -- packages/core/src/deployment/svm.ts`.
74
+
75
+ New exports: `SVM_DEPLOYMENT_STAGING`, `SVM_DEPLOYMENT_PRODUCTION`,
76
+ `SVM_POOLS_STAGING`, `SVM_POOLS_PRODUCTION`,
77
+ `SUI_DEPLOYMENT_STAGING`, `SUI_DEPLOYMENT_PRODUCTION`,
78
+ `SUI_POOLS_STAGING`, `SUI_POOLS_PRODUCTION`.
79
+
80
+ Behavioural caveat: consumers that caught the previous `notDeployed`
81
+ throw as a guard will silently start succeeding. Kernel manager /
82
+ event-emitter surfaces still throw for non-DEV (see `kernel.ts`).
83
+
84
+ ## 2.0.0-beta.8 — 2026-05-21
85
+
86
+ Lockstep — no source changes. Paired with `@skate-org/amm-sui-v2@2.0.0-beta.8`
87
+ moving Sui contracts from `SUI_ENV.PRODUCTION` to `SUI_ENV.DEV`.
88
+
89
+ ## 2.0.0-beta.7 — 2026-05-21
90
+
91
+ Trimmed retired `0x9D62b2b6…` USDC_USDT entry from
92
+ `deployment/aggregated/production.ts`. Doc baselines refreshed
93
+ (`STABILITY.md`, `MIGRATION.md`, `CLAUDE.md`). No public surface
94
+ change versus beta.6.
95
+
96
+ ## 2.0.0-beta (cumulative, 2026-05-07 → 2026-05-21)
97
+
98
+ Sum of beta.0 → beta.6. Surface set against which `2.0.0` final will
99
+ be frozen.
100
+
101
+ - **Surface pulls (beta.0):** removed alpha-era leaks
102
+ `KERNEL_EXECUTOR_REGISTRY_Dev`, `KERNEL_MESSAGE_BOX_Dev`,
69
103
  `KERNEL_ACCOUNT_REGISTRY_Dev`, `KERNEL_MANAGER_Dev`,
70
- `KERNEL_EVENT_EMITTER_Dev`, `KERNEL_POOL_IMPL_Dev` removed. Use
71
- `KernelManagerAddress(mode)` / `KernelEventEmitterAddress(mode)` /
72
- `POOL_INFO_Dev`. `KERNEL_POOL_USDC_USDT_Dev` stays exported as a
73
- smoke-test cross-check.
74
- - `PERIPHERY_PROD`, `PERIPHERY_STAGING` removed (were empty `{}`
75
- placeholders). `PeripheryDeploymentFor(chain, mode)` now throws
76
- `SdkError("…not yet deployed…")` for STAGING / PRODUCTION,
77
- mirroring the kernel-side posture introduced in alpha.6.
78
- - `bytes32HexRegex`, `isHexString`, `isHexStringLoose` removed. Use
79
- `evmAddressToBytes32` / `toBytes32Address`.
80
- - `PeripheryDeploymentFor` / `PeripheryManagerAddress` /
81
- `PeripheryEventEmitterAddress` / `SkateGatewayAddress` /
82
- `ActionBoxAddress` lost their default `mode = "PRODUCTION"` argument
83
- `mode` is now mandatory.
84
-
85
- Surface count: 73 → 62. See `STABILITY.md` (repo root) for the full
86
- per-package classification.
87
-
88
- ## 2.0.0-alpha.8 2026-05-07
89
-
90
- Lockstep bump — paired with the api `streamSwapQuote` going live as a
91
- polling stub for the deferred WebSocket. This package's source is
92
- unchanged versus `2.0.0-alpha.7`.
93
-
94
- ## 2.0.0-alpha.7 — 2026-05-07
95
-
96
- Lockstep bump — paired with the api action-by-user clients, polling
97
- `subscribeSwapQuote` helper, and svm browser-bundle build fix.
98
- This package's source is unchanged versus `2.0.0-alpha.6`.
99
-
100
- ## 2.0.0-alpha.6 — 2026-05-07
101
-
102
- - **Per-env kernel chain config.** New `KERNEL_CHAIN_BY_MODE: Record<EnvMode, CHAIN>`
103
- + `KernelChain(mode)` accessor. Defaults every env to `CHAIN.MEGAETH` today;
104
- pointing a future env at a different kernel chain is a one-line edit.
105
- - **Breaking — `KernelManagerAddress` / `KernelEventEmitterAddress` throw on
106
- STAGING / PRODUCTION.** Previously returned v1 Skate-chain placeholder
107
- addresses (`0xB328…`, `0x4688…`) that don't exist on MegaETH; combined with
108
- the kernel-chain hardcode, this caused silent reads from non-existent
109
- contracts. Now both throw `SdkError("…not yet deployed to {mode}…")`. The
110
- default `mode = "PRODUCTION"` argument is removed — callers must be explicit.
111
-
112
- ## 2.0.0-alpha.5 — 2026-05-06
113
-
114
- Lockstep bump — paired with the kernel lens helpers ported into
115
- `@skate-org/amm-evm-v2`. This package's source is unchanged versus
116
- `2.0.0-alpha.4`.
117
-
118
- ## 2.0.0-alpha.4 — 2026-05-06
119
-
120
- Lockstep bump — paired with the `SwapQuote` schema fix in
121
- `@skate-org/amm-api-v2`. This package's source is unchanged versus
122
- `2.0.0-alpha.3`.
123
-
124
- ## 2.0.0-alpha.3 — 2026-05-06
125
-
126
- Lockstep bump — paired with the SVM/Sui efficiency pass in
127
- `@skate-org/amm-svm-v2` and `@skate-org/amm-sui-v2`. This package's
128
- source is unchanged versus `2.0.0-alpha.2`.
129
-
130
- ## 2.0.0-alpha.2 — 2026-05-05
131
-
132
- Plan C of the SVM/Sui integration. Adds `@skate-org/amm-sui-v2` to
133
- the workspace; this package's source is unchanged versus
134
- `2.0.0-alpha.1` (re-versioned in lockstep).
135
-
136
- ## 2.0.0-alpha.1 — 2026-05-05
137
-
138
- Plan B of the SVM/Sui integration. Adds `@skate-org/amm-svm-v2` to
139
- the workspace; this package's source is unchanged versus
140
- `2.0.0-alpha.0` (re-versioned in lockstep).
141
-
142
- ## 2.0.0-alpha.0 — 2026-05-05
143
-
144
- Plan A of the SVM/Sui integration (see
145
- docs/superpowers/specs/2026-05-04-svm-sui-integration-design.md).
146
-
147
- - Add uniswap-v3 math module (`tickMath`, `sqrtPriceMath`,
148
- `liquidityMath`, `fullMath`). Relocated from
149
- `@skate-org/amm-evm-v2`.
150
- - Add `EvmChain` / `SvmChain` / `SuiChain` literal-union sub-types of
151
- `CHAIN`.
152
- - **Breaking:** `PoolInfoType.peripheryInfo` is now a chain-id-
153
- discriminated mapped type. EVM chain entries narrow to
154
- `EvmPeripheryInfo`; SVM chain entries to `SvmPeripheryInfo`; Sui
155
- to `SuiPeripheryInfo`. Code that read
156
- `pool.peripheryInfo[chain].address` as `0x${string}` unconditionally
157
- now type-narrows by chain.
158
- - New named types `EvmPeripheryInfo`, `SvmPeripheryInfo`,
159
- `SuiPeripheryInfo`, `PeripheryInfoFor<K>`.
160
- - Cross-VM utilities (`base58ToBytes32`, `evmAddressToBytes32`,
161
- `bytes32ToBase58`, `toBytes32Address`, `fromBytes32Address`)
162
- unchanged in this release — already in core under
163
- `adapter/skate.ts`.
164
-
165
- ## 1.0.0 — 2026-05-04
166
-
167
- Realigning all four `@skate-org/amm-*-v2` packages at a single version
168
- for the coherent v1 SDK release. No source changes vs 0.4.0 — this is
169
- purely a versioning realignment so consumers can install
170
- `@skate-org/amm-core-v2@1`, `@skate-org/amm-api-v2@1`, `@skate-org/amm-evm-v2@1`,
171
- `@skate-org/amm-v2@1` and know they belong to the same release.
172
-
173
- ## 0.4.0 — 2026-04-29
174
-
175
- - Add full DEV deployment table for Arbitrum periphery (`PERIPHERY_DEV`,
176
- `PeripheryManagerAddress`, `PeripheryEventEmitterAddress`, `SkateGatewayAddress`,
177
- `ActionBoxAddress`).
178
- - Add `KERNEL_EVENT_EMITTER_Dev` and tighten `KernelEventEmitterAddress` return
179
- type from `| null` to `0x${string}`.
180
- - Wire `KERNEL_POOL_USDC_USDT_Dev` and the rest of the DEV kernel address constants.
181
-
182
- ## 0.3.0 — 2026-04-25
183
-
184
- - Phase 4: shared `SdkError` base; cross-package error hierarchy.
185
-
186
- ## 0.2.0 — 2026-04-22
187
-
188
- - Phase 3: full chain table + VM enum (`AptosVM` removed; `TEMPO 4217` added).
189
-
190
- ## 0.1.0 — 2026-04-20
191
-
192
- - Initial: `CHAIN`, `VM`, `EnvMode*`, `Token`, `TokenPair`, `ActionStatus`,
193
- `TaskPhase`, `KernelManagerAddress`, `POOL_INFO_{Dev,Staging,Production}`.
104
+ `KERNEL_EVENT_EMITTER_Dev`, `KERNEL_POOL_IMPL_Dev`,
105
+ `PERIPHERY_PROD`, `PERIPHERY_STAGING`, `bytes32HexRegex`,
106
+ `isHexString`, `isHexStringLoose`. Consumers move to
107
+ `KernelManagerAddress(mode)` / `PeripheryDeploymentFor(chain,
108
+ mode)` accessors.
109
+ - **`findTokensBySymbol` / `getTokenSymbol` (beta.1, beta.6):**
110
+ added in beta.1 with positional args, switched to object input
111
+ `findTokensBySymbol({ symbol, chainIds?, mode? })` in beta.6 to
112
+ remove the awkward `findTokensBySymbol("USDC", undefined, "DEV")`
113
+ call shape. Loose-beta breaking change.
114
+ - **SVM deployment catalog (beta.2, beta.3):** new
115
+ `SVM_DEPLOYMENT_DEV`, per-pool `SVM_POOLS_DEV`,
116
+ `SvmDeploymentFor(chain, mode)`. Solana mainnet
117
+ `usdc-usdt-1bps` periphery LIVE in DEV. Eclipse / STAGING /
118
+ PRODUCTION throw `SdkError("not yet deployed")`. New helper
119
+ `svmBytes32Base58ToEvmAddress` for decoding on-chain kernel-address
120
+ fields.
121
+ - **Sui deployment catalog (beta.6):** new `SUI_POOLS_DEV` +
122
+ `SUI_DEPLOYMENT_DEV` + `SuiDeploymentFor(chain, mode)`. Sui
123
+ USDC/USDT periphery (`0xc014f7cb…`) wired to DEV kernel pool
124
+ `0x2c23334e…`.
125
+ - **API ActionFields (beta.4):** v2-pure shape flat `destChainId`
126
+ / `destVmType`, `peripheryFunctionMeta`, `poolInfo`; dropped v1
127
+ emulation fields (`legacyStatus`, flat tx-hash denorms, `tokens`,
128
+ `amounts`).
129
+ - **Typed argument shapes (beta.5):** sibling exports `SwapArgs`,
130
+ `MintArgs`, `BurnArgs`, `DecreaseLiquidityArgs`.
131
+ `peripheryFunctionMeta.args` for `mint` / `increaseLiquidity` now
132
+ carries `liquidity` + `amount{0,1}Unused`.
133
+
134
+ Surface count: 25 → 23 (one-time pull at beta.0). See
135
+ `STABILITY.md` for the per-symbol classification.
package/README.md CHANGED
@@ -11,7 +11,7 @@ Zero heavy runtime deps. Pure TypeScript.
11
11
  - `EnvMode`, `DevModeConfig`, `EnvModeWithConfig`, `normalizeMode`
12
12
  - `Token`, `TokenPair`
13
13
  - `ActionStatus`, `TaskPhase`, `TaskFunctionMeta`
14
- - Kernel addresses: `KernelManagerAddress`, `KernelEventEmitterAddress` (DEV-only STAGING/PRODUCTION throw `SdkError` until v2 deploys there)
14
+ - Kernel addresses: `KernelManagerAddress`, `KernelEventEmitterAddress` (STAGING + PRODUCTION alias DEV as of `2.0.0-beta.10`)
15
15
  - Kernel chain config: `KERNEL_CHAIN_BY_MODE`, `KernelChain(mode)` — defaults every env to `CHAIN.MEGAETH`
16
16
  - Periphery deployment: `PERIPHERY_DEV`, `PeripheryManagerAddress`,
17
17
  `PeripheryEventEmitterAddress`, `SkateGatewayAddress`, `ActionBoxAddress`
@@ -0,0 +1,54 @@
1
+ import { EnvMode, EnvModeWithConfig } from "./types/mode";
2
+ import { CHAIN } from "./types/chain";
3
+ import type { SvmChain } from "./types/chain-vm";
4
+ import type { SuiChain } from "./types/chain-vm";
5
+ import type { PeripheryInfoFor } from "./deployment/aggregated/_type_";
6
+ import type { Token } from "./types/pair";
7
+ /**
8
+ * Env-bound client that wraps all core resolver functions with a fixed
9
+ * `EnvMode`. Construct once with the desired env and call methods without
10
+ * the trailing `mode` parameter.
11
+ *
12
+ * @example
13
+ * const core = new AmmCore('PRODUCTION');
14
+ * const kernelChain = core.KernelChain();
15
+ * const pools = core.getAllPoolInfo();
16
+ */
17
+ export declare class AmmCore {
18
+ readonly mode: EnvMode;
19
+ constructor(env: EnvModeWithConfig);
20
+ KernelChain(): CHAIN;
21
+ KernelManagerAddress(): `0x${string}`;
22
+ KernelEventEmitterAddress(): `0x${string}`;
23
+ PeripheryDeploymentFor(chain: CHAIN): import("./deployment").PeripheryDeployment | null;
24
+ PeripheryManagerAddress(chain: CHAIN): `0x${string}` | null;
25
+ PeripheryEventEmitterAddress(chain: CHAIN): `0x${string}` | null;
26
+ SkateGatewayAddress(chain: CHAIN): `0x${string}` | null;
27
+ ActionBoxAddress(chain: CHAIN): `0x${string}` | null;
28
+ SvmDeploymentFor(chain: SvmChain): import("./deployment").SvmDeployment | null;
29
+ SuiDeploymentFor(chain: SuiChain): import("./deployment").SuiDeployment | null;
30
+ getAllPoolInfo(): import("./deployment/aggregated/_type_").PoolInfoType;
31
+ getAllPoolKeys(): string[];
32
+ getPoolInfoByKey(key: string): {
33
+ kernelPool: `0x${string}`;
34
+ token0: string;
35
+ token1: string;
36
+ feeBps: number;
37
+ peripheryInfo: { [K in CHAIN]?: PeripheryInfoFor<K>; };
38
+ } | null;
39
+ getSupportedChains(): CHAIN[];
40
+ getSupportedPairs(chainId: CHAIN): (import("./types").TokenPair & {
41
+ poolKey: import("./deployment").PoolKey;
42
+ })[];
43
+ getSupportedTokens(chainId: CHAIN): Token[];
44
+ getOtherTokensInPairs(chainId: CHAIN, tokenAddress: string): Token[];
45
+ kernelPoolToPoolKey(kernelPool: `0x${string}`): string;
46
+ getPeripheryDetailsByKernelPoolAndChainId<K extends CHAIN>(kernelPool: `0x${string}`, chainId: K): PeripheryInfoFor<K> | null;
47
+ getPeripheryDetailsByKernelPoolAndChainId(kernelPool: `0x${string}`, chainId: number): PeripheryInfoFor<CHAIN> | null;
48
+ findTokensBySymbol(args: {
49
+ symbol: string;
50
+ chainIds?: readonly CHAIN[];
51
+ }): Token[];
52
+ getTokenSymbol(address: string, chainId: CHAIN): string | null;
53
+ }
54
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAiB,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAwBjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;;;;;GASG;AACH,qBAAa,OAAO;IAClB,QAAQ,CAAC,IA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AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,YAoD3B,CAAC"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/deployment/aggregated/dev.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,YA2O3B,CAAC"}
@@ -1,6 +1,3 @@
1
- export * from "./_type_";
2
- export * from "./dev";
3
- export * from "./staging";
4
- export * from "./production";
1
+ export type { PoolKey, EvmPeripheryInfo, SvmPeripheryInfo, SuiPeripheryInfo, PeripheryInfoFor, } from "./_type_";
5
2
  export * from "./retrieval";
6
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deployment/aggregated/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/deployment/aggregated/index.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,cAAc,aAAa,CAAC"}
@@ -1,3 +1,6 @@
1
1
  import { PoolInfoType } from "./_type_";
2
+ /** v2 PRODUCTION currently points at the same on-chain deploy as DEV until
3
+ * production forks off. Kernel manager / event emitter / EVM periphery
4
+ * surfaces also alias DEV (see kernel.ts and periphery.ts). */
2
5
  export declare const POOL_INFO_Production: PoolInfoType;
3
6
  //# sourceMappingURL=production.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"production.d.ts","sourceRoot":"","sources":["../../../src/deployment/aggregated/production.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,eAAO,MAAM,oBAAoB,EAAE,YAAiB,CAAC"}
1
+ {"version":3,"file":"production.d.ts","sourceRoot":"","sources":["../../../src/deployment/aggregated/production.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;gEAEgE;AAChE,eAAO,MAAM,oBAAoB,EAAE,YAA4B,CAAC"}
@@ -27,9 +27,13 @@ export declare function getPeripheryDetailsByKernelPoolAndChainId(kernelPool: `0
27
27
  * `(symbol, chainId)` pair always points at one token, but
28
28
  * `(symbol, chainIds[])` may produce many.
29
29
  *
30
- * Pass `chainIds` undefined / omitted to search every supported chain.
30
+ * Omit `chainIds` to search every supported chain.
31
31
  */
32
- export declare function findTokensBySymbol(symbol: string, chainIds?: readonly CHAIN[], mode?: EnvMode): Token[];
32
+ export declare function findTokensBySymbol(args: {
33
+ symbol: string;
34
+ chainIds?: readonly CHAIN[];
35
+ mode?: EnvMode;
36
+ }): Token[];
33
37
  /**
34
38
  * Reverse lookup: return the symbol of the token at `address` on
35
39
  * `chainId`, or `null` if no supported token matches that pair.
@@ -1 +1 @@
1
- {"version":3,"file":"retrieval.d.ts","sourceRoot":"","sources":["../../../src/deployment/aggregated/retrieval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,cAAc,CAAC,IAAI,GAAE,OAAsB,GAAG,YAAY,CAMzE;AAED,wBAAgB,cAAc,CAAC,IAAI,GAAE,OAAsB,GAAG,OAAO,EAAE,CAEtE;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,GAAE,OAAsB;;;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,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,KAAK,MAAM,EAAE,EACzB,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,OAAO,GACb,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;AAWlC;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GAAG,KAAK,EAAE,CAgBV;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,KAAK,EACd,IAAI,GAAE,OAAsB,GAC3B,MAAM,GAAG,IAAI,CAMf"}
@@ -1,3 +1,6 @@
1
1
  import { PoolInfoType } from "./_type_";
2
+ /** v2 STAGING currently points at the same on-chain deploy as DEV (Solana
3
+ * mainnet SAB…/SPP… + Sui mainnet package 0x96e1d3…); split into a
4
+ * separate map only when staging and dev actually diverge. */
2
5
  export declare const POOL_INFO_Staging: PoolInfoType;
3
6
  //# sourceMappingURL=staging.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"staging.d.ts","sourceRoot":"","sources":["../../../src/deployment/aggregated/staging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,eAAO,MAAM,iBAAiB,EAAE,YAAiB,CAAC"}
1
+ {"version":3,"file":"staging.d.ts","sourceRoot":"","sources":["../../../src/deployment/aggregated/staging.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;+DAE+D;AAC/D,eAAO,MAAM,iBAAiB,EAAE,YAA4B,CAAC"}
@@ -1,5 +1,6 @@
1
- export * from "./kernel";
1
+ export { KERNEL_CHAIN_BY_MODE, KernelChain, KernelManagerAddress, KernelEventEmitterAddress } from "./kernel";
2
2
  export * from "./periphery";
3
- export * from "./svm";
3
+ export { type SvmDeployment, SvmDeploymentFor } from "./svm";
4
+ export { type SuiDeployment, SuiDeploymentFor } from "./sui";
4
5
  export * from "./aggregated";
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deployment/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deployment/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAC9G,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,KAAK,aAAa,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,KAAK,aAAa,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC7D,cAAc,cAAc,CAAC"}
@@ -1,21 +1,16 @@
1
1
  import { EnvMode } from "../types";
2
2
  import { CHAIN } from "../types";
3
3
  export declare const KERNEL_POOL_USDC_USDT_Dev = "0x2c23334eE3b030e6bacEDEDf7C511eEA08Cf7E7e";
4
+ export declare const KERNEL_POOL_WETH_USDC_Dev = "0x0185175Fd3DF28AcEf4faED7772db3207a64b046";
5
+ export declare const KERNEL_POOL_QQQX_USDC_Dev = "0x4bCa49bC6CeD8505d10b08C01bce326166dF1a8A";
6
+ export declare const KERNEL_POOL_NVDAX_USDC_Dev = "0x49a22A648A308E394171A63fa163f0368E85749f";
4
7
  export declare const KERNEL_CHAIN_BY_MODE: Readonly<Record<EnvMode, CHAIN>>;
5
8
  /** Return the kernel CHAIN id for a given env mode. */
6
9
  export declare function KernelChain(mode: EnvMode): CHAIN;
7
- /**
8
- * Address of the Skate Kernel Manager for the given env mode.
9
- *
10
- * Today only DEV resolves; STAGING / PRODUCTION throw an `SdkError` to
11
- * surface the unwired state instead of silently returning a v1-era
12
- * placeholder that would cause RPC reads to misfire on MegaETH.
13
- */
14
- export declare function KernelManagerAddress(mode: EnvMode): `0x${string}`;
15
- /**
16
- * Address of the Skate Kernel Event Emitter for the given env mode.
17
- *
18
- * Same alpha posture as `KernelManagerAddress` — only DEV is wired.
19
- */
20
- export declare function KernelEventEmitterAddress(mode: EnvMode): `0x${string}`;
10
+ /** Address of the Skate Kernel Manager for the given env mode. All three
11
+ * modes alias the same DEV deploy until STAGING / PRODUCTION fork off. */
12
+ export declare function KernelManagerAddress(_mode: EnvMode): `0x${string}`;
13
+ /** Address of the Skate Kernel Event Emitter for the given env mode.
14
+ * Same aliasing posture as `KernelManagerAddress`. */
15
+ export declare function KernelEventEmitterAddress(_mode: EnvMode): `0x${string}`;
21
16
  //# sourceMappingURL=kernel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../../src/deployment/kernel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAkBjC,eAAO,MAAM,yBAAyB,+CAA+C,CAAC;AAoBtF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAIjE,CAAC;AAEF,uDAAuD;AACvD,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,KAAK,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,KAAK,MAAM,EAAE,CAGjE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO,GAAG,KAAK,MAAM,EAAE,CAGtE"}
1
+ {"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../../src/deployment/kernel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAqBjC,eAAO,MAAM,yBAAyB,+CAA+C,CAAC;AACtF,eAAO,MAAM,yBAAyB,+CAA+C,CAAC;AACtF,eAAO,MAAM,yBAAyB,+CAA+C,CAAC;AACtF,eAAO,MAAM,0BAA0B,+CAA+C,CAAC;AAkBvF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAIjE,CAAC;AAEF,uDAAuD;AACvD,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,KAAK,CAEhD;AAED;2EAC2E;AAC3E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,MAAM,EAAE,CAElE;AAED;uDACuD;AACvD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,MAAM,EAAE,CAEvE"}
@@ -9,12 +9,9 @@ export interface PeripheryDeployment {
9
9
  eventEmitter: `0x${string}`;
10
10
  peripheryPoolImpl: `0x${string}`;
11
11
  }
12
- export declare const PERIPHERY_DEV: Partial<Record<CHAIN, PeripheryDeployment>>;
13
12
  /**
14
13
  * Look up the periphery deployment record for a given chain in a given env.
15
- * Returns `null` when the chain has no DEV entry; throws `SdkError` for
16
- * STAGING / PRODUCTION since v2 isn't deployed there yet (mirrors the
17
- * kernel-side `KernelManagerAddress` posture).
14
+ * Returns `null` when the chain has no entry for the chosen env.
18
15
  */
19
16
  export declare function PeripheryDeploymentFor(chain: CHAIN, mode: EnvMode): PeripheryDeployment | null;
20
17
  export declare function PeripheryManagerAddress(chain: CHAIN, mode: EnvMode): `0x${string}` | null;
@@ -1 +1 @@
1
- {"version":3,"file":"periphery.d.ts","sourceRoot":"","sources":["../../src/deployment/periphery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,E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AAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,KAAK,MAAM,EAAE,CAAC;IACzB,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAC;IAChC,SAAS,EAAE,KAAK,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,KAAK,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,KAAK,MAAM,EAAE,CAAC;IAChC,oBAAoB,EAAE,KAAK,MAAM,EAAE,CAAC;IACpC,YAAY,EAAE,KAAK,MAAM,EAAE,CAAC;IAC5B,iBAAiB,EAAE,KAAK,MAAM,EAAE,CAAC;CAClC;AAoDD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,OAAO,GACZ,mBAAmB,GAAG,IAAI,CAS5B;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,OAAO,GACZ,KAAK,MAAM,EAAE,GAAG,IAAI,CAEtB;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,OAAO,GACZ,KAAK,MAAM,EAAE,GAAG,IAAI,CAEtB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,OAAO,GACZ,KAAK,MAAM,EAAE,GAAG,IAAI,CAEtB;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,OAAO,GACZ,KAAK,MAAM,EAAE,GAAG,IAAI,CAEtB"}
@@ -0,0 +1,40 @@
1
+ import { CHAIN, EnvMode } from "../types";
2
+ import type { SuiChain } from "../types/chain-vm";
3
+ /** Deploy-wide Sui addresses. Per-pool object ids live in `SUI_POOLS_<mode>`
4
+ * below; this struct holds the deploy-wide pieces shared across pools. */
5
+ export interface SuiDeployment {
6
+ /** Sui package id that owns the periphery module. */
7
+ peripheryPackage: string;
8
+ }
9
+ /** Returns `null` for an unregistered SuiChain in the chosen mode. */
10
+ export declare function SuiDeploymentFor(chain: SuiChain, mode: EnvMode): SuiDeployment | null;
11
+ /** Per-pool Sui addresses, keyed by `[poolKey][SuiChain]`. `poolKey` matches
12
+ * the key used by `POOL_INFO_Dev` (e.g. "USDC_USDT"). Mirrors `SVM_POOLS_DEV`.
13
+ * - Adding a brand-new pool requires a new key here AND a new pool object
14
+ * in `aggregated/dev.ts` with `...SUI_POOLS_DEV.<key>` in its
15
+ * `peripheryInfo`. */
16
+ export declare const SUI_POOLS_DEV: {
17
+ USDC_USDT: {
18
+ 1001: {
19
+ poolId: string;
20
+ managerCapId: string;
21
+ peripheryPackage: string;
22
+ token0: {
23
+ address: string;
24
+ symbol: string;
25
+ isNative: false;
26
+ decimal: number;
27
+ chainId: CHAIN.SUI;
28
+ };
29
+ token1: {
30
+ address: string;
31
+ symbol: string;
32
+ isNative: false;
33
+ decimal: number;
34
+ chainId: CHAIN.SUI;
35
+ };
36
+ chain: string;
37
+ };
38
+ };
39
+ };
40
+ //# sourceMappingURL=sui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../src/deployment/sui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD;2EAC2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAeD,sEAAsE;AACtE,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,QAAQ,EACf,IAAI,EAAE,OAAO,GACZ,aAAa,GAAG,IAAI,CAStB;AAED;;;;yBAIyB;AACzB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;CA4B6C,CAAC"}