@imtbl/checkout-sdk 2.0.0-alpha.0

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 (245) hide show
  1. package/LICENSE.md +176 -0
  2. package/README.md +58 -0
  3. package/dist/browser/index.js +6566 -0
  4. package/dist/node/index.cjs +6566 -0
  5. package/dist/node/index.js +6566 -0
  6. package/dist/types/api/blockscout/blockscout.d.ts +53 -0
  7. package/dist/types/api/blockscout/blockscout.test.d.ts +1 -0
  8. package/dist/types/api/blockscout/blockscoutType.d.ts +33 -0
  9. package/dist/types/api/blockscout/index.d.ts +2 -0
  10. package/dist/types/api/http/httpClient.d.ts +14 -0
  11. package/dist/types/api/http/httpClient.test.d.ts +1 -0
  12. package/dist/types/api/http/index.d.ts +1 -0
  13. package/dist/types/availability/availability.d.ts +6 -0
  14. package/dist/types/availability/availability.test.d.ts +1 -0
  15. package/dist/types/availability/index.d.ts +1 -0
  16. package/dist/types/balances/balances.d.ts +9 -0
  17. package/dist/types/balances/balances.test.d.ts +1 -0
  18. package/dist/types/balances/index.d.ts +1 -0
  19. package/dist/types/blockExplorer/blockExplorer.d.ts +9 -0
  20. package/dist/types/blockExplorer/blockExplorer.test.d.ts +1 -0
  21. package/dist/types/blockExplorer/index.d.ts +1 -0
  22. package/dist/types/config/config.d.ts +26 -0
  23. package/dist/types/config/config.test.d.ts +1 -0
  24. package/dist/types/config/index.d.ts +1 -0
  25. package/dist/types/config/remoteConfigFetcher.d.ts +19 -0
  26. package/dist/types/config/remoteConfigFetcher.test.d.ts +1 -0
  27. package/dist/types/config/tokensFetcher.d.ts +23 -0
  28. package/dist/types/config/tokensFetcher.test.d.ts +1 -0
  29. package/dist/types/connect/connect.d.ts +4 -0
  30. package/dist/types/connect/connect.test.d.ts +1 -0
  31. package/dist/types/connect/index.d.ts +1 -0
  32. package/dist/types/env/constants.d.ts +150 -0
  33. package/dist/types/env/env.d.ts +3 -0
  34. package/dist/types/env/env.test.d.ts +1 -0
  35. package/dist/types/env/index.d.ts +2 -0
  36. package/dist/types/errors/checkoutError.d.ts +80 -0
  37. package/dist/types/errors/checkoutError.test.d.ts +1 -0
  38. package/dist/types/errors/index.d.ts +1 -0
  39. package/dist/types/fiatRamp/fiatRamp.d.ts +23 -0
  40. package/dist/types/fiatRamp/fiatRamp.test.d.ts +1 -0
  41. package/dist/types/fiatRamp/index.d.ts +1 -0
  42. package/dist/types/gasEstimate/bridgeGasEstimate.d.ts +4 -0
  43. package/dist/types/gasEstimate/bridgeGasEstimate.test.d.ts +1 -0
  44. package/dist/types/gasEstimate/bridgeGasEstimateType.d.ts +5 -0
  45. package/dist/types/gasEstimate/gasEstimator.d.ts +4 -0
  46. package/dist/types/gasEstimate/gasEstimator.test.d.ts +1 -0
  47. package/dist/types/gasEstimate/gasPriceInWei.d.ts +2 -0
  48. package/dist/types/gasEstimate/gasPriceInWei.test.d.ts +1 -0
  49. package/dist/types/gasEstimate/index.d.ts +3 -0
  50. package/dist/types/index.d.ts +18 -0
  51. package/dist/types/instance/contract.d.ts +2 -0
  52. package/dist/types/instance/index.d.ts +2 -0
  53. package/dist/types/instance/instance.d.ts +11 -0
  54. package/dist/types/instance/instance.test.d.ts +1 -0
  55. package/dist/types/logger/debugLogger.d.ts +3 -0
  56. package/dist/types/logger/debugLogger.test.d.ts +1 -0
  57. package/dist/types/network/index.d.ts +1 -0
  58. package/dist/types/network/network.d.ts +7 -0
  59. package/dist/types/network/network.test.d.ts +1 -0
  60. package/dist/types/provider/getUnderlyingProvider.d.ts +8 -0
  61. package/dist/types/provider/getUnderlyingProvider.test.d.ts +1 -0
  62. package/dist/types/provider/index.d.ts +4 -0
  63. package/dist/types/provider/injected/index.d.ts +3 -0
  64. package/dist/types/provider/injected/index.test.d.ts +1 -0
  65. package/dist/types/provider/injected/register.d.ts +20 -0
  66. package/dist/types/provider/injected/store.d.ts +42 -0
  67. package/dist/types/provider/injected/utils.d.ts +19 -0
  68. package/dist/types/provider/injected/window.d.ts +8 -0
  69. package/dist/types/provider/injectedProvidersManager.d.ts +19 -0
  70. package/dist/types/provider/provider.d.ts +3 -0
  71. package/dist/types/provider/provider.test.d.ts +1 -0
  72. package/dist/types/provider/providerDetail.d.ts +5 -0
  73. package/dist/types/provider/validateProvider.d.ts +5 -0
  74. package/dist/types/provider/validateProvider.test.d.ts +1 -0
  75. package/dist/types/readOnlyProviders/readOnlyProvider.d.ts +4 -0
  76. package/dist/types/readOnlyProviders/readOnlyProviders.test.d.ts +1 -0
  77. package/dist/types/riskAssessment/index.d.ts +1 -0
  78. package/dist/types/riskAssessment/riskAssessment.d.ts +14 -0
  79. package/dist/types/riskAssessment/riskAssessment.test.d.ts +1 -0
  80. package/dist/types/sdk.d.ts +216 -0
  81. package/dist/types/sdk.test.d.ts +1 -0
  82. package/dist/types/smartCheckout/actions/getUnsignedActions.d.ts +7 -0
  83. package/dist/types/smartCheckout/actions/getUnsignedActions.test.d.ts +1 -0
  84. package/dist/types/smartCheckout/actions/index.d.ts +2 -0
  85. package/dist/types/smartCheckout/actions/signActions.d.ts +6 -0
  86. package/dist/types/smartCheckout/actions/signActions.test.d.ts +1 -0
  87. package/dist/types/smartCheckout/actions/types.d.ts +32 -0
  88. package/dist/types/smartCheckout/aggregators/allowanceAggregator.d.ts +2 -0
  89. package/dist/types/smartCheckout/aggregators/allowanceAggregator.test.d.ts +1 -0
  90. package/dist/types/smartCheckout/aggregators/balanceAggregator.d.ts +5 -0
  91. package/dist/types/smartCheckout/aggregators/balanceAggregator.test.d.ts +1 -0
  92. package/dist/types/smartCheckout/aggregators/index.d.ts +2 -0
  93. package/dist/types/smartCheckout/aggregators/itemAggregator.d.ts +6 -0
  94. package/dist/types/smartCheckout/aggregators/itemAggregator.test.d.ts +1 -0
  95. package/dist/types/smartCheckout/allowList/allowListCheck.d.ts +11 -0
  96. package/dist/types/smartCheckout/allowList/allowListCheck.test.d.ts +1 -0
  97. package/dist/types/smartCheckout/allowList/index.d.ts +1 -0
  98. package/dist/types/smartCheckout/allowList/types.d.ts +6 -0
  99. package/dist/types/smartCheckout/allowance/erc1155.d.ts +9 -0
  100. package/dist/types/smartCheckout/allowance/erc1155.test.d.ts +1 -0
  101. package/dist/types/smartCheckout/allowance/erc20.d.ts +9 -0
  102. package/dist/types/smartCheckout/allowance/erc20.test.d.ts +1 -0
  103. package/dist/types/smartCheckout/allowance/erc721.d.ts +12 -0
  104. package/dist/types/smartCheckout/allowance/erc721.test.d.ts +1 -0
  105. package/dist/types/smartCheckout/allowance/index.d.ts +3 -0
  106. package/dist/types/smartCheckout/allowance/types.d.ts +30 -0
  107. package/dist/types/smartCheckout/balanceCheck/balanceCheck.d.ts +7 -0
  108. package/dist/types/smartCheckout/balanceCheck/balanceCheck.test.d.ts +1 -0
  109. package/dist/types/smartCheckout/balanceCheck/balanceRequirement.d.ts +17 -0
  110. package/dist/types/smartCheckout/balanceCheck/balanceRequirement.test.d.ts +1 -0
  111. package/dist/types/smartCheckout/balanceCheck/index.d.ts +1 -0
  112. package/dist/types/smartCheckout/balanceCheck/types.d.ts +30 -0
  113. package/dist/types/smartCheckout/buy/buy.d.ts +7 -0
  114. package/dist/types/smartCheckout/buy/buy.test.d.ts +1 -0
  115. package/dist/types/smartCheckout/buy/index.d.ts +1 -0
  116. package/dist/types/smartCheckout/cancel/cancel.d.ts +3 -0
  117. package/dist/types/smartCheckout/cancel/cancel.test.d.ts +1 -0
  118. package/dist/types/smartCheckout/cancel/index.d.ts +1 -0
  119. package/dist/types/smartCheckout/fees/fees.d.ts +5 -0
  120. package/dist/types/smartCheckout/fees/fees.test.d.ts +1 -0
  121. package/dist/types/smartCheckout/gas/gasCalculator.d.ts +6 -0
  122. package/dist/types/smartCheckout/gas/gasCalculator.test.d.ts +1 -0
  123. package/dist/types/smartCheckout/gas/index.d.ts +1 -0
  124. package/dist/types/smartCheckout/index.d.ts +1 -0
  125. package/dist/types/smartCheckout/itemRequirements/index.d.ts +1 -0
  126. package/dist/types/smartCheckout/itemRequirements/itemRequirements.d.ts +2 -0
  127. package/dist/types/smartCheckout/itemRequirements/itemRequirements.test.d.ts +1 -0
  128. package/dist/types/smartCheckout/routing/bridge/bridgeRoute.d.ts +11 -0
  129. package/dist/types/smartCheckout/routing/bridge/bridgeRoute.test.d.ts +1 -0
  130. package/dist/types/smartCheckout/routing/bridge/getBridgeFeeEstimate.d.ts +7 -0
  131. package/dist/types/smartCheckout/routing/bridge/getBridgeFeeEstimate.test.d.ts +1 -0
  132. package/dist/types/smartCheckout/routing/bridge/getEthBalance.d.ts +2 -0
  133. package/dist/types/smartCheckout/routing/bridge/getEthBalance.test.d.ts +1 -0
  134. package/dist/types/smartCheckout/routing/bridgeAndSwap/bridgeAndSwapRoute.d.ts +15 -0
  135. package/dist/types/smartCheckout/routing/bridgeAndSwap/bridgeAndSwapRoute.test.d.ts +1 -0
  136. package/dist/types/smartCheckout/routing/bridgeAndSwap/constructBridgeRequirements.d.ts +9 -0
  137. package/dist/types/smartCheckout/routing/bridgeAndSwap/constructBridgeRequirements.test.d.ts +1 -0
  138. package/dist/types/smartCheckout/routing/bridgeAndSwap/fetchL1ToL2Mapping.test.d.ts +1 -0
  139. package/dist/types/smartCheckout/routing/bridgeAndSwap/fetchL1ToL2Mappings.d.ts +4 -0
  140. package/dist/types/smartCheckout/routing/bridgeAndSwap/getBalancesByChain.d.ts +7 -0
  141. package/dist/types/smartCheckout/routing/bridgeAndSwap/getBalancesByChain.test.d.ts +1 -0
  142. package/dist/types/smartCheckout/routing/bridgeAndSwap/getDexQuotes.d.ts +5 -0
  143. package/dist/types/smartCheckout/routing/bridgeAndSwap/getDexQuotes.test.d.ts +1 -0
  144. package/dist/types/smartCheckout/routing/geoBlocking.d.ts +3 -0
  145. package/dist/types/smartCheckout/routing/geoBlocking.test.d.ts +1 -0
  146. package/dist/types/smartCheckout/routing/index.d.ts +1 -0
  147. package/dist/types/smartCheckout/routing/indexer/fetchL1Representation.d.ts +9 -0
  148. package/dist/types/smartCheckout/routing/indexer/fetchL1Representation.test.d.ts +1 -0
  149. package/dist/types/smartCheckout/routing/onRamp/index.d.ts +1 -0
  150. package/dist/types/smartCheckout/routing/onRamp/onRampRoute.d.ts +4 -0
  151. package/dist/types/smartCheckout/routing/onRamp/onRampRoute.test.d.ts +1 -0
  152. package/dist/types/smartCheckout/routing/routingCalculator.d.ts +13 -0
  153. package/dist/types/smartCheckout/routing/routingCalculator.test.d.ts +1 -0
  154. package/dist/types/smartCheckout/routing/routingOptions.d.ts +7 -0
  155. package/dist/types/smartCheckout/routing/routingOptions.test.d.ts +1 -0
  156. package/dist/types/smartCheckout/routing/swap/quoteFetcher.d.ts +7 -0
  157. package/dist/types/smartCheckout/routing/swap/quoteFetcher.test.d.ts +1 -0
  158. package/dist/types/smartCheckout/routing/swap/swapRoute.d.ts +24 -0
  159. package/dist/types/smartCheckout/routing/swap/swapRoute.test.d.ts +1 -0
  160. package/dist/types/smartCheckout/routing/tokenBalances.d.ts +5 -0
  161. package/dist/types/smartCheckout/routing/tokenBalances.test.d.ts +1 -0
  162. package/dist/types/smartCheckout/routing/types.d.ts +15 -0
  163. package/dist/types/smartCheckout/sell/index.d.ts +1 -0
  164. package/dist/types/smartCheckout/sell/sell.d.ts +7 -0
  165. package/dist/types/smartCheckout/sell/sell.test.d.ts +1 -0
  166. package/dist/types/smartCheckout/smartCheckout.d.ts +6 -0
  167. package/dist/types/smartCheckout/smartCheckout.test.d.ts +1 -0
  168. package/dist/types/swap/index.d.ts +1 -0
  169. package/dist/types/swap/swap.d.ts +7 -0
  170. package/dist/types/swap/swap.test.d.ts +1 -0
  171. package/dist/types/tokens/index.d.ts +1 -0
  172. package/dist/types/tokens/tokens.d.ts +12 -0
  173. package/dist/types/tokens/tokens.test.d.ts +1 -0
  174. package/dist/types/transaction/index.d.ts +1 -0
  175. package/dist/types/transaction/transaction.d.ts +21 -0
  176. package/dist/types/transaction/transaction.test.d.ts +1 -0
  177. package/dist/types/types/balances.d.ts +52 -0
  178. package/dist/types/types/buy.d.ts +15 -0
  179. package/dist/types/types/cancel.d.ts +15 -0
  180. package/dist/types/types/chains.d.ts +48 -0
  181. package/dist/types/types/config.d.ts +265 -0
  182. package/dist/types/types/connect.d.ts +34 -0
  183. package/dist/types/types/eip1193.d.ts +47 -0
  184. package/dist/types/types/eip6963.d.ts +29 -0
  185. package/dist/types/types/fees.d.ts +10 -0
  186. package/dist/types/types/fiatRamp.d.ts +25 -0
  187. package/dist/types/types/gasEstimate.d.ts +64 -0
  188. package/dist/types/types/index.d.ts +20 -0
  189. package/dist/types/types/network.d.ts +77 -0
  190. package/dist/types/types/networkInfo.d.ts +15 -0
  191. package/dist/types/types/provider.d.ts +45 -0
  192. package/dist/types/types/sell.d.ts +13 -0
  193. package/dist/types/types/smartCheckout.d.ts +918 -0
  194. package/dist/types/types/swap.d.ts +47 -0
  195. package/dist/types/types/token.d.ts +40 -0
  196. package/dist/types/types/tokenInfo.d.ts +27 -0
  197. package/dist/types/types/transaction.d.ts +18 -0
  198. package/dist/types/types/wallet.d.ts +49 -0
  199. package/dist/types/types/widgets.d.ts +11 -0
  200. package/dist/types/utils/utils.d.ts +11 -0
  201. package/dist/types/utils/utils.test.d.ts +1 -0
  202. package/dist/types/wallet/index.d.ts +1 -0
  203. package/dist/types/wallet/wallet.d.ts +2 -0
  204. package/dist/types/wallet/wallet.test.d.ts +1 -0
  205. package/dist/types/widgets/definitions/configurations/addTokens.d.ts +5 -0
  206. package/dist/types/widgets/definitions/configurations/bridge.d.ts +5 -0
  207. package/dist/types/widgets/definitions/configurations/commerce.d.ts +17 -0
  208. package/dist/types/widgets/definitions/configurations/connect.d.ts +5 -0
  209. package/dist/types/widgets/definitions/configurations/index.d.ts +11 -0
  210. package/dist/types/widgets/definitions/configurations/onramp.d.ts +5 -0
  211. package/dist/types/widgets/definitions/configurations/purchase.d.ts +2 -0
  212. package/dist/types/widgets/definitions/configurations/sale.d.ts +8 -0
  213. package/dist/types/widgets/definitions/configurations/swap.d.ts +5 -0
  214. package/dist/types/widgets/definitions/configurations/theme.d.ts +7 -0
  215. package/dist/types/widgets/definitions/configurations/wallet.d.ts +12 -0
  216. package/dist/types/widgets/definitions/configurations/widget.d.ts +31 -0
  217. package/dist/types/widgets/definitions/events/addTokens.d.ts +41 -0
  218. package/dist/types/widgets/definitions/events/bridge.d.ts +52 -0
  219. package/dist/types/widgets/definitions/events/commerce.d.ts +134 -0
  220. package/dist/types/widgets/definitions/events/connect.d.ts +47 -0
  221. package/dist/types/widgets/definitions/events/index.d.ts +11 -0
  222. package/dist/types/widgets/definitions/events/onramp.d.ts +28 -0
  223. package/dist/types/widgets/definitions/events/orchestration.d.ts +84 -0
  224. package/dist/types/widgets/definitions/events/purchase.d.ts +30 -0
  225. package/dist/types/widgets/definitions/events/sale.d.ts +103 -0
  226. package/dist/types/widgets/definitions/events/swap.d.ts +40 -0
  227. package/dist/types/widgets/definitions/events/wallet.d.ts +28 -0
  228. package/dist/types/widgets/definitions/events/widgets.d.ts +35 -0
  229. package/dist/types/widgets/definitions/global.d.ts +73 -0
  230. package/dist/types/widgets/definitions/parameters/addTokens.d.ts +20 -0
  231. package/dist/types/widgets/definitions/parameters/bridge.d.ts +20 -0
  232. package/dist/types/widgets/definitions/parameters/commerce.d.ts +44 -0
  233. package/dist/types/widgets/definitions/parameters/connect.d.ts +16 -0
  234. package/dist/types/widgets/definitions/parameters/index.d.ts +9 -0
  235. package/dist/types/widgets/definitions/parameters/onramp.d.ts +20 -0
  236. package/dist/types/widgets/definitions/parameters/purchase.d.ts +18 -0
  237. package/dist/types/widgets/definitions/parameters/sale.d.ts +50 -0
  238. package/dist/types/widgets/definitions/parameters/swap.d.ts +31 -0
  239. package/dist/types/widgets/definitions/parameters/wallet.d.ts +12 -0
  240. package/dist/types/widgets/definitions/types.d.ts +282 -0
  241. package/dist/types/widgets/load.d.ts +2 -0
  242. package/dist/types/widgets/load.test.d.ts +1 -0
  243. package/dist/types/widgets/version.d.ts +23 -0
  244. package/dist/types/widgets/version.test.d.ts +1 -0
  245. package/package.json +87 -0
@@ -0,0 +1,47 @@
1
+ import { Quote, TransactionDetails } from '@imtbl/dex-sdk';
2
+ import { TransactionReceipt, Eip1193Provider } from 'ethers';
3
+ import { TokenInfo } from './tokenInfo';
4
+ import { WrappedBrowserProvider } from './provider';
5
+ /**
6
+ * Interface representing the parameters for {@link Checkout.swap}.
7
+ * @property {WrappedBrowserProvider | Eip1193Provider} provider - The provider used to get the wallet address.
8
+ * @property {TokenInfo} fromToken - The token to swap from.
9
+ * @property {TokenInfo} toToken - The token to swap to.
10
+ * @property {string | undefined} fromAmount - The amount to swap from.
11
+ * @property {string | undefined} toAmount - The amount to swap to.
12
+ * @property {number | undefined} slippagePercent - The percentage of slippage tolerance. Default = 0.1. Max = 50. Min = 0
13
+ * @property {number | undefined} maxHops - Maximum hops allowed in optimal route. Default is 2
14
+ * @property {number | undefined} deadline - Latest time swap can execute. Default is 15 minutes
15
+ */
16
+ export interface SwapParams {
17
+ provider: WrappedBrowserProvider | Eip1193Provider;
18
+ fromToken: TokenInfo;
19
+ toToken: TokenInfo;
20
+ fromAmount?: string;
21
+ toAmount?: string;
22
+ slippagePercent?: number;
23
+ maxHops?: number;
24
+ deadline?: number;
25
+ }
26
+ /**
27
+ * Interface representing the result of {@link Checkout.swapQuote}.
28
+ * @property {TransactionDetails} approval - The approval transaction details.
29
+ * @property {TransactionDetails} swap - The swap transaction details.
30
+ * @property {Quote} quote - The quote for the swap.
31
+ */
32
+ export interface SwapQuoteResult {
33
+ approval: TransactionDetails | null;
34
+ swap: TransactionDetails;
35
+ quote: Quote;
36
+ }
37
+ /**
38
+ * Interface representing the result of {@link Checkout.swap}.
39
+ * @property {TransactionDetails} swap - The swap transaction details.
40
+ * @property {Quote} quote - The quote for the swap.
41
+ * @property {TransactionReceipt | null} swapReceipt - The receipt of the swap transaction.
42
+ */
43
+ export interface SwapResult {
44
+ swap: TransactionDetails;
45
+ quote: Quote;
46
+ swapReceipt: TransactionReceipt | null;
47
+ }
@@ -0,0 +1,40 @@
1
+ import { ChainId } from './chains';
2
+ import { TokenInfo } from './tokenInfo';
3
+ export interface TokenMasterInfo extends TokenInfo {
4
+ chainId: ChainId;
5
+ tokenFeatures: TokenFilterTypes[];
6
+ }
7
+ /**
8
+ * Interface representing the parameters for {@link Checkout.getTokenAllowList}.
9
+ * @property {TokenFilterTypes} type - The type of token to retrieve.
10
+ * @property {ChainId} chainId - The ID of the blockchain network.
11
+ * @property {TokenFilter[]} [exclude] - The tokens to exclude from the list.
12
+ */
13
+ export interface GetTokenAllowListParams {
14
+ type: TokenFilterTypes;
15
+ chainId: ChainId;
16
+ exclude?: TokenFilter[];
17
+ }
18
+ /**
19
+ * Interface representing the result of {@link Checkout.getTokenAllowList}.
20
+ * @property {TokenInfo[]} tokens - The list of tokens allowed for the specified params.
21
+ */
22
+ export interface GetTokenAllowListResult {
23
+ tokens: TokenInfo[];
24
+ }
25
+ /**
26
+ * Enum representing the types of token filters available.
27
+ */
28
+ export declare enum TokenFilterTypes {
29
+ ALL = "all",
30
+ SWAP = "swap",
31
+ BRIDGE = "bridge",
32
+ ONRAMP = "onramp"
33
+ }
34
+ /**
35
+ * Interface representing a token filter that can be used to exclude certain tokens.
36
+ * @property {string} address - The token contract address.
37
+ */
38
+ export interface TokenFilter {
39
+ address: string;
40
+ }
@@ -0,0 +1,27 @@
1
+ import { JsonRpcProvider } from 'ethers';
2
+ import { WrappedBrowserProvider } from './provider';
3
+ /**
4
+ * Represents information about a token.
5
+ * @interface TokenInfo
6
+ * @property {string} name - The name of the token.
7
+ * @property {string} symbol - The symbol of the token.
8
+ * @property {number} decimals - The number of decimal places the token supports.
9
+ * @property {string | undefined} [address] - The address of the token.
10
+ * @property {string | undefined} [icon] - The URL of the token's icon.
11
+ */
12
+ export interface TokenInfo {
13
+ name: string;
14
+ symbol: string;
15
+ decimals: number;
16
+ address?: string;
17
+ icon?: string;
18
+ }
19
+ /**
20
+ * Interface representing the parameters for {@link Checkout.getTokenInfo}.
21
+ * @property {WrappedBrowserProvider | JsonRpcProvider} provider - The provider used to get the balance.
22
+ * @property {string} tokenAddress - The contract address of the token.
23
+ */
24
+ export interface GetTokenInfoParams {
25
+ provider: WrappedBrowserProvider | JsonRpcProvider;
26
+ tokenAddress: string;
27
+ }
@@ -0,0 +1,18 @@
1
+ import { TransactionRequest, TransactionResponse, Eip1193Provider } from 'ethers';
2
+ import { WrappedBrowserProvider } from './provider';
3
+ /**
4
+ * Interface representing the parameters for {@link Checkout.sendTransaction}.
5
+ * @property {WrappedBrowserProvider | Eip1193Provider} provider - The provider to connect to the network.
6
+ * @property {TransactionRequest} transaction - The transaction to send.
7
+ */
8
+ export interface SendTransactionParams {
9
+ provider: WrappedBrowserProvider | Eip1193Provider;
10
+ transaction: TransactionRequest;
11
+ }
12
+ /**
13
+ * Interface representing the result of {@link Checkout.sendTransaction}.
14
+ * @property {TransactionResponse} transactionResponse - The response of the transaction.
15
+ */
16
+ export interface SendTransactionResult {
17
+ transactionResponse: TransactionResponse;
18
+ }
@@ -0,0 +1,49 @@
1
+ import { WalletProviderName } from './provider';
2
+ export declare enum WalletAction {
3
+ CHECK_CONNECTION = "eth_accounts",
4
+ CONNECT = "eth_requestAccounts",
5
+ ADD_NETWORK = "wallet_addEthereumChain",
6
+ SWITCH_NETWORK = "wallet_switchEthereumChain",
7
+ GET_CHAINID = "eth_chainId",
8
+ REQUEST_PERMISSIONS = "wallet_requestPermissions"
9
+ }
10
+ /**
11
+ * Interface representing a wallet filter to be used in {@link GetWalletAllowListParams}.
12
+ * @property {WalletProviderName} walletProviderName - The wallet provider name to filter wallets by.
13
+ */
14
+ export interface WalletFilter {
15
+ walletProviderName: WalletProviderName;
16
+ }
17
+ /**
18
+ * Interface representing the parameters for {@link Checkout.getWalletAllowList}.
19
+ * @property {WalletFilterTypes} type - The type of wallets to filter by.
20
+ * @property {WalletFilter[]} [exclude] - An optional list of wallet filters to exclude from the allowed wallets list.
21
+ */
22
+ export interface GetWalletAllowListParams {
23
+ type: WalletFilterTypes;
24
+ exclude?: WalletFilter[];
25
+ }
26
+ /**
27
+ * Interface representing information about a wallet used in {@link GetWalletAllowListResult}.
28
+ * @property {WalletProviderName} walletProviderName - The wallet provider name for the wallet.
29
+ * @property {string | undefined} description - A description of the wallet.
30
+ * @property {string | undefined} icon - The URL/data:image of an icon for the wallet.
31
+ */
32
+ export interface WalletInfo {
33
+ walletProviderName: WalletProviderName;
34
+ description?: string;
35
+ icon?: string;
36
+ }
37
+ /**
38
+ * Interface representing the result of {@link Checkout.getWalletAllowList}.
39
+ * @property {WalletInfo[]} wallets - A list of {@link WalletInfo} objects representing the allowed wallets.
40
+ */
41
+ export interface GetWalletAllowListResult {
42
+ wallets: WalletInfo[];
43
+ }
44
+ /**
45
+ * Enum representing the platform filters used in {@link GetWalletAllowListParams}.
46
+ */
47
+ export declare enum WalletFilterTypes {
48
+ ALL = "all"
49
+ }
@@ -0,0 +1,11 @@
1
+ import { WidgetConfiguration } from '../widgets/definitions/configurations/widget';
2
+ import { SemanticVersion } from '../widgets/definitions/types';
3
+ /**
4
+ * Represents the configuration options for instantiating the Commerce Widgets factory.
5
+ * @property {WidgetConfiguration} config - global configuration options for the widgets.
6
+ * @property {SemanticVersion | undefined} version - version of the Commerce Widgets bundle(default latest version will be used).
7
+ */
8
+ export type WidgetsInit = {
9
+ config: WidgetConfiguration;
10
+ version?: SemanticVersion;
11
+ };
@@ -0,0 +1,11 @@
1
+ import { ChainId } from '../types';
2
+ export declare const isMatchingAddress: (addressA?: string, addressB?: string) => boolean;
3
+ export declare const isZkEvmChainId: (chainId: ChainId) => chainId is ChainId.IMTBL_ZKEVM_MAINNET | ChainId.IMTBL_ZKEVM_TESTNET | ChainId.IMTBL_ZKEVM_DEVNET;
4
+ /**
5
+ * Rounds up a token amount to a set number of decimals, so it can be handled by Swap, Bridge, OnRamp Widgets.
6
+ * Widgets can only handle formatted values of 6 (DEFAULT_TOKEN_FORMATTING_DECIMALS) decimals.
7
+ * @param amount
8
+ * @param maxDecimals
9
+ * @returns
10
+ */
11
+ export declare const formatSmartCheckoutAmount: (amount: string, maxDecimals?: number) => string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export * from './wallet';
@@ -0,0 +1,2 @@
1
+ import { GetWalletAllowListParams, GetWalletAllowListResult } from '../types';
2
+ export declare function getWalletAllowList(params: GetWalletAllowListParams): Promise<GetWalletAllowListResult>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { WidgetConfiguration } from './widget';
2
+ /**
3
+ * Add Tokens Widget Configuration represents the configuration options for the Add Tokens Widget.
4
+ */
5
+ export type AddTokensWidgetConfiguration = {} & WidgetConfiguration;
@@ -0,0 +1,5 @@
1
+ import { WidgetConfiguration } from './widget';
2
+ /**
3
+ * Bridge Widget Configuration represents the configuration options for the Bridge Widget.
4
+ */
5
+ export type BridgeWidgetConfiguration = {} & WidgetConfiguration;
@@ -0,0 +1,17 @@
1
+ import { ConnectWidgetConfiguration } from './connect';
2
+ import { WalletWidgetConfiguration } from './wallet';
3
+ import { BridgeWidgetConfiguration } from './bridge';
4
+ import { SwapWidgetConfiguration } from './swap';
5
+ import { OnrampWidgetConfiguration } from './onramp';
6
+ import { SaleWidgetConfiguration } from './sale';
7
+ import { AddTokensWidgetConfiguration } from './addTokens';
8
+ import { WidgetConfiguration } from './widget';
9
+ export type CommerceWidgetConfiguration = {
10
+ CONNECT?: Omit<ConnectWidgetConfiguration, keyof WidgetConfiguration>;
11
+ WALLET?: Omit<WalletWidgetConfiguration, keyof WidgetConfiguration>;
12
+ SWAP?: Omit<SwapWidgetConfiguration, keyof WidgetConfiguration>;
13
+ BRIDGE?: Omit<BridgeWidgetConfiguration, keyof WidgetConfiguration>;
14
+ ONRAMP?: Omit<OnrampWidgetConfiguration, keyof WidgetConfiguration>;
15
+ SALE?: Omit<SaleWidgetConfiguration, keyof WidgetConfiguration>;
16
+ ADD_TOKENS?: Omit<AddTokensWidgetConfiguration, keyof WidgetConfiguration>;
17
+ } & Omit<WidgetConfiguration, 'walletConnect'>;
@@ -0,0 +1,5 @@
1
+ import { WidgetConfiguration } from './widget';
2
+ /**
3
+ * Connect Widget Configuration represents the configuration options for the Connect Widget.
4
+ */
5
+ export type ConnectWidgetConfiguration = {} & WidgetConfiguration;
@@ -0,0 +1,11 @@
1
+ export * from './connect';
2
+ export * from './bridge';
3
+ export * from './wallet';
4
+ export * from './swap';
5
+ export * from './onramp';
6
+ export * from './sale';
7
+ export * from './theme';
8
+ export * from './widget';
9
+ export * from './addTokens';
10
+ export * from './commerce';
11
+ export * from './purchase';
@@ -0,0 +1,5 @@
1
+ import { WidgetConfiguration } from './widget';
2
+ /**
3
+ * Onramp Widget Configuration represents the configuration options for the Onramp Widget.
4
+ */
5
+ export type OnrampWidgetConfiguration = {} & WidgetConfiguration;
@@ -0,0 +1,2 @@
1
+ import { WidgetConfiguration } from './widget';
2
+ export type PurchaseWidgetConfiguration = {} & WidgetConfiguration;
@@ -0,0 +1,8 @@
1
+ import { WidgetConfiguration } from './widget';
2
+ /**
3
+ * Sale Widget Configuration represents the configuration options for the Sale Widget.
4
+ */
5
+ export type SaleWidgetConfiguration = {
6
+ waitFulfillmentSettlements?: boolean;
7
+ hideExcludedPaymentTypes?: boolean;
8
+ } & WidgetConfiguration;
@@ -0,0 +1,5 @@
1
+ import { WidgetConfiguration } from './widget';
2
+ /**
3
+ * Swap Widget Configuration represents the configuration options for the Swap Widget.
4
+ */
5
+ export type SwapWidgetConfiguration = {} & WidgetConfiguration;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Enum representing the themes for the widgets.
3
+ */
4
+ export declare enum WidgetTheme {
5
+ LIGHT = "light",
6
+ DARK = "dark"
7
+ }
@@ -0,0 +1,12 @@
1
+ import { WidgetConfiguration } from './widget';
2
+ /**
3
+ * Wallet Widget Configuration represents the configuration options for the Wallet Widget.
4
+ * @property {boolean | undefined} showDisconnectButton
5
+ * @property {boolean | undefined} showNetworkMenu
6
+ */
7
+ export type WalletWidgetConfiguration = {
8
+ /** Show/hide the disconnect button in the Wallet Widget (defaults to true) */
9
+ showDisconnectButton?: boolean;
10
+ /** Show/hide the network menu in the Wallet Widget (defaults to true) */
11
+ showNetworkMenu?: boolean;
12
+ } & WidgetConfiguration;
@@ -0,0 +1,31 @@
1
+ import { WidgetTheme } from './theme';
2
+ /**
3
+ * Widget Configuration represents the shared configuration options for the Commerce Widgets.
4
+ * @property {WidgetTheme | undefined} theme
5
+ * @property {WidgetLanguage | undefined} language
6
+ * @property {WalletConnectConfig | undefined} walletConnect
7
+ */
8
+ export type WidgetConfiguration = {
9
+ /** The theme of the Commerce Widget (default: "DARK") */
10
+ theme?: WidgetTheme;
11
+ language?: WidgetLanguage;
12
+ walletConnect?: WalletConnectConfig;
13
+ };
14
+ /**
15
+ * Widget Language represents the language options for the Commerce Widgets.
16
+ */
17
+ export type WidgetLanguage = 'en' | 'ja' | 'ko' | 'zh';
18
+ /**
19
+ * WalletConnect Config represents the configuration required to enable WalletConnect for the Commerce Widgets.
20
+ */
21
+ export type WalletConnectConfig = {
22
+ /** WalletConnect projectId */
23
+ projectId: string;
24
+ /** Dapp metadata that will be displayed on wallet connection and transaction approvals. */
25
+ metadata: {
26
+ name: string;
27
+ description: string;
28
+ url: string;
29
+ icons: string[];
30
+ };
31
+ };
@@ -0,0 +1,41 @@
1
+ import { EIP6963ProviderInfo, WrappedBrowserProvider } from '../../../types';
2
+ /**
3
+ * Enum of possible Add Tokens Widget event types.
4
+ */
5
+ export declare enum AddTokensEventType {
6
+ CLOSE_WIDGET = "close-widget",
7
+ LANGUAGE_CHANGED = "language-changed",
8
+ CONNECT_SUCCESS = "connect-success",
9
+ SUCCESS = "success",
10
+ FAILURE = "failure"
11
+ }
12
+ /**
13
+ * Represents a successful add tokens transaction.
14
+ * @property {string} transactionHash
15
+ */
16
+ export type AddTokensSuccess = {
17
+ /** The transaction hash of the successful transaction. */
18
+ transactionHash: string;
19
+ };
20
+ /**
21
+ * Type representing add tokens failure
22
+ * @property {string} reason
23
+ * @property {number} timestamp
24
+ */
25
+ export type AddTokensFailed = {
26
+ /** The reason why it failed. */
27
+ reason: string;
28
+ /** The timestamp of the failed transaction. */
29
+ timestamp: number;
30
+ };
31
+ /**
32
+ * Type representing a successful provider connection
33
+ * @property {WrappedBrowserProvider} provider
34
+ * @property {EIP6963ProviderInfo} providerInfo
35
+ * @property {'from' | 'to'} providerType
36
+ */
37
+ export type AddTokensConnectSuccess = {
38
+ provider: WrappedBrowserProvider;
39
+ providerInfo: EIP6963ProviderInfo;
40
+ providerType: 'from' | 'to';
41
+ };
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Enum of possible Bridge Widget event types.
3
+ */
4
+ export declare enum BridgeEventType {
5
+ CLOSE_WIDGET = "close-widget",
6
+ FAILURE = "failure",
7
+ TRANSACTION_SENT = "transaction-sent",
8
+ LANGUAGE_CHANGED = "language-changed",
9
+ CLAIM_WITHDRAWAL_SUCCESS = "claim-withdrawal-success",
10
+ CLAIM_WITHDRAWAL_FAILURE = "claim-withdrawal-failure"
11
+ }
12
+ /**
13
+ * Represents a successful bridge transaction.
14
+ * @property {string} transactionHash
15
+ */
16
+ export type BridgeTransactionSent = {
17
+ /** The hash of the successful transaction. */
18
+ transactionHash: string;
19
+ };
20
+ /**
21
+ * Represents a failed bridge transaction.
22
+ * @property {string} reason
23
+ * @property {number} timestamp
24
+ */
25
+ export type BridgeFailed = {
26
+ /** The reason for the failed transaction. */
27
+ reason: string;
28
+ /** The timestamp of the failed transaction. */
29
+ timestamp: number;
30
+ };
31
+ /**
32
+ * Represents a successful bridge claim withdrawal.
33
+ * @property {string} transactionHash
34
+ */
35
+ export type BridgeClaimWithdrawalSuccess = {
36
+ /** The hash of the successful transaction. */
37
+ transactionHash: string;
38
+ };
39
+ /**
40
+ * Represents a failed bridge claim withdrawal.
41
+ * @property {string} transactionHash
42
+ * @property {string} reason
43
+ * @property {number} timestamp
44
+ */
45
+ export type BridgeClaimWithdrawalFailed = {
46
+ /** The hash of the failed transaction. */
47
+ transactionHash: string;
48
+ /** The reason for the failed transaction. */
49
+ reason: string;
50
+ /** The timestamp of the failed transaction. */
51
+ timestamp: number;
52
+ };
@@ -0,0 +1,134 @@
1
+ import { ConnectionFailed, ConnectionSuccess } from './connect';
2
+ import { SaleFailed, SalePaymentMethod, SalePaymentToken, SaleSuccess, SaleTransactionSuccess } from './sale';
3
+ import { EIP6963ProviderInfo, WalletProviderName, WrappedBrowserProvider } from '../../../types';
4
+ import { OnRampFailed, OnRampSuccess } from './onramp';
5
+ import { BridgeClaimWithdrawalFailed, BridgeClaimWithdrawalSuccess, BridgeFailed, BridgeTransactionSent } from './bridge';
6
+ import { SwapFailed, SwapRejected, SwapSuccess } from './swap';
7
+ import { WalletNetworkSwitch } from './wallet';
8
+ import { AddTokensFailed, AddTokensSuccess, AddTokensConnectSuccess } from './addTokens';
9
+ export declare enum CommerceEventType {
10
+ INITIALISED = "INITIALISED",
11
+ PROVIDER_UPDATED = "PROVIDER_UPDATED",
12
+ CLOSE = "CLOSE",
13
+ SUCCESS = "SUCCESS",
14
+ FAILURE = "FAILURE",
15
+ DISCONNECTED = "DISCONNECTED",
16
+ USER_ACTION = "USER_ACTION"
17
+ }
18
+ export declare enum CommerceSuccessEventType {
19
+ SWAP_SUCCESS = "SWAP_SUCCESS",
20
+ ONRAMP_SUCCESS = "ONRAMP_SUCCESS",
21
+ CONNECT_SUCCESS = "CONNECT_SUCCESS",
22
+ SALE_SUCCESS = "SALE_SUCCESS",
23
+ SALE_TRANSACTION_SUCCESS = "SALE_TRANSACTION_SUCCESS",
24
+ BRIDGE_SUCCESS = "BRIDGE_SUCCESS",
25
+ BRIDGE_CLAIM_WITHDRAWAL_SUCCESS = "BRIDGE_CLAIM_WITHDRAWAL_SUCCESS",
26
+ ADD_TOKENS_SUCCESS = "ADD_TOKENS_SUCCESS",
27
+ ADD_TOKENS_CONNECT_SUCCESS = "ADD_TOKENS_CONNECT_SUCCESS"
28
+ }
29
+ export declare enum CommerceFailureEventType {
30
+ BRIDGE_FAILED = "BRIDGE_FAILED",
31
+ BRIDGE_CLAIM_WITHDRAWAL_FAILED = "BRIDGE_CLAIM_WITHDRAWAL_FAILED",
32
+ SWAP_FAILED = "SWAP_FAILED",
33
+ SWAP_REJECTED = "SWAP_REJECTED",
34
+ CONNECT_FAILED = "CONNECT_FAILED",
35
+ SALE_FAILED = "SALE_FAILED",
36
+ ONRAMP_FAILED = "ONRAMP_FAILED",
37
+ ADD_TOKENS_FAILED = "ADD_TOKENS_FAILED"
38
+ }
39
+ export declare enum CommerceUserActionEventType {
40
+ PAYMENT_METHOD_SELECTED = "PAYMENT_METHOD_SELECTED",
41
+ PAYMENT_TOKEN_SELECTED = "PAYMENT_TOKEN_SELECTED",
42
+ NETWORK_SWITCH = "NETWORK_SWITCH"
43
+ }
44
+ export type CommerceProviderUpdatedEvent = {
45
+ /** The connected provider. */
46
+ provider: WrappedBrowserProvider;
47
+ /** The wallet provider name of the connected provider. */
48
+ walletProviderName: WalletProviderName | undefined;
49
+ /** The wallet provider EIP-6963 metadata. */
50
+ walletProviderInfo: EIP6963ProviderInfo | undefined;
51
+ };
52
+ export type CommerceSaleSuccessEvent = {
53
+ type: CommerceSuccessEventType.SALE_SUCCESS;
54
+ data: SaleSuccess;
55
+ };
56
+ export type CommerceSaleSuccessfulTransactionEvent = {
57
+ type: CommerceSuccessEventType.SALE_TRANSACTION_SUCCESS;
58
+ data: SaleTransactionSuccess;
59
+ };
60
+ export type CommerceOnRampSuccessEvent = {
61
+ type: CommerceSuccessEventType.ONRAMP_SUCCESS;
62
+ data: OnRampSuccess;
63
+ };
64
+ export type CommerceBridgeSuccessEvent = {
65
+ type: CommerceSuccessEventType.BRIDGE_SUCCESS;
66
+ data: BridgeTransactionSent;
67
+ };
68
+ export type CommerceBridgeClaimWithdrawalSuccessEvent = {
69
+ type: CommerceSuccessEventType.BRIDGE_CLAIM_WITHDRAWAL_SUCCESS;
70
+ data: BridgeClaimWithdrawalSuccess;
71
+ };
72
+ export type CommerceSwapSuccessEvent = {
73
+ type: CommerceSuccessEventType.SWAP_SUCCESS;
74
+ data: SwapSuccess;
75
+ };
76
+ export type CommerceConnectSuccessEvent = {
77
+ type: CommerceSuccessEventType.CONNECT_SUCCESS;
78
+ data: ConnectionSuccess;
79
+ };
80
+ export type CommerceAddTokensSuccessEvent = {
81
+ type: CommerceSuccessEventType.ADD_TOKENS_SUCCESS;
82
+ data: AddTokensSuccess;
83
+ };
84
+ export type CommerceAddTokensConnectSuccessEvent = {
85
+ type: CommerceSuccessEventType.ADD_TOKENS_CONNECT_SUCCESS;
86
+ data: AddTokensConnectSuccess;
87
+ };
88
+ export type CommerceSuccessEvent = CommerceAddTokensSuccessEvent | CommerceAddTokensConnectSuccessEvent | CommerceConnectSuccessEvent | CommerceBridgeSuccessEvent | CommerceBridgeClaimWithdrawalSuccessEvent | CommerceOnRampSuccessEvent | CommerceSwapSuccessEvent | CommerceSaleSuccessEvent | CommerceSaleSuccessfulTransactionEvent;
89
+ export type CommerceBridgeFailureEvent = {
90
+ type: CommerceFailureEventType.BRIDGE_FAILED;
91
+ data: BridgeFailed;
92
+ };
93
+ export type CommerceBridgeClaimWithdrawalFailedEvent = {
94
+ type: CommerceFailureEventType.BRIDGE_CLAIM_WITHDRAWAL_FAILED;
95
+ data: BridgeClaimWithdrawalFailed;
96
+ };
97
+ export type CommerceConnectFailureEvent = {
98
+ type: CommerceFailureEventType.CONNECT_FAILED;
99
+ data: ConnectionFailed;
100
+ };
101
+ export type CommerceOnRampFailureEvent = {
102
+ type: CommerceFailureEventType.ONRAMP_FAILED;
103
+ data: OnRampFailed;
104
+ };
105
+ export type CommerceSwapFailureEvent = {
106
+ type: CommerceFailureEventType.SWAP_FAILED;
107
+ data: SwapFailed;
108
+ };
109
+ export type CommerceSwapRejectedEvent = {
110
+ type: CommerceFailureEventType.SWAP_REJECTED;
111
+ data: SwapRejected;
112
+ };
113
+ export type CommerceSaleFailureEvent = {
114
+ type: CommerceFailureEventType.SALE_FAILED;
115
+ data: SaleFailed;
116
+ };
117
+ export type CommerceAddTokensFailureEvent = {
118
+ type: CommerceFailureEventType.ADD_TOKENS_FAILED;
119
+ data: AddTokensFailed;
120
+ };
121
+ export type CommerceFailureEvent = CommerceAddTokensFailureEvent | CommerceBridgeFailureEvent | CommerceBridgeClaimWithdrawalFailedEvent | CommerceConnectFailureEvent | CommerceOnRampFailureEvent | CommerceSwapFailureEvent | CommerceSwapRejectedEvent | CommerceSaleFailureEvent;
122
+ export type CommercePaymentMethodSelectedEvent = {
123
+ type: CommerceUserActionEventType.PAYMENT_METHOD_SELECTED;
124
+ data: SalePaymentMethod;
125
+ };
126
+ export type CommercePaymentTokenSelectedEvent = {
127
+ type: CommerceUserActionEventType.PAYMENT_TOKEN_SELECTED;
128
+ data: SalePaymentToken;
129
+ };
130
+ export type CommerceNetworkSwitchEvent = {
131
+ type: CommerceUserActionEventType.NETWORK_SWITCH;
132
+ data: WalletNetworkSwitch;
133
+ };
134
+ export type CommerceUserActionEvent = CommercePaymentMethodSelectedEvent | CommercePaymentTokenSelectedEvent | CommerceNetworkSwitchEvent;
@@ -0,0 +1,47 @@
1
+ import { EIP6963ProviderInfo, WrappedBrowserProvider, WalletProviderName } from '../../../types';
2
+ /**
3
+ * Enum representing possible Connect Widget event types.
4
+ */
5
+ export declare enum ConnectEventType {
6
+ CLOSE_WIDGET = "close-widget",
7
+ SUCCESS = "success",
8
+ FAILURE = "failure",
9
+ LANGUAGE_CHANGED = "language-changed",
10
+ WALLETCONNECT_PROVIDER_UPDATED = "walletconnect-provider-updated"
11
+ }
12
+ /**
13
+ * Represents a successful connection.
14
+ * @property {WrappedBrowserProvider} provider
15
+ * @property {WalletProviderName | undefined} walletProviderName
16
+ */
17
+ export type ConnectionSuccess = {
18
+ /** The connected provider. */
19
+ provider: WrappedBrowserProvider;
20
+ /** The wallet provider name of the connected provider. */
21
+ walletProviderName: WalletProviderName | undefined;
22
+ /** The wallet provider EIP-6963 metadata. */
23
+ walletProviderInfo: EIP6963ProviderInfo | undefined;
24
+ };
25
+ /**
26
+ * Represents a connection failure with a reason.
27
+ * @property {string} reason
28
+ */
29
+ export type ConnectionFailed = {
30
+ /** The reason for the failed connection. */
31
+ reason: string;
32
+ };
33
+ export type WalletConnectProviderChanged = {
34
+ ethereumProvider: any;
35
+ walletConnectManager: WalletConnectManager;
36
+ };
37
+ /**
38
+ * Provides access to the underlying WalletConnect modal and provider.
39
+ */
40
+ export interface WalletConnectManager {
41
+ isInitialised: () => boolean;
42
+ isEnabled: () => boolean;
43
+ getModal: () => any;
44
+ getProvider: () => Promise<any>;
45
+ loadWalletListings: () => Promise<Response | undefined>;
46
+ getWalletLogoUrl: (walletSlug?: string) => Promise<string | undefined>;
47
+ }
@@ -0,0 +1,11 @@
1
+ export * from './widgets';
2
+ export * from './connect';
3
+ export * from './wallet';
4
+ export * from './swap';
5
+ export * from './sale';
6
+ export * from './bridge';
7
+ export * from './orchestration';
8
+ export * from './onramp';
9
+ export * from './commerce';
10
+ export * from './addTokens';
11
+ export * from './purchase';