rpcpool/yellowstone-faithful

Web3.js compatibility

Opened this issue · 1 comments

  • need to support getVersion
  • need to support some sample RPC calls with different params, need to document which getBlock getTransaction we support
pub fn faithful() {
    let faithful_rpc = RpcClient::new("http://faithful/".to_string());

    let block = faithful_rpc.get_block_with_config(
        205200004,
        RpcBlockConfig {
            transaction_details: Some(TransactionDetails::Full),
            commitment: Some(CommitmentConfig::finalized()),
            max_supported_transaction_version: Some(0),
            encoding: Some(UiTransactionEncoding::Base64),
            rewards: Some(true),
        },
    );
    println!("got reply from faithful");
    match block {
        Ok(block) => {
            println!("blockhash : {}", block.blockhash);
        },
        Err(e) => {
            println!("Err: {}", e);
        },
    };
}

Needs support for json encoding for responses.