@sodax/dapp-kit 0.0.1-rc.3 → 0.0.1-rc.30

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 (126) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +152 -53
  3. package/dist/index.d.mts +1425 -0
  4. package/dist/index.d.ts +1425 -4
  5. package/dist/index.js +931 -194
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +890 -191
  8. package/dist/index.mjs.map +1 -1
  9. package/package.json +7 -8
  10. package/src/contexts/index.ts +2 -0
  11. package/src/core/index.ts +5 -33
  12. package/src/hooks/backend/README.md +135 -0
  13. package/src/hooks/backend/index.ts +23 -0
  14. package/src/hooks/backend/useBackendAllMoneyMarketAssets.ts +49 -0
  15. package/src/hooks/backend/useBackendAllMoneyMarketBorrowers.ts +61 -0
  16. package/src/hooks/backend/useBackendIntentByHash.ts +53 -0
  17. package/src/hooks/backend/useBackendIntentByTxHash.ts +52 -0
  18. package/src/hooks/backend/useBackendMoneyMarketAsset.ts +57 -0
  19. package/src/hooks/backend/useBackendMoneyMarketAssetBorrowers.ts +67 -0
  20. package/src/hooks/backend/useBackendMoneyMarketAssetSuppliers.ts +67 -0
  21. package/src/hooks/backend/useBackendMoneyMarketPosition.ts +56 -0
  22. package/src/hooks/backend/useBackendOrderbook.ts +63 -0
  23. package/src/hooks/bridge/index.ts +5 -0
  24. package/src/hooks/bridge/useBridge.ts +57 -0
  25. package/src/hooks/bridge/useBridgeAllowance.ts +49 -0
  26. package/src/hooks/bridge/useBridgeApprove.ts +68 -0
  27. package/src/hooks/bridge/useGetBridgeableAmount.ts +50 -0
  28. package/src/hooks/bridge/useGetBridgeableTokens.ts +62 -0
  29. package/src/hooks/index.ts +3 -0
  30. package/src/hooks/mm/index.ts +3 -1
  31. package/src/hooks/mm/useBorrow.ts +20 -10
  32. package/src/hooks/mm/useMMAllowance.ts +55 -0
  33. package/src/hooks/mm/useMMApprove.ts +67 -0
  34. package/src/hooks/mm/useRepay.ts +20 -10
  35. package/src/hooks/mm/useReservesData.ts +30 -0
  36. package/src/hooks/mm/useReservesHumanized.ts +30 -0
  37. package/src/hooks/mm/useReservesList.ts +29 -0
  38. package/src/hooks/mm/useReservesUsdFormat.ts +38 -0
  39. package/src/hooks/mm/useSupply.ts +9 -6
  40. package/src/hooks/mm/useUserFormattedSummary.ts +54 -0
  41. package/src/hooks/mm/useUserReservesData.ts +30 -48
  42. package/src/hooks/mm/useWithdraw.ts +17 -11
  43. package/src/hooks/provider/useHubProvider.ts +3 -21
  44. package/src/hooks/provider/useSpokeProvider.ts +97 -6
  45. package/src/hooks/shared/index.ts +4 -2
  46. package/src/hooks/shared/useDeriveUserWalletAddress.ts +44 -0
  47. package/src/hooks/shared/useEstimateGas.ts +18 -0
  48. package/src/hooks/shared/useRequestTrustline.ts +82 -0
  49. package/src/hooks/shared/useStellarTrustlineCheck.ts +71 -0
  50. package/src/hooks/staking/index.ts +19 -0
  51. package/src/hooks/staking/useCancelUnstake.ts +52 -0
  52. package/src/hooks/staking/useClaim.ts +46 -0
  53. package/src/hooks/staking/useConvertedAssets.ts +47 -0
  54. package/src/hooks/staking/useInstantUnstake.ts +50 -0
  55. package/src/hooks/staking/useInstantUnstakeAllowance.ts +59 -0
  56. package/src/hooks/staking/useInstantUnstakeApprove.ts +52 -0
  57. package/src/hooks/staking/useInstantUnstakeRatio.ts +54 -0
  58. package/src/hooks/staking/useStake.ts +47 -0
  59. package/src/hooks/staking/useStakeAllowance.ts +57 -0
  60. package/src/hooks/staking/useStakeApprove.ts +50 -0
  61. package/src/hooks/staking/useStakeRatio.ts +53 -0
  62. package/src/hooks/staking/useStakingConfig.ts +40 -0
  63. package/src/hooks/staking/useStakingInfo.ts +50 -0
  64. package/src/hooks/staking/useUnstake.ts +54 -0
  65. package/src/hooks/staking/useUnstakeAllowance.ts +58 -0
  66. package/src/hooks/staking/useUnstakeApprove.ts +52 -0
  67. package/src/hooks/staking/useUnstakingInfo.ts +53 -0
  68. package/src/hooks/staking/useUnstakingInfoWithPenalty.ts +59 -0
  69. package/src/hooks/swap/index.ts +4 -1
  70. package/src/hooks/swap/useCancelSwap.ts +44 -0
  71. package/src/hooks/swap/useQuote.ts +20 -6
  72. package/src/hooks/swap/useStatus.ts +3 -3
  73. package/src/hooks/swap/{useCreateIntentOrder.ts → useSwap.ts} +22 -19
  74. package/src/hooks/swap/useSwapAllowance.ts +48 -0
  75. package/src/hooks/swap/useSwapApprove.ts +68 -0
  76. package/src/providers/SodaxProvider.tsx +7 -4
  77. package/dist/contexts/index.d.ts +0 -7
  78. package/dist/contexts/index.d.ts.map +0 -1
  79. package/dist/core/index.d.ts +0 -4
  80. package/dist/core/index.d.ts.map +0 -1
  81. package/dist/hooks/index.d.ts +0 -5
  82. package/dist/hooks/index.d.ts.map +0 -1
  83. package/dist/hooks/mm/index.d.ts +0 -7
  84. package/dist/hooks/mm/index.d.ts.map +0 -1
  85. package/dist/hooks/mm/useBorrow.d.ts +0 -26
  86. package/dist/hooks/mm/useBorrow.d.ts.map +0 -1
  87. package/dist/hooks/mm/useHubWalletAddress.d.ts +0 -24
  88. package/dist/hooks/mm/useHubWalletAddress.d.ts.map +0 -1
  89. package/dist/hooks/mm/useRepay.d.ts +0 -26
  90. package/dist/hooks/mm/useRepay.d.ts.map +0 -1
  91. package/dist/hooks/mm/useSupply.d.ts +0 -32
  92. package/dist/hooks/mm/useSupply.d.ts.map +0 -1
  93. package/dist/hooks/mm/useUserReservesData.d.ts +0 -9
  94. package/dist/hooks/mm/useUserReservesData.d.ts.map +0 -1
  95. package/dist/hooks/mm/useWithdraw.d.ts +0 -26
  96. package/dist/hooks/mm/useWithdraw.d.ts.map +0 -1
  97. package/dist/hooks/provider/index.d.ts +0 -3
  98. package/dist/hooks/provider/index.d.ts.map +0 -1
  99. package/dist/hooks/provider/useHubProvider.d.ts +0 -3
  100. package/dist/hooks/provider/useHubProvider.d.ts.map +0 -1
  101. package/dist/hooks/provider/useSpokeProvider.d.ts +0 -4
  102. package/dist/hooks/provider/useSpokeProvider.d.ts.map +0 -1
  103. package/dist/hooks/shared/index.d.ts +0 -4
  104. package/dist/hooks/shared/index.d.ts.map +0 -1
  105. package/dist/hooks/shared/useAllowance.d.ts +0 -3
  106. package/dist/hooks/shared/useAllowance.d.ts.map +0 -1
  107. package/dist/hooks/shared/useApprove.d.ts +0 -10
  108. package/dist/hooks/shared/useApprove.d.ts.map +0 -1
  109. package/dist/hooks/shared/useSodaxContext.d.ts +0 -8
  110. package/dist/hooks/shared/useSodaxContext.d.ts.map +0 -1
  111. package/dist/hooks/swap/index.d.ts +0 -4
  112. package/dist/hooks/swap/index.d.ts.map +0 -1
  113. package/dist/hooks/swap/useCreateIntentOrder.d.ts +0 -33
  114. package/dist/hooks/swap/useCreateIntentOrder.d.ts.map +0 -1
  115. package/dist/hooks/swap/useQuote.d.ts +0 -39
  116. package/dist/hooks/swap/useQuote.d.ts.map +0 -1
  117. package/dist/hooks/swap/useStatus.d.ts +0 -31
  118. package/dist/hooks/swap/useStatus.d.ts.map +0 -1
  119. package/dist/index.d.ts.map +0 -1
  120. package/dist/providers/SodaxProvider.d.ts +0 -10
  121. package/dist/providers/SodaxProvider.d.ts.map +0 -1
  122. package/dist/providers/index.d.ts +0 -2
  123. package/dist/providers/index.d.ts.map +0 -1
  124. package/src/hooks/mm/useHubWalletAddress.ts +0 -49
  125. package/src/hooks/shared/useAllowance.ts +0 -31
  126. package/src/hooks/shared/useApprove.ts +0 -53
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2025] [Sodax]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -10,23 +10,59 @@ dApp Kit is a collection of React components, hooks, and utilities designed to s
10
10
  - Withdraw tokens from the money market (`useWithdraw`)
11
11
  - Borrow tokens from the money market (`useBorrow`)
12
12
  - Repay borrowed tokens (`useRepay`)
13
+ - Check token allowance (`useMMAllowance`)
14
+ - Approve token spending (`useMMApprove`)
13
15
  - Get user reserves data (`useUserReservesData`)
14
- - Calculate hub wallet address by using spoke chain id and spoke chain wallet address (`useHubWalletAddress`)
16
+ - Get reserves data (`useReservesData`)
17
+ - Get humanized reserves data (`useReservesHumanized`)
18
+ - Get list of reserves (`useReservesList`)
19
+ - Get USD formatted reserves data (`useReservesUsdFormat`)
20
+ - Get formatted user portfolio summary (`useUserFormattedSummary`)
15
21
 
16
22
  - Swap/Intent
17
23
  - Get quote for an intent order (`useQuote`)
18
- - Create and submit an intent order (`useCreateIntentOrder`)
24
+ - Create and submit an swap intent order (`useSwap`)
19
25
  - Get status of an intent order (`useStatus`)
26
+ - Check token allowance (`useSwapAllowance`)
27
+ - Approve token spending (`useSwapApprove`)
28
+ - Cancel a swap intent order (`useCancelSwap`)
20
29
 
21
30
  - Provider
22
31
  - Get hub chain provider (`useHubProvider`)
23
32
  - Get spoke chain provider (`useSpokeProvider`)
24
33
  - Get wallet provider (`useWalletProvider`)
25
34
 
26
- - Token Management
27
- - Check token allowance (`useAllowance`)
28
- - Approve token spending (`useApprove`)
29
-
35
+ - Bridge
36
+ - Bridge tokens between chains (`useBridge`)
37
+ - Check token allowance for bridging (`useBridgeAllowance`)
38
+ - Approve source token for bridging (`useBridgeApprove`)
39
+ - Get max amount available to be bridged (`useGetBridgeableAmount`)
40
+ - Get available destination tokens based on provided source token (`useGetBridgeableTokens`)
41
+
42
+ - Shared
43
+ - Derive user wallet address for hub abstraction (`useDeriveUserWalletAddress`)
44
+ - Check if Stellar trustline is established for an asset (`useStellarTrustlineCheck`)
45
+ - Request creation of Stellar trustline line for an asset (`useRequestTrustline`)
46
+
47
+ - Staking
48
+ - Stake SODA tokens to receive xSODA shares (`useStake`)
49
+ - Unstake xSODA shares (`useUnstake`)
50
+ - Instant unstake xSODA shares with penalty (`useInstantUnstake`)
51
+ - Claim unstaked SODA tokens after unstaking period (`useClaim`)
52
+ - Cancel unstake request (`useCancelUnstake`)
53
+ - Check SODA token allowance for staking (`useStakeAllowance`)
54
+ - Approve SODA token spending for staking (`useStakeApprove`)
55
+ - Check xSODA token allowance for unstaking (`useUnstakeAllowance`)
56
+ - Approve xSODA token spending for unstaking (`useUnstakeApprove`)
57
+ - Check xSODA token allowance for instant unstaking (`useInstantUnstakeAllowance`)
58
+ - Approve xSODA token spending for instant unstaking (`useInstantUnstakeApprove`)
59
+ - Get comprehensive staking information (`useStakingInfo`)
60
+ - Get unstaking information with penalty details (`useUnstakingInfoWithPenalty`)
61
+ - Get unstaking information (`useUnstakingInfo`)
62
+ - Get staking configuration (`useStakingConfig`)
63
+ - Get stake ratio (SODA to xSODA conversion rate) (`useStakeRatio`)
64
+ - Get instant unstake ratio (xSODA to SODA conversion rate with penalty) (`useInstantUnstakeRatio`)
65
+ - Get converted assets amount for xSODA shares (`useConvertedAssets`)
30
66
 
31
67
  ## Installation
32
68
 
@@ -43,56 +79,43 @@ pnpm add @sodax/dapp-kit
43
79
  1. First, install the required dependencies:
44
80
 
45
81
  ```bash
46
- npm install @sodax/dapp-kit @tanstack/react-query @sodax/wallet-sdk
82
+ pnpm install @sodax/dapp-kit @tanstack/react-query @sodax/wallet-sdk-react
47
83
  ```
48
84
 
49
85
  2. Set up the providers in your app:
50
86
 
51
87
  ```typescript
52
88
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
53
- import { XWagmiProviders } from '@sodax/wallet-sdk';
89
+ import { SodaxWalletProvider } from '@sodax/wallet-sdk-react';
54
90
  import { SodaxProvider } from '@sodax/dapp-kit';
55
- import { SONIC_MAINNET_CHAIN_ID } from '@sodax/types';
91
+ import type { RpcConfig } from '@sodax/types';
56
92
 
57
93
  const queryClient = new QueryClient();
58
94
 
59
- // Configure Sodax
60
- const sodaxConfig = {
61
- hubProviderConfig: {
62
- hubRpcUrl: 'https://rpc.soniclabs.com',
63
- chainConfig: getHubChainConfig(SONIC_MAINNET_CHAIN_ID),
64
- },
65
- moneyMarket: getMoneyMarketConfig(SONIC_MAINNET_CHAIN_ID),
66
- solver: {
67
- intentsContract: '0x6382D6ccD780758C5e8A6123c33ee8F4472F96ef',
68
- solverApiEndpoint: 'https://staging-new-world.iconblockchain.xyz',
69
- partnerFee: {
70
- address: '0x0Ab764AB3816cD036Ea951bE973098510D8105A6',
71
- percentage: 100, // 1%
72
- },
73
- },
74
- relayerApiEndpoint: 'https://xcall-relay.nw.iconblockchain.xyz',
95
+ const rpcConfig: RpcConfig = {
96
+ // EVM chains
97
+ sonic: 'https://rpc.soniclabs.com',
98
+ '0xa86a.avax': 'https://api.avax.network/ext/bc/C/rpc',
99
+ '0xa4b1.arbitrum': 'https://arb1.arbitrum.io/rpc',
100
+ '0x2105.base': 'https://mainnet.base.org',
101
+ '0x38.bsc': 'https://bsc-dataseed1.binance.org',
102
+ '0xa.optimism': 'https://mainnet.optimism.io',
103
+ '0x89.polygon': 'https://polygon-rpc.com',
104
+
105
+ // Other chains
106
+ '0x1.icon': 'https://ctz.solidwallet.io/api/v3',
107
+ solana: 'https://solana-mainnet.g.alchemy.com/v2/your-api-key',
108
+ sui: 'https://fullnode.mainnet.sui.io',
109
+ 'injective-1': 'https://sentry.tm.injective.network:26657',
75
110
  };
76
111
 
77
112
  function App() {
78
113
  return (
79
- <SodaxProvider testnet={false} config={sodaxConfig}>
114
+ <SodaxProvider testnet={false} rpcConfig={rpcConfig}>
80
115
  <QueryClientProvider client={queryClient}>
81
- <XWagmiProviders
82
- config={{
83
- EVM: {
84
- wagmiConfig: wagmiConfig,
85
- },
86
- SUI: {
87
- isMainnet: true,
88
- },
89
- SOLANA: {
90
- endpoint: 'https://solana-mainnet.g.alchemy.com/v2/your-api-key',
91
- },
92
- }}
93
- >
116
+ <SodaxWalletProvider rpcConfig={rpcConfig}>
94
117
  <YourApp />
95
- </XWagmiProviders>
118
+ </SodaxWalletProvider>
96
119
  </QueryClientProvider>
97
120
  </SodaxProvider>
98
121
  );
@@ -103,7 +126,7 @@ function App() {
103
126
 
104
127
  ```typescript
105
128
  // Connect Wallet Operations
106
- import { useXConnectors, useXConnect, useXAccount } from '@sodax/wallet-sdk';
129
+ import { useXConnectors, useXConnect, useXAccount } from '@sodax/wallet-sdk-react';
107
130
  const evmConnectors = useXConnectors('EVM');
108
131
  const { mutateAsync: connect, isPending } = useXConnect();
109
132
  const account = useXAccount('EVM');
@@ -146,11 +169,11 @@ function MoneyMarketComponent() {
146
169
  }
147
170
 
148
171
  // Token Management
149
- import { useAllowance, useApprove } from '@sodax/dapp-kit';
172
+ import { useMMAllowance, useApprove } from '@sodax/dapp-kit';
150
173
 
151
174
  function TokenManagementComponent() {
152
175
  // Check token allowance
153
- const { data: hasAllowed } = useAllowance(token, amount);
176
+ const { data: hasAllowed } = useMMAllowance(token, amount);
154
177
 
155
178
  // Approve token spending
156
179
  const { approve, isLoading: isApproving } = useApprove(token);
@@ -159,8 +182,26 @@ function TokenManagementComponent() {
159
182
  };
160
183
  }
161
184
 
185
+ // Wallet Address Derivation
186
+ import { useDeriveUserWalletAddress, useSpokeProvider } from '@sodax/dapp-kit';
187
+
188
+ function WalletAddressComponent() {
189
+ const spokeProvider = useSpokeProvider(chainId, walletProvider);
190
+
191
+ // Derive user wallet address for hub abstraction
192
+ const { data: derivedAddress, isLoading, error } = useDeriveUserWalletAddress(spokeProvider, userAddress);
193
+
194
+ return (
195
+ <div>
196
+ {isLoading && <div>Deriving wallet address...</div>}
197
+ {error && <div>Error: {error.message}</div>}
198
+ {derivedAddress && <div>Derived Address: {derivedAddress}</div>}
199
+ </div>
200
+ );
201
+ }
202
+
162
203
  // Swap Operations
163
- import { useQuote, useCreateIntentOrder, useStatus } from '@sodax/dapp-kit';
204
+ import { useQuote, useSwap, useStatus } from '@sodax/dapp-kit';
164
205
 
165
206
  function SwapComponent() {
166
207
  // Get quote for an intent order
@@ -174,9 +215,9 @@ function SwapComponent() {
174
215
  });
175
216
 
176
217
  // Create and submit an intent order
177
- const { mutateAsync: createOrder, isPending: isCreating } = useCreateIntentOrder();
178
- const handleCreateOrder = async () => {
179
- const order = await createOrder({
218
+ const { mutateAsync: swap, isPending: isCreating } = useSwap();
219
+ const handleSwap = async () => {
220
+ const order = await swap({
180
221
  token_src: '0x...',
181
222
  token_src_blockchain_id: '0xa86a.avax',
182
223
  token_dst: '0x...',
@@ -189,6 +230,53 @@ function SwapComponent() {
189
230
  // Get status of an intent order
190
231
  const { data: orderStatus } = useStatus('0x...');
191
232
  }
233
+
234
+ // Bridge Operations
235
+ import { useBridge, useBridgeAllowance, useBridgeApprove, useGetBridgeableAmount, useGetBridgeableTokens } from '@sodax/dapp-kit';
236
+
237
+ function BridgeComponent() {
238
+ const spokeProvider = useSpokeProvider(chainId, walletProvider);
239
+
240
+ // Get available destination tokens for bridging
241
+ const { data: bridgeableTokens, isLoading: isTokensLoading } = useGetBridgeableTokens(
242
+ '0x2105.base', // from chain
243
+ '0x89.polygon', // to chain
244
+ '0x...' // source token address
245
+ );
246
+
247
+ // Get maximum amount available to bridge
248
+ const { data: bridgeableAmount } = useGetBridgeableAmount(
249
+ { address: '0x...', xChainId: '0x2105.base' }, // from token
250
+ { address: '0x...', xChainId: '0x89.polygon' } // to token
251
+ );
252
+
253
+ // Check token allowance for bridge
254
+ const { data: hasAllowed } = useBridgeAllowance(bridgeParams, spokeProvider);
255
+
256
+ // Approve tokens for bridge
257
+ const { approve: approveBridge, isLoading: isApproving } = useBridgeApprove(spokeProvider);
258
+ const handleApprove = async () => {
259
+ await approveBridge(bridgeParams);
260
+ };
261
+
262
+ // Execute bridge transaction
263
+ const { mutateAsync: bridge, isPending: isBridging } = useBridge(spokeProvider);
264
+ const handleBridge = async () => {
265
+ const result = await bridge({
266
+ srcChainId: '0x2105.base',
267
+ srcAsset: '0x...',
268
+ amount: 1000n,
269
+ dstChainId: '0x89.polygon',
270
+ dstAsset: '0x...',
271
+ recipient: '0x...'
272
+ });
273
+
274
+ console.log('Bridge transaction hashes:', {
275
+ spokeTxHash: result.value[0],
276
+ hubTxHash: result.value[1]
277
+ });
278
+ };
279
+ }
192
280
  ```
193
281
 
194
282
  ## Requirements
@@ -210,19 +298,30 @@ function SwapComponent() {
210
298
  - [`useRepay()`](./src/hooks/mm/useRepay.ts) - Repay borrowed tokens
211
299
  - [`useSupply()`](./src/hooks/mm/useSupply.ts) - Supply tokens to the money market
212
300
  - [`useWithdraw()`](./src/hooks/mm/useWithdraw.ts) - Withdraw supplied tokens
213
- - [`useUserReservesData()`](./src/hooks/mm/useUserReservesData.ts) - Get list of supplied assets
214
- - [`useHubWalletAddress()`](./src/hooks/mm/useHubWalletAddress.ts) - Get hub wallet address for a spoke chain
301
+ - [`useUserReservesData()`](./src/hooks/mm/useUserReservesData.ts) - Get user's reserves data(supplied asset and debt)
302
+ - [`useReservesData()`](./src/hooks/mm/useReservesData.ts) - Get reserves data
303
+ - [`useMMAllowance()`](./src/hooks/mm/useMMAllowance.ts) - Check token allowance for a specific amount
304
+ - [`useMMApprove()`](./src/hooks/mm/useMMApprove.ts) - Approve token spending
215
305
 
216
306
  #### Swap Hooks
217
307
  - [`useQuote()`](./src/hooks/swap/useQuote.ts) - Get quote for an intent order
218
- - [`useCreateIntentOrder()`](./src/hooks/swap/useCreateIntentOrder.ts) - Create and submit an intent order
308
+ - [`useSwap()`](./src/hooks/swap/useSwap.ts) - Create and submit an intent order
219
309
  - [`useStatus()`](./src/hooks/swap/useStatus.ts) - Get status of an intent order
310
+ - [`useSwapAllowance()`](./src/hooks/swap/useSwapAllowance.ts) - Check token allowance for an intent order
311
+ - [`useSwapApprove()`](./src/hooks/swap/useSwapApprove.ts) - Approve token spending
312
+ - [`useCancelSwap()`](./src/hooks/swap/useCancelSwap.ts) - Cancel a swap intent order
220
313
 
221
314
  #### Shared Hooks
222
315
  - [`useSodaxContext()`](./src/hooks/shared/useSodaxContext.ts) - Access Sodax context and configuration
223
- - [`useAllowance()`](./src/hooks/shared/useAllowance.ts) - Check token allowance for a specific amount
224
- - [`useApprove()`](./src/hooks/shared/useApprove.ts) - Approve token spending
225
-
316
+ - [`useEstimateGas()`](./src/hooks/shared/useEstimateGas.ts) - Estimate gas costs for transactions
317
+ - [`useDeriveUserWalletAddress()`](./src/hooks/shared/useDeriveUserWalletAddress.ts) - Derive user wallet address for hub abstraction
318
+
319
+ #### Bridge Hooks
320
+ - [`useBridge()`](./src/hooks/bridge/useBridge.ts) - Execute bridge transactions to transfer tokens between chains
321
+ - [`useBridgeAllowance()`](./src/hooks/bridge/useBridgeAllowance.ts) - Check token allowance for bridge operations
322
+ - [`useBridgeApprove()`](./src/hooks/bridge/useBridgeApprove.ts) - Approve token spending for bridge actions
323
+ - [`useGetBridgeableAmount()`](./src/hooks/bridge/useGetBridgeableAmount.ts) - Get maximum amount available to be bridged
324
+ - [`useGetBridgeableTokens()`](./src/hooks/bridge/useGetBridgeableTokens.ts) - Get available destination tokens for bridging
226
325
 
227
326
  ## Contributing
228
327