Ejemplo n.º 1
0
def load_vote_accounts(config: ValidatorConfig, vote_account_pubkey: str):
    """
    loads block production
    https://docs.solana.com/developing/clients/jsonrpc-api#getvoteaccounts
    """
    params = [
        {
            'votePubkey': vote_account_pubkey
        }
    ]
    return smart_rpc_call(config, "getVoteAccounts", params, {})
Ejemplo n.º 2
0
def load_block_production(config: ValidatorConfig, identity_account_pubkey: str):
    """
    loads block production
    https://docs.solana.com/developing/clients/jsonrpc-api#getblockproduction
    """
    params = [
        {
            'identity': identity_account_pubkey
        }
    ]
    return smart_rpc_call(config, "getBlockProduction", params, {})
Ejemplo n.º 3
0
def load_leader_schedule(config: ValidatorConfig, identity_account_pubkey: str):
    """
    loads leader schedule
    https://docs.solana.com/developing/clients/jsonrpc-api#getleaderschedule
    """
    params = [
        None,
        {
            'identity': identity_account_pubkey
        }
    ]
    return smart_rpc_call(config, "getLeaderSchedule", params, {})
Ejemplo n.º 4
0
def load_epoch_info(config: ValidatorConfig):
    """
    loads epoch info
    https://docs.solana.com/developing/clients/jsonrpc-api#getepochinfo
    """
    return smart_rpc_call(config, "getEpochInfo", [], {})
Ejemplo n.º 5
0
def load_identity_account_balance(config: ValidatorConfig, identity_account_pubkey: str):
    """
    loads identity account balance
    https://docs.solana.com/developing/clients/jsonrpc-api#getbalance
    """
    return smart_rpc_call(config, "getBalance", [identity_account_pubkey], {})