Get started with the B3 SDK in minutes and start building on the B3 ecosystem
Install the SDK package
npm install @b3dotfun/sdk
Import CSS styles
import "@b3dotfun/sdk/index.css";
import { B3Provider, SignInWithB3 } from "@b3dotfun/sdk/global-account/react"; function App() { return ( <B3Provider environment="production"> {children} </B3Provider> ); }
Instant Accounts
import { SignInWithB3 } from "@b3dotfun/sdk/global-account/react"; function App() { return ( <B3Provider environment="production"> <SignInWithB3 provider={{ strategy: "google" }} partnerId="your-partner-id" onLoginSuccess={(globalAccount) => { console.log("Authenticated:", globalAccount); }} /> </B3Provider> ); }
Access Liquidity
import { AnySpend } from "@b3dotfun/sdk/anyspend/react"; function SwapPage() { return <AnySpend isMainnet={true} mode="page" />; }