UNPKG

@bsv/wallet-toolbox

Version:

BRC100 conforming wallet, wallet storage and wallet signer components

37 lines 1.99 kB
import { AtomicBEEF, CreateActionResult, ListActionsResult, Transaction } from '@bsv/sdk'; /** * Generates a formatted log string from an AtomicBEEF object. * @param {AtomicBEEF} atomicBeef - The AtomicBEEF object containing transaction data. * @param {ListActionsResult} [actionsResult] - The result of listing actions, used for additional transaction metadata. * @param {boolean} [showKey=true] - Whether to display key transaction details. * @returns {Promise<{ log: string; logColor: string }>} - An object containing the formatted log string and a colorized version. */ export declare function toLogString(atomicBeef: AtomicBEEF, actionsResult?: ListActionsResult, showKey?: boolean): { log: string; logColor: string; }; export declare function createActionResultToTxLogString(createActionResult: CreateActionResult, actionsResult?: ListActionsResult, showKey?: boolean): { log: string; logColor: string; }; /** * Generates a formatted log string from a Transaction object. * Ensures proper indentation and prevents recursion errors. * @param {Transaction} tx - The Transaction object containing transaction data. * @param {number} indent - The current indentation level. * @param {boolean} [showKey=true] - Whether to display key transaction details. * @param {ListActionsResult} [actionsResult] - The result of listing actions. * @returns {{ log: string; logColor: string }} - A formatted log string and colorized version. */ export declare function txToLogString(tx: Transaction, indent?: number, showKey?: boolean, actionsResult?: ListActionsResult): { log: string; logColor: string; }; /** * Checks if an object is empty. * @param {unknown} obj - The object to check. * @returns {boolean} - Returns true if the object is empty, otherwise false. */ export declare const isEmptyObject: (obj: unknown) => boolean; export declare function numberArrayToHexString(numbers: number[]): string; //# sourceMappingURL=createAction2.test.d.ts.map