Skip to main content

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

Minimal Permissions

Only request the minimum permissions necessary for your application.

Short Duration

Use shorter permission durations for enhanced security.

Specific Targets

Specify exact contract addresses rather than broad permissions.

Regular Audits

Regularly audit and rotate session keys.

Error Handling

Common permission-related errors and how to handle them:

Next Steps

React Hooks

Explore all available hooks for permission management.

Examples

See complete permission implementation examples.