@frak-labs/react-sdk 0.1.0-beta.de6e0d34 → 0.1.0-beta.ebc9d3a3
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/dist/index.cjs +1 -1
- package/dist/index.d.cts +386 -3
- package/dist/index.d.ts +386 -3
- package/dist/index.js +1 -1
- package/package.json +9 -8
- package/dist/hook/helper/useReferralInteraction.d.cts +0 -24
- package/dist/hook/helper/useReferralInteraction.d.ts +0 -24
- package/dist/hook/index.d.cts +0 -11
- package/dist/hook/index.d.ts +0 -11
- package/dist/hook/useDisplayModal.d.cts +0 -38
- package/dist/hook/useDisplayModal.d.ts +0 -38
- package/dist/hook/useFrakClient.d.cts +0 -6
- package/dist/hook/useFrakClient.d.ts +0 -6
- package/dist/hook/useFrakConfig.d.cts +0 -9
- package/dist/hook/useFrakConfig.d.ts +0 -9
- package/dist/hook/useGetProductInformation.d.cts +0 -30
- package/dist/hook/useGetProductInformation.d.ts +0 -30
- package/dist/hook/useOpenSso.d.cts +0 -33
- package/dist/hook/useOpenSso.d.ts +0 -33
- package/dist/hook/usePrepareSso.d.cts +0 -40
- package/dist/hook/usePrepareSso.d.ts +0 -40
- package/dist/hook/useSendInteraction.d.cts +0 -33
- package/dist/hook/useSendInteraction.d.ts +0 -33
- package/dist/hook/useSendTransaction.d.cts +0 -34
- package/dist/hook/useSendTransaction.d.ts +0 -34
- package/dist/hook/useSiweAuthenticate.d.cts +0 -35
- package/dist/hook/useSiweAuthenticate.d.ts +0 -35
- package/dist/hook/useWalletStatus.d.cts +0 -16
- package/dist/hook/useWalletStatus.d.ts +0 -16
- package/dist/hook/utils/useFrakContext.d.cts +0 -9
- package/dist/hook/utils/useFrakContext.d.ts +0 -9
- package/dist/hook/utils/useMounted.d.cts +0 -2
- package/dist/hook/utils/useMounted.d.ts +0 -2
- package/dist/hook/utils/useWindowLocation.d.cts +0 -8
- package/dist/hook/utils/useWindowLocation.d.ts +0 -8
- package/dist/provider/FrakConfigProvider.d.cts +0 -29
- package/dist/provider/FrakConfigProvider.d.ts +0 -29
- package/dist/provider/FrakIFrameClientProvider.d.cts +0 -32
- package/dist/provider/FrakIFrameClientProvider.d.ts +0 -32
- package/dist/provider/index.d.cts +0 -4
- package/dist/provider/index.d.ts +0 -4
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { GetProductInformationReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type FrakRpcError } from "@frak-labs/frame-connector";
|
|
3
|
-
import { type UseQueryOptions } from "@tanstack/react-query";
|
|
4
|
-
/** @ignore */
|
|
5
|
-
type QueryOptions = Omit<UseQueryOptions<GetProductInformationReturnType, FrakRpcError, undefined>, "queryKey" | "queryFn">;
|
|
6
|
-
/** @inline */
|
|
7
|
-
interface UseGetProductInformationParams {
|
|
8
|
-
/**
|
|
9
|
-
* Optional query options, see {@link @tanstack/react-query!useQuery | `useQuery()`} for more infos
|
|
10
|
-
*/
|
|
11
|
-
query?: QueryOptions;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Hook that return a query helping to get the current product information
|
|
15
|
-
*
|
|
16
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.getProductInformation | `getProductInformation()`} action
|
|
17
|
-
*
|
|
18
|
-
* @param args
|
|
19
|
-
*
|
|
20
|
-
* @group hooks
|
|
21
|
-
*
|
|
22
|
-
* @returns
|
|
23
|
-
* The query hook wrapping the `getProductInformation()` action
|
|
24
|
-
* The `data` result is a {@link @frak-labs/core-sdk!index.GetProductInformationReturnType | `GetProductInformationReturnType`}
|
|
25
|
-
*
|
|
26
|
-
* @see {@link @frak-labs/core-sdk!actions.getProductInformation | `getProductInformation()`} for more info about the underlying action
|
|
27
|
-
* @see {@link @tanstack/react-query!useQuery | `useQuery()`} for more info about the useQuery options and response
|
|
28
|
-
*/
|
|
29
|
-
export declare function useGetProductInformation({ query, }?: UseGetProductInformationParams): import("@tanstack/react-query").UseQueryResult<undefined, FrakRpcError<undefined>>;
|
|
30
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { GetProductInformationReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type FrakRpcError } from "@frak-labs/frame-connector";
|
|
3
|
-
import { type UseQueryOptions } from "@tanstack/react-query";
|
|
4
|
-
/** @ignore */
|
|
5
|
-
type QueryOptions = Omit<UseQueryOptions<GetProductInformationReturnType, FrakRpcError, undefined>, "queryKey" | "queryFn">;
|
|
6
|
-
/** @inline */
|
|
7
|
-
interface UseGetProductInformationParams {
|
|
8
|
-
/**
|
|
9
|
-
* Optional query options, see {@link @tanstack/react-query!useQuery | `useQuery()`} for more infos
|
|
10
|
-
*/
|
|
11
|
-
query?: QueryOptions;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Hook that return a query helping to get the current product information
|
|
15
|
-
*
|
|
16
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.getProductInformation | `getProductInformation()`} action
|
|
17
|
-
*
|
|
18
|
-
* @param args
|
|
19
|
-
*
|
|
20
|
-
* @group hooks
|
|
21
|
-
*
|
|
22
|
-
* @returns
|
|
23
|
-
* The query hook wrapping the `getProductInformation()` action
|
|
24
|
-
* The `data` result is a {@link @frak-labs/core-sdk!index.GetProductInformationReturnType | `GetProductInformationReturnType`}
|
|
25
|
-
*
|
|
26
|
-
* @see {@link @frak-labs/core-sdk!actions.getProductInformation | `getProductInformation()`} for more info about the underlying action
|
|
27
|
-
* @see {@link @tanstack/react-query!useQuery | `useQuery()`} for more info about the useQuery options and response
|
|
28
|
-
*/
|
|
29
|
-
export declare function useGetProductInformation({ query, }?: UseGetProductInformationParams): import("@tanstack/react-query").UseQueryResult<undefined, FrakRpcError<undefined>>;
|
|
30
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { OpenSsoParamsType, OpenSsoReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type FrakRpcError } from "@frak-labs/frame-connector";
|
|
3
|
-
import { type UseMutationOptions } from "@tanstack/react-query";
|
|
4
|
-
/** @ignore */
|
|
5
|
-
type MutationOptions = Omit<UseMutationOptions<OpenSsoReturnType, FrakRpcError, OpenSsoParamsType>, "mutationFn" | "mutationKey">;
|
|
6
|
-
/** @inline */
|
|
7
|
-
interface UseOpenSsoParams {
|
|
8
|
-
/**
|
|
9
|
-
* Optional mutation options, see {@link @tanstack/react-query!useMutation | `useMutation()`} for more infos
|
|
10
|
-
*/
|
|
11
|
-
mutations?: MutationOptions;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Hook that return a mutation helping to open the SSO page
|
|
15
|
-
*
|
|
16
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.openSso | `openSso()`} action
|
|
17
|
-
*
|
|
18
|
-
* @param args
|
|
19
|
-
*
|
|
20
|
-
* @group hooks
|
|
21
|
-
*
|
|
22
|
-
* @returns
|
|
23
|
-
* The mutation hook wrapping the `openSso()` action
|
|
24
|
-
* The `mutate` and `mutateAsync` argument is of type {@link @frak-labs/core-sdk!index.OpenSsoParamsType | `OpenSsoParamsType`}
|
|
25
|
-
* The mutation doesn't output any value
|
|
26
|
-
*
|
|
27
|
-
* @see {@link @frak-labs/core-sdk!actions.openSso | `openSso()`} for more info about the underlying action
|
|
28
|
-
* @see {@link @tanstack/react-query!useMutation | `useMutation()`} for more info about the mutation options and response
|
|
29
|
-
*/
|
|
30
|
-
export declare function useOpenSso({ mutations }?: UseOpenSsoParams): import("@tanstack/react-query").UseMutationResult<{
|
|
31
|
-
wallet?: import("viem").Hex;
|
|
32
|
-
}, FrakRpcError<undefined>, OpenSsoParamsType, unknown>;
|
|
33
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { OpenSsoParamsType, OpenSsoReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type FrakRpcError } from "@frak-labs/frame-connector";
|
|
3
|
-
import { type UseMutationOptions } from "@tanstack/react-query";
|
|
4
|
-
/** @ignore */
|
|
5
|
-
type MutationOptions = Omit<UseMutationOptions<OpenSsoReturnType, FrakRpcError, OpenSsoParamsType>, "mutationFn" | "mutationKey">;
|
|
6
|
-
/** @inline */
|
|
7
|
-
interface UseOpenSsoParams {
|
|
8
|
-
/**
|
|
9
|
-
* Optional mutation options, see {@link @tanstack/react-query!useMutation | `useMutation()`} for more infos
|
|
10
|
-
*/
|
|
11
|
-
mutations?: MutationOptions;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Hook that return a mutation helping to open the SSO page
|
|
15
|
-
*
|
|
16
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.openSso | `openSso()`} action
|
|
17
|
-
*
|
|
18
|
-
* @param args
|
|
19
|
-
*
|
|
20
|
-
* @group hooks
|
|
21
|
-
*
|
|
22
|
-
* @returns
|
|
23
|
-
* The mutation hook wrapping the `openSso()` action
|
|
24
|
-
* The `mutate` and `mutateAsync` argument is of type {@link @frak-labs/core-sdk!index.OpenSsoParamsType | `OpenSsoParamsType`}
|
|
25
|
-
* The mutation doesn't output any value
|
|
26
|
-
*
|
|
27
|
-
* @see {@link @frak-labs/core-sdk!actions.openSso | `openSso()`} for more info about the underlying action
|
|
28
|
-
* @see {@link @tanstack/react-query!useMutation | `useMutation()`} for more info about the mutation options and response
|
|
29
|
-
*/
|
|
30
|
-
export declare function useOpenSso({ mutations }?: UseOpenSsoParams): import("@tanstack/react-query").UseMutationResult<{
|
|
31
|
-
wallet?: import("viem").Hex;
|
|
32
|
-
}, FrakRpcError<undefined>, OpenSsoParamsType, unknown>;
|
|
33
|
-
export {};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { PrepareSsoParamsType } from "@frak-labs/core-sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Hook that generates SSO URL for popup flow
|
|
4
|
-
*
|
|
5
|
-
* This is a **synchronous** hook (no async calls) that generates the SSO URL
|
|
6
|
-
* client-side without communicating with the wallet iframe.
|
|
7
|
-
*
|
|
8
|
-
* @param params - SSO parameters for URL generation
|
|
9
|
-
*
|
|
10
|
-
* @group hooks
|
|
11
|
-
*
|
|
12
|
-
* @returns
|
|
13
|
-
* Object containing:
|
|
14
|
-
* - `ssoUrl`: Generated SSO URL (or undefined if client not ready)
|
|
15
|
-
* - `isReady`: Boolean indicating if URL is available
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```tsx
|
|
19
|
-
* function MyComponent() {
|
|
20
|
-
* const { data } = usePrepareSso({
|
|
21
|
-
* metadata: { logoUrl: "..." },
|
|
22
|
-
* directExit: true
|
|
23
|
-
* });
|
|
24
|
-
*
|
|
25
|
-
* const handleClick = () => {
|
|
26
|
-
* if (ssoUrl) {
|
|
27
|
-
* window.open(data?.ssoUrl, "_blank");
|
|
28
|
-
* }
|
|
29
|
-
* };
|
|
30
|
-
*
|
|
31
|
-
* return <button onClick={handleClick} disabled={!isReady}>Login</button>;
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @see {@link @frak-labs/core-sdk!actions.prepareSso | `prepareSso()`} for the underlying action
|
|
36
|
-
* @see {@link @frak-labs/core-sdk!actions.openSso | `openSso()`} for the recommended high-level API
|
|
37
|
-
*/
|
|
38
|
-
export declare function usePrepareSso(params: PrepareSsoParamsType): import("@tanstack/react-query").UseQueryResult<{
|
|
39
|
-
ssoUrl: string;
|
|
40
|
-
}, Error>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { PrepareSsoParamsType } from "@frak-labs/core-sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Hook that generates SSO URL for popup flow
|
|
4
|
-
*
|
|
5
|
-
* This is a **synchronous** hook (no async calls) that generates the SSO URL
|
|
6
|
-
* client-side without communicating with the wallet iframe.
|
|
7
|
-
*
|
|
8
|
-
* @param params - SSO parameters for URL generation
|
|
9
|
-
*
|
|
10
|
-
* @group hooks
|
|
11
|
-
*
|
|
12
|
-
* @returns
|
|
13
|
-
* Object containing:
|
|
14
|
-
* - `ssoUrl`: Generated SSO URL (or undefined if client not ready)
|
|
15
|
-
* - `isReady`: Boolean indicating if URL is available
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```tsx
|
|
19
|
-
* function MyComponent() {
|
|
20
|
-
* const { data } = usePrepareSso({
|
|
21
|
-
* metadata: { logoUrl: "..." },
|
|
22
|
-
* directExit: true
|
|
23
|
-
* });
|
|
24
|
-
*
|
|
25
|
-
* const handleClick = () => {
|
|
26
|
-
* if (ssoUrl) {
|
|
27
|
-
* window.open(data?.ssoUrl, "_blank");
|
|
28
|
-
* }
|
|
29
|
-
* };
|
|
30
|
-
*
|
|
31
|
-
* return <button onClick={handleClick} disabled={!isReady}>Login</button>;
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @see {@link @frak-labs/core-sdk!actions.prepareSso | `prepareSso()`} for the underlying action
|
|
36
|
-
* @see {@link @frak-labs/core-sdk!actions.openSso | `openSso()`} for the recommended high-level API
|
|
37
|
-
*/
|
|
38
|
-
export declare function usePrepareSso(params: PrepareSsoParamsType): import("@tanstack/react-query").UseQueryResult<{
|
|
39
|
-
ssoUrl: string;
|
|
40
|
-
}, Error>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { SendInteractionParamsType, SendInteractionReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type FrakRpcError } from "@frak-labs/frame-connector";
|
|
3
|
-
import { type UseMutationOptions } from "@tanstack/react-query";
|
|
4
|
-
/** @ignore */
|
|
5
|
-
type MutationOptions = Omit<UseMutationOptions<SendInteractionReturnType, FrakRpcError, SendInteractionParamsType>, "mutationFn" | "mutationKey">;
|
|
6
|
-
/** @inline */
|
|
7
|
-
interface UseSendInteractionParams {
|
|
8
|
-
/**
|
|
9
|
-
* Optional mutation options, see {@link @tanstack/react-query!useMutation | `useMutation()`} for more infos
|
|
10
|
-
*/
|
|
11
|
-
mutations?: MutationOptions;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Hook that return a mutation helping to send a user interaction
|
|
15
|
-
*
|
|
16
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.sendInteraction | `sendInteraction()`} action
|
|
17
|
-
*
|
|
18
|
-
* @param args
|
|
19
|
-
*
|
|
20
|
-
* @group hooks
|
|
21
|
-
*
|
|
22
|
-
* @returns
|
|
23
|
-
* The mutation hook wrapping the `sendInteraction()` action
|
|
24
|
-
* The `mutate` and `mutateAsync` argument is of type {@link @frak-labs/core-sdk!index.SendInteractionParamsType | `SendInteractionParamsType`}
|
|
25
|
-
* The `data` result is a {@link @frak-labs/core-sdk!index.SendInteractionReturnType | `SendInteractionReturnType`}
|
|
26
|
-
*
|
|
27
|
-
* @see {@link @frak-labs/core-sdk!actions.sendInteraction | `sendInteraction()`} for more info about the underlying action
|
|
28
|
-
* @see {@link @tanstack/react-query!useMutation | `useMutation()`} for more info about the mutation options and response
|
|
29
|
-
*/
|
|
30
|
-
export declare function useSendInteraction({ mutations, }?: UseSendInteractionParams): import("@tanstack/react-query").UseMutationResult<{
|
|
31
|
-
delegationId: string;
|
|
32
|
-
}, FrakRpcError<undefined>, SendInteractionParamsType, unknown>;
|
|
33
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { SendInteractionParamsType, SendInteractionReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type FrakRpcError } from "@frak-labs/frame-connector";
|
|
3
|
-
import { type UseMutationOptions } from "@tanstack/react-query";
|
|
4
|
-
/** @ignore */
|
|
5
|
-
type MutationOptions = Omit<UseMutationOptions<SendInteractionReturnType, FrakRpcError, SendInteractionParamsType>, "mutationFn" | "mutationKey">;
|
|
6
|
-
/** @inline */
|
|
7
|
-
interface UseSendInteractionParams {
|
|
8
|
-
/**
|
|
9
|
-
* Optional mutation options, see {@link @tanstack/react-query!useMutation | `useMutation()`} for more infos
|
|
10
|
-
*/
|
|
11
|
-
mutations?: MutationOptions;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Hook that return a mutation helping to send a user interaction
|
|
15
|
-
*
|
|
16
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.sendInteraction | `sendInteraction()`} action
|
|
17
|
-
*
|
|
18
|
-
* @param args
|
|
19
|
-
*
|
|
20
|
-
* @group hooks
|
|
21
|
-
*
|
|
22
|
-
* @returns
|
|
23
|
-
* The mutation hook wrapping the `sendInteraction()` action
|
|
24
|
-
* The `mutate` and `mutateAsync` argument is of type {@link @frak-labs/core-sdk!index.SendInteractionParamsType | `SendInteractionParamsType`}
|
|
25
|
-
* The `data` result is a {@link @frak-labs/core-sdk!index.SendInteractionReturnType | `SendInteractionReturnType`}
|
|
26
|
-
*
|
|
27
|
-
* @see {@link @frak-labs/core-sdk!actions.sendInteraction | `sendInteraction()`} for more info about the underlying action
|
|
28
|
-
* @see {@link @tanstack/react-query!useMutation | `useMutation()`} for more info about the mutation options and response
|
|
29
|
-
*/
|
|
30
|
-
export declare function useSendInteraction({ mutations, }?: UseSendInteractionParams): import("@tanstack/react-query").UseMutationResult<{
|
|
31
|
-
delegationId: string;
|
|
32
|
-
}, FrakRpcError<undefined>, SendInteractionParamsType, unknown>;
|
|
33
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { SendTransactionReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type SendTransactionParams } from "@frak-labs/core-sdk/actions";
|
|
3
|
-
import { type FrakRpcError } from "@frak-labs/frame-connector";
|
|
4
|
-
import { type UseMutationOptions } from "@tanstack/react-query";
|
|
5
|
-
/** @ignore */
|
|
6
|
-
type MutationOptions = Omit<UseMutationOptions<SendTransactionReturnType, FrakRpcError, SendTransactionParams>, "mutationFn" | "mutationKey">;
|
|
7
|
-
/** @inline */
|
|
8
|
-
interface UseSendTransactionParams {
|
|
9
|
-
/**
|
|
10
|
-
* Optional mutation options, see {@link @tanstack/react-query!useMutation | `useMutation()`} for more infos
|
|
11
|
-
*/
|
|
12
|
-
mutations?: MutationOptions;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Hook that return a mutation helping to send a transaction
|
|
16
|
-
*
|
|
17
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.sendTransaction | `sendTransaction()`} action
|
|
18
|
-
*
|
|
19
|
-
* @param args
|
|
20
|
-
*
|
|
21
|
-
* @group hooks
|
|
22
|
-
*
|
|
23
|
-
* @returns
|
|
24
|
-
* The mutation hook wrapping the `sendTransaction()` action
|
|
25
|
-
* The `mutate` and `mutateAsync` argument is of type {@link @frak-labs/core-sdk!actions.SendTransactionParams | `SendTransactionParams`}
|
|
26
|
-
* The `data` result is a {@link @frak-labs/core-sdk!index.SendTransactionReturnType | `SendTransactionReturnType`}
|
|
27
|
-
*
|
|
28
|
-
* @see {@link @frak-labs/core-sdk!actions.sendTransaction | `sendTransaction()`} for more info about the underlying action
|
|
29
|
-
* @see {@link @tanstack/react-query!useMutation | `useMutation()`} for more info about the mutation options and response
|
|
30
|
-
*/
|
|
31
|
-
export declare function useSendTransactionAction({ mutations, }?: UseSendTransactionParams): import("@tanstack/react-query").UseMutationResult<{
|
|
32
|
-
hash: import("viem").Hex;
|
|
33
|
-
}, FrakRpcError<undefined>, SendTransactionParams, unknown>;
|
|
34
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { SendTransactionReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type SendTransactionParams } from "@frak-labs/core-sdk/actions";
|
|
3
|
-
import { type FrakRpcError } from "@frak-labs/frame-connector";
|
|
4
|
-
import { type UseMutationOptions } from "@tanstack/react-query";
|
|
5
|
-
/** @ignore */
|
|
6
|
-
type MutationOptions = Omit<UseMutationOptions<SendTransactionReturnType, FrakRpcError, SendTransactionParams>, "mutationFn" | "mutationKey">;
|
|
7
|
-
/** @inline */
|
|
8
|
-
interface UseSendTransactionParams {
|
|
9
|
-
/**
|
|
10
|
-
* Optional mutation options, see {@link @tanstack/react-query!useMutation | `useMutation()`} for more infos
|
|
11
|
-
*/
|
|
12
|
-
mutations?: MutationOptions;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Hook that return a mutation helping to send a transaction
|
|
16
|
-
*
|
|
17
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.sendTransaction | `sendTransaction()`} action
|
|
18
|
-
*
|
|
19
|
-
* @param args
|
|
20
|
-
*
|
|
21
|
-
* @group hooks
|
|
22
|
-
*
|
|
23
|
-
* @returns
|
|
24
|
-
* The mutation hook wrapping the `sendTransaction()` action
|
|
25
|
-
* The `mutate` and `mutateAsync` argument is of type {@link @frak-labs/core-sdk!actions.SendTransactionParams | `SendTransactionParams`}
|
|
26
|
-
* The `data` result is a {@link @frak-labs/core-sdk!index.SendTransactionReturnType | `SendTransactionReturnType`}
|
|
27
|
-
*
|
|
28
|
-
* @see {@link @frak-labs/core-sdk!actions.sendTransaction | `sendTransaction()`} for more info about the underlying action
|
|
29
|
-
* @see {@link @tanstack/react-query!useMutation | `useMutation()`} for more info about the mutation options and response
|
|
30
|
-
*/
|
|
31
|
-
export declare function useSendTransactionAction({ mutations, }?: UseSendTransactionParams): import("@tanstack/react-query").UseMutationResult<{
|
|
32
|
-
hash: import("viem").Hex;
|
|
33
|
-
}, FrakRpcError<undefined>, SendTransactionParams, unknown>;
|
|
34
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { SiweAuthenticateReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type SiweAuthenticateModalParams } from "@frak-labs/core-sdk/actions";
|
|
3
|
-
import { type FrakRpcError } from "@frak-labs/frame-connector";
|
|
4
|
-
import { type UseMutationOptions } from "@tanstack/react-query";
|
|
5
|
-
/** @inline */
|
|
6
|
-
type MutationOptions = Omit<UseMutationOptions<SiweAuthenticateReturnType, FrakRpcError, SiweAuthenticateModalParams>, "mutationFn" | "mutationKey">;
|
|
7
|
-
/** @ignore */
|
|
8
|
-
interface UseSiweAuthenticateParams {
|
|
9
|
-
/**
|
|
10
|
-
* Optional mutation options, see {@link @tanstack/react-query!useMutation | `useMutation()`} for more infos
|
|
11
|
-
*/
|
|
12
|
-
mutations?: MutationOptions;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Hook that return a mutation helping to send perform a SIWE authentication
|
|
16
|
-
*
|
|
17
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.sendTransaction | `sendTransaction()`} action
|
|
18
|
-
*
|
|
19
|
-
* @param args
|
|
20
|
-
*
|
|
21
|
-
* @group hooks
|
|
22
|
-
*
|
|
23
|
-
* @returns
|
|
24
|
-
* The mutation hook wrapping the `siweAuthenticate()` action
|
|
25
|
-
* The `mutate` and `mutateAsync` argument is of type {@link @frak-labs/core-sdk!actions.SiweAuthenticateModalParams | `SiweAuthenticateModalParams`}
|
|
26
|
-
* The `data` result is a {@link @frak-labs/core-sdk!index.SiweAuthenticateReturnType | `SiweAuthenticateReturnType`}
|
|
27
|
-
*
|
|
28
|
-
* @see {@link @frak-labs/core-sdk!actions.siweAuthenticate | `siweAuthenticate()`} for more info about the underlying action
|
|
29
|
-
* @see {@link @tanstack/react-query!useMutation | `useMutation()`} for more info about the mutation options and response
|
|
30
|
-
*/
|
|
31
|
-
export declare function useSiweAuthenticate({ mutations, }?: UseSiweAuthenticateParams): import("@tanstack/react-query").UseMutationResult<{
|
|
32
|
-
signature: import("viem").Hex;
|
|
33
|
-
message: string;
|
|
34
|
-
}, FrakRpcError<undefined>, SiweAuthenticateModalParams, unknown>;
|
|
35
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { SiweAuthenticateReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type SiweAuthenticateModalParams } from "@frak-labs/core-sdk/actions";
|
|
3
|
-
import { type FrakRpcError } from "@frak-labs/frame-connector";
|
|
4
|
-
import { type UseMutationOptions } from "@tanstack/react-query";
|
|
5
|
-
/** @inline */
|
|
6
|
-
type MutationOptions = Omit<UseMutationOptions<SiweAuthenticateReturnType, FrakRpcError, SiweAuthenticateModalParams>, "mutationFn" | "mutationKey">;
|
|
7
|
-
/** @ignore */
|
|
8
|
-
interface UseSiweAuthenticateParams {
|
|
9
|
-
/**
|
|
10
|
-
* Optional mutation options, see {@link @tanstack/react-query!useMutation | `useMutation()`} for more infos
|
|
11
|
-
*/
|
|
12
|
-
mutations?: MutationOptions;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Hook that return a mutation helping to send perform a SIWE authentication
|
|
16
|
-
*
|
|
17
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.sendTransaction | `sendTransaction()`} action
|
|
18
|
-
*
|
|
19
|
-
* @param args
|
|
20
|
-
*
|
|
21
|
-
* @group hooks
|
|
22
|
-
*
|
|
23
|
-
* @returns
|
|
24
|
-
* The mutation hook wrapping the `siweAuthenticate()` action
|
|
25
|
-
* The `mutate` and `mutateAsync` argument is of type {@link @frak-labs/core-sdk!actions.SiweAuthenticateModalParams | `SiweAuthenticateModalParams`}
|
|
26
|
-
* The `data` result is a {@link @frak-labs/core-sdk!index.SiweAuthenticateReturnType | `SiweAuthenticateReturnType`}
|
|
27
|
-
*
|
|
28
|
-
* @see {@link @frak-labs/core-sdk!actions.siweAuthenticate | `siweAuthenticate()`} for more info about the underlying action
|
|
29
|
-
* @see {@link @tanstack/react-query!useMutation | `useMutation()`} for more info about the mutation options and response
|
|
30
|
-
*/
|
|
31
|
-
export declare function useSiweAuthenticate({ mutations, }?: UseSiweAuthenticateParams): import("@tanstack/react-query").UseMutationResult<{
|
|
32
|
-
signature: import("viem").Hex;
|
|
33
|
-
message: string;
|
|
34
|
-
}, FrakRpcError<undefined>, SiweAuthenticateModalParams, unknown>;
|
|
35
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { WalletStatusReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Hook that return a query helping to get the current wallet status.
|
|
4
|
-
*
|
|
5
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.watchWalletStatus | `watchWalletStatus()`} action
|
|
6
|
-
*
|
|
7
|
-
* @group hooks
|
|
8
|
-
*
|
|
9
|
-
* @returns
|
|
10
|
-
* The query hook wrapping the `watchWalletStatus()` action
|
|
11
|
-
* The `data` result is a {@link @frak-labs/core-sdk!index.WalletStatusReturnType | `WalletStatusReturnType`}
|
|
12
|
-
*
|
|
13
|
-
* @see {@link @frak-labs/core-sdk!actions.watchWalletStatus | `watchWalletStatus()`} for more info about the underlying action
|
|
14
|
-
* @see {@link @tanstack/react-query!useQuery | `useQuery()`} for more info about the useQuery response
|
|
15
|
-
*/
|
|
16
|
-
export declare function useWalletStatus(): import("@tanstack/react-query").UseQueryResult<WalletStatusReturnType, Error>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { WalletStatusReturnType } from "@frak-labs/core-sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Hook that return a query helping to get the current wallet status.
|
|
4
|
-
*
|
|
5
|
-
* It's a {@link @tanstack/react-query!home | `tanstack`} wrapper around the {@link @frak-labs/core-sdk!actions.watchWalletStatus | `watchWalletStatus()`} action
|
|
6
|
-
*
|
|
7
|
-
* @group hooks
|
|
8
|
-
*
|
|
9
|
-
* @returns
|
|
10
|
-
* The query hook wrapping the `watchWalletStatus()` action
|
|
11
|
-
* The `data` result is a {@link @frak-labs/core-sdk!index.WalletStatusReturnType | `WalletStatusReturnType`}
|
|
12
|
-
*
|
|
13
|
-
* @see {@link @frak-labs/core-sdk!actions.watchWalletStatus | `watchWalletStatus()`} for more info about the underlying action
|
|
14
|
-
* @see {@link @tanstack/react-query!useQuery | `useQuery()`} for more info about the useQuery response
|
|
15
|
-
*/
|
|
16
|
-
export declare function useWalletStatus(): import("@tanstack/react-query").UseQueryResult<WalletStatusReturnType, Error>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type FrakContext } from "@frak-labs/core-sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Extract the current frak context from the url
|
|
4
|
-
* @ignore
|
|
5
|
-
*/
|
|
6
|
-
export declare function useFrakContext(): {
|
|
7
|
-
frakContext: FrakContext | null | undefined;
|
|
8
|
-
updateContext: (newContext: Partial<FrakContext>) => void;
|
|
9
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type FrakContext } from "@frak-labs/core-sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Extract the current frak context from the url
|
|
4
|
-
* @ignore
|
|
5
|
-
*/
|
|
6
|
-
export declare function useFrakContext(): {
|
|
7
|
-
frakContext: FrakContext | null | undefined;
|
|
8
|
-
updateContext: (newContext: Partial<FrakContext>) => void;
|
|
9
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { FrakWalletSdkConfig } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type PropsWithChildren } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* The context that will keep the Frak Wallet SDK configuration
|
|
5
|
-
* @ignore
|
|
6
|
-
*/
|
|
7
|
-
export declare const FrakConfigContext: import("react").Context<FrakWalletSdkConfig | undefined>;
|
|
8
|
-
/**
|
|
9
|
-
* Props to instantiate the Frak Wallet SDK configuration provider
|
|
10
|
-
*
|
|
11
|
-
* @group provider
|
|
12
|
-
*/
|
|
13
|
-
export type FrakConfigProviderProps = {
|
|
14
|
-
/**
|
|
15
|
-
* The wanted Frak configuration
|
|
16
|
-
* @see {@link @frak-labs/core-sdk!index.FrakWalletSdkConfig | FrakWalletSdkConfig}
|
|
17
|
-
*/
|
|
18
|
-
config: FrakWalletSdkConfig;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Simple config provider for the Frak Wallet SDK
|
|
22
|
-
*
|
|
23
|
-
* Should be wrapped within a {@link @tanstack/react-query!QueryClientProvider | `QueryClientProvider`}
|
|
24
|
-
*
|
|
25
|
-
* @group provider
|
|
26
|
-
*
|
|
27
|
-
* @param parameters
|
|
28
|
-
*/
|
|
29
|
-
export declare function FrakConfigProvider(parameters: PropsWithChildren<FrakConfigProviderProps>): import("react").FunctionComponentElement<import("react").ProviderProps<FrakWalletSdkConfig | undefined>>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { FrakWalletSdkConfig } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type PropsWithChildren } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* The context that will keep the Frak Wallet SDK configuration
|
|
5
|
-
* @ignore
|
|
6
|
-
*/
|
|
7
|
-
export declare const FrakConfigContext: import("react").Context<FrakWalletSdkConfig | undefined>;
|
|
8
|
-
/**
|
|
9
|
-
* Props to instantiate the Frak Wallet SDK configuration provider
|
|
10
|
-
*
|
|
11
|
-
* @group provider
|
|
12
|
-
*/
|
|
13
|
-
export type FrakConfigProviderProps = {
|
|
14
|
-
/**
|
|
15
|
-
* The wanted Frak configuration
|
|
16
|
-
* @see {@link @frak-labs/core-sdk!index.FrakWalletSdkConfig | FrakWalletSdkConfig}
|
|
17
|
-
*/
|
|
18
|
-
config: FrakWalletSdkConfig;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Simple config provider for the Frak Wallet SDK
|
|
22
|
-
*
|
|
23
|
-
* Should be wrapped within a {@link @tanstack/react-query!QueryClientProvider | `QueryClientProvider`}
|
|
24
|
-
*
|
|
25
|
-
* @group provider
|
|
26
|
-
*
|
|
27
|
-
* @param parameters
|
|
28
|
-
*/
|
|
29
|
-
export declare function FrakConfigProvider(parameters: PropsWithChildren<FrakConfigProviderProps>): import("react").FunctionComponentElement<import("react").ProviderProps<FrakWalletSdkConfig | undefined>>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type FrakClient, type FrakWalletSdkConfig } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type CSSProperties, type ReactNode } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* The context that will keep the Frak Wallet SDK client
|
|
5
|
-
* @ignore
|
|
6
|
-
*/
|
|
7
|
-
export declare const FrakIFrameClientContext: import("react").Context<FrakClient | undefined>;
|
|
8
|
-
/**
|
|
9
|
-
* Props to instantiate the Frak Wallet SDK configuration provider
|
|
10
|
-
*
|
|
11
|
-
* @group provider
|
|
12
|
-
*/
|
|
13
|
-
export type FrakIFrameClientProps = {
|
|
14
|
-
config: FrakWalletSdkConfig;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* IFrame client provider for the Frak Wallet SDK
|
|
18
|
-
* It will automatically create the frak wallet iFrame (required for the wallet to communicate with the SDK securely), and provide it in the context
|
|
19
|
-
*
|
|
20
|
-
* @group provider
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* This provider must be wrapped within a {@link FrakConfigProvider} to work properly
|
|
24
|
-
*
|
|
25
|
-
* @param args
|
|
26
|
-
* @param args.style - Some custom styles to apply to the iFrame
|
|
27
|
-
* @param args.children - Descedant components that will have access to the Frak Client
|
|
28
|
-
*/
|
|
29
|
-
export declare function FrakIFrameClientProvider({ style, children, }: {
|
|
30
|
-
style?: CSSProperties;
|
|
31
|
-
children?: ReactNode;
|
|
32
|
-
}): import("react").FunctionComponentElement<import("react").FragmentProps>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type FrakClient, type FrakWalletSdkConfig } from "@frak-labs/core-sdk";
|
|
2
|
-
import { type CSSProperties, type ReactNode } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* The context that will keep the Frak Wallet SDK client
|
|
5
|
-
* @ignore
|
|
6
|
-
*/
|
|
7
|
-
export declare const FrakIFrameClientContext: import("react").Context<FrakClient | undefined>;
|
|
8
|
-
/**
|
|
9
|
-
* Props to instantiate the Frak Wallet SDK configuration provider
|
|
10
|
-
*
|
|
11
|
-
* @group provider
|
|
12
|
-
*/
|
|
13
|
-
export type FrakIFrameClientProps = {
|
|
14
|
-
config: FrakWalletSdkConfig;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* IFrame client provider for the Frak Wallet SDK
|
|
18
|
-
* It will automatically create the frak wallet iFrame (required for the wallet to communicate with the SDK securely), and provide it in the context
|
|
19
|
-
*
|
|
20
|
-
* @group provider
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* This provider must be wrapped within a {@link FrakConfigProvider} to work properly
|
|
24
|
-
*
|
|
25
|
-
* @param args
|
|
26
|
-
* @param args.style - Some custom styles to apply to the iFrame
|
|
27
|
-
* @param args.children - Descedant components that will have access to the Frak Client
|
|
28
|
-
*/
|
|
29
|
-
export declare function FrakIFrameClientProvider({ style, children, }: {
|
|
30
|
-
style?: CSSProperties;
|
|
31
|
-
children?: ReactNode;
|
|
32
|
-
}): import("react").FunctionComponentElement<import("react").FragmentProps>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { FrakConfigProvider, FrakConfigContext } from "./FrakConfigProvider";
|
|
2
|
-
export type { FrakConfigProviderProps } from "./FrakConfigProvider";
|
|
3
|
-
export { FrakIFrameClientContext, FrakIFrameClientProvider, } from "./FrakIFrameClientProvider";
|
|
4
|
-
export type { FrakIFrameClientProps } from "./FrakIFrameClientProvider";
|
package/dist/provider/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { FrakConfigProvider, FrakConfigContext } from "./FrakConfigProvider";
|
|
2
|
-
export type { FrakConfigProviderProps } from "./FrakConfigProvider";
|
|
3
|
-
export { FrakIFrameClientContext, FrakIFrameClientProvider, } from "./FrakIFrameClientProvider";
|
|
4
|
-
export type { FrakIFrameClientProps } from "./FrakIFrameClientProvider";
|