Guides

DRep Delegation#

DRep (Delegation Representative) delegation enables users to participate in Cardano's governance system by assigning their voting power to chosen representatives. By integrating DRep delegation into your application, you empower users to influence the blockchain's future without requiring them to actively participate in every governance decision.

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#

{
  "changeAddress": "addr_test1...",
  "utxos": ["8282...", "8282..."],
  "delegations": [
    {
      "type": "drep",
      "address": "addr_test1...",
      "keyHash": "drep13d6sxkyz6st9h65qqrzd8ukpywhr8swe9f6357qntgjqye0gttd"
    }
  ]
}

Parameter Details#

Parameter Description Example
type Must be "drep" "drep"
address User's full address "addr_test1..."
keyHash DRep ID to delegate to "drep13d6s..."
utxos Array of UTXOs in CBOR hex format ["8282...", "8282..."]

Implementation Examples#

Using Fetch API:

Deno & FetchUsing Deno & fetch to delegate to a DRep.

Using cURL:

Bash & cURL

Transaction Signing#

After building the transaction, it must be signed before submission:

Sign Transaction

User Interface Examples#

Eternl Vote Delegation

Eternl's DRep delegation interface provides a good reference