@avalanche-sdk/client
Version:
A TypeScript SDK for interacting with the Avalanche network through JSON-RPC APIs. This SDK provides a comprehensive set of tools to interact with all Avalanche chains (P-Chain, X-Chain, C-Chain) and various APIs, including wallet functionality for transa
18 lines • 616 B
TypeScript
import { XPAddress } from "../avalancheAccount.js";
/**
* Converts a private key to an XP address.
*
* @param privateKey - The private key to convert.
* @param hrp - The human readable prefix to use for the address.
* @returns The XP address as a `0x` prefixed string.
*
* @example
* ```ts
* import { privateKeyToXPAddress } from "@avalanche-sdk/client/accounts";
*
* const address = privateKeyToXPAddress("0xab....", "avax");
* console.log(address);
* ```
*/
export declare function privateKeyToXPAddress(privateKey: string, hrp: string): XPAddress;
//# sourceMappingURL=privateKeyToXPAddress.d.ts.map