Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web3.js compatibility #35

Open
linuskendall opened this issue Aug 17, 2023 · 1 comment
Open

Web3.js compatibility #35

linuskendall opened this issue Aug 17, 2023 · 1 comment

Comments

@linuskendall
Copy link
Contributor

linuskendall commented Aug 17, 2023

  • 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);
        },
    };
}
@linuskendall linuskendall changed the title Web3.js compatibilikty Web3.js compatibility Aug 17, 2023
@linuskendall
Copy link
Contributor Author

Needs support for json encoding for responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant