Evolution SDK
Querying

Query Delegation

Query stake delegation status and accumulated rewards

Query Delegation

Check which pool a stake credential is delegated to and how many rewards have accumulated.

Query Wallet Delegation

The simplest way to check delegation for your connected wallet:

import {  } from "@evolution-sdk/evolution"

const  = ({
  : "preprod",
  : { : "blockfrost", : "https://cardano-preprod.blockfrost.io/api/v0", : ..! },
  : { : "seed", : ..!, : 0 }
})

const  = await .()

.("Pool:", .)     // null if not delegated
.("Rewards:", .)  // Accumulated lovelace

Query by Reward Address

For querying any address's delegation, use getDelegation with a reward address:

import {  } from "@evolution-sdk/evolution"

const  = ({
  : "preprod",
  : { : "blockfrost", : "https://cardano-preprod.blockfrost.io/api/v0", : ..! },
  : { : "seed", : ..!, : 0 }
})

declare const : any

const  = await .()

.("Pool:", .)
.("Rewards:", .)

Delegation Response

interface Delegation {
  poolId: PoolKeyHash | null  // Current pool delegation (null = not delegated)
  rewards: bigint             // Accumulated rewards in lovelace
}

Next Steps

  • Staking — Register, delegate, and withdraw
  • Withdrawal — Claim your accumulated rewards