Skip to main content

extract_zip_48_fields

Function extract_zip_48_fields 

Source
pub fn extract_zip_48_fields(
    derivation: &Bip32Derivation,
    seed_fp: &SeedFingerprint,
    expected_coin_type: ChildNumber,
) -> Option<(AccountId, Scope, NonHardenedChildIndex)>
Expand description

Extracts the ZIP 48 account index, scope, and address index from a PCZT derivation path.

expected_coin_type is the hardened coin type index of the network.

Returns None if the seed fingerprints don’t match, if this is not a ZIP 48 derivation path for expected_coin_type, or if its scope is neither external (0) nor internal (1).