Skip to main content
This guide covers the common actions and operations that are supported by both MetaMask and Coinbase Wallet. These actions form the foundation of wallet testing with OnchainTestKit.

Base Actions

All wallets support these fundamental actions through the BaseActionType enum:

Wallet Import and Setup

Import from Seed Phrase

Import from Private Key

Network Operations

Switch Network

dApp Connection

Connect to dApp

Transaction Handling

Approve Transaction

Reject Transaction

Complete Transaction Flow

Signature Handling

Sign Message

Sign Typed Data

Token Approvals

Change Spending Cap

Remove Spending Cap

Notification Detection

Both wallets support detecting the type of notification currently displayed:

Approval Types

All approval actions support these types:

Complete Example

Here’s a complete example that demonstrates multiple common actions:

Best Practices

Always check for wallet fixture existence before using it in tests
Never use production wallets or seed phrases in tests
Use identifyNotificationType() when handling complex flows with multiple approval steps

Next Steps