@ledgerhq/coin-stacks
Version:
Ledger Stacks Coin integration
31 lines • 1.19 kB
TypeScript
import { ClarityValue } from "@stacks/transactions";
/**
* Converts a memo string to a buffer Clarity Value for sending in transactions
*
* @param memo - The memo to convert
* @returns Clarity Value representing the memo (some(buffer) or none)
*/
export declare const memoToBufferCV: (memo?: any) => ClarityValue;
/**
* Converts a hex string (from memo) to a readable string
*
* @param memoHex - Hex string representation of memo
* @returns Readable string or empty string if conversion fails
*/
export declare const hexMemoToString: (memoHex?: string) => string;
/**
* Converts a Clarity Value memo to readable string
* Used when processing incoming transactions
*
* @param memoJson - The memo Clarity Value from a transaction
* @returns Readable string or undefined if conversion fails
*/
export declare const bufferMemoToString: (memoJson: any) => string | undefined;
/**
* Processes a memo CV hex string from a transaction
*
* @param memoHex - Hex string of serialized Clarity Value memo
* @returns Readable string or undefined if conversion fails
*/
export declare const processMemoCV: (memoHex?: string) => string | undefined;
//# sourceMappingURL=memoUtils.d.ts.map