@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
30 lines • 731 B
TypeScript
import { Hex } from "viem";
/**
* Encodes a hex string (0x...) into CB58.
*
* @param hex - The hex string to encode.
* @returns The CB58 encoded string.
*
* @example
* ```ts
* import { hexToCB58 } from "@avalanche-sdk/client/utils";
*
* const cb58 = hexToCB58("0x1234567890abcdef");
* ```
*/
export declare function hexToCB58(hex: Hex): string;
/**
* Decodes a CB58 string into a hex string (0x...).
*
* @param cb58 - The CB58 string to decode.
* @returns The hex string.
*
* @example
* ```ts
* import { CB58ToHex } from "@avalanche-sdk/client/utils";
*
* const hex = CB58ToHex("AhhdUnShjkljhSDSSHJl...");
* ```
*/
export declare function CB58ToHex(cb58: string): Hex;
//# sourceMappingURL=common.d.ts.map