@sun-protocol/sun-sdk-sunswap-v4 0.1.0-beta.0

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/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # @sun-protocol/sun-sdk-sunswap-v4
2
+
3
+ SunSwap V4 pool keys, IDs, planners, contract reads, and position transaction action builders.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @sun-protocol/sun-sdk-sunswap-v4
9
+ ```
10
+
11
+ ## Example
12
+
13
+ ```ts
14
+ import { computeV4PoolId, createV4PoolKey } from '@sun-protocol/sun-sdk-sunswap-v4'
15
+
16
+ const poolKey = createV4PoolKey({
17
+ network: 'mainnet',
18
+ currencyA,
19
+ currencyB,
20
+ fee: 3000,
21
+ })
22
+ const poolId = computeV4PoolId(poolKey)
23
+ ```
24
+
25
+ Primary exports include pool-key normalization, pool ID calculation, hook parameter encoding, planner payload encoding, contract read specifications, and initialize/mint/increase/decrease/collect action builders.
26
+
27
+ This package builds deterministic protocol data and actions. It does not access a wallet, sign, broadcast, or orchestrate approvals. Use `sun.liquidity.v4` and `sun.positions.v4` from `@sun-protocol/sun-sdk-protocols` for complete workflows.
28
+
29
+ Requires Node.js 20 or a compatible JavaScript runtime.
30
+
31
+ [Full API documentation](https://github.com/sun-protocol/sun-sdk/blob/main/docs/sdk/api/sunswap-v4.md)