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

# Session Key Management (Beta)

> Create scoped session keys in AIR Kit with air_grantPermissions and air_executeAction — let users approve once then sign transactions without re-prompts (beta).

Session keys allow your application to execute transactions on behalf of users without requiring approval for each action. This is useful for gaming, automated strategies, or any flow where per-transaction signing creates friction.

**air\_listSessionKeyScopes**

```tsx theme={null}
const scopes = await provider.request({
  method: "air_listSessionKeyScopes",
  params: [chainId] // optional chain ID
});
// Returns: ActionPolicyInfo[]
```

**air\_grantPermissions**

```tsx theme={null}
const result = await provider.request({
  method: "air_grantPermissions",
  params: [policies] // ActionPolicyInfo[]
});
// Returns: { compressedSessionData: string, sessionOwnerPrivateKey: string, permissionIds: Hex[] }
```

**air\_revokePermission**

```tsx theme={null}
const txHash = await provider.request({
  method: "air_revokePermission",
  params: [permissionId] // Hex
});
// Returns: string (transaction hash)
```

**air\_executeAction**

```tsx theme={null}
const txHash = await provider.request({
  method: 'air_executeAction',
  params: [{
    compressedSessionData: string,
    sessionOwnerPrivateKey: string,
    call: {
      data?: Hex,
      to: Address,
      value?: bigint
    }
  }]
});
// Returns: string (transaction hash)
```
