@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 • 608 B
TypeScript
import { XPAddress } from "../avalancheAccount.js";
/**
* Converts a public key to an XP address.
*
* @param publicKey - The public 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 { publicKeyToXPAddress } from "@avalanche-sdk/client/accounts";
*
* const address = publicKeyToXPAddress("0xab....", "avax");
* console.log(address);
* ```
*/
export declare function publicKeyToXPAddress(publicKey: string, hrp: string): XPAddress;
//# sourceMappingURL=publicKeyToXPAddress.d.ts.map