@skate-org/amm-core-v2 2.0.0-beta.3 → 2.0.0-beta.7

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 CHANGED
@@ -1,214 +1,49 @@
1
1
  # @skate-org/amm-core-v2
2
2
 
3
- ## 2.0.0-beta.3 — 2026-05-18
3
+ ## 2.0.0-beta.7 — 2026-05-21
4
4
 
5
- Internal refactor: per-pool SVM addresses consolidated into one file.
6
- No public type changes, no runtime data changes — `POOL_INFO_Dev` resolves
7
- to the same object shape it did in beta.2.
5
+ Trimmed retired `0x9D62b2b6…` USDC_USDT entry from
6
+ `deployment/aggregated/production.ts`. Doc baselines refreshed
7
+ (`STABILITY.md`, `MIGRATION.md`, `CLAUDE.md`). No public surface
8
+ change versus beta.6.
8
9
 
9
- - **`deployment/svm.ts` new `SVM_POOLS_DEV` export:** map keyed by
10
- `[poolKey][SvmChain]` (e.g. `SVM_POOLS_DEV.USDC_USDT[CHAIN.SOLANA]`)
11
- carrying per-pool PDAs, vaults, mints, and token programs. Validated
12
- at the declaration site via `satisfies Record<string, Partial<Record<
13
- SvmChain, SvmPeripheryInfo>>>`. Additive, non-breaking — public surface
14
- gains the export.
15
- - **`deployment/aggregated/dev.ts` — thin composition:**
16
- `POOL_INFO_Dev.USDC_USDT.peripheryInfo` now spreads
17
- `...SVM_POOLS_DEV.USDC_USDT` instead of inlining the SOLANA literal.
18
- Adding a new SVM chain entry to an existing pool (e.g. Eclipse once it
19
- deploys) is a one-file edit in `svm.ts`.
20
- - **`manager` field on `SvmPeripheryInfo`:** unchanged — duplication
21
- against `SVM_DEPLOYMENT_DEV[chain].manager` is intentional and deferred
22
- to a future PR; dedup would be a public-type change.
10
+ ## 2.0.0-beta (cumulative, 2026-05-07 2026-05-21)
23
11
 
24
- ## 2.0.0-beta.2 2026-05-17
12
+ Sum of beta.0 → beta.6. Surface set against which `2.0.0` final will
13
+ be frozen.
25
14
 
26
- SVM-side periphery wired into the deployment catalog. Solana mainnet
27
- (chain_id 901) goes from "no deployment yet" to LIVE in DEV.
28
-
29
- - **`deployment/svm.ts` (new):** `SVM_DEPLOYMENT_DEV` table per
30
- `SvmChain` carrying deploy-wide pubkeys — `periphery_pool` program,
31
- `action_box` program, `action_box state_v3` PDA, `task_ledger` PDA,
32
- manager — plus a `SvmDeploymentFor(chain, mode)` accessor that
33
- mirrors the kernel/periphery `…For(chain, mode)` pattern. Solana
34
- mainnet (chain_id 901) is populated; Eclipse still empty.
35
- STAGING / PRODUCTION throw `SdkError("not yet deployed")`.
36
- - **`SvmPeripheryInfo` extended:** now carries the per-pool PDAs
37
- (`peripheryPool`, `poolAuthority`, `dust`, `poolToken0Vault`,
38
- `poolToken1Vault`) plus `manager` so builders can populate
39
- `accountsStrict({...})` from the catalog without keypair math at
40
- call time. `tokenProgramId0/1` / `token0/1` / `chain` carry over
41
- from beta.1. Additive type change (existing fields kept).
42
- - **`POOL_INFO_Dev.USDC_USDT.peripheryInfo[CHAIN.SOLANA]`
43
- populated** with the deployed `usdc-usdt-1bps` pool — PDAs and
44
- vaults verified on-chain 2026-05-15 against the handover repo at
45
- `/home/phil/works/handover/amm/solana_contracts/skate_amm/
46
- config/pools.deployment.json`. Same kernel route as Arbitrum
47
- periphery — Solana joins as an additional periphery for the same
48
- kernel pool.
49
- - **Retrieval helpers** now report SOLANA alongside ARBITRUM:
50
- `getSupportedChains("DEV")` returns `[CHAIN.SOLANA, CHAIN.ARBITRUM]`,
51
- `findTokensBySymbol("USDC")` finds both the Arbitrum USDC ERC-20 and
52
- the Solana USDC mint. Unit tests updated accordingly.
53
- - **`svmBytes32Base58ToEvmAddress(value)` (new export)** in
54
- `adapter/skate.ts`. Composes `bytes32ToEvmAddress(base58ToBytes32(...))`
55
- for the common case of decoding an SVM-stored EVM address
56
- (`kernel_pool`, `kernel_factory`) back to its 0x-prefixed lowercase
57
- form. Used by `@skate-org/amm-svm-v2`'s `readPeripheryPool`.
58
-
59
- ## 2.0.0-beta.1 — 2026-05-07
60
-
61
- Two new token-lookup helpers in `deployment/aggregated/retrieval.ts`:
62
-
63
- - **`findTokensBySymbol(symbol, chainIds?, mode?)`** — search the
64
- deployment catalog for tokens with a given symbol, optionally
65
- filtered to specific chains. Symbol comparison is case-insensitive;
66
- results are deduped by `(chainId, address)`. Pass `chainIds` as
67
- `undefined` (or omit) to search every supported chain.
68
- - **`getTokenSymbol(address, chainId, mode?)`** — reverse lookup;
69
- returns the token symbol at `(address, chainId)`, or `null` if no
70
- supported token matches. Address comparison is case-insensitive.
71
-
72
- Both functions reuse the existing `getSupportedTokens` /
73
- `getSupportedChains` accessors so they automatically pick up new pools
74
- as the deployment table grows. 12 new unit tests covering case-
75
- insensitive matching, dedup behavior, mixed-valid/invalid `chainIds`,
76
- and unsupported-chain returns.
77
-
78
- ## 2.0.0-beta.0 — 2026-05-07
79
-
80
- First **beta**. Promoted under the `beta` dist-tag; `latest` stays at
81
- `1.0.0` (v1 line) per the policy in `CLAUDE.md`. **Loose beta** —
82
- documented breaking changes are still allowed within `2.0.0-beta.x`;
83
- `2.0.0` final is the strict surface freeze.
84
-
85
- **Breaking — internal-leak surface pulls.** Symbols that were exported in
86
- the alpha line but never intended to be load-bearing have moved to module-
87
- private. Internal SDK callsites all have sanctioned replacements:
88
-
89
- - `KERNEL_EXECUTOR_REGISTRY_Dev`, `KERNEL_MESSAGE_BOX_Dev`,
15
+ - **Surface pulls (beta.0):** removed alpha-era leaks
16
+ `KERNEL_EXECUTOR_REGISTRY_Dev`, `KERNEL_MESSAGE_BOX_Dev`,
90
17
  `KERNEL_ACCOUNT_REGISTRY_Dev`, `KERNEL_MANAGER_Dev`,
91
- `KERNEL_EVENT_EMITTER_Dev`, `KERNEL_POOL_IMPL_Dev` removed. Use
92
- `KernelManagerAddress(mode)` / `KernelEventEmitterAddress(mode)` /
93
- `POOL_INFO_Dev`. `KERNEL_POOL_USDC_USDT_Dev` stays exported as a
94
- smoke-test cross-check.
95
- - `PERIPHERY_PROD`, `PERIPHERY_STAGING` removed (were empty `{}`
96
- placeholders). `PeripheryDeploymentFor(chain, mode)` now throws
97
- `SdkError("…not yet deployed…")` for STAGING / PRODUCTION,
98
- mirroring the kernel-side posture introduced in alpha.6.
99
- - `bytes32HexRegex`, `isHexString`, `isHexStringLoose` removed. Use
100
- `evmAddressToBytes32` / `toBytes32Address`.
101
- - `PeripheryDeploymentFor` / `PeripheryManagerAddress` /
102
- `PeripheryEventEmitterAddress` / `SkateGatewayAddress` /
103
- `ActionBoxAddress` lost their default `mode = "PRODUCTION"` argument
104
- `mode` is now mandatory.
105
-
106
- Surface count: 73 → 62. See `STABILITY.md` (repo root) for the full
107
- per-package classification.
108
-
109
- ## 2.0.0-alpha.8 2026-05-07
110
-
111
- Lockstep bump — paired with the api `streamSwapQuote` going live as a
112
- polling stub for the deferred WebSocket. This package's source is
113
- unchanged versus `2.0.0-alpha.7`.
114
-
115
- ## 2.0.0-alpha.7 — 2026-05-07
116
-
117
- Lockstep bump — paired with the api action-by-user clients, polling
118
- `subscribeSwapQuote` helper, and svm browser-bundle build fix.
119
- This package's source is unchanged versus `2.0.0-alpha.6`.
120
-
121
- ## 2.0.0-alpha.6 — 2026-05-07
122
-
123
- - **Per-env kernel chain config.** New `KERNEL_CHAIN_BY_MODE: Record<EnvMode, CHAIN>`
124
- + `KernelChain(mode)` accessor. Defaults every env to `CHAIN.MEGAETH` today;
125
- pointing a future env at a different kernel chain is a one-line edit.
126
- - **Breaking — `KernelManagerAddress` / `KernelEventEmitterAddress` throw on
127
- STAGING / PRODUCTION.** Previously returned v1 Skate-chain placeholder
128
- addresses (`0xB328…`, `0x4688…`) that don't exist on MegaETH; combined with
129
- the kernel-chain hardcode, this caused silent reads from non-existent
130
- contracts. Now both throw `SdkError("…not yet deployed to {mode}…")`. The
131
- default `mode = "PRODUCTION"` argument is removed — callers must be explicit.
132
-
133
- ## 2.0.0-alpha.5 — 2026-05-06
134
-
135
- Lockstep bump — paired with the kernel lens helpers ported into
136
- `@skate-org/amm-evm-v2`. This package's source is unchanged versus
137
- `2.0.0-alpha.4`.
138
-
139
- ## 2.0.0-alpha.4 — 2026-05-06
140
-
141
- Lockstep bump — paired with the `SwapQuote` schema fix in
142
- `@skate-org/amm-api-v2`. This package's source is unchanged versus
143
- `2.0.0-alpha.3`.
144
-
145
- ## 2.0.0-alpha.3 — 2026-05-06
146
-
147
- Lockstep bump — paired with the SVM/Sui efficiency pass in
148
- `@skate-org/amm-svm-v2` and `@skate-org/amm-sui-v2`. This package's
149
- source is unchanged versus `2.0.0-alpha.2`.
150
-
151
- ## 2.0.0-alpha.2 — 2026-05-05
152
-
153
- Plan C of the SVM/Sui integration. Adds `@skate-org/amm-sui-v2` to
154
- the workspace; this package's source is unchanged versus
155
- `2.0.0-alpha.1` (re-versioned in lockstep).
156
-
157
- ## 2.0.0-alpha.1 — 2026-05-05
158
-
159
- Plan B of the SVM/Sui integration. Adds `@skate-org/amm-svm-v2` to
160
- the workspace; this package's source is unchanged versus
161
- `2.0.0-alpha.0` (re-versioned in lockstep).
162
-
163
- ## 2.0.0-alpha.0 — 2026-05-05
164
-
165
- Plan A of the SVM/Sui integration (see
166
- docs/superpowers/specs/2026-05-04-svm-sui-integration-design.md).
167
-
168
- - Add uniswap-v3 math module (`tickMath`, `sqrtPriceMath`,
169
- `liquidityMath`, `fullMath`). Relocated from
170
- `@skate-org/amm-evm-v2`.
171
- - Add `EvmChain` / `SvmChain` / `SuiChain` literal-union sub-types of
172
- `CHAIN`.
173
- - **Breaking:** `PoolInfoType.peripheryInfo` is now a chain-id-
174
- discriminated mapped type. EVM chain entries narrow to
175
- `EvmPeripheryInfo`; SVM chain entries to `SvmPeripheryInfo`; Sui
176
- to `SuiPeripheryInfo`. Code that read
177
- `pool.peripheryInfo[chain].address` as `0x${string}` unconditionally
178
- now type-narrows by chain.
179
- - New named types `EvmPeripheryInfo`, `SvmPeripheryInfo`,
180
- `SuiPeripheryInfo`, `PeripheryInfoFor<K>`.
181
- - Cross-VM utilities (`base58ToBytes32`, `evmAddressToBytes32`,
182
- `bytes32ToBase58`, `toBytes32Address`, `fromBytes32Address`)
183
- unchanged in this release — already in core under
184
- `adapter/skate.ts`.
185
-
186
- ## 1.0.0 — 2026-05-04
187
-
188
- Realigning all four `@skate-org/amm-*-v2` packages at a single version
189
- for the coherent v1 SDK release. No source changes vs 0.4.0 — this is
190
- purely a versioning realignment so consumers can install
191
- `@skate-org/amm-core-v2@1`, `@skate-org/amm-api-v2@1`, `@skate-org/amm-evm-v2@1`,
192
- `@skate-org/amm-v2@1` and know they belong to the same release.
193
-
194
- ## 0.4.0 — 2026-04-29
195
-
196
- - Add full DEV deployment table for Arbitrum periphery (`PERIPHERY_DEV`,
197
- `PeripheryManagerAddress`, `PeripheryEventEmitterAddress`, `SkateGatewayAddress`,
198
- `ActionBoxAddress`).
199
- - Add `KERNEL_EVENT_EMITTER_Dev` and tighten `KernelEventEmitterAddress` return
200
- type from `| null` to `0x${string}`.
201
- - Wire `KERNEL_POOL_USDC_USDT_Dev` and the rest of the DEV kernel address constants.
202
-
203
- ## 0.3.0 — 2026-04-25
204
-
205
- - Phase 4: shared `SdkError` base; cross-package error hierarchy.
206
-
207
- ## 0.2.0 — 2026-04-22
208
-
209
- - Phase 3: full chain table + VM enum (`AptosVM` removed; `TEMPO 4217` added).
210
-
211
- ## 0.1.0 — 2026-04-20
212
-
213
- - Initial: `CHAIN`, `VM`, `EnvMode*`, `Token`, `TokenPair`, `ActionStatus`,
214
- `TaskPhase`, `KernelManagerAddress`, `POOL_INFO_{Dev,Staging,Production}`.
18
+ `KERNEL_EVENT_EMITTER_Dev`, `KERNEL_POOL_IMPL_Dev`,
19
+ `PERIPHERY_PROD`, `PERIPHERY_STAGING`, `bytes32HexRegex`,
20
+ `isHexString`, `isHexStringLoose`. Consumers move to
21
+ `KernelManagerAddress(mode)` / `PeripheryDeploymentFor(chain,
22
+ mode)` accessors.
23
+ - **`findTokensBySymbol` / `getTokenSymbol` (beta.1, beta.6):**
24
+ added in beta.1 with positional args, switched to object input
25
+ `findTokensBySymbol({ symbol, chainIds?, mode? })` in beta.6 to
26
+ remove the awkward `findTokensBySymbol("USDC", undefined, "DEV")`
27
+ call shape. Loose-beta breaking change.
28
+ - **SVM deployment catalog (beta.2, beta.3):** new
29
+ `SVM_DEPLOYMENT_DEV`, per-pool `SVM_POOLS_DEV`,
30
+ `SvmDeploymentFor(chain, mode)`. Solana mainnet
31
+ `usdc-usdt-1bps` periphery LIVE in DEV. Eclipse / STAGING /
32
+ PRODUCTION throw `SdkError("not yet deployed")`. New helper
33
+ `svmBytes32Base58ToEvmAddress` for decoding on-chain kernel-address
34
+ fields.
35
+ - **Sui deployment catalog (beta.6):** new `SUI_POOLS_DEV` +
36
+ `SUI_DEPLOYMENT_DEV` + `SuiDeploymentFor(chain, mode)`. Sui
37
+ USDC/USDT periphery (`0xc014f7cb…`) wired to DEV kernel pool
38
+ `0x2c23334e…`.
39
+ - **API ActionFields (beta.4):** v2-pure shape flat `destChainId`
40
+ / `destVmType`, `peripheryFunctionMeta`, `poolInfo`; dropped v1
41
+ emulation fields (`legacyStatus`, flat tx-hash denorms, `tokens`,
42
+ `amounts`).
43
+ - **Typed argument shapes (beta.5):** sibling exports `SwapArgs`,
44
+ `MintArgs`, `BurnArgs`, `DecreaseLiquidityArgs`.
45
+ `peripheryFunctionMeta.args` for `mint` / `increaseLiquidity` now
46
+ carries `liquidity` + `amount{0,1}Unused`.
47
+
48
+ Surface count: 25 → 23 (one-time pull at beta.0). See
49
+ `STABILITY.md` for the per-symbol classification.
@@ -1 +1 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/deployment/aggregated/dev.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,YA4B3B,CAAC"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/deployment/aggregated/dev.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,YA6B3B,CAAC"}
@@ -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":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,eAAO,MAAM,oBAAoB,EAAE,YAAiB,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,cA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;AAED,wBAAgB,yCAAyC,CAAC,CAAC,SAAS,KAAK,EACvE,UAAU,EAAE,KAAK,MAAM,EAAE,EACzB,OAAO,EAAE,CAAC,EACV,IAAI,CAAC,EAAE,OAAO,GACb,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAC9B,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,5 +1,6 @@
1
1
  export * from "./kernel";
2
2
  export * from "./periphery";
3
3
  export * from "./svm";
4
+ export * 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":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC"}
@@ -0,0 +1,42 @@
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
+ export declare const SUI_DEPLOYMENT_DEV: Partial<Record<SuiChain, SuiDeployment>>;
10
+ /** Returns `null` for an unregistered SuiChain in DEV; throws for
11
+ * STAGING/PRODUCTION (no Sui deploy yet). */
12
+ export declare function SuiDeploymentFor(chain: SuiChain, mode: EnvMode): SuiDeployment | null;
13
+ /** Per-pool Sui addresses, keyed by `[poolKey][SuiChain]`. `poolKey` matches
14
+ * the key used by `POOL_INFO_Dev` (e.g. "USDC_USDT"). Mirrors `SVM_POOLS_DEV`.
15
+ * - Adding a brand-new pool requires a new key here AND a new pool object
16
+ * in `aggregated/dev.ts` with `...SUI_POOLS_DEV.<key>` in its
17
+ * `peripheryInfo`. */
18
+ export declare const SUI_POOLS_DEV: {
19
+ USDC_USDT: {
20
+ 1001: {
21
+ poolId: string;
22
+ managerCapId: string;
23
+ peripheryPackage: string;
24
+ token0: {
25
+ address: string;
26
+ symbol: string;
27
+ isNative: false;
28
+ decimal: number;
29
+ chainId: CHAIN.SUI;
30
+ };
31
+ token1: {
32
+ address: string;
33
+ symbol: string;
34
+ isNative: false;
35
+ decimal: number;
36
+ chainId: CHAIN.SUI;
37
+ };
38
+ chain: string;
39
+ };
40
+ };
41
+ };
42
+ //# 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;AAIlD;2EAC2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,CAKvE,CAAC;AAEF;8CAC8C;AAC9C,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,QAAQ,EACf,IAAI,EAAE,OAAO,GACZ,aAAa,GAAG,IAAI,CAItB;AAED;;;;yBAIyB;AACzB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;CA4B6C,CAAC"}
package/dist/index.cjs CHANGED
@@ -42,10 +42,13 @@ __export(index_exports, {
42
42
  PeripheryDeploymentFor: () => PeripheryDeploymentFor,
43
43
  PeripheryEventEmitterAddress: () => PeripheryEventEmitterAddress,
44
44
  PeripheryManagerAddress: () => PeripheryManagerAddress,
45
+ SUI_DEPLOYMENT_DEV: () => SUI_DEPLOYMENT_DEV,
46
+ SUI_POOLS_DEV: () => SUI_POOLS_DEV,
45
47
  SVM_DEPLOYMENT_DEV: () => SVM_DEPLOYMENT_DEV,
46
48
  SVM_POOLS_DEV: () => SVM_POOLS_DEV,
47
49
  SdkError: () => SdkError,
48
50
  SkateGatewayAddress: () => SkateGatewayAddress,
51
+ SuiDeploymentFor: () => SuiDeploymentFor,
49
52
  SvmDeploymentFor: () => SvmDeploymentFor,
50
53
  TaskPhase: () => TaskPhase,
51
54
  VM: () => VM,
@@ -337,6 +340,42 @@ var SVM_POOLS_DEV = {
337
340
  }
338
341
  };
339
342
 
343
+ // src/deployment/sui.ts
344
+ var SUI_DEPLOYMENT_DEV = {
345
+ [1001 /* SUI */]: {
346
+ peripheryPackage: "0x96e1d3897efee30bede047a14d186a952350d4759d3175f76ff6ac2c4a121901"
347
+ }
348
+ };
349
+ function SuiDeploymentFor(chain, mode) {
350
+ if (mode !== "DEV")
351
+ return notDeployed("SuiDeploymentFor", mode, "SDK v2 Sui side");
352
+ return SUI_DEPLOYMENT_DEV[chain] ?? null;
353
+ }
354
+ var SUI_POOLS_DEV = {
355
+ USDC_USDT: {
356
+ [1001 /* SUI */]: {
357
+ poolId: "0xc014f7cb0a2604fb887d09165242828e6fe913f30d7ae2bea80199caed5ccbcb",
358
+ managerCapId: "0xca34c6dff464f42a349294fa9fbe67a6d72eb999081db8de3fd56672b68863ee",
359
+ peripheryPackage: "0x96e1d3897efee30bede047a14d186a952350d4759d3175f76ff6ac2c4a121901",
360
+ token0: {
361
+ address: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
362
+ symbol: "USDC",
363
+ isNative: false,
364
+ decimal: 6,
365
+ chainId: 1001 /* SUI */
366
+ },
367
+ token1: {
368
+ address: "0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068::usdt::USDT",
369
+ symbol: "USDT",
370
+ isNative: false,
371
+ decimal: 6,
372
+ chainId: 1001 /* SUI */
373
+ },
374
+ chain: "SUI"
375
+ }
376
+ }
377
+ };
378
+
340
379
  // src/deployment/aggregated/dev.ts
341
380
  var POOL_INFO_Dev = {
342
381
  USDC_USDT: {
@@ -363,7 +402,8 @@ var POOL_INFO_Dev = {
363
402
  address: "0x0433CCB013a590eA4231aAC9ddf05bb753c14127",
364
403
  chain: "ARBITRUM"
365
404
  },
366
- ...SVM_POOLS_DEV.USDC_USDT
405
+ ...SVM_POOLS_DEV.USDC_USDT,
406
+ ...SUI_POOLS_DEV.USDC_USDT
367
407
  }
368
408
  }
369
409
  };
@@ -460,7 +500,8 @@ function getPeripheryDetailsByKernelPoolAndChainId(kernelPool, chainId, mode = "
460
500
  const info = getAllPoolInfo(mode);
461
501
  return info[poolKey]?.peripheryInfo[chainId] ?? null;
462
502
  }
463
- function findTokensBySymbol(symbol, chainIds, mode = "PRODUCTION") {
503
+ function findTokensBySymbol(args) {
504
+ const { symbol, chainIds, mode = "PRODUCTION" } = args;
464
505
  const normalized = symbol.toLowerCase();
465
506
  const chains = chainIds ?? getSupportedChains(mode);
466
507
  const out = [];
@@ -1036,10 +1077,13 @@ function addDelta(x, y) {
1036
1077
  PeripheryDeploymentFor,
1037
1078
  PeripheryEventEmitterAddress,
1038
1079
  PeripheryManagerAddress,
1080
+ SUI_DEPLOYMENT_DEV,
1081
+ SUI_POOLS_DEV,
1039
1082
  SVM_DEPLOYMENT_DEV,
1040
1083
  SVM_POOLS_DEV,
1041
1084
  SdkError,
1042
1085
  SkateGatewayAddress,
1086
+ SuiDeploymentFor,
1043
1087
  SvmDeploymentFor,
1044
1088
  TaskPhase,
1045
1089
  VM,