@dzapio/sdk 2.0.3 → 2.0.5

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 (222) hide show
  1. package/dist/examples/chain-utils.d.ts +1 -0
  2. package/dist/examples/chain-utils.js +20 -0
  3. package/dist/examples/permit-utils.d.ts +1 -0
  4. package/dist/examples/permit-utils.js +90 -0
  5. package/dist/examples/token-utils.d.ts +1 -0
  6. package/dist/examples/token-utils.js +41 -0
  7. package/dist/examples/trade-operations.d.ts +1 -0
  8. package/dist/examples/trade-operations.js +89 -0
  9. package/dist/examples/zap-operations.d.ts +1 -0
  10. package/dist/examples/zap-operations.js +69 -0
  11. package/dist/index.d.ts +9 -7
  12. package/dist/index.js +1 -1
  13. package/dist/index.m.js +1 -1
  14. package/dist/index.umd.js +1 -1
  15. package/dist/src/api/index.d.ts +26 -0
  16. package/dist/src/api/index.js +140 -0
  17. package/dist/src/artifacts/ERC20Permit.d.ts +374 -0
  18. package/dist/src/artifacts/ERC20Permit.js +469 -0
  19. package/dist/src/artifacts/Permit2.d.ts +700 -0
  20. package/dist/src/artifacts/Permit2.js +904 -0
  21. package/dist/src/artifacts/Permit2Proxy.d.ts +416 -0
  22. package/dist/src/artifacts/Permit2Proxy.js +206 -0
  23. package/dist/src/artifacts/default/DZapCoreAbi.d.ts +2 -0
  24. package/dist/src/artifacts/default/DZapCoreAbi.js +3079 -0
  25. package/dist/src/artifacts/default/DZapCoreV2Abi.d.ts +2 -0
  26. package/dist/src/artifacts/default/DZapCoreV2Abi.js +3719 -0
  27. package/dist/src/artifacts/default/DZapDcaAbi.d.ts +2 -0
  28. package/dist/src/artifacts/default/DZapDcaAbi.js +1829 -0
  29. package/dist/src/artifacts/default/Permit2Abi.d.ts +700 -0
  30. package/dist/src/artifacts/default/Permit2Abi.js +904 -0
  31. package/dist/src/artifacts/default/erc20Abi.d.ts +165 -0
  32. package/dist/src/artifacts/default/erc20Abi.js +220 -0
  33. package/dist/src/artifacts/default/index.d.ts +6 -0
  34. package/dist/src/artifacts/default/index.js +13 -0
  35. package/dist/src/artifacts/index.d.ts +2 -0
  36. package/dist/src/artifacts/index.js +9 -0
  37. package/dist/src/artifacts/staging/DZapCoreSwapAbi.d.ts +2 -0
  38. package/dist/src/artifacts/staging/DZapCoreSwapAbi.js +3079 -0
  39. package/dist/src/artifacts/staging/index.d.ts +2 -0
  40. package/dist/src/artifacts/staging/index.js +5 -0
  41. package/dist/src/axios/baseClient.d.ts +2 -0
  42. package/dist/src/axios/baseClient.js +7 -0
  43. package/dist/src/axios/index.d.ts +8 -0
  44. package/dist/src/axios/index.js +34 -0
  45. package/dist/src/chains/definitions/arthera.d.ts +35 -0
  46. package/dist/src/chains/definitions/arthera.js +28 -0
  47. package/dist/src/chains/definitions/fiveIre.d.ts +35 -0
  48. package/dist/src/chains/definitions/fiveIre.js +28 -0
  49. package/dist/src/chains/definitions/hyperEvm.d.ts +35 -0
  50. package/dist/src/chains/definitions/hyperEvm.js +26 -0
  51. package/dist/src/chains/definitions/hyperliquid.d.ts +35 -0
  52. package/dist/src/chains/definitions/hyperliquid.js +26 -0
  53. package/dist/src/chains/index.d.ts +143 -0
  54. package/dist/src/chains/index.js +21 -0
  55. package/dist/src/config/index.d.ts +36 -0
  56. package/dist/src/config/index.js +59 -0
  57. package/dist/src/constants/address.d.ts +12 -0
  58. package/dist/src/constants/address.js +27 -0
  59. package/dist/src/constants/approval.d.ts +7 -0
  60. package/dist/src/constants/approval.js +17 -0
  61. package/dist/src/constants/axios.d.ts +2 -0
  62. package/dist/src/constants/axios.js +5 -0
  63. package/dist/src/constants/chains.d.ts +18 -0
  64. package/dist/src/constants/chains.js +21 -0
  65. package/dist/src/constants/contract.d.ts +6 -0
  66. package/dist/src/constants/contract.js +18 -0
  67. package/dist/src/constants/erc20.d.ts +25 -0
  68. package/dist/src/constants/erc20.js +28 -0
  69. package/dist/src/constants/httpMethods.d.ts +2 -0
  70. package/dist/src/constants/httpMethods.js +5 -0
  71. package/dist/src/constants/index.d.ts +48 -0
  72. package/dist/src/constants/index.js +53 -0
  73. package/dist/src/constants/permit.d.ts +29 -0
  74. package/dist/src/constants/permit.js +33 -0
  75. package/dist/src/constants/permit2.d.ts +2 -0
  76. package/dist/src/constants/permit2.js +5 -0
  77. package/dist/src/constants/rpc.d.ts +2 -0
  78. package/dist/src/constants/rpc.js +5 -0
  79. package/dist/src/constants/urlConstants.d.ts +15 -0
  80. package/dist/src/constants/urlConstants.js +18 -0
  81. package/dist/src/dZapClient/index.d.ts +1013 -0
  82. package/dist/src/dZapClient/index.js +249 -0
  83. package/dist/src/enums/index.d.ts +46 -0
  84. package/dist/src/enums/index.js +57 -0
  85. package/dist/src/index.d.ts +18 -0
  86. package/dist/src/index.js +50 -0
  87. package/dist/src/service/cache/cacheProvider.d.ts +10 -0
  88. package/dist/src/service/cache/cacheProvider.js +72 -0
  89. package/dist/src/service/cache/constant.d.ts +2 -0
  90. package/dist/src/service/cache/constant.js +6 -0
  91. package/dist/src/service/price/index.d.ts +16 -0
  92. package/dist/src/service/price/index.js +80 -0
  93. package/dist/src/service/price/provider/coingecko/config.d.ts +6 -0
  94. package/dist/src/service/price/provider/coingecko/config.js +9 -0
  95. package/dist/src/service/price/provider/coingecko/index.d.ts +9 -0
  96. package/dist/src/service/price/provider/coingecko/index.js +66 -0
  97. package/dist/src/service/price/provider/defiLlama/config.d.ts +3 -0
  98. package/dist/src/service/price/provider/defiLlama/config.js +6 -0
  99. package/dist/src/service/price/provider/defiLlama/index.d.ts +9 -0
  100. package/dist/src/service/price/provider/defiLlama/index.js +60 -0
  101. package/dist/src/service/price/provider/defiLlama/types.d.ts +11 -0
  102. package/dist/src/service/price/provider/defiLlama/types.js +2 -0
  103. package/dist/src/service/price/provider/dzap/index.d.ts +6 -0
  104. package/dist/src/service/price/provider/dzap/index.js +22 -0
  105. package/dist/src/service/price/types/IPriceProvider.d.ts +14 -0
  106. package/dist/src/service/price/types/IPriceProvider.js +8 -0
  107. package/dist/src/transactionHandlers/generic.d.ts +24 -0
  108. package/dist/src/transactionHandlers/generic.js +48 -0
  109. package/dist/src/transactionHandlers/permit.d.ts +61 -0
  110. package/dist/src/transactionHandlers/permit.js +177 -0
  111. package/dist/src/transactionHandlers/trade.d.ts +24 -0
  112. package/dist/src/transactionHandlers/trade.js +263 -0
  113. package/dist/src/transactionHandlers/zap.d.ts +37 -0
  114. package/dist/src/transactionHandlers/zap.js +135 -0
  115. package/dist/src/types/axiosClient.d.ts +6 -0
  116. package/dist/src/types/axiosClient.js +2 -0
  117. package/dist/src/types/btc.d.ts +45 -0
  118. package/dist/src/types/btc.js +2 -0
  119. package/dist/src/types/chains.d.ts +2 -0
  120. package/dist/src/types/chains.js +2 -0
  121. package/dist/src/types/contract.d.ts +14 -0
  122. package/dist/src/types/contract.js +2 -0
  123. package/dist/src/types/eip-2612.d.ts +24 -0
  124. package/dist/src/types/eip-2612.js +58 -0
  125. package/dist/src/types/index.d.ts +482 -0
  126. package/dist/src/types/index.js +8 -0
  127. package/dist/src/types/permit.d.ts +191 -0
  128. package/dist/src/types/permit.js +54 -0
  129. package/dist/src/types/wallet.d.ts +2 -0
  130. package/dist/src/types/wallet.js +2 -0
  131. package/dist/src/types/zap/build.d.ts +44 -0
  132. package/dist/src/types/zap/build.js +2 -0
  133. package/dist/src/types/zap/index.d.ts +34 -0
  134. package/dist/src/types/zap/index.js +23 -0
  135. package/dist/src/types/zap/path.d.ts +33 -0
  136. package/dist/src/types/zap/path.js +2 -0
  137. package/dist/src/types/zap/pool.d.ts +39 -0
  138. package/dist/src/types/zap/pool.js +2 -0
  139. package/dist/src/types/zap/position.d.ts +27 -0
  140. package/dist/src/types/zap/position.js +2 -0
  141. package/dist/src/types/zap/quote.d.ts +7 -0
  142. package/dist/src/types/zap/quote.js +2 -0
  143. package/dist/src/types/zap/status.d.ts +28 -0
  144. package/dist/src/types/zap/status.js +2 -0
  145. package/dist/src/types/zap/step.d.ts +15 -0
  146. package/dist/src/types/zap/step.js +2 -0
  147. package/dist/src/utils/amount.d.ts +82 -0
  148. package/dist/src/utils/amount.js +71 -0
  149. package/dist/src/utils/axios.d.ts +13 -0
  150. package/dist/src/utils/axios.js +42 -0
  151. package/dist/src/utils/date.d.ts +1 -0
  152. package/dist/src/utils/date.js +8 -0
  153. package/dist/src/utils/decoder/swap/abis.d.ts +643 -0
  154. package/dist/src/utils/decoder/swap/abis.js +831 -0
  155. package/dist/src/utils/decoder/swap/inputDataDecoder.d.ts +14 -0
  156. package/dist/src/utils/decoder/swap/inputDataDecoder.js +124 -0
  157. package/dist/src/utils/eip-2612/eip2612Permit.d.ts +23 -0
  158. package/dist/src/utils/eip-2612/eip2612Permit.js +121 -0
  159. package/dist/src/utils/eip-5792/batchApproveTokens.d.ts +21 -0
  160. package/dist/src/utils/eip-5792/batchApproveTokens.js +49 -0
  161. package/dist/src/utils/eip-5792/index.d.ts +3 -0
  162. package/dist/src/utils/eip-5792/index.js +9 -0
  163. package/dist/src/utils/eip-5792/isBatchTxnSupportedByWallet.d.ts +6 -0
  164. package/dist/src/utils/eip-5792/isBatchTxnSupportedByWallet.js +22 -0
  165. package/dist/src/utils/eip-5792/sendBatchCalls.d.ts +10 -0
  166. package/dist/src/utils/eip-5792/sendBatchCalls.js +25 -0
  167. package/dist/src/utils/eip-5792/waitForBatchTransactionReceipt.d.ts +4 -0
  168. package/dist/src/utils/eip-5792/waitForBatchTransactionReceipt.js +26 -0
  169. package/dist/src/utils/encodeApproveCall.d.ts +6 -0
  170. package/dist/src/utils/encodeApproveCall.js +12 -0
  171. package/dist/src/utils/erc20.d.ts +65 -0
  172. package/dist/src/utils/erc20.js +152 -0
  173. package/dist/src/utils/errors.d.ts +17 -0
  174. package/dist/src/utils/errors.js +78 -0
  175. package/dist/src/utils/index.d.ts +4566 -0
  176. package/dist/src/utils/index.js +196 -0
  177. package/dist/src/utils/multicall.d.ts +14 -0
  178. package/dist/src/utils/multicall.js +25 -0
  179. package/dist/src/utils/permit2/domain.d.ts +2 -0
  180. package/dist/src/utils/permit2/domain.js +11 -0
  181. package/dist/src/utils/permit2/index.d.ts +4 -0
  182. package/dist/src/utils/permit2/index.js +97 -0
  183. package/dist/src/utils/permit2/nonce.d.ts +15 -0
  184. package/dist/src/utils/permit2/nonce.js +61 -0
  185. package/dist/src/utils/permit2/permitData.d.ts +23 -0
  186. package/dist/src/utils/permit2/permitData.js +85 -0
  187. package/dist/src/utils/permit2/values.d.ts +54 -0
  188. package/dist/src/utils/permit2/values.js +88 -0
  189. package/dist/src/utils/permit2/witnessData.d.ts +4 -0
  190. package/dist/src/utils/permit2/witnessData.js +48 -0
  191. package/dist/src/utils/signIntent/custom.d.ts +11 -0
  192. package/dist/src/utils/signIntent/custom.js +31 -0
  193. package/dist/src/utils/signIntent/gasless.d.ts +12 -0
  194. package/dist/src/utils/signIntent/gasless.js +101 -0
  195. package/dist/src/utils/signTypedData.d.ts +11 -0
  196. package/dist/src/utils/signTypedData.js +21 -0
  197. package/dist/src/utils/tokens.d.ts +8 -0
  198. package/dist/src/utils/tokens.js +73 -0
  199. package/dist/src/utils/updateQuotes.d.ts +3 -0
  200. package/dist/src/utils/updateQuotes.js +69 -0
  201. package/dist/src/zap/constants/index.d.ts +2 -0
  202. package/dist/src/zap/constants/index.js +18 -0
  203. package/dist/src/zap/constants/path.d.ts +8 -0
  204. package/dist/src/zap/constants/path.js +11 -0
  205. package/dist/src/zap/constants/step.d.ts +3 -0
  206. package/dist/src/zap/constants/step.js +6 -0
  207. package/dist/src/zap/constants/urls.d.ts +12 -0
  208. package/dist/src/zap/constants/urls.js +15 -0
  209. package/dist/test/build.test.d.ts +1 -0
  210. package/dist/test/build.test.js +65 -0
  211. package/dist/test/permit/permit2Nonce.test.d.ts +2 -0
  212. package/dist/test/permit/permit2Nonce.test.js +96 -0
  213. package/dist/test/quotes.test.d.ts +1 -0
  214. package/dist/test/quotes.test.js +59 -0
  215. package/dist/test/status.test.d.ts +1 -0
  216. package/dist/test/status.test.js +37 -0
  217. package/dist/tsconfig.tsbuildinfo +1 -0
  218. package/dist/utils/decoder/swap/abis.d.ts +643 -0
  219. package/dist/utils/decoder/swap/inputDataDecoder.d.ts +14 -0
  220. package/dist/utils/index.d.ts +2 -4
  221. package/dist/utils/tokens.d.ts +3 -2
  222. package/package.json +2 -2
@@ -0,0 +1,26 @@
1
+ import { CancelToken } from 'axios';
2
+ import { BroadcastTxParams, CalculatePointsRequest, GaslessExecuteTxParams, TradeBuildTxnRequest, TradeQuotesRequest } from '../types';
3
+ import { ZapBuildTxnRequest, ZapPoolDetailsRequest, ZapPoolsRequest, ZapPositionsRequest, ZapQuoteRequest, ZapStatusRequest } from '../types/zap';
4
+ export declare const fetchTradeQuotes: (request: TradeQuotesRequest) => Promise<any>;
5
+ export declare const fetchTradeBuildTxnData: (request: TradeBuildTxnRequest) => Promise<any>;
6
+ export declare const executeGaslessTxnData: (request: GaslessExecuteTxParams) => Promise<any>;
7
+ export declare const broadcastTx: (request: BroadcastTxParams) => Promise<any>;
8
+ export declare const fetchZapBuildTxnData: (request: ZapBuildTxnRequest, cancelToken?: CancelToken) => Promise<any>;
9
+ export declare const fetchZapQuote: (request: ZapQuoteRequest, cancelToken?: CancelToken) => Promise<any>;
10
+ export declare const fetchZapTxnStatus: (request: ZapStatusRequest) => Promise<any>;
11
+ export declare const fetchZapPositions: (request: ZapPositionsRequest) => Promise<any>;
12
+ export declare const fetchZapPools: (request: ZapPoolsRequest) => Promise<any>;
13
+ export declare const fetchZapPoolDetails: (request: ZapPoolDetailsRequest) => Promise<any>;
14
+ export declare const fetchZapChains: () => Promise<any>;
15
+ export declare const fetchZapProviders: () => Promise<any>;
16
+ export declare const fetchAllSupportedChains: () => Promise<any>;
17
+ export declare const fetchAllTokens: (chainId: number, source?: string, account?: string) => Promise<any>;
18
+ export declare const fetchTokenDetails: (tokenAddress: string | string[], chainId: number, account?: string, includeBalance?: boolean, includePrice?: boolean) => Promise<any>;
19
+ export declare const fetchTokenPrice: (tokenAddresses: string[], chainId: number) => Promise<any>;
20
+ export declare const fetchStatus: ({ txHash, txIds, chainId }: {
21
+ txHash?: string;
22
+ txIds?: string;
23
+ chainId?: number;
24
+ }) => Promise<any>;
25
+ export declare const fetchCalculatedPoints: (request: CalculatePointsRequest) => Promise<any>;
26
+ export declare const fetchBalances: (chainId: number, account: string) => Promise<any>;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchBalances = exports.fetchCalculatedPoints = exports.fetchStatus = exports.fetchTokenPrice = exports.fetchTokenDetails = exports.fetchAllTokens = exports.fetchAllSupportedChains = exports.fetchZapProviders = exports.fetchZapChains = exports.fetchZapPoolDetails = exports.fetchZapPools = exports.fetchZapPositions = exports.fetchZapTxnStatus = exports.fetchZapQuote = exports.fetchZapBuildTxnData = exports.broadcastTx = exports.executeGaslessTxnData = exports.fetchTradeBuildTxnData = exports.fetchTradeQuotes = void 0;
4
+ const httpMethods_1 = require("../constants/httpMethods");
5
+ const urlConstants_1 = require("../constants/urlConstants");
6
+ const axios_1 = require("../utils/axios");
7
+ const urls_1 = require("../zap/constants/urls");
8
+ const fetchTradeQuotes = (request) => (0, axios_1.invoke)({
9
+ endpoint: urlConstants_1.QUOTES_URL,
10
+ data: request,
11
+ method: httpMethods_1.POST,
12
+ shouldRetry: true,
13
+ });
14
+ exports.fetchTradeQuotes = fetchTradeQuotes;
15
+ const fetchTradeBuildTxnData = (request) => (0, axios_1.invoke)({
16
+ endpoint: urlConstants_1.BUILD_TX_URL,
17
+ data: request,
18
+ method: httpMethods_1.POST,
19
+ });
20
+ exports.fetchTradeBuildTxnData = fetchTradeBuildTxnData;
21
+ const executeGaslessTxnData = (request) => (0, axios_1.invoke)({
22
+ endpoint: urlConstants_1.GASLESS_EXECUTE_TX_URL,
23
+ data: request,
24
+ method: httpMethods_1.POST,
25
+ });
26
+ exports.executeGaslessTxnData = executeGaslessTxnData;
27
+ const broadcastTx = (request) => (0, axios_1.invoke)({
28
+ endpoint: urlConstants_1.BROADCAST_TX,
29
+ data: request,
30
+ method: httpMethods_1.POST,
31
+ });
32
+ exports.broadcastTx = broadcastTx;
33
+ const fetchZapBuildTxnData = (request, cancelToken) => (0, axios_1.invokeZap)({
34
+ endpoint: urls_1.ZAP_ENDPOINTS.buildTx,
35
+ data: request,
36
+ method: httpMethods_1.POST,
37
+ cancelToken,
38
+ });
39
+ exports.fetchZapBuildTxnData = fetchZapBuildTxnData;
40
+ const fetchZapQuote = (request, cancelToken) => (0, axios_1.invokeZap)({
41
+ endpoint: urls_1.ZAP_ENDPOINTS.quote,
42
+ data: request,
43
+ method: httpMethods_1.POST,
44
+ cancelToken,
45
+ });
46
+ exports.fetchZapQuote = fetchZapQuote;
47
+ const fetchZapTxnStatus = (request) => (0, axios_1.invokeZap)({
48
+ endpoint: urls_1.ZAP_ENDPOINTS.status,
49
+ data: request,
50
+ method: httpMethods_1.GET,
51
+ });
52
+ exports.fetchZapTxnStatus = fetchZapTxnStatus;
53
+ const fetchZapPositions = (request) => (0, axios_1.invokeZap)({
54
+ endpoint: urls_1.ZAP_ENDPOINTS.positions,
55
+ data: request,
56
+ method: httpMethods_1.GET,
57
+ });
58
+ exports.fetchZapPositions = fetchZapPositions;
59
+ const fetchZapPools = (request) => (0, axios_1.invokeZap)({
60
+ endpoint: urls_1.ZAP_ENDPOINTS.pools,
61
+ data: request,
62
+ method: httpMethods_1.GET,
63
+ });
64
+ exports.fetchZapPools = fetchZapPools;
65
+ const fetchZapPoolDetails = (request) => (0, axios_1.invokeZap)({
66
+ endpoint: urls_1.ZAP_ENDPOINTS.poolDetails,
67
+ data: request,
68
+ method: httpMethods_1.GET,
69
+ });
70
+ exports.fetchZapPoolDetails = fetchZapPoolDetails;
71
+ const fetchZapChains = () => (0, axios_1.invokeZap)({
72
+ endpoint: urls_1.ZAP_ENDPOINTS.config.chains,
73
+ method: httpMethods_1.GET,
74
+ });
75
+ exports.fetchZapChains = fetchZapChains;
76
+ const fetchZapProviders = () => (0, axios_1.invokeZap)({
77
+ endpoint: urls_1.ZAP_ENDPOINTS.config.providers,
78
+ method: httpMethods_1.GET,
79
+ });
80
+ exports.fetchZapProviders = fetchZapProviders;
81
+ const fetchAllSupportedChains = () => (0, axios_1.invoke)({
82
+ endpoint: urlConstants_1.GET_ALL_CHAINS_URL,
83
+ data: {},
84
+ method: httpMethods_1.GET,
85
+ shouldRetry: true,
86
+ });
87
+ exports.fetchAllSupportedChains = fetchAllSupportedChains;
88
+ const fetchAllTokens = (chainId, source, account) => (0, axios_1.invoke)({
89
+ endpoint: urlConstants_1.GET_ALL_TOKENS_URL,
90
+ data: { chainId, source, account },
91
+ method: httpMethods_1.GET,
92
+ shouldRetry: true,
93
+ });
94
+ exports.fetchAllTokens = fetchAllTokens;
95
+ const fetchTokenDetails = (tokenAddress, chainId, account, includeBalance, includePrice) => {
96
+ const data = {
97
+ tokenAddress: Array.isArray(tokenAddress) ? undefined : tokenAddress,
98
+ tokenAddresses: Array.isArray(tokenAddress) ? tokenAddress.join(',') : undefined,
99
+ chainId,
100
+ account,
101
+ includeBalance,
102
+ includePrice,
103
+ };
104
+ return (0, axios_1.invoke)({
105
+ endpoint: urlConstants_1.GET_TOKEN_DETAILS_URL,
106
+ data,
107
+ method: httpMethods_1.GET,
108
+ });
109
+ };
110
+ exports.fetchTokenDetails = fetchTokenDetails;
111
+ const fetchTokenPrice = (tokenAddresses, chainId) => (0, axios_1.invoke)({
112
+ endpoint: urlConstants_1.GET_TOKEN_PRICE,
113
+ data: { tokenAddresses, chainId },
114
+ method: httpMethods_1.GET,
115
+ });
116
+ exports.fetchTokenPrice = fetchTokenPrice;
117
+ const fetchStatus = ({ txHash, txIds, chainId }) => (0, axios_1.invoke)({
118
+ endpoint: urlConstants_1.GET_STATUS,
119
+ data: {
120
+ txHash,
121
+ txIds,
122
+ chainId,
123
+ },
124
+ method: httpMethods_1.GET,
125
+ });
126
+ exports.fetchStatus = fetchStatus;
127
+ const fetchCalculatedPoints = (request) => (0, axios_1.invoke)({
128
+ endpoint: urlConstants_1.CALCULATE_POINTS_URL,
129
+ data: request,
130
+ method: httpMethods_1.POST,
131
+ });
132
+ exports.fetchCalculatedPoints = fetchCalculatedPoints;
133
+ const fetchBalances = (chainId, account) => {
134
+ return (0, axios_1.invoke)({
135
+ endpoint: urlConstants_1.GET_BALANCES,
136
+ data: { chainId, account },
137
+ method: httpMethods_1.GET,
138
+ });
139
+ };
140
+ exports.fetchBalances = fetchBalances;
@@ -0,0 +1,374 @@
1
+ export declare const erc20PermitAbi: readonly [{
2
+ readonly inputs: readonly [];
3
+ readonly name: "InvalidShortString";
4
+ readonly type: "error";
5
+ }, {
6
+ readonly inputs: readonly [{
7
+ readonly internalType: "string";
8
+ readonly name: "str";
9
+ readonly type: "string";
10
+ }];
11
+ readonly name: "StringTooLong";
12
+ readonly type: "error";
13
+ }, {
14
+ readonly anonymous: false;
15
+ readonly inputs: readonly [{
16
+ readonly indexed: true;
17
+ readonly internalType: "address";
18
+ readonly name: "owner";
19
+ readonly type: "address";
20
+ }, {
21
+ readonly indexed: true;
22
+ readonly internalType: "address";
23
+ readonly name: "spender";
24
+ readonly type: "address";
25
+ }, {
26
+ readonly indexed: false;
27
+ readonly internalType: "uint256";
28
+ readonly name: "value";
29
+ readonly type: "uint256";
30
+ }];
31
+ readonly name: "Approval";
32
+ readonly type: "event";
33
+ }, {
34
+ readonly anonymous: false;
35
+ readonly inputs: readonly [];
36
+ readonly name: "EIP712DomainChanged";
37
+ readonly type: "event";
38
+ }, {
39
+ readonly anonymous: false;
40
+ readonly inputs: readonly [{
41
+ readonly indexed: true;
42
+ readonly internalType: "address";
43
+ readonly name: "from";
44
+ readonly type: "address";
45
+ }, {
46
+ readonly indexed: true;
47
+ readonly internalType: "address";
48
+ readonly name: "to";
49
+ readonly type: "address";
50
+ }, {
51
+ readonly indexed: false;
52
+ readonly internalType: "uint256";
53
+ readonly name: "value";
54
+ readonly type: "uint256";
55
+ }];
56
+ readonly name: "Transfer";
57
+ readonly type: "event";
58
+ }, {
59
+ readonly inputs: readonly [];
60
+ readonly name: "DOMAIN_SEPARATOR";
61
+ readonly outputs: readonly [{
62
+ readonly internalType: "bytes32";
63
+ readonly name: "";
64
+ readonly type: "bytes32";
65
+ }];
66
+ readonly stateMutability: "view";
67
+ readonly type: "function";
68
+ }, {
69
+ readonly inputs: readonly [];
70
+ readonly name: "PERMIT_TYPEHASH";
71
+ readonly outputs: readonly [{
72
+ readonly internalType: "bytes32";
73
+ readonly name: "";
74
+ readonly type: "bytes32";
75
+ }];
76
+ readonly stateMutability: "view";
77
+ readonly type: "function";
78
+ }, {
79
+ readonly inputs: readonly [{
80
+ readonly internalType: "address";
81
+ readonly name: "owner";
82
+ readonly type: "address";
83
+ }, {
84
+ readonly internalType: "address";
85
+ readonly name: "spender";
86
+ readonly type: "address";
87
+ }];
88
+ readonly name: "allowance";
89
+ readonly outputs: readonly [{
90
+ readonly internalType: "uint256";
91
+ readonly name: "";
92
+ readonly type: "uint256";
93
+ }];
94
+ readonly stateMutability: "view";
95
+ readonly type: "function";
96
+ }, {
97
+ readonly inputs: readonly [{
98
+ readonly internalType: "address";
99
+ readonly name: "spender";
100
+ readonly type: "address";
101
+ }, {
102
+ readonly internalType: "uint256";
103
+ readonly name: "amount";
104
+ readonly type: "uint256";
105
+ }];
106
+ readonly name: "approve";
107
+ readonly outputs: readonly [{
108
+ readonly internalType: "bool";
109
+ readonly name: "";
110
+ readonly type: "bool";
111
+ }];
112
+ readonly stateMutability: "nonpayable";
113
+ readonly type: "function";
114
+ }, {
115
+ readonly inputs: readonly [{
116
+ readonly internalType: "address";
117
+ readonly name: "account";
118
+ readonly type: "address";
119
+ }];
120
+ readonly name: "balanceOf";
121
+ readonly outputs: readonly [{
122
+ readonly internalType: "uint256";
123
+ readonly name: "";
124
+ readonly type: "uint256";
125
+ }];
126
+ readonly stateMutability: "view";
127
+ readonly type: "function";
128
+ }, {
129
+ readonly inputs: readonly [];
130
+ readonly name: "decimals";
131
+ readonly outputs: readonly [{
132
+ readonly internalType: "uint8";
133
+ readonly name: "";
134
+ readonly type: "uint8";
135
+ }];
136
+ readonly stateMutability: "view";
137
+ readonly type: "function";
138
+ }, {
139
+ readonly inputs: readonly [{
140
+ readonly internalType: "address";
141
+ readonly name: "spender";
142
+ readonly type: "address";
143
+ }, {
144
+ readonly internalType: "uint256";
145
+ readonly name: "subtractedValue";
146
+ readonly type: "uint256";
147
+ }];
148
+ readonly name: "decreaseAllowance";
149
+ readonly outputs: readonly [{
150
+ readonly internalType: "bool";
151
+ readonly name: "";
152
+ readonly type: "bool";
153
+ }];
154
+ readonly stateMutability: "nonpayable";
155
+ readonly type: "function";
156
+ }, {
157
+ readonly inputs: readonly [];
158
+ readonly name: "eip712Domain";
159
+ readonly outputs: readonly [{
160
+ readonly internalType: "bytes1";
161
+ readonly name: "fields";
162
+ readonly type: "bytes1";
163
+ }, {
164
+ readonly internalType: "string";
165
+ readonly name: "name";
166
+ readonly type: "string";
167
+ }, {
168
+ readonly internalType: "string";
169
+ readonly name: "version";
170
+ readonly type: "string";
171
+ }, {
172
+ readonly internalType: "uint256";
173
+ readonly name: "chainId";
174
+ readonly type: "uint256";
175
+ }, {
176
+ readonly internalType: "address";
177
+ readonly name: "verifyingContract";
178
+ readonly type: "address";
179
+ }, {
180
+ readonly internalType: "bytes32";
181
+ readonly name: "salt";
182
+ readonly type: "bytes32";
183
+ }, {
184
+ readonly internalType: "uint256[]";
185
+ readonly name: "extensions";
186
+ readonly type: "uint256[]";
187
+ }];
188
+ readonly stateMutability: "view";
189
+ readonly type: "function";
190
+ }, {
191
+ readonly inputs: readonly [{
192
+ readonly internalType: "address";
193
+ readonly name: "spender";
194
+ readonly type: "address";
195
+ }, {
196
+ readonly internalType: "uint256";
197
+ readonly name: "addedValue";
198
+ readonly type: "uint256";
199
+ }];
200
+ readonly name: "increaseAllowance";
201
+ readonly outputs: readonly [{
202
+ readonly internalType: "bool";
203
+ readonly name: "";
204
+ readonly type: "bool";
205
+ }];
206
+ readonly stateMutability: "nonpayable";
207
+ readonly type: "function";
208
+ }, {
209
+ readonly inputs: readonly [];
210
+ readonly name: "name";
211
+ readonly outputs: readonly [{
212
+ readonly internalType: "string";
213
+ readonly name: "";
214
+ readonly type: "string";
215
+ }];
216
+ readonly stateMutability: "view";
217
+ readonly type: "function";
218
+ }, {
219
+ readonly inputs: readonly [];
220
+ readonly name: "version";
221
+ readonly outputs: readonly [{
222
+ readonly internalType: "string";
223
+ readonly name: "";
224
+ readonly type: "string";
225
+ }];
226
+ readonly stateMutability: "view";
227
+ readonly type: "function";
228
+ }, {
229
+ readonly inputs: readonly [{
230
+ readonly internalType: "address";
231
+ readonly name: "owner";
232
+ readonly type: "address";
233
+ }];
234
+ readonly name: "nonces";
235
+ readonly outputs: readonly [{
236
+ readonly internalType: "uint256";
237
+ readonly name: "";
238
+ readonly type: "uint256";
239
+ }];
240
+ readonly stateMutability: "view";
241
+ readonly type: "function";
242
+ }, {
243
+ readonly inputs: readonly [{
244
+ readonly internalType: "address";
245
+ readonly name: "owner";
246
+ readonly type: "address";
247
+ }, {
248
+ readonly internalType: "address";
249
+ readonly name: "spender";
250
+ readonly type: "address";
251
+ }, {
252
+ readonly internalType: "uint256";
253
+ readonly name: "value";
254
+ readonly type: "uint256";
255
+ }, {
256
+ readonly internalType: "uint256";
257
+ readonly name: "deadline";
258
+ readonly type: "uint256";
259
+ }, {
260
+ readonly internalType: "uint8";
261
+ readonly name: "v";
262
+ readonly type: "uint8";
263
+ }, {
264
+ readonly internalType: "bytes32";
265
+ readonly name: "r";
266
+ readonly type: "bytes32";
267
+ }, {
268
+ readonly internalType: "bytes32";
269
+ readonly name: "s";
270
+ readonly type: "bytes32";
271
+ }];
272
+ readonly name: "permit";
273
+ readonly outputs: readonly [];
274
+ readonly stateMutability: "nonpayable";
275
+ readonly type: "function";
276
+ }, {
277
+ readonly inputs: readonly [{
278
+ readonly name: "holder";
279
+ readonly type: "address";
280
+ readonly internalType: "address";
281
+ }, {
282
+ readonly name: "spender";
283
+ readonly type: "address";
284
+ readonly internalType: "address";
285
+ }, {
286
+ readonly name: "nonce";
287
+ readonly type: "uint256";
288
+ readonly internalType: "uint256";
289
+ }, {
290
+ readonly name: "expiry";
291
+ readonly type: "uint256";
292
+ readonly internalType: "uint256";
293
+ }, {
294
+ readonly name: "allowed";
295
+ readonly type: "bool";
296
+ readonly internalType: "bool";
297
+ }, {
298
+ readonly internalType: "uint8";
299
+ readonly name: "v";
300
+ readonly type: "uint8";
301
+ }, {
302
+ readonly internalType: "bytes32";
303
+ readonly name: "r";
304
+ readonly type: "bytes32";
305
+ }, {
306
+ readonly internalType: "bytes32";
307
+ readonly name: "s";
308
+ readonly type: "bytes32";
309
+ }];
310
+ readonly name: "permit";
311
+ readonly outputs: readonly [];
312
+ readonly stateMutability: "nonpayable";
313
+ readonly type: "function";
314
+ }, {
315
+ readonly inputs: readonly [];
316
+ readonly name: "symbol";
317
+ readonly outputs: readonly [{
318
+ readonly internalType: "string";
319
+ readonly name: "";
320
+ readonly type: "string";
321
+ }];
322
+ readonly stateMutability: "view";
323
+ readonly type: "function";
324
+ }, {
325
+ readonly inputs: readonly [];
326
+ readonly name: "totalSupply";
327
+ readonly outputs: readonly [{
328
+ readonly internalType: "uint256";
329
+ readonly name: "";
330
+ readonly type: "uint256";
331
+ }];
332
+ readonly stateMutability: "view";
333
+ readonly type: "function";
334
+ }, {
335
+ readonly inputs: readonly [{
336
+ readonly internalType: "address";
337
+ readonly name: "to";
338
+ readonly type: "address";
339
+ }, {
340
+ readonly internalType: "uint256";
341
+ readonly name: "amount";
342
+ readonly type: "uint256";
343
+ }];
344
+ readonly name: "transfer";
345
+ readonly outputs: readonly [{
346
+ readonly internalType: "bool";
347
+ readonly name: "";
348
+ readonly type: "bool";
349
+ }];
350
+ readonly stateMutability: "nonpayable";
351
+ readonly type: "function";
352
+ }, {
353
+ readonly inputs: readonly [{
354
+ readonly internalType: "address";
355
+ readonly name: "from";
356
+ readonly type: "address";
357
+ }, {
358
+ readonly internalType: "address";
359
+ readonly name: "to";
360
+ readonly type: "address";
361
+ }, {
362
+ readonly internalType: "uint256";
363
+ readonly name: "amount";
364
+ readonly type: "uint256";
365
+ }];
366
+ readonly name: "transferFrom";
367
+ readonly outputs: readonly [{
368
+ readonly internalType: "bool";
369
+ readonly name: "";
370
+ readonly type: "bool";
371
+ }];
372
+ readonly stateMutability: "nonpayable";
373
+ readonly type: "function";
374
+ }];