Web3 API Reference
Provider Object
interface MacroProvider {
// Standard EIP-1193 Properties
isConnected(): boolean;
chainId: string;
selectedAddress: string | null;
// Standard EIP-1193 Methods
request(args: RequestArguments): Promise<unknown>;
on(eventName: string, listener: (arg: any) => void): Provider;
removeListener(eventName: string, listener: (arg: any) => void): Provider;
// Macro Browser Specific
isMacro: boolean; // Always true, identifies Macro Browser
isPrivate: boolean; // Indicates if browser is in private mode (always true)
securityLevel: 'standard' | 'enhanced'; // Current security settings
}
interface RequestArguments {
method: string;
params?: unknown[] | object;
}Supported JSON-RPC Methods
Basic Methods
Method
Parameters
Return Type
Description
Signing Methods
Method
Parameters
Return Type
Description
Chain Management
Method
Parameters
Return Type
Description
Macro-Specific Methods
Method
Parameters
Return Type
Description
Provider Events
Transaction Objects
Chain Objects
Security Considerations
Transaction Analysis
Permissions
Error Handling
Usage Examples
Connecting to a dApp
Contract Interaction
Transaction with Confirmation
Compatibility Notes
Browser Differences
Feature Detection
Last updated