XRPLF / xrpl4j

A 100% Java implementation to interact with the XRP Ledger.
ISC License
92 stars 51 forks source link

Add sidechain-specific features #245

Open mvadari opened 2 years ago

mvadari commented 2 years ago

I'd like to add two features related to sidechains to xrpl4j:

Analogous xrpl.js issue: https://github.com/XRPLF/xrpl.js/pull/1940 Analogous xrpl-py issue: https://github.com/XRPLF/xrpl-py/pull/366

sappenin commented 2 years ago

Thanks @mvadari , this is a great suggestion!

nkramer44 commented 2 years ago

@mukulljangid Do you mind taking this on?

The new federator_info RPC should require new XrplRequest and XrplResult immutables. I would mark them as @Beta just in case the API changes between now and launch.

As for the helper method -- I wonder if it would make sense to add a method/field to the Payment immutable Optional<Address> crossChainDestination(). This method wouldn't get serialized to JSON, but if it's present we could easily set the memo field to the hex representation of the destination address. This would make cross-chain stuff easy without having to introduce a new util or service class. @mukulljangid @sappenin How does that sound?

mukulljangid commented 2 years ago

Thanks @nkramer44! Sounds good to me! I was a bit skeptical about adding a new util. This approach should work!

mvadari commented 2 years ago

The sidechain design has been greatly updated now.

There are 7 new transaction types. While there aren't any more RPCs, some of the RPCs (ledger_entry, account_objects) have more filters.

References: