@swapkit/helpers 1.0.0-rc.9 → 1.0.0-rc.90

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 (38) hide show
  1. package/dist/index.js +2065 -0
  2. package/dist/index.js.map +28 -0
  3. package/package.json +24 -37
  4. package/src/helpers/__tests__/asset.test.ts +126 -108
  5. package/src/helpers/__tests__/memo.test.ts +52 -40
  6. package/src/helpers/__tests__/others.test.ts +42 -37
  7. package/src/helpers/__tests__/validators.test.ts +24 -0
  8. package/src/helpers/asset.ts +119 -87
  9. package/src/helpers/liquidity.ts +50 -43
  10. package/src/helpers/memo.ts +31 -28
  11. package/src/helpers/others.ts +29 -12
  12. package/src/helpers/validators.ts +15 -6
  13. package/src/helpers/web3wallets.ts +178 -0
  14. package/src/index.ts +13 -9
  15. package/src/modules/__tests__/assetValue.test.ts +325 -116
  16. package/src/modules/__tests__/bigIntArithmetics.test.ts +30 -0
  17. package/src/modules/__tests__/swapKitNumber.test.ts +306 -183
  18. package/src/modules/assetValue.ts +216 -152
  19. package/src/modules/bigIntArithmetics.ts +214 -147
  20. package/src/modules/requestClient.ts +29 -0
  21. package/src/modules/swapKitError.ts +32 -5
  22. package/src/modules/swapKitNumber.ts +8 -1
  23. package/src/types/abis/erc20.ts +99 -0
  24. package/src/types/abis/tcEthVault.ts +496 -0
  25. package/src/types/chains.ts +220 -0
  26. package/src/types/commonTypes.ts +119 -0
  27. package/src/types/derivationPath.ts +56 -0
  28. package/src/types/index.ts +10 -0
  29. package/src/types/network.ts +43 -0
  30. package/src/types/sdk.ts +11 -0
  31. package/src/types/tokens.ts +30 -0
  32. package/src/types/transactions.ts +45 -0
  33. package/src/types/wallet.ts +39 -0
  34. package/LICENSE +0 -201
  35. package/dist/index.cjs +0 -1
  36. package/dist/index.d.ts +0 -354
  37. package/dist/index.es.js +0 -1054
  38. package/src/helpers/request.ts +0 -16
@@ -1,16 +0,0 @@
1
- import type { Options } from 'ky';
2
- import ky from 'ky';
3
-
4
- const kyClient = ky.create({
5
- headers: {
6
- referrer: 'https://sk.thorswap.net',
7
- referer: 'https://sk.thorswap.net',
8
- 'Content-Type': 'application/json',
9
- },
10
- });
11
-
12
- export const RequestClient = {
13
- get: <T>(url: string | URL | Request, options?: Options) => kyClient.get(url, options).json<T>(),
14
- post: <T>(url: string | URL | Request, options?: Options) =>
15
- kyClient.post(url, options).json<T>(),
16
- };