@exodus/bytes
    Preparing search index...

    Function fromWifString

    • Decode a WIF string to WIF data

      Returns a promise that resolves to an object with { version, privateKey, compressed }.

      The optional version parameter validates the version byte.

      Throws if the WIF string is invalid or version doesn't match.

      Parameters

      • string: string

        The WIF encoded string

      • Optionalversion: number

        Optional expected version byte to validate against

      Returns Promise<Wif>

      The decoded WIF data

      Error if the WIF string is invalid or version doesn't match