TokenLock (via the DAG L1 API) before creating a delegated stake.
All endpoints return the following response headers:
- X-Id — The node’s public key identifier
- X-Session-Token — The current cluster session token
- Request-Signature — Cryptographic signature of the response for verification
Prerequisites: Before creating a delegated stake, you must:
- Create a
TokenLockvia the DAG L1/token-locksendpoint withunlockEpoch: null(indefinite lock) - Note the returned hash — this becomes the
tokenLockRefin your delegated stake request
POST /delegated-stakes
Creates a new delegated stake or updates an existing one.- Create: Provide a
tokenLockRefpointing to aTokenLockwith anullunlockEpochvalue. - Update (re-delegate): Provide the same
tokenLockRefas the original stake with a newnodeId. The lock and all accrued rewards are transferred to the new node without waiting for the unlock period.
SignedCreateDelegatedStake
The delegated stake creation payload
Array of cryptographic signature proofs from the source address owner
200 OK
Hash of the accepted delegated stake create transaction
400 Bad Request
Array of error cause objects
503 Service Unavailable
Node is not in Ready state.
PUT /delegated-stakes
Withdraws an existing delegated stake. After withdrawal, the locked tokens and all available rewards are released after the unlock period has elapsed.SignedWithdrawDelegatedStake
Same envelope structure as POST /delegated-stakes but with a WithdrawDelegatedStake value payload containing source, tokenLockRef, and parent.
Response 200 OK
Hash of the accepted delegated stake withdrawal transaction
400 Bad Request
Invalid withdrawal request. Returns an ErrorResponse with rejection reasons.
Response 503 Service Unavailable
Node is not in Ready state.
GET /delegated-stakes//info
Returns all delegated stake positions (active and pending withdrawal) for a given address.DAG wallet address to query
200 OK
The queried wallet address
Currently active delegated stake positions
Stakes in the withdrawal pending state (same schema as
activeDelegatedStakes)GET /delegated-stakes/last-reference/
Returns the last delegated stake transaction reference for a given address. Use this to build theparent field for new delegated stake requests.
DAG wallet address
200 OK
Ordinal of the last delegated stake transaction (0 if none)
Hash of the last delegated stake transaction (empty string if none)
503 Service Unavailable
Node is not in Ready state.
GET /delegated-stakes/rewards-info
Returns global rewards configuration and statistics. Use this data to calculate estimated APY for delegated staking positions.200 OK
Number of epochs per year, based on current global snapshot epoch configuration
Current DAG price expressed in datum/USD format
Information about the next DAG price and the epoch at which it takes effect
Total amount delegated across all active stakes (including accrued rewards), in datums
Average reward rate per DAG per epoch, in datums
Current total supply of all DAG balances, in datums
Total incremental rewards added in the latest epoch, in datums
Estimated total annual reward per DAG in datums (
latestAverageRewardPerDag × epochsPerYear)503 Service Unavailable
Node is not in Ready state.