Delegate to a Stake Pool
Stake pool delegation with Anvil API
Stake pool delegation allows users to participate in Cardano's consensus protocol by delegating their stake to a pool that produces blocks. By integrating stake pool delegation into your application, you enable users to earn rewards while supporting the network's security and decentralization without requiring technical expertise in running validator nodes.
API Endpoint
URL: https://preprod.api.ada-anvil.app/v2/services/transactions/build
Method: POST
Headers: Content-Type: application/json
, x-api-key: YOUR_API_KEY
Request Format
Parameter Details
type
Must be "pool"
"pool"
address
User's full address
"addr_test1..."
keyHash
Pool ID to delegate to
"pool1z5uq..."
utxos
Array of UTXOs in CBOR hex format
["8282...", "8282..."]
Implementation Examples
Using Fetch API:
Using cURL:
Transaction Signing
After building the transaction, it must be signed before submission:
User Interface Examples
Last updated
Was this helpful?