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

Support for custom paths #32

Closed
junderw opened this issue Jun 4, 2020 · 1 comment
Closed

Support for custom paths #32

junderw opened this issue Jun 4, 2020 · 1 comment

Comments

@junderw
Copy link

junderw commented Jun 4, 2020

Given an xpub, there should be a way to override the path. Perhaps using some keywords.

If not specified the default is %CHANGE%/%INDEX%

ie

CUSTOM_PATH="123/%CHANGE%/1/8/23/%INDEX%/2/4"

will result in the first receive address paths of:

  • 123/0/1/8/23/0/2/4
  • 123/0/1/8/23/1/2/4
  • 123/0/1/8/23/2/2/4

and the first change address paths of:

  • 123/1/1/8/23/0/2/4
  • 123/1/1/8/23/1/2/4
  • 123/1/1/8/23/2/2/4

Some things to consider as design choices:

  1. Should it be possible to have %CHANGE% come AFTER %INDEX%
  2. Should it be possible to omit %CHANGE% (if ie. an exchange would rather explicitly specify change address(es) for whatever reason)
  3. Should it be further abstracted where variables like %CHANGE% and %INDEX% can be created/added and given parameters (ie. Creating a non-hardened "BIP44 Account"-like system where you only check the next number if there is tx history in any receive address of the previous number)

I would say 1=no, 2=yes, 3="someday... maybe"

@shesek
Copy link
Collaborator

shesek commented Jun 4, 2020

This will be made possible with script descriptors.

In the meanwhile, bwt does support specifying a --bare-xpub to derive child keys directly without separate internal/external chains (just xpub.../i instead of both xpub.../0/i and xpub.../1/i). But this assumes that the index is the last derivation, and so couldn't be used with some of your examples.

@shesek shesek closed this as completed Jun 4, 2020
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

2 participants