import { JubPoint } from '../../crypto/babyJub';
import { AttachableMemoryCacheDevice } from '../cacheDevices/AttachableMemoryCacheDevice';
export declare const stealthPairCacheDevice: AttachableMemoryCacheDevice<{
    H0: [bigint, bigint];
    H1: [bigint, bigint];
}>;
export declare const stealthPairOldCacheDevice: AttachableMemoryCacheDevice<{
    H0: [bigint, bigint];
    H1: [bigint, bigint];
}>;
export declare const stealthAddressCacheDevice: AttachableMemoryCacheDevice<string>;
export interface EncryptionKeyPair {
    privateKey: string;
    publicKey: string;
}
export declare const EncryptionKeyPairDefaultValue: EncryptionKeyPair;
export declare class UserKeys {
    private signature;
    private nullifyingKey;
    private readonly PREFIX_FOR_SPENDING_PAIR;
    private readonly PREFIX_FOR_NULLIFYING_PAIR;
    constructor(_signature?: string, _nullifyingKey?: string);
    getSignature(): string;
    setSignature(_signature: string): void;
    private requireSignature;
    private requireKeyMaterial;
    verifyTronMessage(signingMessage: string, signerAddress: string): boolean;
    /**
     * get shielded private key from message signature used to login to the application,
     * this private key is used to generate encryption keypairs as well as public key
     * @retuns 0x-prefixed shielded private key
     */
    getShieldedPrivateKey: () => string;
    /**
     * generate shielded public key from private key
     * @param privateKey the key used to generate the shielded public key, this should be the signature
     * that the user provided
     * @retuns shielded public key in hexstring with 0x prefixed
     */
    getShieldedPublicKey: () => string;
    /**
     * derive the EdDSA-Poseidon BabyJubJub public key for the spending private key. This must match
     * the key that `signEddsa` (circomlib's signPoseidon) signs with, i.e. the scalar is derived from
     * blake512(prv) + clamping, not from privSpendingKey directly.
     */
    getSpendingKeyPair: () => {
        privSpendingKey: string;
        pubSpendingBJJPoint: JubPoint;
    };
    /**
     * EdDSA-Poseidon sign a message (a circom field element as bigint) using the shielded private key
     * as the EdDSA secret. Returns { R8, S } with R8 as a JubPoint and S as a bigint scalar.
     */
    signEddsa: (message: bigint) => {
        R8: JubPoint;
        S: bigint;
    };
    /**
     * Currently used for creating shielded private keys for deposit UTXOs, which are encrypted and sent to enclave for private send
     * @param nonce Used to deterministically generate new shielded private key
     * @returns new shielded private key in hexstring with 0x prefixed
     */
    getShieldedPrivateKeyFromNonce: (nonce: bigint) => string;
    getClaimableSignatureFromNonce: (nonce: bigint) => string;
    /**
     * deterministically derive an EVM address from the shielded private key
     */
    getDerivedEthereumAddress: () => string;
    /**
     * deterministically derive a Solana public key from the shielded private key
     */
    getDerivedSolanaPublicKey: () => string;
    getSignerPrivateKeyFromNonce: (walletNonce: bigint) => string;
    getSignerSolanaPrivateKeyFromNonce: (walletNonce: bigint) => string;
    verifyMessage(signingMessage: string): string;
    verifySolanaMessage(signingMessage: string, signerPublicKey: string): boolean;
    static getRandomizedStealthPairOld: (s: bigint, privateKey: string) => {
        H0: [bigint, bigint];
        H1: [bigint, bigint];
    };
    static getRandomizedStealthPair: (s: bigint, privateKey: string) => {
        H0: [bigint, bigint];
        H1: [bigint, bigint];
    };
    static getStealthAddressCompressedPoints: (s: bigint, privateKey: string) => {
        h0: bigint;
        h1: bigint;
    };
    static checkSignature: (s: bigint, stealthAddressH0: bigint, stealthAddressH1: bigint, privateKey: string) => boolean;
    static getStealthAddress: (s: bigint, privateKey: string) => string;
    static getH1FromH0: (H0: JubPoint, privateKey: string) => JubPoint;
    static verifyStealthPair: (H0: JubPoint, H1: JubPoint, privateKey: string, onlyYCheck?: boolean) => boolean;
    static getStealthAddressNewStyle: (H0: JubPoint, nullifyingPrivateKey: string, spendingPublicKey?: bigint[]) => string;
    static findCorrectRandomization(initialRandomization: bigint, privateKey?: string): bigint;
    static getH0FromRandomization: (randomization: bigint) => JubPoint;
    static findH0(randomization: bigint, privateKey: string | undefined): JubPoint | undefined;
    /**
     * generate private and public keypair
     * @param seed seed to use to deterministically generate key, must be in DataHexString format
     * and must correspond to 32 bytes
     */
    static getEncryptionKeyPair: (privateKey: string) => EncryptionKeyPair;
    /**
     * generate access token, this accessKey is what should be sent to the server for signing
     * @returns accessKey in hexstring with 0x prefixed
     */
    getAccessKey: () => string;
    /**
     * generate backend token, which is used for access control on backend
     * @returns accessKey in hexstring with 0x prefixed
     */
    getBackendToken: () => string;
}
