What is the B3 SDK?

The B3 SDK (@b3dotfun/sdk) is a unified TypeScript SDK that provides everything you need to build applications on the B3 ecosystem. It wraps cross-chain payment infrastructure in developer-friendly React components and headless services.

Architecture

The SDK is organized into focused modules designed for maximum flexibility and ease of use:

AnySpend Module

Cross-chain execution engine for payments, swaps, and NFT minting across multiple blockchains.

Global Account Module

B3 Global Accounts are deprecated. Read the notice before using this module.

Learn More

Module Structure

Each module contains organized, purpose-built components:

  • react/ - React components and hooks for easy integration
  • services/ - Headless TypeScript services for custom implementations
  • types/ - Comprehensive TypeScript definitions
  • utils/ - Utility functions and helpers
  • constants/ - Configuration and constants

Platform Support

FeatureReact WebReact NativeHeadless
AnySpend✅❌✅
Shared Utils✅✅✅

Installation

bash
npm install @b3dotfun/sdk

CSS Styles

Import the default styles for the best visual experience:

typescript
import "@b3dotfun/sdk/index.css";

Quick Start

Cross-Chain Payments with AnySpend

tsx
import { AnySpend } from "@b3dotfun/sdk/anyspend/react";function PaymentPage() { return <AnySpend mode="page" />;}

NFT Minting

For a mint button that takes payment in any token, use AnySpendNFTButton, whose props and full nftContract object are documented under AnySpendNFTButton on docs.anyspend.com.

Key Features

Universal Payment Infrastructure

Any Token Payments

Accept payments in any cryptocurrency with automatic conversion to your preferred token.

Cross-Chain Swaps

Enable seamless token swaps across 20+ supported blockchains with optimal routing.

NFT Minting

One-click NFT minting buttons that accept payments in any token from any chain.

Fiat Onramps

Integrated fiat-to-crypto onramps for users without existing cryptocurrency.

Headless TypeScript Services

To quote and create orders without React, call the AnySpend order API, starting with the quote endpoint on docs.anyspend.com.

Support & Community

Discord Community

Join the B3 developer community for support and discussions.

What's Next?

  1. Install the SDK and import the styles
  2. Set up AnySpend for cross-chain payments
  3. Explore examples and implementation patterns
  4. Join the community for support and updates

The B3 SDK provides everything you need to build the next generation of cross-chain applications with seamless user experiences. Start building today!

Ask a question... ⌘I