Decode a WIF string to WIF data (synchronous)
Returns an object with { version, privateKey, compressed }.
{ version, privateKey, compressed }
The optional version parameter validates the version byte.
version
Throws if the WIF string is invalid or version doesn't match.
The WIF encoded string
Optional
Optional expected version byte to validate against
The decoded WIF data
Error if the WIF string is invalid or version doesn't match
Decode a WIF string to WIF data (synchronous)
Returns an object with
{ version, privateKey, compressed }.The optional
versionparameter validates the version byte.Throws if the WIF string is invalid or version doesn't match.