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

1import { WIF } from "@ardenthq/sdk-cryptography";

Encode a private key

1WIF.encode({
2 version: 128,
3 privateKey: "0000000000000000000000000000000000000000000000000000000000000001",
4 compressed: true,
5});

Decode an encoded WIF

1WIF.decode('KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn');
Last updated 2 months ago
Edit Page
Share: