# EigenLayer

### Supported Chains

Available on **Ethereum mainnet and testnet**

### Available Endpoints:

*Click on the endpoint to jump to the section with full details*

* [<mark style="color:blue;">**/getstake**</mark>](#getstake) <mark style="color:blue;">`GET`</mark> -Get the stake amount for a particular address.
* <mark style="color:blue;">**/**</mark>[<mark style="color:blue;">**restake**</mark>](#restake) <mark style="color:green;">`POST`</mark> - Initiate a transaction to restake on EigenLayer protocol.
* [<mark style="color:blue;">**/requestwithdrawal**</mark> ](#requestwithdrawal)<mark style="color:green;">`POST`</mark> - Initiate a withdrawal request on EigenLayer.
* [<mark style="color:blue;">**/claim**</mark>](#claim) <mark style="color:green;">`POST`</mark> - Initiate a transaction to claim restaked token after a withdrawal request.
* [**/**](#mint)[<mark style="color:blue;">**delegate**</mark>](#delegate) <mark style="color:green;">`POST`</mark> - Initiate a transaction to delegate the staked assets on EigenLayer.
* [**/**](#burn)[<mark style="color:blue;">**undelegate**</mark>](#undelegate) <mark style="color:green;">`POST`</mark> - Initiate a transaction to undelegate the staked assets on the EigenLayer.

*Also see* [<mark style="color:blue;">Error Handling Details</mark>](#error-handling-details)

## Liquid Staking IDs

Many endpoints have a parameter where you can provide a Liquid Staking ID.&#x20;

Below is a list of Liquid Staking IDs related to the EigenLayer. Please see the [Liquid Staking ID page](https://docs.expand.network/ids/liquid-staking-ids) for a complete Liquid Staking ID list and more information.

<table><thead><tr><th width="275">Liquid Staking Name</th><th>Chain</th><th>Liquid Staking ID</th></tr></thead><tbody><tr><td>EigenLayer</td><td>Ethereum</td><td>3</td></tr><tr><td>EigenLayer</td><td>Ethereum Holesky Testnet </td><td>17000</td></tr></tbody></table>

## Endpoint Details

### /getstake

#### Get the stake amount for a particular address.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/liquidstaking/getstake`

#### Query Parameters

<table><thead><tr><th width="190">Name</th><th width="167">Type</th><th>Description</th></tr></thead><tbody><tr><td>rpc</td><td>String</td><td>Remote procedural call URL.</td></tr><tr><td>liquidStakingId</td><td>String</td><td>Refer to the <a href="../../ids/liquid-staking-ids">Liquid Staking Id</a> page for details.</td></tr><tr><td>address<mark style="color:red;">*</mark></td><td>String</td><td>Public address of the user.</td></tr></tbody></table>

{% tabs %}
{% tab title="Sample Request" %}

```
https://api.expand.network/liquidstaking/getstake?address=0x7358cE33f7C3361A66d644A95603983adF16D722&liquidStakingId=3
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "bEIGEN": "110000000000000000"
    }
}
```

{% endtab %}
{% endtabs %}

[<mark style="color:blue;">back to top</mark>](#endpoints-available)

### /restake

#### Initiate a transaction to restake on EigenLayer.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/liquidstaking/restake`

#### Request Body

<table><thead><tr><th width="214">Name</th><th width="141">Type</th><th>Description</th></tr></thead><tbody><tr><td>rpc</td><td>String</td><td>Remote procedural call URL.</td></tr><tr><td>liquidStakingId</td><td>String</td><td>Refer to the <a href="../../ids/liquid-staking-ids">Liquid Staking Id</a> page for details.</td></tr><tr><td>from<mark style="color:red;">*</mark></td><td>String</td><td>Public address of the owner of this request.</td></tr><tr><td>token<mark style="color:red;">*</mark></td><td>String</td><td>Staked token name for restake.</td></tr><tr><td>gas</td><td>String</td><td>Maximum gas limit provided by the sender, for the transaction.</td></tr><tr><td>gasPriority</td><td>String</td><td>low, medium, or high.</td></tr></tbody></table>

{% tabs %}
{% tab title="Sample Request" %}

```json
{
   "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
   "amount": "100000000000000",
   "liquidStakingId": "3",
   "gas": "8000000",
   "gasPriority": "high",
   "token":"sTETH"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
        "to": "0x858646372CC42E1A627fcE94aa7A7033e7CF075A",
        "data": "0xe7a050aa00000000000000000000000093c4b944d05dfe6df7645a86cd2206016c51564d000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe8400000000000000000000000000000000000000000000000000005af3107a4000",
        "value": "0",
        "gas": "171219",
        "gasPrice": "2",
        "estimationCheck": true,
        "referenceId": "6ced624eb4bf46438063062d4a4df12d"
    }
}
```

{% endtab %}
{% endtabs %}

[<mark style="color:blue;">back to top</mark>](#endpoints-available)

### /delegate

#### Initiate a transaction to delegate the staked assets on EigenLayer.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/liquidstaking/delegate`

#### Request Body

<table><thead><tr><th width="193">Name</th><th width="139">Type</th><th>Description</th></tr></thead><tbody><tr><td>rpc</td><td>String</td><td>Remote procedural call URL.</td></tr><tr><td>liquidStakingId</td><td>String</td><td>Refer to the <a href="../../ids/liquid-staking-ids">Liquid Staking Id</a> page for details.</td></tr><tr><td>from<mark style="color:red;">*</mark></td><td>String</td><td>Public address of the owner of this request.</td></tr><tr><td>delegateTo<mark style="color:red;">*</mark></td><td>String</td><td>The operator contract address to which the user wants to delegate</td></tr><tr><td>gas</td><td>String</td><td>Maximum gas limit provided by the sender, for the transaction.</td></tr><tr><td>gasPriority</td><td>String</td><td>low, medium, or high.</td></tr></tbody></table>

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "delegateTo": "0xdbed88d83176316fc46797b43adee927dc2ff2f5",
    "liquidStakingId": "3",
    "gas": "80000",
    "gasPriority": "low"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
        "to": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A",
        "data": "0xeea9064b000000000000000000000000dbed88d83176316fc46797b43adee927dc2ff2f500000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "gas": "80000",
        "value": "0",
        "gasPrice": "1",
        "estimationCheck": true,
        "referenceId": "f95b5b2d47124927ba87c452202d9bbf"
    }
}
```

{% endtab %}
{% endtabs %}

[<mark style="color:blue;">back to top</mark>](#endpoints-available)

### /undelegate

#### Initiate a transaction to undelegate the staked assets on the Eigen Layer.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/liquidstaking/undelegate`

#### Request Body

<table><thead><tr><th width="192">Name</th><th width="136">Type</th><th>Description</th></tr></thead><tbody><tr><td>rpc</td><td>String</td><td>Remote procedural call URL.</td></tr><tr><td>liquidStakingId</td><td>String</td><td>Refer to the <a href="../../ids/liquid-staking-ids">Liquid Staking Id</a> page for details.</td></tr><tr><td>from<mark style="color:red;">*</mark></td><td>String</td><td>Public address of the owner of this request.</td></tr><tr><td>gas</td><td>String</td><td>Maximum gas limit provided by the sender, for the transaction.</td></tr><tr><td>gasPriority</td><td>String</td><td>low, medium, or high.</td></tr></tbody></table>

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "liquidStakingId": "3",
    "gas": "80000"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
        "to": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A",
        "data": "0xda8be864000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b402",
        "gas": "131514",
        "value": "0",
        "estimationCheck": true,
        "referenceId": "e05489bdfda945f096746d4634c7a283"
    }
}
```

{% endtab %}
{% endtabs %}

[<mark style="color:blue;">back to top</mark>](#endpoints-available)

### /requestwithdrawal

#### Initiate a transaction to request a withdrawal on EigenLayer.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/liquidstaking/requestwithdrawal`

#### Request Body

<table><thead><tr><th width="182">Name</th><th width="143">Type</th><th>Description</th></tr></thead><tbody><tr><td>rpc</td><td>String</td><td>Remote procedural call URL.</td></tr><tr><td>liquidStakingId</td><td>String</td><td>Refer to the <a href="../../ids/liquid-staking-ids">Liquid Staking Id</a> page for details.</td></tr><tr><td>from<mark style="color:red;">*</mark></td><td>String</td><td>Public address of the owner of this request.</td></tr><tr><td>amount<mark style="color:red;">*</mark></td><td>String</td><td>Amount of tokens to request withdrawal.</td></tr><tr><td>token<mark style="color:red;">*</mark></td><td>String</td><td>Staked token name.</td></tr><tr><td>gas</td><td>String</td><td>Maximum gas limit provided by the sender, for the transaction.</td></tr><tr><td>gasPriority</td><td>String</td><td>low, medium, or high.</td></tr></tbody></table>

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "liquidStakingId": "3",
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "amount": "15630524642139",
    "gas": "800000",
    "gasPriority": "high",
    "token": "sTETH"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
        "to": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A",
        "data": "0x0dd8dd02000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b402000000000000000000000000000000000000000000000000000000000000000100000000000000000000000093c4b944d05dfe6df7645a86cd2206016c51564d000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000e3743de735b",
        "gas": "97185",
        "value": "0",
        "gasPrice": "2",
        "estimationCheck": true,
        "referenceId": "f77d6f7160f84040a5766e908cc76510"
    }
}
```

{% endtab %}
{% endtabs %}

[<mark style="color:blue;">back to top</mark>](#endpoints-available)

### /claim

#### Initiate a transaction to claim the rewards.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/liquidstaking/claim`

#### Request Body

<table><thead><tr><th width="184">Name</th><th width="108">Type</th><th>Description</th></tr></thead><tbody><tr><td>rpc</td><td>String</td><td>Remote procedural call URL.</td></tr><tr><td>liquidStakingId</td><td>String</td><td>Refer to the <a href="../../ids/liquid-staking-ids">Liquid Staking Id</a> page for details.</td></tr><tr><td>from<mark style="color:red;">*</mark></td><td>String</td><td>Public address of the owner of this request.</td></tr><tr><td>amount<mark style="color:red;">*</mark></td><td>String</td><td>Amount of tokens to claim.</td></tr><tr><td>token<mark style="color:red;">*</mark></td><td>String</td><td>Staked token name.</td></tr><tr><td>gas</td><td>String</td><td>Maximum gas limit provided by the sender, for the transaction.</td></tr><tr><td>gasPriority</td><td>String</td><td>low, medium, or high.</td></tr></tbody></table>

{% tabs %}
{% tab title="Sample Request" %}

```json
{
   "liquidStakingId": "3",
   "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
   "amount": "1236",
   "token": "sTETH",
   "gas": "800000",
   "gasPriority": "high"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
        "to": "0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A",
        "data": "0x334043960000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b402000000000000000000000000dbed88d83176316fc46797b43adee927dc2ff2f5000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b4020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000100000000000000000000000093c4b944d05dfe6df7645a86cd2206016c51564d000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000004d4000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe840000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001",
        "gas": "800000",
        "value": "0",
        "gasPrice": "2",
        "estimationCheck": true,
        "referenceId": "2b178c56016b4446bd9e77329bcc3eaf"
    }
}
```

{% endtab %}
{% endtabs %}

[<mark style="color:blue;">back to top</mark>](#endpoints-available)

### Error Handling Details

<table><thead><tr><th width="253">Error</th><th>Description</th></tr></thead><tbody><tr><td>400 (Bad Request)</td><td>Indicates the request is invalid or missing the required parameters. The msg field will contain details about the error.</td></tr><tr><td>401 (Unauthorised)</td><td>Indicates the request lacks valid authentication credentials (API key). Ensure that you provide a valid API key in the request headers.</td></tr><tr><td>404 (Not Found)</td><td>Indicates that the specified endpoint or resource does not exist.</td></tr><tr><td>500 (Server Error)</td><td>Indicates an internal server error.</td></tr></tbody></table>

[<mark style="color:blue;">back to top</mark>](#endpoints-available)
