UNPKG

@bitgo/utxo-bin

Version:

Command-line utility for BitGo UTXO transactions

63 lines 1.83 kB
import * as utxolib from '@bitgo/utxo-lib'; import { Buffer } from 'buffer'; type InputArgs = { /** path to psbt file */ path?: string; /** when set, create a new psbt */ create?: boolean; /** network */ network: utxolib.Network; /** expect empty psbt */ expectEmpty?: boolean; }; type OutputArgs = { /** edit the input file */ edit: boolean; /** output path */ out?: string; }; export type WithPsbtOptions = InputArgs & OutputArgs; export declare const withPsbtOptions: { readonly create: { readonly type: "boolean"; readonly default: false; }; readonly edit: { readonly type: "boolean"; readonly default: false; }; readonly out: { readonly type: "string"; }; readonly network: { type: "string"; description: string; default: string | undefined; coerce: (arg: string) => utxolib.Network; } & { demandOption: true; }; readonly path: { readonly type: "string"; readonly nargs: 1; readonly default: ""; }; readonly stdin: { readonly type: "boolean"; readonly default: false; }; readonly data: { readonly type: "string"; readonly description: "hex or base64"; readonly alias: "hex"; }; readonly clipboard: { readonly type: "boolean"; readonly default: false; }; }; export declare function getOrCreatePsbt(args: InputArgs): Promise<utxolib.Psbt>; export declare function emitOutput(value: utxolib.Psbt | Buffer | string, args: InputArgs & OutputArgs): Promise<void>; export declare function withPsbt(args: InputArgs & OutputArgs, fn: (psbt: utxolib.Psbt) => Promise<utxolib.Psbt | Buffer>): Promise<void>; export {}; //# sourceMappingURL=withPsbt.d.ts.map