Expand description

Sub-address index structure and key calculation helper functions for address.

Sub-addresses are grouped with index of sub-addresses as a pair of indices (i,j) with i, the major index, representing a group of sub-addresses (called an account) and j, the minor index, representing a particular sub-address within that account.

Structs

A sub-address index with major and minor indexes, primary address is 0/0.

Functions

Compute the view public key and spend public key (V', S') at index i from view pair (v, S) where V' = v*S' and S' = mG + S.
Compute a subkey pair (v', s') from a root keypair (v, s) for index i.
Compute the scalar m = Hn("SubAddr" || v || major_index || minor_index) at index i from the view secret key v.
Compute the spend public key S' = mG + S at index i from the view pair (v, S).
Compute the private spend key s' = s + m where m is computed with get_secret_scalar based on v.
Compute the sub-address at index i valid on the given network (by default Network::Mainnet).
Compute the private view key v' = v * s' where s' is computed with get_spend_secret_key.