Converts a private key to an XP address.
The private key to convert.
The human readable prefix to use for the address.
The XP address as a 0x prefixed string.
0x
import { privateKeyToXPAddress } from "@avalanche-sdk/client/accounts";const address = privateKeyToXPAddress("0xab....", "avax");console.log(address); Copy
import { privateKeyToXPAddress } from "@avalanche-sdk/client/accounts";const address = privateKeyToXPAddress("0xab....", "avax");console.log(address);
Converts a private key to an XP address.