Importing a Wallet
Import Wallet
import { PhantasmaKeys } from "phantasma-sdk-ts";
const wif = "YOUR_WIF"; // replace with your WIF
const wallet = PhantasmaKeys.fromWIF(wif);
const address = wallet.Address.Text; // Get the Address.Importing a Wallet from a private key
import { PhantasmaKeys, getWifFromPrivateKey } from "phantasma-sdk-ts";
const privateKey = "YOUR_PRIVATE_KEY_HEX";
const wif = getWifFromPrivateKey(privateKey);
const wallet = PhantasmaKeys.fromWIF(wif);
const address = wallet.Address.Text; // Get the Address.
console.log(`${address}`);Last updated