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

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 +2099 -0
  2. package/dist/index.js.map +29 -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 +118 -93
  9. package/src/helpers/derivationPath.ts +52 -0
  10. package/src/helpers/liquidity.ts +50 -43
  11. package/src/helpers/memo.ts +31 -28
  12. package/src/helpers/others.ts +30 -13
  13. package/src/helpers/validators.ts +15 -6
  14. package/src/helpers/web3wallets.ts +178 -0
  15. package/src/index.ts +14 -9
  16. package/src/modules/__tests__/assetValue.test.ts +325 -116
  17. package/src/modules/__tests__/bigIntArithmetics.test.ts +30 -0
  18. package/src/modules/__tests__/swapKitNumber.test.ts +306 -183
  19. package/src/modules/assetValue.ts +216 -152
  20. package/src/modules/bigIntArithmetics.ts +214 -147
  21. package/src/modules/requestClient.ts +29 -0
  22. package/src/modules/swapKitError.ts +32 -5
  23. package/src/modules/swapKitNumber.ts +8 -1
  24. package/src/types/abis/erc20.ts +99 -0
  25. package/src/types/abis/tcEthVault.ts +496 -0
  26. package/src/types/chains.ts +220 -0
  27. package/src/types/commonTypes.ts +119 -0
  28. package/src/types/derivationPath.ts +56 -0
  29. package/src/types/index.ts +9 -0
  30. package/src/types/network.ts +43 -0
  31. package/src/types/sdk.ts +44 -0
  32. package/src/types/tokens.ts +30 -0
  33. package/src/types/wallet.ts +47 -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
- };