Getting Started
The EigenLayer restaking flow consists of the following steps:
- Create EigenPod address: construct a serialized transaction to generate an EigenPod address for your validator to use as a withdrawal address.
- Create Staking Request: set up nodes for staking using P2P infrastructure.
- Check Request Status: check the status of the node set-up operation.
- Prepare Staking Transaction: construct a serialized transaction to deposit the stake amount with a smart contract.
- Create Activate Restake Request: set up a request to fetch the Beacon chain proofs and validate them on-chain.
- Get Activate Restake Transaction: construct a serialized transaction to verify the validator withdrawal credentials on-chain.
- Prepare Delegate Restake Transaction: construct a serialized transaction to delegate the restake amount to the EigenLayer node operator.
Get an authentication token to start using Restaking API.
Request examples are provided using cURL.
1. Create EigenPod Address
-
Retrieve a serialized transaction to generate an EigenPod address by sending a POST request to /api/v1/eth/staking/direct/eigenlayer/tx/create-pod. Use https://api-test-holesky.p2p.org for testing or https://api.p2p.org for production.
Example request:
curl --request POST \ --url https://api.p2p.org/api/v1/eth/staking/direct/eigenlayer/tx/create-pod \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>'
Example response:
{ "result": { "serializeTx": "0x02f902d705808301674e8508530af16e830186a094681a1b3441c6bfb12f91651efd9f02c83c0702938901bc16d674ec800000b902a44f498c730000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030aa5f27070a21d79455c4a9b73c0aa4a8b1a65a1fb530d7fd8e6cd23aa16660679ac43ee4861098f6d9166aed3a4d8abb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002001000000000000000000000028c84612d37de9209018ad96167f12169b653e9a000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000060978c565cd915f4e885b4201093d1501697610eb9ee99b9b60b70434dc330e98d5b42927725304ded48483a8b8f39506d09bcb22ee18d4f6b50257946ac5ee360385308d95c0e2bc963902d42e985c29ee489aa3c989ac1561c952a6424f107a800000000000000000000000000000000000000000000000000000000000000014cb452f6e3f10ba2175c86a0284f53fcb61404b458393391abc3d5622e3e55cdc0", "to": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "gasLimit": "0.0000000000001", "data": "0x84d81062", "value": "0.0", "chainId": "5", "type": "2", "maxFeePerGas": "0.0000000000000014", "maxPriorityFeePerGas": "1366" }, "error": {} }
serializeTx
— serialized unsigned transaction.to
— recipient address for this transaction.gasLimit
— maximum gas limit for this block.data
— transaction data.value
— amount this transaction is sending in Wei.chainId
— chain ID this transaction is authorized on, as specified by EIP-155.type
— EIP-2718 type of this transaction envelope.maxFeePerGas
— maximum price per unit of gas this transaction will pay for the combined EIP-1559 block's base fee and this transaction's priority fee in Wei.maxPriorityFeePerGas
— price per unit of gas in Wei, which is added to the EIP-1559 block's base fee. This added fee is used to incentivize miners to prioritize this transaction.
-
Use
serializeTx
from the previous step to sign and send the signed transaction to the Ethereum network.By broadcasting this transaction, you are generating an EigenPod address. The Ethereum address used to sign this transaction will be the
eigenPodOwnerAddress
.
2. Create Staking Request
Let's now start the node request creation.
-
Prepare
id
that is an arbitrary UUID. Generate it in one of the following ways: -
Set up staking nodes through the P2P infrastructure by sending a POST request to /api/v1/eth/staking/direct/nodes-request/create.
Example request:
curl --request POST \ --url https://api.p2p.org/api/v1/eth/staking/direct/nodes-request/create \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' \ --header 'content-type: application/json' \ --data ' { "id":"6df58880-c4c9-484a-8fc4-7f7668fe9522", "type": "RESTAKING", "validatorsCount": 1, "feeRecipientAddress":"0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17", "eigenPodOwnerAddress": "0x27AABeE07E0dbC8b0de20f42b1a1980871314Ef5", "controllerAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17" "nodesOptions":{ "location": "any", "relaysSet": "" } } '
id
— arbitrary UUID. You can later use that UUID to check the status of the set-up operation.type
— staking operation type:RESTAKING
— select this value to initiate a restaking operation.REGULAR
— default value that is used for native staking transactions.
validatorsCount
— number of validators. One validator is equal to 32 ETH.feeRecipientAddress
— fee recipient address.eigenPodOwnerAddress
— owner of the EigenPod address. You can retrieve this value in the EigenPod creation step.controllerAddress
— controller address for the validators.nodesOptions
:-
location
— node location. Currently, onlyany
is supported.relaysSet
— Miner Extractable Value (MEV) relay selection.
Example response:
{ "result": true }
3. Check Request Status
Check the node set-up operation status by sending a GET request to /api/v1/eth/staking/direct/nodes-request/status/{id}.
Example request:
curl --request GET \
--url https://api.p2p.org/api/v1/eth/staking/direct/nodes-request/status/6df58880-c4c9-484a-8fc4-7f7668fe9522 \
--header 'accept: application/json' \
--header 'authorization: Bearer <token>'
id
— UUID that was specified in the node set-up request.
Example response:
{
"result": {
"id": "6df58880-c4c9-484a-8fc4-7f7668fe9522",
"status": "ready",
"type": "RESTAKING",
"validatorsCount": 1,
"withdrawalAddress": null,
"eigenPodAddress": "0x1433F808a4867aDEeEb3AE0Df58691C252269A2C",
"eigenPodOwnerAddress": "0x27AABeE07E0dbC8b0de20f42b1a1980871314Ef5",
"controllerAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17",
"feeRecipientAddress": "0x53da3c92fCCEb0CFE1764f65DDfF1564A2b15585",
"depositData": [
{
"pubkey": "0xaed7226d86d884dd44bc45c2b57f7634e72abf247713163388b1c34d89a1322d7228ca023dbaf2465b822e35ba00da13",
"signature": "0x91b710f0e3affe704e76ada81b095afbedf4b760f3160760e8fa0298cc4858e0f325c2652dc698ec63c59db65562551114ab7fcafe1d675eaaf186fa7758800f0157bd0b51cd3a131fac562d6933658ddbf182aab8d20a9483b1392085e54cf5",
"depositDataRoot": "0xd0d00dce54b4ec8a7803783fc786a859459ead1d35b856c525cb289aba4b0f89",
"withdrawalCredentials": "0100000000000000000000001433f808a4867adeeeb3ae0df58691c252269a2c",
"amount": "32000000000",
"depositMessageRoot": "04f641c39de982aee68cc7c78bd23bcafffed91fd1c455282b651e0c8d6c4e20",
"forkVersion": "00001020",
"eth2NetworkName": "goerli",
"depositCliVersion": "2.3.0"
}
],
"createdAt": "2024-01-30T15:40:55.453Z"
}
}
-
id
— UUID that was specified in the node set-up request. -
status
— current status of the nodes request:init
— node request is created.processing
— node request is in progress.ready
— backend has the deposit data for the node request.cancel
— something went wrong and the deposit data was not created.
-
validatorsCount
— number of validators. One validator is equal to 32 ETH. -
withdrawalAddress
— withdrawal address for the validators that is set tonull
by default. This corresponds to the EigenPod address. -
eigenPodAddress
— EigenPod address. This address is also used as the validator withdrawal address. -
eigenPodOwnerAddress
— owner of the EigenPod address. -
controllerAddress
— controller address for the validators. -
feeRecipientAddress
— fee recipient address. -
depositData
:pubkey
— validator public key.signature
— validator signature.depositDataRoot
— SHA-256 hash of the SSZ-encoded DepositData object. Used as a protection against malformed input.withdrawalCredentials
— withdrawal address credentials, passed in the expected format by the Ethereum deposit smart contract.amount
— amount of ETH, denominated in Gwei, that is being deposited.depositMessageRoot
— cryptographic hash of the Merkle tree’s root, ensuring the integrity and authenticity of the deposit data.forkVersion
— version of the network fork that the deposit is intended for. It helps in aligning the deposit with a specific version of the protocol.eth2NetworkName
— name of the Ethereum 2.0 network where the deposit is made.depositCliVersion
— version of the deposit command-line interface (CLI) tool that was used to generate the deposit data.
-
createdAt
— timestamp of the transaction in the ISO 8601 format.
4. Prepare Staking Transaction
There are two ways to prepare a staking transaction using the Restaking API:
- Interact directly with the Ethereum Deposit Smart Contract.
- Utilize the P2P smart contract.
Ethereum Deposit Smart Contract
This option can be preferable for clients, who have a lot of engineering resources available and don't want their infrastructure to have an extra dependency. In this case:
- Retrieve all the required data from the previous step within the
depositData
object and prepare the staking transaction yourselves. - Construct a signature and send the deposit amount to the Ethereum deposit smart contract. Check an example of how to sign and send a transaction to the Ethereum network.
P2P Smart Contract
-
Create a serialized transaction for depositing the stake amount and send it as a POST request to /api/v1/eth/staking/direct/tx/deposit.
Example request:
curl --request POST \ --url https://api.p2p.org/api/v1/eth/staking/direct/tx/deposit \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' \ --header 'content-type: application/json' \ --data ' { "withdrawalAddress": "0x1433F808a4867aDEeEb3AE0Df58691C252269A2C", "depositData": [ { "pubkey": "0xaed7226d86d884dd44bc45c2b57f7634e72abf247713163388b1c34d89a1322d7228ca023dbaf2465b822e35ba00da13", "signature": "0x91b710f0e3affe704e76ada81b095afbedf4b760f3160760e8fa0298cc4858e0f325c2652dc698ec63c59db65562551114ab7fcafe1d675eaaf186fa7758800f0157bd0b51cd3a131fac562d6933658ddbf182aab8d20a9483b1392085e54cf5", "depositDataRoot": "0xd0d00dce54b4ec8a7803783fc786a859459ead1d35b856c525cb289aba4b0f89" } ] } '
-
withdrawalAddress
— withdrawal address for the validators. For theRESTAKING
operation type, this corresponds to theeigenPodAddress
in the step 3 Check Request Status. -
depositData
:pubkey
— validator public key.signature
— validator signature.depositDataRoot
— hash of the deposit data.
Example response:
{ "error": null, "result": { "serializeTx": "0x02f902d305808205508205c8830186a094681a1b3441c6bfb12f91651efd9f02c83c0702938901bc16d674ec800000b902a44f498c730000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030aed7226d86d884dd44bc45c2b57f7634e72abf247713163388b1c34d89a1322d7228ca023dbaf2465b822e35ba00da13000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200100000000000000000000001433f808a4867adeeeb3ae0df58691c252269a2c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006091b710f0e3affe704e76ada81b095afbedf4b760f3160760e8fa0298cc4858e0f325c2652dc698ec63c59db65562551114ab7fcafe1d675eaaf186fa7758800f0157bd0b51cd3a131fac562d6933658ddbf182aab8d20a9483b1392085e54cf50000000000000000000000000000000000000000000000000000000000000001d0d00dce54b4ec8a7803783fc786a859459ead1d35b856c525cb289aba4b0f89c0", "to": "0x681a1b3441c6BFb12f91651EFD9F02c83c070293", "gasLimit": "0.0000000000001", "data": "0x4f498c730000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030aed7226d86d884dd44bc45c2b57f7634e72abf247713163388b1c34d89a1322d7228ca023dbaf2465b822e35ba00da13000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200100000000000000000000001433f808a4867adeeeb3ae0df58691c252269a2c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006091b710f0e3affe704e76ada81b095afbedf4b760f3160760e8fa0298cc4858e0f325c2652dc698ec63c59db65562551114ab7fcafe1d675eaaf186fa7758800f0157bd0b51cd3a131fac562d6933658ddbf182aab8d20a9483b1392085e54cf50000000000000000000000000000000000000000000000000000000000000001d0d00dce54b4ec8a7803783fc786a859459ead1d35b856c525cb289aba4b0f89", "value": "32.0", "chainId": 5, "type": 2, "maxFeePerGas": "0.00000000000000148", "maxPriorityFeePerGas": "1360" } }
serializeTx
— serialized unsigned transaction.to
— recipient address for this transaction.gasLimit
— maximum gas limit for this block.data
— transaction data.value
— amount this transaction is sending in Wei.chainId
— chain ID this transaction is authorized on, as specified by EIP-155.type
— EIP-2718 type of this transaction envelope.maxFeePerGas
— maximum price per unit of gas this transaction will pay for the combined EIP-1559 block's base fee and this transaction's priority fee in Wei.maxPriorityFeePerGas
— price per unit of gas in Wei, which is added to the EIP-1559 block's base fee. This added fee is used to incentivize miners to prioritize this transaction.
-
-
Use
serializeTx
from the previous step to sign and send the signed transaction to the Ethereum network.By broadcasting this transaction, you are depositing the required stake amount in the Ethereum deposit smart contract by using the P2P smart contract as a proxy.
5. Create Activate Restake Request
Once the validator is active and performing the validator duties, the next step is to activate the restake amount. This step entails fetching the Beacon chain proofs and validating them on-chain.
-
To check that a validator is active, retrieve its status by sending a POST request to /api/v1/eth/staking/direct/validator/status.
Example request:
curl --request POST \ --url https://api.p2p.org/api/v1/eth/staking/direct/validator/status \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' \ --header 'content-type: application/json' \ --data ' { "pubkeys": [ "0xaed7226d86d884dd44bc45c2b57f7634e72abf247713163388b1c34d89a1322d7228ca023dbaf2465b822e35ba00da13" ] } '
pubkeys
— validator public keys.
Example response:
{ "result": { "list": [ { "status": "active_ongoing", "amount": "1", "pubkey": "0xaed7226d86d884dd44bc45c2b57f7634e72abf247713163388b1c34d89a1322d7228ca023dbaf2465b822e35ba00da13", "withdrawalAddress": "0x39D02C253dA1d9F85ddbEB3B6Dc30bc1EcBbFA17" } ] }, "error": {} }
status
— state of the validator:not_found
— specified validator could not be located.pending_initialized
— validator is initialized but not yet in the queue for activation.pending_queued
— validator entered a queue for activation.active_ongoing
— validator was activated and currently participates in attesting and proposing blocks.active_exiting
— validator is in process of exiting the network while participating in the validator activities.active_slashed
— validator was slashed due to misbehaviors.exited_unslashed
— validator has exited the network without being slashed and is no longer acting as a validator.exited_slashed
— validator has exited the network after being slashed and is no longer acting as a validator.withdrawal_possible
— validator has a non-zero balance.withdrawal_done
— validator completed the withdrawal process.
amount
— total stake amount for the validator at the moment.pubkey
— validator public key.withdrawalAddress
— withdrawal address of the validator. For theRESTAKING
operation type, this corresponds to theeigenPodAddress
in the step 3 Check Request Status.
Note
Make sure that the validator status is set to
active_ongoing
before proceeding.
-
Initiate verifying the withdrawal credentials by sending a POST request to /api/v1/eth/staking/direct/eigenlayer/tx/verify-withdrawal-credentials-request.
Example request:
curl --request POST \ --url https://api.p2p.org/api/v1/eth/staking/direct/eigenlayer/tx/verify-withdrawal-credentials-request \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' \ --header 'content-type: application/json' \ --data ' { "id":"6df58880-c4c9-484a-8fc4-7f7668fe9522", "eigenPodOwnerAddress": "0x27AABeE07E0dbC8b0de20f42b1a1980871314Ef5", "pubkeys": [ "0xffC08FcD7cFeF5c70fB2b0e1f2A8EaA690AaE2bDFfa5dBEc4dEef31DcC0B19eB1f9Cebe3E2fe9eefBD9a1BDF6FD89b39" ] } '
id
— arbitrary UUID that was specified in the node set-up request.eigenPodOwnerAddress
— owner of the EigenPod address.pubkeys
— validator public key.
Example response:
{ "error": null, "result": true }
6. Get Activate Restake Transaction
-
Retrieve a serialized transaction for verifying the withdrawal credentials by sending a GET request to /api/v1/eth/staking/direct/eigenlayer/tx/verify-withdrawal-credentials-status/{id}.
Example request:
curl --request GET \ --url https://api.p2p.org/api/v1/eth/staking/direct/eigenlayer/tx/verify-withdrawal-credentials-request/6df58880-c4c9-484a-8fc4-7f7668fe9522 \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>'
id
— UUID that was specified in the node set-up request.
Example response:
{ "error": null, "result": { "id": "6df58880-c4c9-484a-8fc4-7f7668fe9522", "status": "ready", "message": "", "list": [ { "serializeTx": "0x02f909508242688084030825768474f1a9c08398968094cfc239bf63bfd7612a89c7698d153a948585901a80b909243f65cf1900000000000000000000000000000000000000000000000000000000666fdd4000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000007c07e2850f00f9d0604e7bd6f51d4987b264fd10cdabee5ea6f34277890ac5be32600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000060bcb326da31157074ad71344b79226d19fb94637927446afdbab40263b103bfb87b327b747acf8b63b8ab0f434715a2782594cab804669156af708996bc7b55ea70a2de09668a35580651f17ed9834cbc8c7ac886d064ab261a632519e76a05df000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000001a67e30000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000005c0ae8699735d6c16b0cbc88e3c69f089c075df058b5bdd252e54f0b406b2cac0ec71b34293af65d7bf1f1898346d1b4b833550f2d8704c076f0fc2d90004e765f3fbf1361377a341bf9979914d7f788e879aeb85742402d6a6cf7c7e8988ddd2718be80c1aa5377733a147936e7141f5cbfc6b74af7e2f70f249cd915398847f45eca115b7525090b0e99195f47579f41e109fe3b6874e01664f51f62bb7c534ed40cf30257eeffb869c4fe59221f8ccd42226838088e33e645f7f9e6ce598d62740d288cfb29ddcbb06894819e0d1978a08309fd0f4d276a3c204b1196061fdfc35058974c30350e5307c65ed41a1b314cab6445bca43506bc188c8b318c908f4a9656f52ffc613887b1f746e700e51f48cdfee7e1d6df32d407c92dfff950b72de96c2c2b2387ff734d3623fc6f5edbd19979059bc364c0424eae9d7baed550a2edf839844dcf503f9e428c2f5bfcb658e46b83fa936e30f2e81dd02eb56863b6cf04127db05441cd833107a52be852868890e4317e6a02ab47683aa75964220b7d05f875f140027ef5118a2247bbb84ce8f2f0f1123623085daf7960c329f5ffb40ed610513493b2e2a3430ff01948bc3c6614d188ab1f97d36914d319684dd571a72053b291b7d072295fa91fc353cb1b54883f9935841c8c5c8349014f44bd49a7502ffcfb0340b1d7885688500ca308161a7f96b62df9d083b71fcc8f2bb8fe6b1689256c0d385f42f5bbe2027a22c1996e110ba97c171d3e5948de92bebf185f868caac676051a2da1818497180f12961b1ec240c592eb0167d4477566095eec8b2e541cad4e91de38385f2e046619f54496c2382cb6cacd5b98c26f5a4e1f3bb3d83e18477590391e2a94b12780d71b34c33beed1a5ce9c2a6a08a538e42304013d789d14330c242ba61032c11f92307b0612a4f41d1aba3dfdc8165958a8d7fe3af8caa085a7639a832001457dfb9128a8061142ad0335629ff23ff9cfeb3c337d7a51a6fbf00b9e34c52e1c9195c969bd4e7a0bfd51d5c5bed9c1167e71f0aa83cc32edfbefa9f4d3e0174ca85182eec9f3a09f6a6c0df6377a510d731206fa80a50bb6abe29085058f16212212a60eec8f049fecb92d8c8e0a84bc021352bfecbeddde993839f614c3dac0a3ee37543f9b412b16199dc158e23b544619e312724bb6d7c3153ed9de791d764a366b389af13c58bf8a8d90481a467657cdd2986268250628d0c10e385c58c6191e6fbe05191bcc04f133f2cea72c1c4848930bd7ba8cac54661072113fb278869e07bb8587f91392933374d017bcbe18869ff2c22b28cc10510d9853292803328be4fb0e80495e8bb8d271f5b889636b5fe28e79f1b850f8658246ce9b6a1e7b49fc06db7143e8fe0b4f2b0c5523a5c985e929f70af28d0bdd1a90a808f977f597c7c778c489e98d3bd8910d31ac0f7c6f67e02e6e4e1bdefb994c6098953f34636ba2b6ca20a4721d2b26a886722ff1c9a7e5ff1cf48b4ad1582d3f4e4a1004f3b20d8c5a2b71387a4254ad933ebc52f075ae229646b6f6aed19a5e372cf295081401eb893ff599b3f9acc0c0d3e7d328921deb59612076801e8cd61592107b5c67c79b846595cc6320c395b46362cbfb909fdb236ad2411b4e4883810a074b840464689986c3f8a8091827e17c32755d8fb3687ba3ba49f342c77f5a1f89bec83d811446e1a467139213d640b6a74f7210d4f8e7e1039790e7bf4efa207555a10a6db1dd4b95da313aaa88b88fe76ad21b516cbc645ffe34ab5de1c8aef8cd4e7f8d2b51e8e1456adc7563cda206ff3671a0000000000000000000000000000000000000000000000000000000000cf7404000000000000000000000000000000000000000000000000000000000069d5e1dafcf4765b02ff2a8f4a815370649a930b69758802715742a27f411304e55bfb2851b92789d942f242f541beffdca1d38e3302d454726900cb85af54ae69979fed7d360c1e7ac965350489f81ed9ac2c36321b27a7d9f845604d649328371a251e42cbca54d05bda12328d2c34d20dce20703a6efdeb96ff7277854d84000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000008cc0837062c30cb00ff54f64195d769165431fb281802d37057d12dfae5916c6e010000000000000000000000cfc239bf63bfd7612a89c7698d153a948585901a00405973070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4e6000000000000000000000000000000000000000000000000000000000000eae6000000000000000000000000000000000000000000000000000000000000ffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff000000000000000000000000000000000000000000000000c0", "to": "0xCfc239bf63bfD7612a89C7698d153a948585901a", "gasLimit": "0.00000000001", "data": "0x3f65cf1900000000000000000000000000000000000000000000000000000000666fdd4000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000007c07e2850f00f9d0604e7bd6f51d4987b264fd10cdabee5ea6f34277890ac5be32600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000060bcb326da31157074ad71344b79226d19fb94637927446afdbab40263b103bfb87b327b747acf8b63b8ab0f434715a2782594cab804669156af708996bc7b55ea70a2de09668a35580651f17ed9834cbc8c7ac886d064ab261a632519e76a05df000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000001a67e30000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000005c0ae8699735d6c16b0cbc88e3c69f089c075df058b5bdd252e54f0b406b2cac0ec71b34293af65d7bf1f1898346d1b4b833550f2d8704c076f0fc2d90004e765f3fbf1361377a341bf9979914d7f788e879aeb85742402d6a6cf7c7e8988ddd2718be80c1aa5377733a147936e7141f5cbfc6b74af7e2f70f249cd915398847f45eca115b7525090b0e99195f47579f41e109fe3b6874e01664f51f62bb7c534ed40cf30257eeffb869c4fe59221f8ccd42226838088e33e645f7f9e6ce598d62740d288cfb29ddcbb06894819e0d1978a08309fd0f4d276a3c204b1196061fdfc35058974c30350e5307c65ed41a1b314cab6445bca43506bc188c8b318c908f4a9656f52ffc613887b1f746e700e51f48cdfee7e1d6df32d407c92dfff950b72de96c2c2b2387ff734d3623fc6f5edbd19979059bc364c0424eae9d7baed550a2edf839844dcf503f9e428c2f5bfcb658e46b83fa936e30f2e81dd02eb56863b6cf04127db05441cd833107a52be852868890e4317e6a02ab47683aa75964220b7d05f875f140027ef5118a2247bbb84ce8f2f0f1123623085daf7960c329f5ffb40ed610513493b2e2a3430ff01948bc3c6614d188ab1f97d36914d319684dd571a72053b291b7d072295fa91fc353cb1b54883f9935841c8c5c8349014f44bd49a7502ffcfb0340b1d7885688500ca308161a7f96b62df9d083b71fcc8f2bb8fe6b1689256c0d385f42f5bbe2027a22c1996e110ba97c171d3e5948de92bebf185f868caac676051a2da1818497180f12961b1ec240c592eb0167d4477566095eec8b2e541cad4e91de38385f2e046619f54496c2382cb6cacd5b98c26f5a4e1f3bb3d83e18477590391e2a94b12780d71b34c33beed1a5ce9c2a6a08a538e42304013d789d14330c242ba61032c11f92307b0612a4f41d1aba3dfdc8165958a8d7fe3af8caa085a7639a832001457dfb9128a8061142ad0335629ff23ff9cfeb3c337d7a51a6fbf00b9e34c52e1c9195c969bd4e7a0bfd51d5c5bed9c1167e71f0aa83cc32edfbefa9f4d3e0174ca85182eec9f3a09f6a6c0df6377a510d731206fa80a50bb6abe29085058f16212212a60eec8f049fecb92d8c8e0a84bc021352bfecbeddde993839f614c3dac0a3ee37543f9b412b16199dc158e23b544619e312724bb6d7c3153ed9de791d764a366b389af13c58bf8a8d90481a467657cdd2986268250628d0c10e385c58c6191e6fbe05191bcc04f133f2cea72c1c4848930bd7ba8cac54661072113fb278869e07bb8587f91392933374d017bcbe18869ff2c22b28cc10510d9853292803328be4fb0e80495e8bb8d271f5b889636b5fe28e79f1b850f8658246ce9b6a1e7b49fc06db7143e8fe0b4f2b0c5523a5c985e929f70af28d0bdd1a90a808f977f597c7c778c489e98d3bd8910d31ac0f7c6f67e02e6e4e1bdefb994c6098953f34636ba2b6ca20a4721d2b26a886722ff1c9a7e5ff1cf48b4ad1582d3f4e4a1004f3b20d8c5a2b71387a4254ad933ebc52f075ae229646b6f6aed19a5e372cf295081401eb893ff599b3f9acc0c0d3e7d328921deb59612076801e8cd61592107b5c67c79b846595cc6320c395b46362cbfb909fdb236ad2411b4e4883810a074b840464689986c3f8a8091827e17c32755d8fb3687ba3ba49f342c77f5a1f89bec83d811446e1a467139213d640b6a74f7210d4f8e7e1039790e7bf4efa207555a10a6db1dd4b95da313aaa88b88fe76ad21b516cbc645ffe34ab5de1c8aef8cd4e7f8d2b51e8e1456adc7563cda206ff3671a0000000000000000000000000000000000000000000000000000000000cf7404000000000000000000000000000000000000000000000000000000000069d5e1dafcf4765b02ff2a8f4a815370649a930b69758802715742a27f411304e55bfb2851b92789d942f242f541beffdca1d38e3302d454726900cb85af54ae69979fed7d360c1e7ac965350489f81ed9ac2c36321b27a7d9f845604d649328371a251e42cbca54d05bda12328d2c34d20dce20703a6efdeb96ff7277854d84000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000008cc0837062c30cb00ff54f64195d769165431fb281802d37057d12dfae5916c6e010000000000000000000000cfc239bf63bfd7612a89c7698d153a948585901a00405973070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4e6000000000000000000000000000000000000000000000000000000000000eae6000000000000000000000000000000000000000000000000000000000000ffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff000000000000000000000000000000000000000000000000", "value": "0.0", "chainId": 17000, "type": 2, "maxFeePerGas": "0.000000001961994688", "maxPriorityFeePerGas": "50865526" } ] } }
id
— UUID that was specified in the node set-up request.status
— current status of the activate restake request:processing
— request is in progress.ready
— request is ready.cancel
— request was canceled due to an error or timeout.
message
— additional comment on the Beacon chain node status.list
:serializeTx
— serialized unsigned transaction.to
— recipient address for this transaction.gasLimit
— maximum gas limit for this block.data
— transaction data.value
— amount this transaction is sending in Wei.chainId
— chain ID this transaction is authorized on, as specified by EIP-155.type
— EIP-2718 type of this transaction envelope.maxFeePerGas
— maximum price per unit of gas this transaction will pay for the combined EIP-1559 block's base fee and this transaction's priority fee in Wei.maxPriorityFeePerGas
— price per unit of gas in Wei, which is added to the EIP-1559 block's base fee. This added fee is used to incentivize miners to prioritize this transaction.
-
Use
serializeTx
from the previous step to sign and send the signed transaction to the Ethereum network.By broadcasting this transaction, you are verifying the validator withdrawal credentials on-chain. You can now delegate your restake amount to an EigenLayer node operator.
7. Prepare Delegate Restake Transaction
- Create a serialized transaction for delegating the restake amount to P2P.org node operator by sending a POST request to /api/v1/eth/staking/direct/eigenlayer/tx/delegate-to.
Note
The EigenLayer node operator address for P2P.org is
0xdbed88d83176316fc46797b43adee927dc2ff2f5
.
Example request:
curl --request POST \
--url https://api.p2p.org/api/v1/eth/staking/direct/eigenlayer/ \
--header 'accept: application/json' \
--header 'authorization: Bearer <token>' \
--header 'content-type: application/json' \
--data '
{
"operatorAddress": "0xdbed88d83176316fc46797b43adee927dc2ff2f5"
}
'
-
operatorAddress
— address of the EigenLayer node operator to delegate the restaked assets.Example response:
{
"error": null,
"result": {
"serializeTx": "0x02f8ef8242688084030825768486442318830186a094a44151489861fe9e3055d95adc98fbd462b948e780b8c4eea9064b00000000000000000000000037d5077434723d0ec21d894a52567cbe6fb2c3d800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0",
"to": "0xA44151489861Fe9e3055d95adC98FbD462B948e7",
"gasLimit": "0.0000000000001",
"data": "0xeea9064b00000000000000000000000037d5077434723d0ec21d894a52567cbe6fb2c3d800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"value": "0.0",
"chainId": 1,
"type": 2,
"maxFeePerGas": "0.000000002252612376",
"maxPriorityFeePerGas": "50865526"
}
}
serializeTx
— serialized unsigned transaction.to
— recipient address for this transaction.gasLimit
— maximum gas limit for this block.data
— transaction data.value
— amount this transaction is sending in Wei.chainId
— chain ID this transaction is authorized on, as specified by EIP-155.type
— EIP-2718 type of this transaction envelope.maxFeePerGas
— maximum price per unit of gas this transaction will pay for the combined EIP-1559 block's base fee and this transaction's priority fee in Wei.maxPriorityFeePerGas
— price per unit of gas in Wei, which is added to the EIP-1559 block's base fee. This added fee is used to incentivize miners to prioritize this transaction.
-
Use
serializeTx
from the previous step to sign and send the signed transaction to the Ethereum network.By broadcasting this transaction, you are delegating your restake to a node operator.
What's Next?
- Withdrawal.
- Restaking API reference.
Updated 6 months ago