npm.io
1.1.6 • Published 3d ago

@frak-labs/react-sdk

Licence
GNU GPL 3.0
Version
1.1.6
Deps
2
Size
192 kB
Vulns
0
Weekly
0
Stars
10

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

Hook Purpose
useWalletStatus Watch wallet connection state and account information
useDisplayModal Trigger SDK modal display for user interactions
useSiweAuthenticate SIWE (Sign-In with Ethereum) authentication flow
useOpenSso Open SSO authentication flow
usePrepareSso Prepare SSO data before opening authentication
useSendTransactionAction Send blockchain transaction actions
useGetMerchantInformation Query merchant info and available rewards
useReferralInteraction Auto-submit referral interactions
useFrakClient Access the FrakClient instance
useFrakConfig Access 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.

Keywords