import { IBaseCoin, KeychainsTriplet, KeyPair } from '../baseCoin';
import { BitGoBase } from '../bitgoBase';
import { AddKeychainOptions, ChangedKeychains, CreateBackupOptions, CreateBitGoOptions, CreateMpcOptions, GetKeychainOptions, GetKeysForSigningOptions, IKeychains, Keychain, ListKeychainOptions, ListKeychainsResult, RecreateMpcOptions, RotateKeychainOptions, UpdatePasswordOptions, UpdateSingleKeychainPasswordOptions } from './iKeychains';
import { BitGoKeyFromOvcShares } from './ovcJsonCodec';
export declare class Keychains implements IKeychains {
    private readonly bitgo;
    private readonly baseCoin;
    constructor(bitgo: BitGoBase, baseCoin: IBaseCoin);
    /**
     * Get a keychain by ID
     * @param params
     * @param params.id
     * @param params.xpub (optional)
     * @param params.ethAddress (optional)
     * @param params.reqId (optional)
     */
    get(params: GetKeychainOptions): Promise<Keychain>;
    /**
     * list the users keychains
     * @param params
     * @param params.limit - Max number of results in a single call.
     * @param params.prevId - Continue iterating (provided by nextBatchPrevId in the previous list)
     * @returns {*}
     */
    list(params?: ListKeychainOptions): Promise<ListKeychainsResult>;
    /**
     * Change the decryption password for all possible keychains associated with a user.
     *
     * This function iterates through all keys associated with the user, decrypts
     * them with the old password and re-encrypts them with the new password.
     *
     * This should be called when a user changes their login password, and are expecting
     * that their wallet passwords are changed to match the new login password.
     *
     * @param params
     * @param params.oldPassword - The old password used for encrypting the key
     * @param params.newPassword - The new password to be used for encrypting the key
     * @returns changedKeys Object - e.g.:
     *  {
     *    xpub1: encryptedPrv,
     *    ...
     *  }
     */
    updatePassword(params: UpdatePasswordOptions): Promise<ChangedKeychains>;
    /**
     * TODO: Deprecate this function in favor of updateSingleKeychainPasswordAsync once v2 encryption is default
     * Update the password used to decrypt a single keychain.
     * Handles v1 (SJCL) envelopes only. For v2 (Argon2id) support use {@link updateSingleKeychainPasswordAsync}.
     * @param params
     * @param params.keychain - The keychain whose password should be updated
     * @param params.oldPassword - The old password used for encrypting the key
     * @param params.newPassword - The new password to be used for encrypting the key
     * @returns {Keychain}
     */
    updateSingleKeychainPassword(params?: UpdateSingleKeychainPasswordOptions): Keychain;
    /**
     * Helper function to determine the encryption version of a ciphertext by parsing it as JSON and checking the "v" field.
     * Return undefined if the ciphertext is not a valid JSON or does not contain a supported "v" field.
     */
    private getEncryptionVersion;
    /**
     * Update the password used to decrypt a single keychain, with support for v2 (Argon2id) envelopes.
     * Automatically detects and preserves the envelope version — a v2-encrypted key stays v2 after the password change.
     * @param params
     * @param params.keychain - The keychain whose password should be updated
     * @param params.oldPassword - The old password used for encrypting the key
     * @param params.newPassword - The new password to be used for encrypting the key
     * @returns {Promise<Keychain>}
     */
    updateSingleKeychainPasswordAsync(params?: UpdateSingleKeychainPasswordOptions): Promise<Keychain>;
    /**
     * Create a public/private key pair
     * @param params - optional params
     * @param params.seed optional - seed to use for keypair generation
     * @param params.isRootKey optional - whether the resulting keypair should be a root key
     * @returns {KeyPair} - the generated keypair
     */
    create(params?: {
        seed?: Buffer;
        isRootKey?: boolean;
    }): KeyPair;
    /**
     * Add a keychain to BitGo's records
     * @param params
     */
    add(params?: AddKeychainOptions): Promise<Keychain>;
    /**
     * Create a BitGo key
     * @param params (empty)
     */
    createBitGo(params?: CreateBitGoOptions): Promise<Keychain>;
    /**
     * Create a backup key
     * @param params
     * @param params.provider (optional)
     */
    createBackup(params?: CreateBackupOptions): Promise<Keychain>;
    /**
     * Gets keys for signing from a wallet
     * @param params
     * @returns {Promise<Keychain[]>}
     */
    getKeysForSigning(params?: GetKeysForSigningOptions): Promise<Keychain[]>;
    /**
     * Convenience function to create and store MPC keychains with BitGo.
     * @param params passphrase used to encrypt secret materials
     * @return {Promise<KeychainsTriplet>} newly created User, Backup, and BitGo keys
     */
    createMpc(params: CreateMpcOptions): Promise<KeychainsTriplet>;
    recreateMpc(params: RecreateMpcOptions): Promise<KeychainsTriplet>;
    /**
     * It parses the JSON downloaded from the OVC for platform (BitGo),
     * and creates a corresponding TSS BitGo key. It also returns the JSON that needs
     * to be uploaded back to the OVCs containing the BitGo -> OVC shares.
     * @param ovcOutputJson JSON format of the file downloaded from the OVC for platform
     * @param enterprise Optional enterprise ID associated with the key
     * @returns {BitGoKeyFromOvcShares}
     */
    createTssBitGoKeyFromOvcShares(ovcOutputJson: unknown, enterprise?: string): Promise<BitGoKeyFromOvcShares>;
    /**
     * Create user keychain, encrypt the private key with the wallet passphrase and store it in BitGo.
     * @param walletPassphrase
     * @returns Keychain including the decrypted private key
     */
    createUserKeychain(walletPassphrase: string): Promise<Keychain>;
    /**
     * Rotate an ofc multi-user-keychain by recreating a new keypair, encrypt it using the user password and sent it to WP
     * This is only meant to be called by ofc multi-user-wallet's key, and will throw if otherwise.
     *
     * Requires 2fa auth before calling. Call the bitgo.unlock() SDK method to unlock the session first.
     * @param params parameters for the rotate keychain method
     * @return rotatedKeychain
     */
    rotateKeychain(params: RotateKeychainOptions): Promise<Keychain>;
    /**
     * Static helper method to determine if a keychain is a ofc multi-user-key
     * @param keychain
     */
    static isMultiUserKey(keychain: Keychain): boolean;
}
//# sourceMappingURL=keychains.d.ts.map