UNPKG

1.86 kBTypeScriptView Raw
1/**
2 * @prettier
3 */
4import * as bip32 from 'bip32';
5import * as stellar from 'stellar-sdk';
6import { BitGo } from '../../bitgo';
7import { BaseCoin } from '../baseCoin';
8import * as config from '../../config';
9interface ValidateKeyOptions {
10 key: string;
11 source: string;
12 passphrase?: string;
13 isUnsignedSweep: boolean;
14 isKrsRecovery: boolean;
15}
16export interface InitiateRecoveryOptions {
17 userKey: string;
18 backupKey: string;
19 bitgoKey?: string;
20 recoveryDestination: string;
21 walletPassphrase?: string;
22}
23declare type GetKrsProviderOptions = {
24 checkCoinFamilySupport?: boolean;
25};
26/**
27 * @param coin
28 * @param krsProviderName
29 * @param checkCoinFamilySupport - assert that krsProvider explicitly supports coin
30 * @return KrsProvider
31 */
32export declare function getKrsProvider(coin: BaseCoin, krsProviderName: string | undefined, { checkCoinFamilySupport }?: GetKrsProviderOptions): config.KrsProvider;
33/**
34 * Wrapper for {@see getKrsProvider} returning void
35 */
36export declare function checkKrsProvider(coin: BaseCoin, krsProviderName: string | undefined, options?: GetKrsProviderOptions): void;
37export declare function getIsKrsRecovery({ backupKey, userKey }: {
38 backupKey: string;
39 userKey: string;
40}): boolean;
41export declare function getIsUnsignedSweep({ backupKey, userKey }: {
42 backupKey: string;
43 userKey: string;
44}): boolean;
45export declare function validateKey(bitgo: BitGo, { key, source, passphrase, isUnsignedSweep, isKrsRecovery }: ValidateKeyOptions): bip32.BIP32Interface;
46export declare function getBip32Keys(bitgo: BitGo, params: InitiateRecoveryOptions, { requireBitGoXpub }: {
47 requireBitGoXpub: boolean;
48}): bip32.BIP32Interface[];
49export declare function getStellarKeys(bitgo: BitGo, params: InitiateRecoveryOptions): stellar.Keypair[];
50export {};
51//# sourceMappingURL=initiate.d.ts.map
\No newline at end of file