> ## Documentation Index
> Fetch the complete documentation index at: https://developers.squads.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Accounts

> Understanding and managing different types of accounts in Grid

# Account Types

Grid provides three types of accounts that work together to enable comprehensive stablecoin operations. Each type serves a specific purpose in the overall architecture:

## Smart Account

The foundation of programmable stablecoin operations. Smart accounts are blockchain-based accounts that enable:

* Native stablecoin transactions
* Programmable payment flows
* On-chain authority management
* Direct blockchain interactions

## Virtual Account

A traditional banking account that bridges traditional and stablecoin operations. Virtual accounts:

* Receive funds from traditional payment rails (ACH, SEPA, etc.)
* Automatically convert incoming traditional currency to stablecoins
* Enable withdrawals to traditional banking systems
* Provide banking infrastructure for stablecoin operations

## Stablecoin Account

The complete package that combines all components for comprehensive stablecoin management:

* Smart account for blockchain operations
* Virtual accounts for traditional finance rails
* Authority management for access control
* Payment processing across all rails

```mermaid theme={null}
flowchart TD
    StablecoinAccount["Stablecoin Account"] --> SmartAccount["Smart Account"]
    StablecoinAccount --> VirtualAccount["Virtual Account"]
    StablecoinAccount --> AuthorityMgmt["Authority Management"]
    StablecoinAccount --> PaymentProcessing["Payment Processing"]

    SmartAccount -->|Blockchain Operations| Stablecoins["Stablecoins"]
    VirtualAccount -->|Traditional Rails| TraditionalCurrency["Traditional Currency"]
    AuthorityMgmt -->|Access Control| Permissions["Permissions"]
    PaymentProcessing -->|Multi-rail| Payments["Payments"]
```

# Smart Accounts

Smart accounts are the foundation of Grid's architecture. They are programmable accounts that can hold funds and execute transactions based on predefined policies.

## Creating a Smart Account

Smart account creation is a direct operation that establishes the initial state and authorities for the account.

```mermaid theme={null}
sequenceDiagram
    participant Client
    participant Grid
    participant Ledger (Solana)

    Client->>Grid: POST /smart-accounts
    Note over Client,Grid: Create smart account with policies
    Grid->>Ledger (Solana): Deploy smart account
    Grid-->>Client: Return smart account address
```

### Account Policies

When creating a smart account, you define its policies. For a comprehensive guide on policies, see [Policies](/grid/v0/core-concepts/policies).

* **Authorities**: List of signers with their permissions
* **Threshold**: Number of required signatures
* **Time Lock**: Optional delay for sensitive operations

```json theme={null}
{
  "policies": {
    "authorities": [
      {
        "address": "0x...",
        "permissions": ["CAN_INITIATE", "CAN_VOTE", "CAN_EXECUTE"]
      }
    ],
    "threshold": 2,
    "time_lock": 3600
  }
}
```

## Virtual Accounts

Virtual accounts provide a way to receive funds from traditional banking systems. They are automatically linked to your smart account.

```mermaid theme={null}
sequenceDiagram
    participant Client
    participant Grid
    participant Bank

    Client->>Grid: POST /virtual-accounts
    Note over Client,Grid: Request virtual account
    Grid-->>Client: Return account details

    Bank->>Grid: Send funds
    Note over Bank,Grid: Funds received
    Grid-->>Client: Update balance
```

### Supported Currencies and Rails

Grid supports a comprehensive set of currencies and payment rails. For detailed information about supported currencies and payment rails, see [Supported Currencies and Rails](/grid/v0/modules/core/supported-currencies).

## Account Management

Once created, you can manage your smart account through various operations:

### Viewing Account Details

```bash theme={null}
GET /smart-accounts/{address}
```

### Checking Balances

```bash theme={null}
GET /smart-accounts/{address}/balances
```

### Managing Authorities

* Add new authorities
* Remove existing authorities
* Update authority permissions

## API Reference

For detailed API specifications, see:

* [Create Smart Account](/grid/v0/api-reference/endpoint/core/create-account)
* [Get Smart Account](/grid/v0/api-reference/endpoint/core/get-account)
* [Request Virtual Account](/grid/v0/api-reference/endpoint/core/request-virtual-account)
* [Get Virtual Accounts](/grid/v0/api-reference/endpoint/core/get-virtual-accounts)
