@xswap-link/sdk 0.15.0 → 0.15.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/.eslintrc.json +1 -0
- package/CHANGELOG.md +16 -0
- package/README.md +22 -4
- package/dist/index.d.mts +47 -1
- package/dist/index.d.ts +47 -1
- package/dist/index.global.js +94 -88
- package/dist/index.js +1378 -985
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1256 -863
- package/dist/index.mjs.map +1 -1
- package/example/index.html +12 -0
- package/example/package.json +24 -0
- package/example/pnpm-lock.yaml +1164 -0
- package/example/src/App.tsx +421 -0
- package/example/src/main.tsx +8 -0
- package/example/vite.config.ts +9 -0
- package/package.json +2 -1
- package/postcss.config.js +2 -0
- package/src/assets/icons/ChevronRightThinIcon.tsx +23 -0
- package/src/assets/icons/InfoThinIcon.tsx +33 -0
- package/src/assets/icons/RedirectThinIcon.tsx +15 -0
- package/src/assets/icons/index.ts +3 -0
- package/src/components/Swap/Header/index.tsx +3 -1
- package/src/components/Swap/HistoryView/ActivityCard/index.tsx +2 -2
- package/src/components/Swap/ReorderButton/ReorderButton.tsx +4 -1
- package/src/components/Swap/SettingsView/Delivery/index.tsx +3 -3
- package/src/components/Swap/SettingsView/InfiniteApproval/index.tsx +3 -3
- package/src/components/Swap/SettingsView/Slippage/index.tsx +5 -3
- package/src/components/Swap/SwapView/ConfirmationView/TokenTiles/index.tsx +5 -2
- package/src/components/Swap/SwapView/ConfirmationView/TxOverview/Header/index.tsx +1 -1
- package/src/components/Swap/SwapView/ConfirmationView/TxOverview/index.tsx +12 -7
- package/src/components/Swap/SwapView/ConfirmationView/TxProgress/index.tsx +136 -0
- package/src/components/Swap/SwapView/ConfirmationView/TxResult/index.tsx +108 -26
- package/src/components/Swap/SwapView/ConfirmationView/index.tsx +19 -4
- package/src/components/Swap/SwapView/FeesPanel/Fees/index.tsx +12 -6
- package/src/components/Swap/SwapView/FeesPanel/index.tsx +3 -1
- package/src/components/Swap/SwapView/SwapPanel/AmountPanel/index.tsx +9 -0
- package/src/components/Swap/SwapView/SwapPanel/TokenPanel/ChainPicker/index.tsx +1 -1
- package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/NetworkFilter/index.tsx +52 -42
- package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/TokenItem/index.tsx +1 -1
- package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/index.tsx +5 -5
- package/src/components/Swap/SwapView/SwapPanel/TokenPanel/index.tsx +24 -2
- package/src/components/Swap/SwapView/SwapPanel/WalletPanel/index.tsx +14 -3
- package/src/components/Swap/SwapView/SwapPanel/index.tsx +14 -2
- package/src/components/Swap/SwapView/WalletPicker/index.tsx +1 -1
- package/src/components/ToggleButton/index.tsx +5 -3
- package/src/components/TxModal/index.tsx +2 -6
- package/src/components/global.css +85 -0
- package/src/config/fonts.ts +15 -2
- package/src/context/SwapProvider.tsx +22 -7
- package/src/context/TxUIWrapper.tsx +34 -4
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useCrossChainDelivery.ts +143 -0
- package/src/models/Route.ts +13 -0
- package/src/models/TransactionDelivery.ts +40 -0
- package/src/models/index.ts +1 -0
- package/src/services/api.ts +23 -0
- package/tailwind.config.js +3 -9
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>XSwap SDK playground</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xswap-sdk-example",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite --force",
|
|
7
|
+
"build": "vite build"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@xswap-link/sdk": "link:..",
|
|
11
|
+
"buffer": "^6.0.3",
|
|
12
|
+
"react": "^18.2.0",
|
|
13
|
+
"react-dom": "^18.2.0"
|
|
14
|
+
},
|
|
15
|
+
"pnpm": {
|
|
16
|
+
"onlyBuiltDependencies": ["esbuild"]
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/react": "^18.2.0",
|
|
20
|
+
"@types/react-dom": "^18.2.0",
|
|
21
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
22
|
+
"vite": "^6.0.0"
|
|
23
|
+
}
|
|
24
|
+
}
|