Skip to main content
This guide will walk you through creating and configuring your first Smart Account using TypeScript.

Prerequisites

  1. API Key: Get your API key
  2. Network: Choose between mainnet or devnet for testing
  3. Dependencies: Install required packages:

Step 1: Create a Smart Account

First, let’s set up our client and create a basic 2-of-3 Smart Account:

Using Idempotency

To prevent duplicate accounts during retries:

Step 2: Add Policies

Adding a Time Lock

Add a 24-hour time lock for additional security:

Setting Up Admin Control

Optionally, designate an admin address for settings management:

Configuring Spending Limits

Set up a daily USDC spending limit to allow controlled token spending:

Step 3: Verify Configuration

Check your Smart Account settings:

Next Steps

  1. Explore Advanced Features
  2. Security Best Practices
  3. Integration Tips
    • Use idempotency for reliability
    • Handle time lock delays
    • Monitor spending limits with GET endpoints
    • Implement proper error handling
For detailed API documentation, check out: