nearprotocolnearprotocol-validator

Query NEAR RPC for delegators


Is there a way to query the NEAR RPC for all current delegators of a specific validator? I checked the API docs, can't find something like this but seems like an essential function that has to exist.


Solution

  • "Delegators" is a staking pool contract concept, so you need to make a view-function call to the staking pool contract, specifically, call get_accounts() function

    NEAR RPC query method has call_function request type which is used to make view-function calls.