Node Provisioning APIs
Provisioning APIs for Ethereum nodes creation and staking delegation
What are the Node Provisioning APIs?
Provision Request API: The client calls this API to initiate a request which creates the transaction objects that the client needs to sign.
Get Validator Objects API: The client calls this API to retrieve the transaction objects used to stake with the Beacon deposit contract.
The client invokes this API to fetch deposit data, which can subsequently be utilized for staking with the Beacon deposit contract.
Get Validator and Provision API:
The client calls this API to receive the validator objects which were created along with their respective provision IDs.
The client invokes this API to get the number of validators by their validator status.
In essence, the Node Provisioning APIs allow clients to spin up new Ethereum nodes via REST APIs. These APIs can be used to generate and receive the transaction objects which must be signed using the Beacon deposit contract. A detailed account of the APIs involved is provided in the following section.
API Reference
Supported Environments
Luganodes supports the following environments on ETH, as defined below
Holesky Testnet | |
Ethereum Mainnet |
Provisioning Request
POST
/api/provision
Submits a provision request to our secure node systems to generate the required files based on the withdrawal address and the number of validators sent in the request.
The response will contain a UUID which can be used to track the provision request.
Headers
Name | Type | Description |
---|---|---|
api-key* | String | API Key provided by Luganodes |
Request Body
Name | Type | Description |
---|---|---|
attributes* | Object |
A maximum of 100 validators can be requested in a single provision request. To provision more nodes, a new provision request must be sent.
Sample Request
Types
Attributes Object
Property | Description | Type |
---|---|---|
withdrawalAddress | Ethereum wallet address which will be used to create withdrawal credentials for the validator | String |
controllerAddress | Address that can be used to sign the exit message. This field is optional | String |
feeRecipient | Fee Recipient address of the validator that receive EL rewards. This field is optional | String |
validatorsCount | Number of validators required | Number |
batch |
| Boolean |
Provision Response Object
Property | Description | Type |
---|---|---|
provisionId | Unique identifier of provisioning request | String |
withdrawalAddress | Withdrawal address specified by user | String |
status | status = "CREATED" will be sent as an acknowledgement | String |
created | Timestamp of the creation of the provision request | String |
validatorsCount | Number of validators | Number |
controllerAddress | Address that can be used to sign the exit message | String |
feeRecipient | Fee Recipient address of the validator that receive EL rewards | String |
If user is unable to sign exit transactions with their withdrawal address, we have added provisions to give signing privileges to controller address
Get Validator Objects
GET
/api/validators
Retrieve the transaction objects that require signing by sending the UUID received in the Provisioning Request API.
Query Parameters
Name | Type | Description |
---|---|---|
provisionId* | String | provisioning_request_uuid:YOUR UUID |
page | Number | page number to be fetched |
per_page | Number | Number of results per page |
Headers
Name | Type | Description |
---|---|---|
api-key* | String | API Key provided by Luganodes |
Validators are provisioned asynchronously, and the automation script processes provision requests, generating the required files. Therefore, an empty array response is received until the script execution is completed.
Sample Request
Types
Paginated Response Object
Field | Description | Type |
---|---|---|
batch | Batch Deposit | Boolean |
depositInput | Data for executing the unsigned deposit transaction on the Beacon Deposit contract. Returns | String |
withdrawalAddress | Withdrawal address as specified by user | String |
withdrawal_credentials | Withdrawal credential is derived from the withdrawal address that's used for deposit to beacon deposit contract | String |
validatorsCount | Number of validators created | Number |
clientId | Partner identifier associated with the API key | String |
provisionId | Unique identifier of provisioning request | String |
provisionStatus | String | |
result | Array of validator objects | Array |
page | Page number of fetched results | Number |
per_page | Number of results per page | Number |
pages | Total number of pages | Number |
total | Number of results in total | Number |
Validator Result Object
Field | Description | Type |
---|---|---|
amount | amount of ETH to be deposited | Number |
validatorIndex | Index of validator on Ethereum chain | Number |
status | String | |
validatorAddress | Validator public key | String |
created | Delegation object creation time | String |
depositInput | Unsigned deposit object for executing the transaction on the Beacon deposit contract. This field is applicable for non-batch contract staking. | String |
Validator Status Enum
Field | Description |
---|---|
CREATED | Validator was provisioned through Luganodes API |
DEPOSITED | The deposit is waiting to be seen by the ETH chain |
PENDING | Validator is in the queue waiting to go live |
ACTIVE | Validator is participating and earning rewards |
EXIT_REQUESTED | Exit has been requested by the client to the validator node |
EXIT_SENT | Exit transaction for the validator is issued to the beacon chain |
EXITED | Validator has exited from the network |
UNKNOWN | Error while fetching the status of validator |
Provision Status Enum
Field | Description |
---|---|
IN_PROGRESS | Provision request is in progress |
CREATED | Provision request successfully created |
FAILED | Provision request failed |
Get Deposit Details
GET
/api/deposit-details
Retrieve the deposit data details that are required to staking in the Ethereum staking contract by sending the UUID received in the Provisioning Request API.
Query Parameters
Name | Type | Description |
---|---|---|
provisionId* | String | provisioning_request_uuid:YOUR UUID |
page | Number | page number to be fetched |
per_page | Number | Number of results per page |
Headers
Name | Type | Description |
---|---|---|
api-key* | String | API Key provided by Luganodes |
The validator index will be set to null
until the validator gets activated on the Ethereum network.
Sample Request
Types
Paginated Response Object
Field | Description | Type |
---|---|---|
batch | Batch Deposit. | Boolean |
withdrawal_credentials | Withdrawal credential is derived from the withdrawal address that's used for deposit to beacon deposit contract | String |
controllerAddress | Address that can be used to sign the exit message | String |
feeRecipient | fee Recipient address of the validator that receive EL rewards | String |
validatorsCount | Number of validators created | Number |
clientId | Partner identifier associated with the API key | String |
provisionId | Unique identifier of provisioning request | String |
result | Array of deposit details objects | Array |
page | Page number of fetched results | Number |
per_page | Number of results per page | Number |
pages | Total number of pages | Number |
total | Number of results in total | Number |
Deposit Details Object
Field | Description | Type |
---|---|---|
validatorIndex | Index of validator in associated provisioning request | Number |
validatorAddress | Validator public key | String |
amount | 32 ETH | Number |
created | Delegation object creation time | String |
status | String | |
signature | Validator signature | String |
deposit_data_root | Hash of the deposit data | String |
deposit_message_root | Hash of the Merkle tree’s root | String |
fork_version | The version of Ethereum fork | String |
Get Validator and Provision IDs
GET
/api/users
Fetch the provision IDs of validators associated with a client API key.
Query Parameters
Name | Type | Description |
---|---|---|
withdrawalAddress | String | withdrawal address as specified by user |
page | Number | page number to be fetched |
per_page | Number | Number of results per page |
Headers
Name | Type | Description |
---|---|---|
api-key* | String | API key provided by Luganodes |
Sample Request
Types
Paginated Response Object
Field | Description | Type |
---|---|---|
clientID | Partner identifier associated with api key | String |
result | Array of Validator Objects | Array |
page | Page of fetched results | Number |
per_page | Number of results per page | Number |
pages | Total number of pages | Number |
total | Number of results in total | Number |
Validator Result Object
Field | Description | Type |
---|---|---|
validatorAddress | Validator Public Key | String |
withdrawalAddress | Withdrawal address as specified by user | String |
controllerAddress | Address that can be used to sign the exit message | String |
feeRecipient | fee Recipient address of the validator that receive EL rewards | String |
provisionId | Unique identifier of provisioning request | String |
created-at | Timestamp of the creation of the provision request | String |
status | String | |
validatorIndex | Index of Validator on Ethereum chain. "0" if not deposited on chain. | Number |
Get Validator Count
GET
/api/validators/count
Returns the number of validators by their status.
Query Parameters
Name | Type | Description |
---|---|---|
withdrawalAddress | String | withdrawal address as specified by user |
page | Number | page number to be fetched |
per_page | Number | Number of results per page |
Headers
Name | Type | Description |
---|---|---|
api-key* | String | API key provided by Luganodes |
Response
Sample Request
Types
Result Object
Field | Description | Type |
---|---|---|
total | Total number of validators provisioned | Number |
by_status | Array of validator count by status | Array |
Status Object
Field | Description | Type |
---|---|---|
pending_initialized | First deposit is processed, but not enough funds are available to get validator into activation queue | Number |
pending_queued | Validator is waiting to get activated, has enough funds while in the queue | Number |
active_ongoing | Validator is currently active and has not initiated any exit | Number |
active_slashed | Validator is still active but has a slashed status and is scheduled to exit | Number |
exited_unslashed | Validator has reached exit epoch, currently not attesting and not slashed | Number |
exited_slashed | Validator has reached exit epoch and was slashed | Number |
withdrawal_possible | After validator has exited, the staked balance can be withdrawn | Number |
withdrawal_done | Withdrawal has been processed | Number |
Last updated