View Source BitcoinLib.Key.HD.ExtendedPublic.ChildFromIndex (BitcoinLib v0.1.3)
Calculates direct childs from a public key based on a given index
Link to this section Summary
Functions
Calculates a direct child from a public key based on a given index
Link to this section Functions
@spec get( %BitcoinLib.Key.HD.ExtendedPublic{ chain_code: term(), depth: term(), fingerprint: term(), index: term(), key: term(), parent_fingerprint: term() }, integer() ) :: {:ok, %BitcoinLib.Key.HD.ExtendedPublic{ chain_code: term(), depth: term(), fingerprint: term(), index: term(), key: term(), parent_fingerprint: term() }} | {:error, binary()}
Calculates a direct child from a public key based on a given index
examples
Examples
iex> %BitcoinLib.Key.HD.ExtendedPublic{ ...> key: 0x252C616D91A2488C1FD1F0F172E98F7D1F6E51F8F389B2F8D632A8B490D5F6DA9, ...> chain_code: 0x463223AAC10FB13F291A1BC76BC26003D98DA661CB76DF61E750C139826DEA8B ...> } ...> |> BitcoinLib.Key.HD.ExtendedPublic.ChildFromIndex.get(0) {
:ok,
%BitcoinLib.Key.HD.ExtendedPublic{
fingerprint: 0x9680603F,
key: 0x30204D3503024160E8303C0042930EA92A9D671DE9AA139C1867353F6B6664E59,
chain_code: 0x05AAE71D7C080474EFAAB01FA79E96F4C6CFE243237780B0DF4BC36106228E31,
depth: 1,
index: 0,
parent_fingerprint: 0x18C1259
}
}