UNPKG

caravan-x

Version:

A terminal-based utility for managing Caravan multisig wallets in regtest mode. This tool simplifies development and testing with Caravan by providing an easy-to-use interface

65 lines (64 loc) 1.95 kB
import { TransactionService } from "../core/transaction"; import { CaravanService } from "../core/caravan"; import { BitcoinService } from "../core/bitcoin"; /** * Commands for managing Bitcoin transactions and PSBTs */ export declare class TransactionCommands { private readonly transactionService; private readonly caravanService; private readonly bitcoinService; constructor(transactionService: TransactionService, caravanService: CaravanService, bitcoinService: BitcoinService); /** * Add a back option to selection choices */ private addBackOption; /** * Check if a value is the back option */ private isBackOption; /** * Custom text input with back option (using 'q' to go back) */ private inputWithBack; /** * Custom password input with back option (using 'q' to go back) */ private passwordWithBack; /** * Custom number input with back option (using 'q' to go back) */ private numberWithBack; /** * Handle spinner errors and return false to indicate operation should be canceled */ private handleSpinnerError; /** * Create a PSBT from a watch-only wallet */ createPSBT(): Promise<string | false | null>; /** * Sign a PSBT with a wallet */ signPSBTWithWallet(psbtBase64?: string, walletName?: string): Promise<string | false | null>; /** * Format a decoded PSBT for display */ private formatPSBTSummary; /** * Sign a PSBT with a private key */ signPSBTWithPrivateKey(): Promise<any | false | null>; /** * Helper method to handle a signed PSBT */ private handleSignedPSBT; /** * Finalize and broadcast a PSBT */ finalizeAndBroadcastPSBT(psbtBase64?: string): Promise<string | false | null>; /** * Analyze a PSBT (decode and show details) */ analyzePSBT(): Promise<any | false | null>; }