Skip to main content

Staking Operations

Overview

Cardano's Proof of Stake system allows ADA holders to delegate their stake to stake pools and participate in the network consensus. The Rosetta API implementation supports all staking operations required to participate in this system.

Staking Operation Types

Each staking operation is sent in requests to the /construction/preprocess and /construction/payloads endpoints with specific operation types:

Operation TypeDescription
inputTransaction input
outputTransaction output
stakeKeyRegistrationRegister a stake key
stakeKeyDeregistrationDeregister a stake key
stakeDelegationDelegate stake to a pool
withdrawalWithdraw rewards
important

The order of operations is important since they are processed in a specific sequence:

  1. Inputs and outputs
  2. Operations requiring certificates (registrations, deregistrations, delegations)
  3. Withdrawals

Operation Examples

{
"operation_identifier": {
"index": 0,
"network_index": 0
},
"type": "input",
"status": "success",
"account": {
"address": "addr1vxa5pudxg77g3sdaddecmw8tvc6hmynywn49lltt4fmvn7cpnkcpx"
},
"amount": {
"value": "-9000000",
"currency": {
"symbol": "ADA",
"decimals": 6
}
},
"coin_change": {
"coin_identifier": {
"identifier": "2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f:1"
},
"coin_action": "coin_spent"
}
}

Required Metadata

Each staking operation requires specific metadata:

OperationRequired Metadata
Stake Key Registrationstaking_credential (hex bytes and curve type)
Stake Delegationstaking_credential and pool_key_hash
Stake Key Deregistrationstaking_credential (hex bytes and curve type)
Withdrawalstaking_credential and amount