sephynox / xrpl-rust

A 100% Rust library to interact with the XRPL. XRPL Grant Winner
https://crates.io/crates/xrpl-rust
ISC License
16 stars 8 forks source link

Standardized client interface #77

Closed LimpidCrypto closed 3 weeks ago

LimpidCrypto commented 4 weeks ago

High Level Overview of Change

This PR adds standardized traits to interact with the websocket clients and future JSON RPC Clients.

trait Client

Implements the request logic for each client.

trait AsyncClient

An external trait implemented for T: embedded_io_async::Read + embedded_io_async::Write or T: Stream<Output = String> + Sink<String>. It calls the request implementation of the Client trait.

Context of Change

This is needed for #76 to be able to use std and no_std clients with the high level methods.

Type of Change

Test Plan