This type is to give a cleaner return
type of next
.
This type is to give a cleaner return
type of next
.
Consider:
def next: this.type = ??? val first: SegWitHDPath = ??? val second = first.next // second is now: // first.type (with underlying type org.bitcoins.core.hd.SegWitHDPath)
def next: NextPath = ??? // in SegWitHDPath override type NextPath = SegWitHDPath val first: SegWitHDPath = ??? val second = first.next // second is now: // SegWitHDPath
BIP32 paths can be subsets/superset of each other.
BIP32 paths can be subsets/superset of each other.
If all elements in a path p
is included in a path
P
, (i.e. p
is a subset of P
), p.diff(P)
is the elements from P
that is not in p
.
// equal paths m/44'/1' diff m/44'/1' == Some(BIP32Path.empty) // diffable path m/44'/0'/0' diff m/44'/0'/0'/0/2 = Some(m/0/2) m/44'/0'/0'/1 diff m/44'/0'/0'/1/2 = Some(m/2) // this is longer than other m/44'/1' diff m/44' == None // any fields are unequal along the way m/44'/1' diff m/43'/2' == None m/44'/1'/0 diff m/44'/2'/1 == None
Increments the address index and returns the new path that can be passed into a ExtKey
Increments the address index and returns the new path that can be passed into a ExtKey