Skip to content

If you use both -n and -i parameters in xpub cli, the -i parameter will not be taken into account #42

@rockstardev

Description

@rockstardev

I was on the stream with master philosopher @dergigi and tried deriving 3 addresses from xpub:

> xpub derive xpub6CQtk4bkfG1d4UTWNBwmWGP95gjvTvEKZhm74CxLfbd4XqXY5wkyaUvLoWyy6Le24VxCqg2nASLu2xhNaDh5FhFDf8ndUUgbm8q1VDqCipy -v -n 3
{
  path: "m/84'/0'/0'/0/0",
  address: 'bc1qcksx27qlksr2cy3pnwdw0mnm94c5cm0vz3jh6e'
}
{
  path: "m/84'/0'/0'/0/1",
  address: 'bc1qw0c77zue3xduyh4jef3r3jhfpx30jxc7s5z7lv'
}
{
  path: "m/84'/0'/0'/0/2",
  address: 'bc1ql4l5m2wnlcwl28rsu0k8k5rx7yjg9fkr2vld8p'
}

But when I tried using -i parameter as well to skip first 2 keys, I got the same output:

> xpub derive xpub6CQtk4bkfG1d4UTWNBwmWGP95gjvTvEKZhm74CxLfbd4XqXY5wkyaUvLoWyy6Le24VxCqg2nASLu2xhNaDh5FhFDf8ndUUgbm8q1VDqCipy -v -n 3 -i 2
{
  path: "m/84'/0'/0'/0/0",
  address: 'bc1qcksx27qlksr2cy3pnwdw0mnm94c5cm0vz3jh6e'
}
{
  path: "m/84'/0'/0'/0/1",
  address: 'bc1qw0c77zue3xduyh4jef3r3jhfpx30jxc7s5z7lv'
}
{
  path: "m/84'/0'/0'/0/2",
  address: 'bc1ql4l5m2wnlcwl28rsu0k8k5rx7yjg9fkr2vld8p'
}

@dergigi is trying to say this is a feature, but it's not... look, it's even in docs:
image

So Gigi, please fix it, that's what we do on SCWUR - motivate programmers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions