Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 543 Bytes

wif.md

File metadata and controls

25 lines (18 loc) · 543 Bytes

WIF

The WIF class provides methods to make working with the Bitcoin Wallet Import Format easier and consistent across all Platform SDK products.

Importing the WIF class

import { WIF } from "@ardenthq/cryptography";

Encode a private key

WIF.encode({
    version: 128,
    privateKey: "0000000000000000000000000000000000000000000000000000000000000001",
    compressed: true,
});

Decode an encoded WIF

WIF.decode('KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn');