diff --git a/sdk/src/rpc.rs b/sdk/src/rpc.rs index 2bb7192a89..0c237a6d52 100644 --- a/sdk/src/rpc.rs +++ b/sdk/src/rpc.rs @@ -15,6 +15,7 @@ use namada_core::ledger::governance::utils::Vote; use namada_core::ledger::ibc::storage::{ ibc_denom_key, ibc_denom_key_prefix, is_ibc_denom_key, }; +use namada_core::ledger::pgf::storage::steward::StewardDetail; use namada_core::ledger::storage::LastBlock; use namada_core::types::account::Account; use namada_core::types::address::{Address, InternalAddress}; @@ -223,6 +224,27 @@ pub async fn has_bonds( convert_response::(RPC.vp().pos().has_bonds(client, source).await) } +/// Get the set of pgf stewards +pub async fn query_pgf_stewards( + client: &C, +) -> Result, error::Error> { + convert_response::>( + RPC.vp().pgf().stewards(client).await, + ) +} + +/// Query the consensus key by validator address +pub async fn query_validator_consensus_keys< + C: crate::queries::Client + Sync, +>( + client: &C, + address: &Address, +) -> Result, error::Error> { + convert_response::>( + RPC.vp().pos().consensus_key(client, address).await, + ) +} + /// Get the set of consensus keys registered in the network pub async fn get_consensus_keys( client: &C,