Skip to content

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