Skip to main content

Authentication Hooks

useB3

The primary hook for accessing Global Account authentication state and actions.

Return Values

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.

useModal

Control B3 modals programmatically.

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

Examples

See complete examples using these hooks.