Caravan Documentation
    Preparing search index...

    Function bip32PathToSequence

    • Convert BIP32 derivation path to an array of integer values representing the corresponding derivation indices.

      Hardened path segments will have the [hardening offset]module:paths.HARDENING_OFFSET added to the index.

      Parameters

      • pathString: any

        BIP32 derivation path string

      Returns number[]

      the derivation indices

      import {bip32PathToSequence} from "@caravan/bitcoin";
      console.log(bip32PathToSequence("m/45'/1/99")); // [2147483693, 1, 99]