Skip to content

Add: Derive account from XRPL_Account #315

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tequdev
Copy link
Contributor

@tequdev tequdev commented Nov 14, 2023

Allows to get Account directly from XRPL-Account, not just from derive.

@WietseWind
Copy link
Owner

Thanks for the contribution!

I'm happy to merge this, but I'd like to understand the advantage/use case that made you add this :)

@tequdev
Copy link
Contributor Author

tequdev commented Nov 14, 2023

Especially for those who are new to this library, generating accounts from XRPL_Account is easier to understand than derive in terms of code readability.

@WietseWind
Copy link
Owner

I understand.

If it's for readability/usability for people new to this lib, I think for the sake of abstraction this addition (which I support) this belongs elsewhere.

Right now the methods are added to the Account.ts section, which deals with none of the crypto derivation.

I think it would be cleanest to add the aliases in the overall index.ts (https://github.com/WietseWind/xrpl-accountlib/blob/master/src/index.ts) which is only used as a mapper to other methods and objects in the first place.

Which could be even more user friendly with a separate export object with direct methods returning the object;

export {
  AccountFromMnemonic,
  /// ...
}

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

Successfully merging this pull request may close these issues.

2 participants