xrpl-rust icon indicating copy to clipboard operation
xrpl-rust copied to clipboard

Let us join efforts (xrpl_async-rs)

Open vporton opened this issue 1 year ago • 1 comments

I am writing xrpl_async Rust library.

I implemented a good async interface common for both JSON RPC and WebSocket APIs. I also implemented some WebSocket waiter tweaks. Thus your task of "Asynchronous ledger interactions" and is to be counted done.

Also I create "Models" instead of you.

I import your library for {decode,encode}_base58.

I propose to join efforts: xrpl-rust for low-level stuff and xrpl_async for high-level. Agree?

I am now trying to serialize transactions. Ideally it would be like this:

#[derive(Serialized)]
struct Transaction {
    #[serialized_as(nth = ...)] // The rest serialization properties belong to `Address` type
    account: Address,
    // ...
}

Then the Rust macro implementation can sort fields to correct order.

Your serialization seems to use string representations of types, what is not idiomatic Rust. I am now thinking about creating such macro wrapper around your serialization functions. Please, give me a clue: What is the most high-level way to serialize with xrpl-rust? (I think it's the one described here, but I am unsure if it's the highest level of your library, by the way it uses string representations of types, what is not idiomatic Rust.)

So, how will we collaborate?

vporton avatar Feb 27 '23 01:02 vporton