B3 백서

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 13쪽 중 12쪽

authentication strategies to display. Options include: , , , , , , , , . Leave undefined to show all options. Blockchain chain configuration object with , , , and . Your unique partner ID for B3 Global Accounts. void"> Callback function called when authentication succeeds. Promise"> Async callback function called when an error occurs. Whether to close the modal after successful login. Custom text or component for the sign-in button. Whether to show the B3 logo in the button. Available Authentication Strategies B3 Global Accounts supports the following authentication methods: Strategy Type Description Social Google OAuth authentication Social Discord OAuth authentication Social GitHub OAuth authentication Social X (formerly Twitter) authentication Social Apple Sign In Passwordless Guest authentication without signup Passwordless Email verification code authentication Wallet WalletConnect protocol Wallet MetaMask browser extension Wallet Coinbase Wallet Next Steps Explore all available React hooks. See complete integration examples. Interactive authentication demo application. --- ## Examples Source: https://docs.b3.fun/sdk/global-account/examples Basic Authentication Example A simple authentication flow with error handling and loading states. Gaming Application Example Complete example for a gaming application with session keys and permissions. E-commerce Application Example Example showing B3 Global Accounts integration in an e-commerce context. React Native Example Example for React Native applications. Next.js App Router Example Example for Next.js 13+ App Router. Advanced Custom Hook Example Custom hook that combines multiple B3 features: CSS Styling Examples Example CSS for styling B3 components: These examples provide comprehensive patterns for integrating B3 Global Accounts into various types of applications. Each example includes proper error handling, loading states, and follows React best practices. Next Steps Learn about cross-chain functionality. --- ## React Hooks Source: https://docs.b3.fun/sdk/global-account/hooks Authentication Hooks useB3 The primary hook for accessing Global Account authentication state and actions. Return Values | Property | Type | Description | |----------|------|-------------| | | | Current authenticated account | | | | Whether user is authenticated | | | | Whether authentication check is in progress | | | | Function to sign out current user | | | | Function to refresh account data | useAccountWallet Access wallet information for the authenticated account. Permission Hooks usePermissions Manage and check session key permissions. useRequestPermissions Request new permissions for session keys. useRevokePermissions Revoke existing permissions. Asset Management Hooks useAccountAssets Retrieve and manage user's digital assets. Modal Management Hooks useModal Control B3 modals programmatically. Navigation Hooks useNavigation Handle navigation within B3 applications. Configuration Hooks useB3Config Access B3 configuration and environment settings. Hook Composition Custom Hook Example Combine multiple hooks for complex functionality: TypeScript Support All hooks include full TypeScript support: Error Handling Best practices for handling errors with hooks: Next Steps See complete examples using these hooks. --- ## Global Accounts Introduction Source: https://docs.b3.fun/sdk/global-account/introduction What are B3 Global Accounts? B3 Global Accounts are a unified authentication system that provides users with a single identity across the entire B3 ecosystem. Users can authenticate once and access all B3 applications, games, and services seamlessly. Key Features Support for Google, Discord, and other social authentication providers. Secure session key authentication with customizable permissions. Works across web, mobile, and desktop applications. Simple React components and headless TypeScript services. Architecture The Global Accounts system consists of several key components: Authentication Flow 1. Social Login: Users authenticate with their preferred social provider 2. Account Creation: A B3 Global Account is created or linked 3. Session Keys: Optional session keys for enhanced security 4. Permissions: Granular permissions for different actions React Components - : Context provider for Global Accounts - : Complete authentication flow - : Permission management - : Display user assets Headless Services - Authentication service for custom implementations - Session management utilities - Permission validation helpers Quick Start Basic Authentication Check Authentication Status Environment Configuration Set up your environment variables: Next Steps Learn about different authentication strategies and implementation. Understand session keys and permission management. Explore available hooks for Global Accounts integration. See complete examples and integration patterns. --- ## Permissions & Session Keys Source: https://docs.b3.fun/sdk/global-account/permissions Overview Session keys and permissions provide a secure way to allow applications to perform actions on behalf of users without requiring constant authentication. This is particularly useful for games and applications that need to execute transactions automatically. Permission System Permission Types B3 Global Accounts support granular permissions that can be configured for different use cases: - Contract Interactions: Specify which smart contracts can be called - Token Limits: Set spending limits for native tokens and ERC-20 tokens - Time Restrictions: Define start and end dates for permissions - Transaction Limits: Control the maximum value per transaction Permission Structure Session Key Implementation Basic Permission Request Game-Specific Permissions For gaming applications, you might need broader permissions: Custom Permission UI For more control over the permission flow: Session Key Management Checking Permission Status Revoking Permissions Advanced Permission Patterns Dynamic Permission Updates Security Best Practices Only request the minimum permissions necessary for your application. Use shorter permission durations for enhanced security. Specify exact contract addresses rather than broad permissions. Regularly audit and rotate session keys. Error Handling Common permission-related errors and how to handle them: Next Steps Explore all available hooks for permission management. See complete permission implementation examples. --- ## B3 SDK Source: https://docs.b3.fun/sdk/introduction What is the B3 SDK? The B3 SDK () is a unified TypeScript SDK that provides everything you need to build applications on the B3 ecosystem. It combines powerful cross-chain payment infrastructure with seamless authentication, all wrapped in developer-friendly React components and headless services. Architecture The SDK is organized into focused modules designed for maximum flexibility and ease of use: Cross-chain execution engine for payments, swaps, and NFT minting across multiple blockchains. B3 Global Accounts authentication and user management with social login and session keys. Module Structure Each module contains organized, purpose-built components: - - React components and hooks for easy integration - - Headless TypeScript services for custom implementations - - Comprehensive TypeScript definitions - - Utility functions and helpers - - Configuration and constants Platform Support | Feature | React Web | React Native | Headless | | --------------- | --------- | ------------ | -------- | | AnySpend | ✅ | ❌ | ✅ | | Global Accounts | ✅ | ✅ | ✅ | | Shared Utils | ✅ | ✅ | ✅ | Installation CSS Styles Import the default styles for the best visual experience: Quick Start Cross-Chain Payments with AnySpend Authentication with Global Accounts NFT Minting Key Features Universal Payment Infrastructure Accept payments in any cryptocurrency with automatic conversion to your preferred token. Enable seamless token swaps across 20+ supported blockchains with optimal routing. One-click NFT minting buttons that accept payments in any token from any chain. Integrated fiat-to-crypto onramps for users without existing cryptocurrency. Seamless Authentication Google, Discord, and other social providers with instant onboarding. Secure session management with granular permissions for enhanced UX. Single identity that works across all B3 applications and games. Built-in smart account abstraction for gasless transactions. Headless TypeScript Services For developers who need maximum control, all functionality is available through headless services: AnySpend Services Global Account Services Support & Community Get help integrating the B3 SDK into your project. Join the B3 developer community for support and discussions. View source code, report issues, and contribute to the SDK. What's Next? 1. Install the SDK and import the styles 2. Set up AnySpend for cross-chain payments 3. Configure Global Accounts for user authentication 4. Explore examples and implementation patterns 5. 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! --- ## snippets/code-examples Source: https://docs.b3.fun/snippets/code-examples Code Examples Installation Basic Setup NFT Purchase Component Cross-Chain Swap Authentication Wallet Connection --- ## snippets/contact-info Source: https://docs.b3.fun/snippets/contact-info Need Help? 📚 B3 Documentation 💬 Join our Discord 🐛 Report Issues on GitHub 📧 Email us at support@b3.fun ); Community & Resources 🎮 Try It Live AnySpend Demo - Try our SDK in action 💬 Get Support Discord Community - Join the conversation 🔧 Contribute GitHub Repository - Contribute to the project 🌐 Ecosystem B3 Docs - Explore the broader ecosystem ); const email = type === "support" ? "support@b3.fun" : type === "partnerships" ? "partnerships@b3.fun" : type === "developer" ? "developers@b3.fun" : "support@b3.fun"; return ( 📧 {email} ); }; ; --- ## snippets/docs-config Source: https://docs.b3.fun/snippets/docs-config name: "B3 SDK", theme: "mint", colors: { primary: "#007AFF", light: "#4DA6FF", dark: "#0056CC", }, navbar: { links: [ { label: "Live Demo", href: "https://anyspend.com", }, { label: "B3 Mainnet", href: "https://docs.b3.fun", }, ], primary: { type: "button", label: "Get Started", href: "/quickstart", }, }, globalAnchors: [ { anchor: "B3 Ecosystem", href: "https://docs.b3.fun", icon: "globe", }, { anchor: "Discord", href: "https://discord.gg/b3dotfun", icon: "discord", }, { anchor: "GitHub", href: "https://github.com/b3-fun/b3", icon: "github", }, ], footer: { socials: { x: "https://x.com/b3labs", github: "https://github.com/b3-fun/b3", discord: "https://discord.gg/b3dotfun", }, }, }; ; --- ## Search Source: https://docs.b3.fun/api-reference/search --- ## Search Redirect Source: https://docs.b3.fun/api-reference/search-redirect --- ## Get Transactions Source: https://docs.b3.fun/api-reference/get-transactions --- ## Get Blocks Source: https://docs.b3.fun/api-reference/get-blocks --- ## Get Token Transfers Source: https://docs.b3.fun/api-reference/get-token-transfers --- ## Get Internal Transactions Source: https://docs.b3.fun/api-reference/get-internal-transactions --- ## Get Main Page Transactions Source: https://docs.b3.fun/api-reference/get-main-page-transactions --- ## Get Main Page Blocks Source: https://docs.b3.fun/api-reference/get-main-page-blocks --- ## Get Indexing Status Source: https://docs.b3.fun/api-reference/get-indexing-status --- ## Get Stats Counters Source: https://docs.b3.fun/api-reference/get-stats-counters --- ## Get Transactions Chart Source: https://docs.b3.fun/api-reference/get-transactions-chart --- ## Get Market Chart Source: https://docs.b3.fun/api-reference/get-market-chart --- ## Get Transaction Info Source: https://docs.b3.fun/api-reference/get-transaction-info --- ## Get Transaction Token Transfers Source: https://docs.b3.fun/api-reference/get-transaction-token-transfers --- ## Get Transaction Internal Transactions Source: https://docs.b3.fun/api-reference/get-transaction-internal-transactions --- ## Get Transaction Logs Source: https://docs.b3.fun/api-reference/get-transaction-logs --- ## Get Transaction Raw Trace Source: https://docs.b3.fun/api-reference/get-transaction-raw-trace --- ## Get Transaction State Changes Source: https://docs.b3.fun/api-reference/get-transaction-state-changes --- ## Get Human-Readable Transaction Summary Source: https://docs.b3.fun/api-reference/get-human-readable-transaction-summary --- ## Get Block Info Source: https://docs.b3.fun/api-reference/get-block-info --- ## Get Block Transactions Source: https://docs.b3.fun/api-reference/get-block-transactions --- ## Get Block Withdrawals Source: https://docs.b3.fun/api-reference/get-block-withdrawals --- ## Get Native Coin Holders List Source: https://docs.b3.fun/api-reference/get-native-coin-holders-list --- ## Get Address Info Source: https://docs.b3.fun/api-reference/get-address-info --- ## Get Address Counters Source: https://docs.b3.fun/api-reference/get-address-counters --- ## Get Address Transactions Source: https://docs.b3.fun/api-reference/get-address-transactions --- ## Get Address Token Transfers Source: https://docs.b3.fun/api-reference/get-address-token-transfers --- ## Get Address Internal Transactions Source: https://docs.b3.fun/api-reference/get-address-internal-transactions --- ## Get Address Logs Source: https://docs.b3.fun/api-reference/get-address-logs --- ## Get Blocks Validated by Address Source: https://docs.b3.fun/api-reference/get-blocks-validated-by-address --- ## Get All Tokens Balances for the Address Source: https://docs.b3.fun/api-reference/get-all-tokens-balances-for-the-address --- ## Token Balances with Filtering and Pagination Source: https://docs.b3.fun/api-reference/token-balances-with-filtering-and-pagination --- ## Get Address Coin Balance History Source: https://docs.b3.fun/api-reference/get-address-coin-balance-history --- ## Get Address Coin Balance History by Day Source: https://docs.b3.fun/api-reference/get-address-coin-balance-history-by-day --- ## Get Address Withdrawals Source: https://docs.b3.fun/api-reference/get-address-withdrawals --- ## Get List of NFT Owned by Address Source: https://docs.b3.fun/api-reference/get-list-of-nft-owned-by-address --- ## Get List of NFT Owned by Address, Grouped by Collection Source: https://docs.b3.fun/api-reference/get-list-of-nft-owned-by-address-grouped-by-collection --- ## Get Tokens List Source: https://docs.b3.fun/api-reference/get-tokens-list --- ## Get Token Info Source: https://docs.b3.fun/api-reference/get-token-info --- ## Get Token Token Transfers Source: https://docs.b3.fun/api-reference/get-token-token-transfers --- ## Get Token Holders Source: https://docs.b3.fun/api-reference/get-token-holders --- ## Get Token Holders Source: https://docs.b3.fun/api-reference/get-token-holders-2 --- ## Get NFT Instances Source: https://docs.b3.fun/api-reference/get-nft-instances --- ## Get NFT Instance by ID Source: https://docs.b3.fun/api-reference/get-nft-instance-by-id --- ## Get Transfers of NFT Instance Source: https://docs.b3.fun/api-reference/get-transfers-of-nft-instance --- ## Get Token Instance Holders Source: https://docs.b3.fun/api-reference/get-token-instance-holders --- ## Get Transfers Count of NFT Instance Source: https://docs.b3.fun/api-reference/get-transfers-count-of-nft-instance --- ## Re-fetch Token Instance Metadata Source: https://docs.b3.fun/api-reference/re-fetch-token-instance-metadata --- ## Get Verified Smart Contracts Source: https://docs.b3.fun/api-reference/get-verified-smart-contracts --- ## Get Verified Smart Contracts Counters Source: https://docs.b3.fun/api-reference/get-verified-smart-contracts-counters --- ## Get Smart Contract Source: https://docs.b3.fun/api-reference/get-smart-contract --- ## Get JSON RPC URL Source: https://docs.b3.fun/api-reference/get-json-rpc-url --- ## Get Withdrawals Source: https://docs.b3.fun/api-reference/get-withdrawals --- ## Get Account Abstraction Indexing Status Source: https://docs.b3.fun/api-reference/get-account-abstraction-indexing-status --- ## GET /blockscout/api/v1/celestia/blob Source: https://docs.b3.fun/api-reference/celestiaservice-getblob --- ## GET /blockscout/api/v1/celestia/l2BatchMetadata Source: https://docs.b3.fun/api-reference/celestiaservice-getl2batchmetadata --- ## If the requested service is unknown, the call will fail with status NOT_FOUND. Source: https://docs.b3.fun/api-reference/if-the-requested-service-is-unknown-the-call-will-fail-with-status-not-found --- ## Get events Source: https://docs.b3.fun/api-reference/get-events --- ## Get contract events Source: https://docs.b3.fun/api-reference/get-contract-events --- ## Get contract events with specific signature Source: https://docs.b3.fun/api-reference/get-contract-events-with-specific-signature --- ## Get transactions Source: https://docs.b3.fun/api-reference/get-transactions-2 --- ## Get contract transactions Source: https://docs.b3.fun/api-reference/get-contract-transactions --- ## Get contract transactions with specific signature Source: https://docs.b3.fun/api-reference/get-contract-transactions-with-specific-signature --- ## Get token owners by contract Source: https://docs.b3.fun/api-reference/get-token-owners-by-contract --- ## Get token transfers by transaction Source: https://docs.b3.fun/api-reference/get-token-transfers-by-transaction --- ## Get token transfers by contract Source: https://docs.b3.fun/api-reference/get-token-transfers-by-contract --- ## Get token transfers Source: https://docs.b3.fun/api-reference/get-token-transfers-2 --- ## Get ERC-20 balances by address Source: https://docs.b3.fun/api-reference/get-erc-20-balances-by-address --- ## Get tokens Source: https://docs.b3.fun/api-reference/get-tokens --- ## Get ERC-721 balances by address Source: https://docs.b3.fun/api-reference/get-erc-721-balances-by-address --- ## Get ERC-1155 balances by address Source: https://docs.b3.fun/api-reference/get-erc-1155-balances-by-address --- ## Get supported tokens for price data Source: https://docs.b3.fun/api-reference/get-supported-tokens-for-price-data --- ## Get token price Source: https://docs.b3.fun/api-reference/get-token-price --- ## Token lookup Source: https://docs.b3.fun/api-reference/token-lookup --- ## Resolve Source: https://docs.b3.fun/api-reference/resolve --- ## Get blocks Source: https://docs.b3.fun/api-reference/get-blocks-2 --- ## Get contract ABI​ Source: https://docs.b3.fun/api-reference/get-contract-abi --- ## Get contract metadata​ Source: https://docs.b3.fun/api-reference/get-contract-metadata --- ## Decode logs and transactions​ Source: https://docs.b3.fun/api-reference/decode-logs-and-transactions --- ## Get NFT balances by address Source: https://docs.b3.fun/api-reference/get-nft-balances-by-address --- ## Get collection Source: https://docs.b3.fun/api-reference/get-collection --- ## Get NFTs Source: https://docs.b3.fun/api-reference/get-nfts --- ## Get NFT owners by contract Source: https://docs.b3.fun/api-reference/get-nft-owners-by-contract --- ## Get NFT owners by token Source: https://docs.b3.fun/api-reference/get-nft-owners-by-token --- ## Get NFT transfers Source: https://docs.b3.fun/api-reference/get-nft-transfers --- ## Get NFT transfers by transaction Source: https://docs.b3.fun/api-reference/get-nft-transfers-by-transaction --- ## Get NFT transfers by contract Source: https://d
프로젝트로 돌아가기