Staked
Search…
Node Provisioning API
Dynamically provision nodes and receive staking transactions to sign.

What is the Node Provisioning API?

The Node Provisioning API allows partners to programmatically spin-up nodes for staking. Partners specify the number of nodes needed and receive a transaction to sign that stakes with those node/s.
Chain
Assets per Node
ETH2
32 ETH per Validator
Dash
1,000 DASH per Masternode
Horizen
500 ZEN per Supernode
Keep
100,000 KEEP per Node

ETH2

Provision validators with an API request and submit the deposits through a single ETH1 transaction.

Integration Environments

Staked supports integration testing on ETH2, as defined below.
Base URL
ETH2 Network
ETH1 Network
https://mainnet.staked.cloud/api
Mainnet
Mainnet
https://testnet.staked.cloud/api
Pyrmont
Goerli
post
https://mainnet.staked.cloud/api
/provisioning_requests/eth2
Post ETH2 Provisioning Request
ETH2 Testnet - Post Provisioning Request.postman_collection.json
1KB
Binary
Postman - Provisioning Request

ETH2 Attributes Object

Field
Description
Type
withdrawalKey
BLS Public Key
String
validators
Array of validator config objects
Array

Validator Config Object

Field
Description
Type
provider
Validator provider enum: "decentralized" or "amazon"
String
count
Number of validators to provision
Number
1
// example post request body
2
{
3
"attributes": {
4
"withdrawalKey": "YOUR ETH2 WITHDRAWAL KEY",
5
"validators": [
6
{
7
"provider": "decentralized",
8
"count": 5
9
}
10
]
11
}
12
}
Copied!

Provisioning Response Object

Field
Description
Type
id
Numbered identifier of provisioning request
String
uuid
Unique identifier of provisioning request
String
created
Provisioning request creation datetime
String
status
Provisioning request status - "CREATED"
String
chain
Chain identifier - "ETH2"
String
user_id
User identifier - returns null unless using oauth
String
partner_id
Partner identifier associated with api key
String
attributes
ETH2 attributes object
Object
get
https://mainnet.staked.cloud/api
/delegations/eth2
Get ETH2 Delegation Objects
ETH2 Testnet - Get Delegation Objects.postman_collection.json
1KB
Binary
Postman - Delegation Objects
Validators are provisioned asynchronously, meaning the GET request will fill-in over time as our infrastructure fulfills the associated provisioning request. Use the "total" field in the response object to track the number of validators provisioned at any given time.

Paginated Response Object

Field
Description
Type
results
Array of ETH2 delegation objects
Array
page
Page of fetched results
Number
pages
Total number of pages
Number
per_page
Number of results per page
Number
total
Number of results in total
Number

ETH2 Delegation Object

Field
Description
Type
id
Identifier of delegation object
Number
address
Validator public key
String
chain
Chain identifier - "ETH2"
String
attributes
ETH2 delegation attributes object
Object
amount
Amount currently delegated
String
created
Delegation object creation time
String
status
ETH2 delegation status enum
String
user_id
User identifier - returns null unless using oauth
String
partner_id
Partner identifier associated with api key
String
provisioning_request_uuid
Associated provisioning request unique identifier
String
provisioning_request_id
Associated provisioning request numbered identifier
String

ETH2 Delegation Attributes Object

Field
Description
Type
cloud
Validator cloud configuration
String
count
Total number of validators in associated provisioning request
Number
index
Index of validator in associated provisioning request
Number
depositInput
Validator deposit transaction data
String
validatorKey
Validator public key
String

ETH2 Delegation Status Enum

Value
Definition
Time Period
CREATED
Validator was provisioned through Staked API
n /a
DEPOSITED
Deposit is waiting to be seen by ETH2 chain
0-6 Hours
PENDING
Validator is in the queue waiting to go live
0-6 Days
ACTIVE
Validator is participating and earning rewards
n / a

Submit Deposits through the Batching Contract

The canonical ETH2 deposit contract, used to convert ETH1 to ETH2, only supports one deposit transaction at a time. Since 32 ETH is required for each validator, depositors with large amounts of ETH would have to broadcast many deposit transactions.
To simplify submitting deposits, we have created a batching contract which takes up to 185 deposits at once and submits each to the deposit contract. Integrators can therefore stake up to 5920 ETH in one Ethereum transaction, and leave behind the hassle of tracking many individually broadcasted transactions.

Batching Contract Deployments

ETH2 Network
ETH1 Network
Batching Contract Address
BatchDeposit.json
2KB
Binary
The batching contract contains an external payable function, batchDeposits, which loops over each validator's deposit and sends them to the deposit contract. The function arguments are passed as a 2-d array where the array at [i] represents the deposit arguments for validator i.
For release notifications of the ETH2 API and developer tools, click here.

Dash

Automate provisioning of Dash masternodes.

Integration Environments

Staked supports integration testing on Dash, as described below.
Base URL
Dash Network
https://mainnet.staked.cloud/api
Mainnet
https://testnet.staked.cloud/api
Testnet
Email [email protected] for testnet Dash, or request it in the Dash Discord. Staked will support 2 masternodes per partner account in a testnet environment.

Getting Started

Each masternode requires an unspent transaction output (UTXO) of exactly 1,000 DASH. The address that owns this UTXO is the collateral address.
Instructions below assume use of the dash command line tool or debug console in the GUI wallet. If using the debug console, please remove dash-cli from the beginning of each command.
Create a new address to hold your masternode collateral.
dash-cli getnewaddress <address-alias>
Example
dash-cli getnewaddress masternode_collateral_1
Next, send exactly 1,000 Dash to your collateral address.
dash-cli sendtoaddress <address> <amount>
Example
dash-cli sendtoaddress yTrtvsNuVgezcGmcVyv2n8D2dFeJEHCYhg 1000
Get the transaction id and output index of the transaction you just created (you may need to wait up to 2 minutes until your transaction is added to a block).
dash-cli masternode outputs
masternode outputs
1
schema
2
{
3
"tx id": "collateral index"
4
}
5
6
example
7
{
8
"3483e20a675d7585f0d3a07579f52551e59854ee6ad88af80492418c75a5d4a2": "1",
9
...
10
}
11
Copied!
A payout address is also needed and can be generated using the getnewaddress command. A single payout address can be shared across masternodes.
post
https://mainnet.staked.cloud/api
/delegations/DASH/delegator/:collateralAddress
Step 1: Post Masternode Provisioning Request
get
https://mainnet.staked.cloud/api
/delegations/DASH/delegator/:collateralAddress
Step 2: Poll Masternode Status

Step 3: Sign Delegation Message

This must be run on the wallet or device that holds collateral key, and can be done completely offline if required. signMessage is returned in the response of the previous step.
1
signmessage collateralAddress signMessage
Copied!
Example Output:
1
H3ub9BATtvuV+zDGdkUQNoUGpaYFr/O1FypmrSmH5WJ0KFRi8T10FSew0EJO/+Ij+OLv4r0rt+HS9pQFsZgc2dE=
Copied!
put
https://mainnet.staked.cloud/api
/delegations/DASH/delegator/:collateralAddress
Step 4: Send Us the Signed Delegation Message
The status of the delegation object is now WaitingToSubmit. When the Masternode is synched, the signedTx will be submitted and the status will be Ready.
Boom! You've programmatically set up a Masternode. Check out the Reporting API to monitor your position.
Last modified 6mo ago