@switch-win/sdk 1.0.0 → 1.0.2
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 +19 -2
- package/package.json +1 -1
- package/src/constants.ts +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
# Switch SDK
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@switch-win/sdk)
|
|
4
|
+
[](https://www.npmjs.com/package/@switch-win/sdk)
|
|
5
|
+
|
|
3
6
|
> **Official integration kit for the Switch DEX Aggregator on PulseChain**
|
|
4
7
|
|
|
5
8
|
Everything partners need to integrate Switch swaps and limit orders — API docs, TypeScript types, ABIs, constants, and ready-to-use examples.
|
|
6
9
|
|
|
7
|
-
**Swap API:** `https://quote.switch.win` | **Limit Order API:** `https://
|
|
10
|
+
**Swap API:** `https://quote.switch.win` | **Limit Order API:** `https://quote.switch.win` | **Chain:** PulseChain (369)
|
|
8
11
|
|
|
9
12
|
---
|
|
10
13
|
|
|
@@ -35,6 +38,8 @@ Switch-SDK/
|
|
|
35
38
|
|
|
36
39
|
## Table of Contents
|
|
37
40
|
|
|
41
|
+
0. [Installation](#installation)
|
|
42
|
+
|
|
38
43
|
### Swaps
|
|
39
44
|
|
|
40
45
|
1. [Quickstart](#quickstart)
|
|
@@ -57,6 +62,18 @@ Switch-SDK/
|
|
|
57
62
|
|
|
58
63
|
---
|
|
59
64
|
|
|
65
|
+
## Installation
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm install @switch-win/sdk
|
|
69
|
+
# or
|
|
70
|
+
yarn add @switch-win/sdk
|
|
71
|
+
# or
|
|
72
|
+
pnpm add @switch-win/sdk
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
60
77
|
## Quickstart
|
|
61
78
|
|
|
62
79
|
Get a swap quote and execute it in **three steps**:
|
|
@@ -883,7 +900,7 @@ All constants are importable from [`src/constants.ts`](src/constants.ts).
|
|
|
883
900
|
| **Min fee** | `30` bps (0.30 %) — enforced on-chain by `MIN_FEE` |
|
|
884
901
|
| **Default slippage** | `50` bps (0.50 %) |
|
|
885
902
|
| **Swap API base** | `https://quote.switch.win` |
|
|
886
|
-
| **Limit Order API base** | `https://
|
|
903
|
+
| **Limit Order API base** | `https://quote.switch.win` |
|
|
887
904
|
|
|
888
905
|
---
|
|
889
906
|
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -65,7 +65,7 @@ export const SWITCH_PLS_FLOW = "0x0fD3fD40F06159606165F21047B83136172273E3";
|
|
|
65
65
|
// ── Limit Order API endpoints ───────────────────────────────────────────────
|
|
66
66
|
|
|
67
67
|
/** Base URL for the Switch backend API (limit orders) */
|
|
68
|
-
export const LIMIT_ORDER_API_BASE = "https://
|
|
68
|
+
export const LIMIT_ORDER_API_BASE = "https://quote.switch.win";
|
|
69
69
|
|
|
70
70
|
/** Limit orders REST endpoint */
|
|
71
71
|
export const LIMIT_ORDERS_ENDPOINT = `${LIMIT_ORDER_API_BASE}/limit-orders`;
|