Skip to content

Documentation / @frak-labs/react-sdk

Frak Wallet React SDK

This SDK help any dApps, or gated content provider, use the Frak Wallet as a regular wallet, with smoother UX for your end-users (pay for his gas fees, check the paywall options, track his consumption etc.)

Checkout our documentation for more information's about the usage:

Hooks

HookPurpose
useWalletStatusWatch wallet connection state and account information
useDisplayModalTrigger SDK modal display for user interactions
useSiweAuthenticateSIWE (Sign-In with Ethereum) authentication flow
useOpenSsoOpen SSO authentication flow
usePrepareSsoPrepare SSO data before opening authentication
useSendTransactionActionSend blockchain transaction actions
useGetMerchantInformationQuery merchant info and available rewards
useReferralInteractionAuto-submit referral interactions
useFrakClientAccess the FrakClient instance
useFrakConfigAccess SDK configuration

Providers

Wrap your application root with these providers:

  • FrakConfigProvider — SDK configuration context. Required at app root.
  • FrakIFrameClientProvider — Iframe client context for SDK communication.

Both providers export TypeScript types: FrakConfigProviderProps, FrakIFrameClientProps.

hooks

provider