# wallet_getCapabilities

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://api.g.alchemy.com/v2/{apiKey}

This method is used to request capabilities from a wallet

Reference: https://www.alchemy.com/docs/wallets/api-reference/smart-wallets/wallet-api-endpoints/wallet-get-capabilities

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| params[0] | [string] or [string, string[]] | Yes |  |

## Result

**getCapabilitiesResponse** (object)

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "wallet_getCapabilities",
  "params": [
    "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    [
      "0x2105",
      "0x14A34"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "0": {
      "atomic": {
        "status": "supported"
      },
      "paymasterService": {
        "supported": true
      },
      "eip7702Auth": {
        "supported": true
      }
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://api.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "wallet_getCapabilities",
  "params": [
    null
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({jsonrpc: '2.0', id: 1, method: 'wallet_getCapabilities', params: [null]})
};

fetch('https://api.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "wallet_getCapabilities",
    "params": [None]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"wallet_getCapabilities\",\n  \"params\": [\n    null\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://api.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"wallet_getCapabilities\",\n  \"params\": [\n    null\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://api.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"wallet_getCapabilities\",\n  \"params\": [\n    null\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: wallet_getCapabilities
description: This method is used to request capabilities from a wallet
params:
  - name: params[0]
    required: true
    schema:
      anyOf:
        - type: array
          additionalItems: false
          items:
            - type: string
              pattern: ^0x.*$
              errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
              title: Wallet Address
          minItems: 1
        - type: array
          additionalItems: false
          items:
            - type: string
              pattern: ^0x.*$
              errorMessage: Must be a valid Ethereum address starting with '0x' (e.g., '0xa363219d7C0b8673df17529D469Db9eFF0f35D2A')
              title: Wallet Address
            - type: array
              title: Chain IDs
              items:
                type: string
                pattern: ^0x.*$
                errorMessage: Must be a valid hex string starting with '0x'
          minItems: 2
      errorMessage: Parameters must be either [walletAddress] or [walletAddress, chainIds]. Wallet address must be a valid hex address (e.g., '0xd46e8dd67c5d32be8058bb8eb970870f07244567'). Chain IDs must be an array of hex chain IDs (e.g., ['0x2105', '0x14A34'])
result:
  name: getCapabilitiesResponse
  schema:
    type: object
    description: Mapping from chain ID (hex) to capabilities
    additionalProperties:
      type: object
examples:
  - name: wallet_getCapabilities example
    params:
      - name: param0
        value: '0xd46e8dd67c5d32be8058bb8eb970870f07244567'
      - name: param1
        value:
          - '0x2105'
          - '0x14A34'
    result:
      name: Response
      value:
        '0':
          atomic:
            status: supported
          paymasterService:
            supported: true
          eip7702Auth:
            supported: true
```
