Skip to main content
The SocketFi React SDK gives you everything you need to embed a passkey-secured smart wallet directly into your React application. Authentication, transaction approval, and Soroban contract reads all happen through hosted popup flows that your users can complete in seconds — without installing a browser extension or touching a seed phrase.

What’s included

Embedded Wallet Auth

Resolve or create a Stellar smart wallet for every user automatically during the authentication flow.

Passkey Sign-In & Sign-Up

Let users authenticate with a device passkey. The SDK handles both new and returning users with the same authenticate() call.

Transaction Approval

Open a hosted approval popup so users can review and sign Soroban contract writes without leaving your app.

Soroban Contract Reads

Query on-chain contract state in a single readContract() call — no approval popup required.

Requirements

Before integrating the SDK, make sure your environment meets the following requirements.
During local development you can use localhost, which browsers treat as a secure context. You only need HTTPS once you deploy to a real domain.

Quick start

The snippet below shows a complete, minimal integration — initialize the client, authenticate the user, and send a transaction.
Create one shared socketfi instance at the module level and import it wherever you need it. Avoid constructing multiple instances inside React components.

Next steps

Ready to add SocketFi to your project? Head to the installation guide to install the package, configure your environment variables, and initialize the client.

Install the React SDK

Install @socketfi/react, set up environment variables, and configure your SocketFi client.