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

Add sidechain-specific features #245

Open
mvadari opened this issue Mar 21, 2022 · 4 comments
Open

Add sidechain-specific features #245

mvadari opened this issue Mar 21, 2022 · 4 comments

Comments

@mvadari
Copy link

mvadari commented Mar 21, 2022

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

  • A new RPC, federator_info, which provides information about the mainchain-sidechain bridge federators
  • A new method/builder that helps developers create a cross-chain transaction. The method takes a payment transaction and the sidechain destination address and adds the sidechain destination address (encoded in hex) as a memo.

Analogous xrpl.js issue: XRPLF/xrpl.js#1940
Analogous xrpl-py issue: XRPLF/xrpl-py#366

@sappenin
Copy link
Collaborator

Thanks @mvadari , this is a great suggestion!

@nkramer44
Copy link
Collaborator

@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
Copy link
Collaborator

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

@mvadari
Copy link
Author

mvadari commented Nov 21, 2022

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:

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

4 participants