@sodax/dapp-kit 2.2.0-rc.1 → 2.2.0-rc.3
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.
- package/README.md +2 -0
- package/dist/index.d.ts +599 -3
- package/dist/index.mjs +705 -41
- package/package.json +3 -3
- package/src/hooks/_apiKeyWire.test.ts +384 -18
- package/src/hooks/_mutationContract.test.ts +13 -0
- package/src/hooks/backend/index.ts +4 -0
- package/src/hooks/backend/useBackendOracleCandles.ts +47 -0
- package/src/hooks/backend/useBackendOracleMarkets.ts +30 -0
- package/src/hooks/bitcoin/useFundTradingWallet.ts +2 -1
- package/src/hooks/bitcoin/useRadfiWithdraw.ts +2 -1
- package/src/hooks/bridge/useBridge.ts +2 -2
- package/src/hooks/dex/useDexDeposit.ts +2 -1
- package/src/hooks/dex/useDexWithdraw.ts +2 -1
- package/src/hooks/dex/useSupplyLiquidity.ts +2 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/leverageYield/useLeverageYieldVaultSwap.ts +2 -2
- package/src/hooks/leverageYieldApi/index.ts +55 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiAllowance.ts +50 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiApprove.ts +37 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiApproveAndBroadcast.test.ts +176 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiApproveAndBroadcast.ts +83 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiApr.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiAsset.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiCancelIntent.ts +37 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiCreateDepositIntent.ts +37 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiCreateWithdrawIntent.ts +37 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiDeadline.ts +38 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiDepositQuote.ts +57 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiEffectiveApr.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiEstimateGas.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiFilledIntent.ts +40 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiIntent.ts +40 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiIntentExtraData.ts +42 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiIntentHash.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiIntentPacket.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiLsdApr.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiMaxWithdraw.ts +43 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiPartnerFee.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiPosition.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiPreviewDeposit.ts +43 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiPreviewRedeem.ts +43 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiPreviewWithdraw.ts +43 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiShareBalance.ts +43 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiSolverFee.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiStatus.ts +48 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiSubmitIntent.ts +36 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiSubmitTx.ts +37 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiSubmitTxStatus.ts +60 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiTotalAssets.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiVault.ts +41 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiVaults.ts +36 -0
- package/src/hooks/leverageYieldApi/useLeverageYieldApiWithdrawQuote.ts +56 -0
- package/src/hooks/migrate/useMigrateBaln.ts +2 -2
- package/src/hooks/migrate/useMigrateIcxToSoda.ts +2 -2
- package/src/hooks/migrate/useMigratebnUSD.ts +2 -2
- package/src/hooks/migrate/useRevertMigrateSodaToIcx.ts +2 -2
- package/src/hooks/mm/useBorrow.ts +2 -4
- package/src/hooks/mm/useRepay.ts +2 -1
- package/src/hooks/mm/useSupply.ts +2 -1
- package/src/hooks/mm/useWithdraw.ts +2 -4
- package/src/hooks/partner/useFeeClaimWithdraw.ts +2 -1
- package/src/hooks/recovery/useWithdrawHubAsset.ts +2 -1
- package/src/hooks/shared/index.ts +2 -0
- package/src/hooks/shared/invalidateBalances.test.ts +71 -0
- package/src/hooks/shared/invalidateBalances.ts +25 -0
- package/src/hooks/shared/useBalances.test.ts +118 -0
- package/src/hooks/shared/useBalances.ts +81 -0
- package/src/hooks/shared/useEstablishTrustline.test.ts +2 -0
- package/src/hooks/shared/useEstablishTrustline.ts +2 -1
- package/src/hooks/shared/useStellarGate.test.ts +1 -1
- package/src/hooks/sponsoring/useActivateStellarAccount.test.ts +6 -4
- package/src/hooks/sponsoring/useActivateStellarAccount.ts +2 -1
- package/src/hooks/sponsoring/useSponsorConfig.test.ts +8 -2
- package/src/hooks/sponsoring/useStellarAccountActive.test.ts +2 -2
- package/src/hooks/sponsoring/useStellarAccountStatus.test.ts +8 -2
- package/src/hooks/staking/useClaim.ts +2 -1
- package/src/hooks/staking/useInstantUnstake.ts +2 -1
- package/src/hooks/staking/useStake.ts +2 -1
- package/src/hooks/swap/useDetailedStatus.test.ts +2 -2
- package/src/hooks/swap/useSwap.ts +2 -2
- package/src/hooks/swapsApi/useSwapsApiApproveAndBroadcast.test.ts +5 -1
- package/src/providers/SodaxProvider.test.ts +1 -1
- package/src/utils/approvalPlan.ts +4 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { DeadlineQueryV2, DeadlineResponseV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiDeadlineParams = ReadHookParams<
|
|
9
|
+
DeadlineResponseV2,
|
|
10
|
+
{
|
|
11
|
+
query?: DeadlineQueryV2;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to compute a deposit/withdraw deadline (hub timestamp + `offsetSeconds`, default 300s)
|
|
18
|
+
* via the leverage-yield API — `sodax.api.leverageYield.getDeadline`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { data: deadline } = useLeverageYieldApiDeadline({ params: { query: { offsetSeconds: 600 } } });
|
|
22
|
+
*/
|
|
23
|
+
export const useLeverageYieldApiDeadline = ({
|
|
24
|
+
params,
|
|
25
|
+
queryOptions,
|
|
26
|
+
}: UseLeverageYieldApiDeadlineParams = {}): UseQueryResult<DeadlineResponseV2, Error> => {
|
|
27
|
+
const { sodax } = useSodaxContext();
|
|
28
|
+
const query = params?.query;
|
|
29
|
+
const apiConfig = params?.apiConfig;
|
|
30
|
+
|
|
31
|
+
return useQuery<DeadlineResponseV2, Error>({
|
|
32
|
+
queryKey: ['leverageYieldApi', 'deadline', query?.offsetSeconds ?? null],
|
|
33
|
+
queryFn: async (): Promise<DeadlineResponseV2> =>
|
|
34
|
+
unwrapResult(await sodax.api.leverageYield.getDeadline(query, apiConfig)),
|
|
35
|
+
retry: retryUnlessAuthFailure,
|
|
36
|
+
...queryOptions,
|
|
37
|
+
});
|
|
38
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type {
|
|
3
|
+
LeverageYieldDepositQuoteRequestV2,
|
|
4
|
+
QuoteQueryV2,
|
|
5
|
+
QuoteResponseV2,
|
|
6
|
+
RequestOverrideConfig,
|
|
7
|
+
} from '@sodax/sdk';
|
|
8
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
9
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
10
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
11
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
12
|
+
|
|
13
|
+
export type UseLeverageYieldApiDepositQuoteParams = ReadHookParams<
|
|
14
|
+
QuoteResponseV2 | undefined,
|
|
15
|
+
{
|
|
16
|
+
body: LeverageYieldDepositQuoteRequestV2 | undefined;
|
|
17
|
+
query?: QuoteQueryV2;
|
|
18
|
+
apiConfig?: RequestOverrideConfig;
|
|
19
|
+
}
|
|
20
|
+
>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* React hook to quote a swap-style leverage-yield deposit (any token → lsoda* shares) via the
|
|
24
|
+
* leverage-yield API — `sodax.api.leverageYield.getDepositQuote`. Pass `query.includeTxData = true`
|
|
25
|
+
* to also build the unsigned create-intent transaction (`srcAddress` then required in the body).
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* const { data: quote } = useLeverageYieldApiDepositQuote({
|
|
29
|
+
* params: {
|
|
30
|
+
* body: {
|
|
31
|
+
* vault: '0x...', tokenSrc: '0x...', tokenSrcChainKey: '0xa4b1.arbitrum',
|
|
32
|
+
* amount: '1000000', quoteType: 'exact_input',
|
|
33
|
+
* },
|
|
34
|
+
* },
|
|
35
|
+
* });
|
|
36
|
+
*/
|
|
37
|
+
export const useLeverageYieldApiDepositQuote = ({
|
|
38
|
+
params,
|
|
39
|
+
queryOptions,
|
|
40
|
+
}: UseLeverageYieldApiDepositQuoteParams = {}): UseQueryResult<QuoteResponseV2 | undefined, Error> => {
|
|
41
|
+
const { sodax } = useSodaxContext();
|
|
42
|
+
const body = params?.body;
|
|
43
|
+
const query = params?.query;
|
|
44
|
+
const apiConfig = params?.apiConfig;
|
|
45
|
+
|
|
46
|
+
return useQuery({
|
|
47
|
+
// Hash the whole request body so every quote input (incl. partnerFee) is a cache dimension.
|
|
48
|
+
queryKey: ['leverageYieldApi', 'depositQuote', body, query?.includeTxData ?? false],
|
|
49
|
+
queryFn: async (): Promise<QuoteResponseV2 | undefined> => {
|
|
50
|
+
if (!body) return undefined;
|
|
51
|
+
return unwrapResult(await sodax.api.leverageYield.getDepositQuote(body, query, apiConfig));
|
|
52
|
+
},
|
|
53
|
+
enabled: !!body,
|
|
54
|
+
retry: retryUnlessAuthFailure,
|
|
55
|
+
...queryOptions,
|
|
56
|
+
});
|
|
57
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { LeverageYieldEffectiveAprV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiEffectiveAprParams = ReadHookParams<
|
|
9
|
+
LeverageYieldEffectiveAprV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
vault: string | undefined;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to fetch the honest combined AAVE + LSD effective APR for a leverage-yield vault via the leverage-yield API —
|
|
18
|
+
* `sodax.api.leverageYield.getEffectiveApr`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { data } = useLeverageYieldApiEffectiveApr({ params: { vault: '0x...' } });
|
|
22
|
+
*/
|
|
23
|
+
export const useLeverageYieldApiEffectiveApr = ({
|
|
24
|
+
params,
|
|
25
|
+
queryOptions,
|
|
26
|
+
}: UseLeverageYieldApiEffectiveAprParams = {}): UseQueryResult<LeverageYieldEffectiveAprV2 | undefined, Error> => {
|
|
27
|
+
const { sodax } = useSodaxContext();
|
|
28
|
+
const vault = params?.vault;
|
|
29
|
+
const apiConfig = params?.apiConfig;
|
|
30
|
+
|
|
31
|
+
return useQuery({
|
|
32
|
+
queryKey: ['leverageYieldApi', 'effectiveApr', vault],
|
|
33
|
+
queryFn: async (): Promise<LeverageYieldEffectiveAprV2 | undefined> => {
|
|
34
|
+
if (!vault) return undefined;
|
|
35
|
+
return unwrapResult(await sodax.api.leverageYield.getEffectiveApr({ vault }, apiConfig));
|
|
36
|
+
},
|
|
37
|
+
enabled: !!vault && vault.length > 0,
|
|
38
|
+
retry: retryUnlessAuthFailure,
|
|
39
|
+
...queryOptions,
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { GasEstimateRequestV2, GasEstimateResponseV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiEstimateGasParams = ReadHookParams<
|
|
9
|
+
GasEstimateResponseV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
body: GasEstimateRequestV2 | undefined;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to estimate gas for a raw transaction on a spoke chain via the leverage-yield API —
|
|
18
|
+
* `sodax.api.leverageYield.estimateGas`. Returns `{ gas }` (chain-specific shape).
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { data } = useLeverageYieldApiEstimateGas({ params: { body: { chainKey: 'sonic', tx: {...} } } });
|
|
22
|
+
*/
|
|
23
|
+
export const useLeverageYieldApiEstimateGas = ({
|
|
24
|
+
params,
|
|
25
|
+
queryOptions,
|
|
26
|
+
}: UseLeverageYieldApiEstimateGasParams = {}): UseQueryResult<GasEstimateResponseV2 | undefined, Error> => {
|
|
27
|
+
const { sodax } = useSodaxContext();
|
|
28
|
+
const body = params?.body;
|
|
29
|
+
const apiConfig = params?.apiConfig;
|
|
30
|
+
|
|
31
|
+
return useQuery({
|
|
32
|
+
queryKey: ['leverageYieldApi', 'estimateGas', body?.chainKey, body?.tx],
|
|
33
|
+
queryFn: async (): Promise<GasEstimateResponseV2 | undefined> => {
|
|
34
|
+
if (!body) return undefined;
|
|
35
|
+
return unwrapResult(await sodax.api.leverageYield.estimateGas(body, apiConfig));
|
|
36
|
+
},
|
|
37
|
+
enabled: !!body,
|
|
38
|
+
retry: retryUnlessAuthFailure,
|
|
39
|
+
...queryOptions,
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { IntentStateV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiFilledIntentParams = ReadHookParams<
|
|
9
|
+
IntentStateV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
txHash: string | undefined;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to get the on-chain fill state for an intent by its hub-chain tx hash via the leverage-yield API — `sodax.api.leverageYield.getFilledIntent`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* const { data } = useLeverageYieldApiFilledIntent({ params: { txHash: '0x123...' } });
|
|
21
|
+
*/
|
|
22
|
+
export const useLeverageYieldApiFilledIntent = ({
|
|
23
|
+
params,
|
|
24
|
+
queryOptions,
|
|
25
|
+
}: UseLeverageYieldApiFilledIntentParams = {}): UseQueryResult<IntentStateV2 | undefined, Error> => {
|
|
26
|
+
const { sodax } = useSodaxContext();
|
|
27
|
+
const txHash = params?.txHash;
|
|
28
|
+
const apiConfig = params?.apiConfig;
|
|
29
|
+
|
|
30
|
+
return useQuery({
|
|
31
|
+
queryKey: ['leverageYieldApi', 'filledIntent', txHash],
|
|
32
|
+
queryFn: async (): Promise<IntentStateV2 | undefined> => {
|
|
33
|
+
if (!txHash) return undefined;
|
|
34
|
+
return unwrapResult(await sodax.api.leverageYield.getFilledIntent(txHash, apiConfig));
|
|
35
|
+
},
|
|
36
|
+
enabled: !!txHash && txHash.length > 0,
|
|
37
|
+
retry: retryUnlessAuthFailure,
|
|
38
|
+
...queryOptions,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { GetIntentResponseV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiIntentParams = ReadHookParams<
|
|
9
|
+
GetIntentResponseV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
txHash: string | undefined;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to look up an Intent struct by its hub-chain creation tx hash via the leverage-yield API — `sodax.api.leverageYield.getIntent`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* const { data } = useLeverageYieldApiIntent({ params: { txHash: '0x123...' } });
|
|
21
|
+
*/
|
|
22
|
+
export const useLeverageYieldApiIntent = ({
|
|
23
|
+
params,
|
|
24
|
+
queryOptions,
|
|
25
|
+
}: UseLeverageYieldApiIntentParams = {}): UseQueryResult<GetIntentResponseV2 | undefined, Error> => {
|
|
26
|
+
const { sodax } = useSodaxContext();
|
|
27
|
+
const txHash = params?.txHash;
|
|
28
|
+
const apiConfig = params?.apiConfig;
|
|
29
|
+
|
|
30
|
+
return useQuery({
|
|
31
|
+
queryKey: ['leverageYieldApi', 'intent', txHash],
|
|
32
|
+
queryFn: async (): Promise<GetIntentResponseV2 | undefined> => {
|
|
33
|
+
if (!txHash) return undefined;
|
|
34
|
+
return unwrapResult(await sodax.api.leverageYield.getIntent(txHash, apiConfig));
|
|
35
|
+
},
|
|
36
|
+
enabled: !!txHash && txHash.length > 0,
|
|
37
|
+
retry: retryUnlessAuthFailure,
|
|
38
|
+
...queryOptions,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { IntentExtraDataRequestV2, IntentExtraDataResponseV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiIntentExtraDataParams = ReadHookParams<
|
|
9
|
+
IntentExtraDataResponseV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
body: IntentExtraDataRequestV2 | undefined;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to recover the relay extra data needed by `/leverage-yield/intents/submit` via the
|
|
18
|
+
* leverage-yield API — `sodax.api.leverageYield.getIntentSubmitTxExtraData`. Provide EITHER `txHash`
|
|
19
|
+
* OR `intent` in the body.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* const { data } = useLeverageYieldApiIntentExtraData({ params: { body: { txHash: '0x...' } } });
|
|
23
|
+
*/
|
|
24
|
+
export const useLeverageYieldApiIntentExtraData = ({
|
|
25
|
+
params,
|
|
26
|
+
queryOptions,
|
|
27
|
+
}: UseLeverageYieldApiIntentExtraDataParams = {}): UseQueryResult<IntentExtraDataResponseV2 | undefined, Error> => {
|
|
28
|
+
const { sodax } = useSodaxContext();
|
|
29
|
+
const body = params?.body;
|
|
30
|
+
const apiConfig = params?.apiConfig;
|
|
31
|
+
|
|
32
|
+
return useQuery({
|
|
33
|
+
queryKey: ['leverageYieldApi', 'intentExtraData', body?.txHash ?? body?.intent?.intentId?.toString()],
|
|
34
|
+
queryFn: async (): Promise<IntentExtraDataResponseV2 | undefined> => {
|
|
35
|
+
if (!body || (!body.txHash && !body.intent)) return undefined;
|
|
36
|
+
return unwrapResult(await sodax.api.leverageYield.getIntentSubmitTxExtraData(body, apiConfig));
|
|
37
|
+
},
|
|
38
|
+
enabled: !!body && (!!body.txHash || !!body.intent),
|
|
39
|
+
retry: retryUnlessAuthFailure,
|
|
40
|
+
...queryOptions,
|
|
41
|
+
});
|
|
42
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { IntentHashResponseV2, IntentRequestV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiIntentHashParams = ReadHookParams<
|
|
9
|
+
IntentHashResponseV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
intent: IntentRequestV2 | undefined;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to compute the keccak256 hash of an Intent struct via the leverage-yield API —
|
|
18
|
+
* `sodax.api.leverageYield.getIntentHash`. Returns `{ hash }`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { data } = useLeverageYieldApiIntentHash({ params: { intent } });
|
|
22
|
+
*/
|
|
23
|
+
export const useLeverageYieldApiIntentHash = ({
|
|
24
|
+
params,
|
|
25
|
+
queryOptions,
|
|
26
|
+
}: UseLeverageYieldApiIntentHashParams = {}): UseQueryResult<IntentHashResponseV2 | undefined, Error> => {
|
|
27
|
+
const { sodax } = useSodaxContext();
|
|
28
|
+
const intent = params?.intent;
|
|
29
|
+
const apiConfig = params?.apiConfig;
|
|
30
|
+
|
|
31
|
+
return useQuery({
|
|
32
|
+
queryKey: ['leverageYieldApi', 'intentHash', intent?.intentId?.toString()],
|
|
33
|
+
queryFn: async (): Promise<IntentHashResponseV2 | undefined> => {
|
|
34
|
+
if (!intent) return undefined;
|
|
35
|
+
return unwrapResult(await sodax.api.leverageYield.getIntentHash({ intent }, apiConfig));
|
|
36
|
+
},
|
|
37
|
+
enabled: !!intent,
|
|
38
|
+
retry: retryUnlessAuthFailure,
|
|
39
|
+
...queryOptions,
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { IntentPacketRequestV2, IntentPacketResponseV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiIntentPacketParams = ReadHookParams<
|
|
9
|
+
IntentPacketResponseV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
body: IntentPacketRequestV2 | undefined;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to long-poll the relayer until the fill packet lands on the destination chain via the
|
|
18
|
+
* leverage-yield API — `sodax.api.leverageYield.getSolvedIntentPacket`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { data } = useLeverageYieldApiIntentPacket({ params: { body: { chainId: 'sonic', fillTxHash: '0x...' } } });
|
|
22
|
+
*/
|
|
23
|
+
export const useLeverageYieldApiIntentPacket = ({
|
|
24
|
+
params,
|
|
25
|
+
queryOptions,
|
|
26
|
+
}: UseLeverageYieldApiIntentPacketParams = {}): UseQueryResult<IntentPacketResponseV2 | undefined, Error> => {
|
|
27
|
+
const { sodax } = useSodaxContext();
|
|
28
|
+
const body = params?.body;
|
|
29
|
+
const apiConfig = params?.apiConfig;
|
|
30
|
+
|
|
31
|
+
return useQuery({
|
|
32
|
+
queryKey: ['leverageYieldApi', 'intentPacket', body?.chainId, body?.fillTxHash],
|
|
33
|
+
queryFn: async (): Promise<IntentPacketResponseV2 | undefined> => {
|
|
34
|
+
if (!body) return undefined;
|
|
35
|
+
return unwrapResult(await sodax.api.leverageYield.getSolvedIntentPacket(body, apiConfig));
|
|
36
|
+
},
|
|
37
|
+
enabled: !!body,
|
|
38
|
+
retry: retryUnlessAuthFailure,
|
|
39
|
+
...queryOptions,
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { LeverageYieldLsdAprV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiLsdAprParams = ReadHookParams<
|
|
9
|
+
LeverageYieldLsdAprV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
vault: string | undefined;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to fetch the off-chain LSD staking-APR snapshot for a leverage-yield vault via the leverage-yield API —
|
|
18
|
+
* `sodax.api.leverageYield.getLsdApr`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { data } = useLeverageYieldApiLsdApr({ params: { vault: '0x...' } });
|
|
22
|
+
*/
|
|
23
|
+
export const useLeverageYieldApiLsdApr = ({
|
|
24
|
+
params,
|
|
25
|
+
queryOptions,
|
|
26
|
+
}: UseLeverageYieldApiLsdAprParams = {}): UseQueryResult<LeverageYieldLsdAprV2 | undefined, Error> => {
|
|
27
|
+
const { sodax } = useSodaxContext();
|
|
28
|
+
const vault = params?.vault;
|
|
29
|
+
const apiConfig = params?.apiConfig;
|
|
30
|
+
|
|
31
|
+
return useQuery({
|
|
32
|
+
queryKey: ['leverageYieldApi', 'lsdApr', vault],
|
|
33
|
+
queryFn: async (): Promise<LeverageYieldLsdAprV2 | undefined> => {
|
|
34
|
+
if (!vault) return undefined;
|
|
35
|
+
return unwrapResult(await sodax.api.leverageYield.getLsdApr({ vault }, apiConfig));
|
|
36
|
+
},
|
|
37
|
+
enabled: !!vault && vault.length > 0,
|
|
38
|
+
retry: retryUnlessAuthFailure,
|
|
39
|
+
...queryOptions,
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { MaxWithdrawResponseV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiMaxWithdrawParams = ReadHookParams<
|
|
9
|
+
MaxWithdrawResponseV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
vault: string | undefined;
|
|
12
|
+
owner: string | undefined;
|
|
13
|
+
apiConfig?: RequestOverrideConfig;
|
|
14
|
+
}
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* React hook to get the maximum assets an owner can withdraw (ERC-4626 maxWithdraw) via the leverage-yield API —
|
|
19
|
+
* `sodax.api.leverageYield.getMaxWithdraw`.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* const { data } = useLeverageYieldApiMaxWithdraw({ params: { vault: '0x...', owner: '1000000000000000000' } });
|
|
23
|
+
*/
|
|
24
|
+
export const useLeverageYieldApiMaxWithdraw = ({
|
|
25
|
+
params,
|
|
26
|
+
queryOptions,
|
|
27
|
+
}: UseLeverageYieldApiMaxWithdrawParams = {}): UseQueryResult<MaxWithdrawResponseV2 | undefined, Error> => {
|
|
28
|
+
const { sodax } = useSodaxContext();
|
|
29
|
+
const vault = params?.vault;
|
|
30
|
+
const owner = params?.owner;
|
|
31
|
+
const apiConfig = params?.apiConfig;
|
|
32
|
+
|
|
33
|
+
return useQuery({
|
|
34
|
+
queryKey: ['leverageYieldApi', 'maxWithdraw', vault, owner],
|
|
35
|
+
queryFn: async (): Promise<MaxWithdrawResponseV2 | undefined> => {
|
|
36
|
+
if (!vault || owner === undefined) return undefined;
|
|
37
|
+
return unwrapResult(await sodax.api.leverageYield.getMaxWithdraw({ vault, owner }, apiConfig));
|
|
38
|
+
},
|
|
39
|
+
enabled: !!vault && vault.length > 0 && owner !== undefined,
|
|
40
|
+
retry: retryUnlessAuthFailure,
|
|
41
|
+
...queryOptions,
|
|
42
|
+
});
|
|
43
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { FeeResponseV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiPartnerFeeParams = ReadHookParams<
|
|
9
|
+
FeeResponseV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
amount: string | undefined;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to compute the partner fee for a given input amount via the leverage-yield API — `sodax.api.leverageYield.getPartnerFee`.
|
|
18
|
+
* Returns `{ fee }` (decimal string).
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { data } = useLeverageYieldApiPartnerFee({ params: { amount: '1000000' } });
|
|
22
|
+
*/
|
|
23
|
+
export const useLeverageYieldApiPartnerFee = ({
|
|
24
|
+
params,
|
|
25
|
+
queryOptions,
|
|
26
|
+
}: UseLeverageYieldApiPartnerFeeParams = {}): UseQueryResult<FeeResponseV2 | undefined, Error> => {
|
|
27
|
+
const { sodax } = useSodaxContext();
|
|
28
|
+
const amount = params?.amount;
|
|
29
|
+
const apiConfig = params?.apiConfig;
|
|
30
|
+
|
|
31
|
+
return useQuery({
|
|
32
|
+
queryKey: ['leverageYieldApi', 'partnerFee', amount],
|
|
33
|
+
queryFn: async (): Promise<FeeResponseV2 | undefined> => {
|
|
34
|
+
if (!amount) return undefined;
|
|
35
|
+
return unwrapResult(await sodax.api.leverageYield.getPartnerFee({ amount }, apiConfig));
|
|
36
|
+
},
|
|
37
|
+
enabled: !!amount && amount.length > 0,
|
|
38
|
+
retry: retryUnlessAuthFailure,
|
|
39
|
+
...queryOptions,
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { LeverageYieldPositionV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiPositionParams = ReadHookParams<
|
|
9
|
+
LeverageYieldPositionV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
vault: string | undefined;
|
|
12
|
+
apiConfig?: RequestOverrideConfig;
|
|
13
|
+
}
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* React hook to fetch a leveraged-position snapshot for a leverage-yield vault via the leverage-yield API —
|
|
18
|
+
* `sodax.api.leverageYield.getPosition`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const { data } = useLeverageYieldApiPosition({ params: { vault: '0x...' } });
|
|
22
|
+
*/
|
|
23
|
+
export const useLeverageYieldApiPosition = ({
|
|
24
|
+
params,
|
|
25
|
+
queryOptions,
|
|
26
|
+
}: UseLeverageYieldApiPositionParams = {}): UseQueryResult<LeverageYieldPositionV2 | undefined, Error> => {
|
|
27
|
+
const { sodax } = useSodaxContext();
|
|
28
|
+
const vault = params?.vault;
|
|
29
|
+
const apiConfig = params?.apiConfig;
|
|
30
|
+
|
|
31
|
+
return useQuery({
|
|
32
|
+
queryKey: ['leverageYieldApi', 'position', vault],
|
|
33
|
+
queryFn: async (): Promise<LeverageYieldPositionV2 | undefined> => {
|
|
34
|
+
if (!vault) return undefined;
|
|
35
|
+
return unwrapResult(await sodax.api.leverageYield.getPosition({ vault }, apiConfig));
|
|
36
|
+
},
|
|
37
|
+
enabled: !!vault && vault.length > 0,
|
|
38
|
+
retry: retryUnlessAuthFailure,
|
|
39
|
+
...queryOptions,
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { PreviewDepositResponseV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiPreviewDepositParams = ReadHookParams<
|
|
9
|
+
PreviewDepositResponseV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
vault: string | undefined;
|
|
12
|
+
assets: string | undefined;
|
|
13
|
+
apiConfig?: RequestOverrideConfig;
|
|
14
|
+
}
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* React hook to preview the shares minted for depositing `assets` (ERC-4626 previewDeposit) via the leverage-yield API —
|
|
19
|
+
* `sodax.api.leverageYield.previewDeposit`.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* const { data } = useLeverageYieldApiPreviewDeposit({ params: { vault: '0x...', assets: '1000000000000000000' } });
|
|
23
|
+
*/
|
|
24
|
+
export const useLeverageYieldApiPreviewDeposit = ({
|
|
25
|
+
params,
|
|
26
|
+
queryOptions,
|
|
27
|
+
}: UseLeverageYieldApiPreviewDepositParams = {}): UseQueryResult<PreviewDepositResponseV2 | undefined, Error> => {
|
|
28
|
+
const { sodax } = useSodaxContext();
|
|
29
|
+
const vault = params?.vault;
|
|
30
|
+
const assets = params?.assets;
|
|
31
|
+
const apiConfig = params?.apiConfig;
|
|
32
|
+
|
|
33
|
+
return useQuery({
|
|
34
|
+
queryKey: ['leverageYieldApi', 'previewDeposit', vault, assets],
|
|
35
|
+
queryFn: async (): Promise<PreviewDepositResponseV2 | undefined> => {
|
|
36
|
+
if (!vault || assets === undefined) return undefined;
|
|
37
|
+
return unwrapResult(await sodax.api.leverageYield.previewDeposit({ vault, assets }, apiConfig));
|
|
38
|
+
},
|
|
39
|
+
enabled: !!vault && vault.length > 0 && assets !== undefined,
|
|
40
|
+
retry: retryUnlessAuthFailure,
|
|
41
|
+
...queryOptions,
|
|
42
|
+
});
|
|
43
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { PreviewRedeemResponseV2, RequestOverrideConfig } from '@sodax/sdk';
|
|
3
|
+
import { useSodaxContext } from '../shared/useSodaxContext.js';
|
|
4
|
+
import { retryUnlessAuthFailure } from '../shared/retryUnlessAuthFailure.js';
|
|
5
|
+
import { unwrapResult } from '../shared/unwrapResult.js';
|
|
6
|
+
import type { ReadHookParams } from '../shared/types.js';
|
|
7
|
+
|
|
8
|
+
export type UseLeverageYieldApiPreviewRedeemParams = ReadHookParams<
|
|
9
|
+
PreviewRedeemResponseV2 | undefined,
|
|
10
|
+
{
|
|
11
|
+
vault: string | undefined;
|
|
12
|
+
shares: string | undefined;
|
|
13
|
+
apiConfig?: RequestOverrideConfig;
|
|
14
|
+
}
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* React hook to preview the assets returned for redeeming `shares` (ERC-4626 previewRedeem) via the leverage-yield API —
|
|
19
|
+
* `sodax.api.leverageYield.previewRedeem`.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* const { data } = useLeverageYieldApiPreviewRedeem({ params: { vault: '0x...', shares: '1000000000000000000' } });
|
|
23
|
+
*/
|
|
24
|
+
export const useLeverageYieldApiPreviewRedeem = ({
|
|
25
|
+
params,
|
|
26
|
+
queryOptions,
|
|
27
|
+
}: UseLeverageYieldApiPreviewRedeemParams = {}): UseQueryResult<PreviewRedeemResponseV2 | undefined, Error> => {
|
|
28
|
+
const { sodax } = useSodaxContext();
|
|
29
|
+
const vault = params?.vault;
|
|
30
|
+
const shares = params?.shares;
|
|
31
|
+
const apiConfig = params?.apiConfig;
|
|
32
|
+
|
|
33
|
+
return useQuery({
|
|
34
|
+
queryKey: ['leverageYieldApi', 'previewRedeem', vault, shares],
|
|
35
|
+
queryFn: async (): Promise<PreviewRedeemResponseV2 | undefined> => {
|
|
36
|
+
if (!vault || shares === undefined) return undefined;
|
|
37
|
+
return unwrapResult(await sodax.api.leverageYield.previewRedeem({ vault, shares }, apiConfig));
|
|
38
|
+
},
|
|
39
|
+
enabled: !!vault && vault.length > 0 && shares !== undefined,
|
|
40
|
+
retry: retryUnlessAuthFailure,
|
|
41
|
+
...queryOptions,
|
|
42
|
+
});
|
|
43
|
+
};
|