> ## 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.

# Intents

> Understanding how intents drive state transitions in Grid

Grid uses an intent-based architecture for operations that originate from the smart account, such as payments and policy changes. This design ensures security and control over all outgoing operations. Operations that don't originate from the smart account, like KYC verification, virtual account creation, and onramping, follow a simpler direct process.

## How Intents Work

An intent represents a desired state change that originates from the smart account. Each intent follows a consistent lifecycle:

1. **Creation**: The intent is created with the desired state change
2. **Authorization**: Required authorities must approve the intent
3. **Confirmation**: The intent is confirmed with necessary signatures
4. **Execution**: The state change is executed on the blockchain

```mermaid theme={null}
stateDiagram-v2
    [*] --> Created
    Created --> Authorized: Authorities approve
    Authorized --> Confirmed: On-chain execution
    Confirmed --> [*]

    Created --> Failed: Invalid intent
    Authorized --> Failed: Authorization timeout
    Confirmed --> Failed: Invalid signatures
```

## Operations That Require Intents

Intents are required for operations that originate from the smart account:

### Payment Intents

* Outgoing transfers to external accounts
* Recurring payments initiated by the smart account
* Direct debits authorized by the smart account

### Policy Intents

* Updating authority permissions
* Modifying threshold requirements
* Changing time locks

## Direct Operations

The following operations don't require intents as they don't originate from the smart account:

### Account Setup

* Smart account creation
* KYC verification
* Virtual account creation

### Incoming Operations

* Onramping funds
* Incoming transfers
* Direct debit collections

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

    Note over Client,Grid: Direct Operations (No Intents)
    Client->>Grid: POST /smart-accounts
    Note over Client,Grid: Create smart account
    Grid->>Ledger (Solana): Deploy smart account
    Grid-->>Client: Return smart account address

    Client->>Grid: POST /kyc
    Note over Client,Grid: KYC verification
    Grid-->>Client: Return KYC status

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

    Note over Client,Grid: Intent-based Operations
    Client->>Grid: POST /payment-intents
    Note over Client,Grid: Create payment intent
    Grid-->>Client: Return intent details
```

## Intent Authorization

Each intent requires authorization from the appropriate authorities based on the smart account's policies. The authorization process ensures that:

1. Only authorized parties can initiate state changes
2. Multiple authorities can be required for sensitive operations
3. Time locks can be enforced for additional security
4. All operations are auditable and traceable

For detailed information about the authorization process, see the [Authorization Guide](/grid/v0/core-concepts/authorization).
