/** * @prettier */ import * as utxolib from '@bitgo-beta/utxo-lib'; declare type WalletUnspent = utxolib.bitgo.WalletUnspent; declare type ScriptType2Of3 = utxolib.bitgo.outputScripts.ScriptType2Of3; import { BitGoBase } from '@bitgo-beta/sdk-core'; import { AbstractUtxoCoin } from '../abstractUtxoCoin'; import { RecoveryProvider } from './RecoveryProvider'; export interface OfflineVaultTxInfo { inputs: WalletUnspent[]; } export interface FormattedOfflineVaultTxInfo { txInfo: { unspents: WalletUnspent[]; }; txHex: string; feeInfo: Record; coin: string; } export interface RecoverParams { scan?: number; userKey: string; backupKey: string; bitgoKey: string; recoveryDestination: string; krsProvider?: string; ignoreAddressTypes: ScriptType2Of3[]; walletPassphrase?: string; apiKey?: string; userKeyPath?: string; recoveryProvider?: RecoveryProvider; } export declare type BackupKeyRecoveryTransansaction = { inputs: WalletUnspent[]; transactionHex: string; coin: string; backupKey: string; recoveryAmount: TNumber; tx?: unknown; }; /** * Builds a funds recovery transaction without BitGo * @param coin * @param bitgo * @param params * - userKey: [encrypted] xprv, or xpub * - backupKey: [encrypted] xprv, or xpub if the xprv is held by a KRS provider * - walletPassphrase: necessary if one of the xprvs is encrypted * - bitgoKey: xpub * - krsProvider: necessary if backup key is held by KRS * - recoveryDestination: target address to send recovered funds to * - scan: the amount of consecutive addresses without unspents to scan through before stopping * - ignoreAddressTypes: (optional) scripts to ignore * for example: ['p2shP2wsh', 'p2wsh'] will prevent code from checking for wrapped-segwit and native-segwit chains on the public block explorers */ export declare function backupKeyRecovery(coin: AbstractUtxoCoin, bitgo: BitGoBase, params: RecoverParams): Promise | FormattedOfflineVaultTxInfo>; export {}; //# sourceMappingURL=backupKeyRecovery.d.ts.map