BSV-ex v0.2.3 BSV.Extended.Children View Source

Module for deriving children from BIP-32 extended keys.

Link to this section Summary

Functions

Derives a child key from the given extended private or public key, using the specified path.

Link to this section Functions

Derives a child key from the given extended private or public key, using the specified path.

Examples

iex> BSV.Extended.PrivateKey.from_seed(BSV.Test.bsv_seed)
...> |> BSV.Extended.Children.derive("m/44'/0'/0'/0/0")
...> |> BSV.Address.from_public_key
...> |> BSV.Address.to_string
"1DB7ijqNz91PPTZyv5StZ8DjjMr69chuwH"

iex> BSV.Extended.PrivateKey.from_seed(BSV.Test.bsv_seed)
...> |> BSV.Extended.Children.derive("m/44'/0'/0'/0/9")
...> |> BSV.Address.from_public_key
...> |> BSV.Address.to_string
"12g4iEyKXndS6qwhLkqxzchep4GwVFUUNJ"

iex> BSV.Extended.PrivateKey.from_seed(BSV.Test.bsv_seed)
...> |> BSV.Extended.Children.derive("m/44'/0'/1'/0/5")
...> |> BSV.Address.from_public_key
...> |> BSV.Address.to_string
"15JvhMtjeRLewqn2hNSdty4zmEvTJYCPcq"