@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.
Files changed (58) hide show
  1. package/.eslintrc.json +1 -0
  2. package/CHANGELOG.md +16 -0
  3. package/README.md +22 -4
  4. package/dist/index.d.mts +47 -1
  5. package/dist/index.d.ts +47 -1
  6. package/dist/index.global.js +94 -88
  7. package/dist/index.js +1378 -985
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +1256 -863
  10. package/dist/index.mjs.map +1 -1
  11. package/example/index.html +12 -0
  12. package/example/package.json +24 -0
  13. package/example/pnpm-lock.yaml +1164 -0
  14. package/example/src/App.tsx +421 -0
  15. package/example/src/main.tsx +8 -0
  16. package/example/vite.config.ts +9 -0
  17. package/package.json +2 -1
  18. package/postcss.config.js +2 -0
  19. package/src/assets/icons/ChevronRightThinIcon.tsx +23 -0
  20. package/src/assets/icons/InfoThinIcon.tsx +33 -0
  21. package/src/assets/icons/RedirectThinIcon.tsx +15 -0
  22. package/src/assets/icons/index.ts +3 -0
  23. package/src/components/Swap/Header/index.tsx +3 -1
  24. package/src/components/Swap/HistoryView/ActivityCard/index.tsx +2 -2
  25. package/src/components/Swap/ReorderButton/ReorderButton.tsx +4 -1
  26. package/src/components/Swap/SettingsView/Delivery/index.tsx +3 -3
  27. package/src/components/Swap/SettingsView/InfiniteApproval/index.tsx +3 -3
  28. package/src/components/Swap/SettingsView/Slippage/index.tsx +5 -3
  29. package/src/components/Swap/SwapView/ConfirmationView/TokenTiles/index.tsx +5 -2
  30. package/src/components/Swap/SwapView/ConfirmationView/TxOverview/Header/index.tsx +1 -1
  31. package/src/components/Swap/SwapView/ConfirmationView/TxOverview/index.tsx +12 -7
  32. package/src/components/Swap/SwapView/ConfirmationView/TxProgress/index.tsx +136 -0
  33. package/src/components/Swap/SwapView/ConfirmationView/TxResult/index.tsx +108 -26
  34. package/src/components/Swap/SwapView/ConfirmationView/index.tsx +19 -4
  35. package/src/components/Swap/SwapView/FeesPanel/Fees/index.tsx +12 -6
  36. package/src/components/Swap/SwapView/FeesPanel/index.tsx +3 -1
  37. package/src/components/Swap/SwapView/SwapPanel/AmountPanel/index.tsx +9 -0
  38. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/ChainPicker/index.tsx +1 -1
  39. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/NetworkFilter/index.tsx +52 -42
  40. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/TokenItem/index.tsx +1 -1
  41. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/index.tsx +5 -5
  42. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/index.tsx +24 -2
  43. package/src/components/Swap/SwapView/SwapPanel/WalletPanel/index.tsx +14 -3
  44. package/src/components/Swap/SwapView/SwapPanel/index.tsx +14 -2
  45. package/src/components/Swap/SwapView/WalletPicker/index.tsx +1 -1
  46. package/src/components/ToggleButton/index.tsx +5 -3
  47. package/src/components/TxModal/index.tsx +2 -6
  48. package/src/components/global.css +85 -0
  49. package/src/config/fonts.ts +15 -2
  50. package/src/context/SwapProvider.tsx +22 -7
  51. package/src/context/TxUIWrapper.tsx +34 -4
  52. package/src/hooks/index.ts +1 -0
  53. package/src/hooks/useCrossChainDelivery.ts +143 -0
  54. package/src/models/Route.ts +13 -0
  55. package/src/models/TransactionDelivery.ts +40 -0
  56. package/src/models/index.ts +1 -0
  57. package/src/services/api.ts +23 -0
  58. 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
+ }