import { SuiClient } from '@onelabs/sui/client';
import { PublicKey } from '@onelabs/sui/cryptography';
import type { ZkProofData, EphemeralKeyPairState, JwtState, ZkLoginAddressState, ZkLoginConfig } from '../types';
/**
 * 网络URL映射
 */
export declare const NETWORK_URLS: {
    readonly mainnet: "https://fullnode.mainnet.sui.io";
    readonly testnet: "https://fullnode.testnet.sui.io";
    readonly devnet: "https://fullnode.devnet.sui.io";
};
/**
 * 默认配置
 */
export declare const DEFAULT_CONFIG: {
    readonly proverEndpoint: "https://zkprover.deltax.online/v1";
    readonly faucetEndpoint: "https://faucet-testnet.onelabs.cc/gas";
    readonly storagePrefix: "zklogin_plus_";
    readonly getSaltUrl: "https://salt.deltax.online/api/userSalt/Google";
};
/**
 * 生成临时密钥对
 */
export declare function generateEphemeralKeyPair(maxEpoch: number): EphemeralKeyPairState;
/**
 * 解码JWT令牌
 */
export declare function decodeJwtToken(token: string): JwtState;
/**
 * 生成用户Salt
 */
export declare function generateUserSalt(getSaltUrl: string, id_token: string): Promise<string>;
/**
 * 生成ZkLogin地址
 */
export declare function generateZkLoginAddress(jwt: string, userSalt: string): ZkLoginAddressState;
/**
 * 获取扩展的临时公钥
 */
export declare function getExtendedPublicKey(publicKey: PublicKey): string;
/**
 * 请求ZK证明
 */
export declare function requestZkProof(jwt: string, extendedEphemeralPublicKey: string, maxEpoch: number, randomness: string, userSalt: string, proverEndpoint: string): Promise<ZkProofData>;
/**
 * 生成zkLogin签名
 */
export declare function buildZkLoginSignature(zkProof: ZkProofData, maxEpoch: number, userSignature: string, addressSeed: string): string;
/**
 * 获取当前epoch
 */
export declare function getCurrentEpoch(suiClient: SuiClient): Promise<number>;
/**
 * 计算最大epoch(当前epoch + 10)
 */
export declare function calculateMaxEpoch(currentEpoch: number): number;
/**
 * 获取地址余额
 */
export declare function getAddressBalance(suiClient: SuiClient, address: string): Promise<string>;
/**
 * 请求水龙头
 */
export declare function requestFaucet(address: string, faucetEndpoint: string): Promise<void>;
/**
 * 构建OAuth URL
 */
export declare function buildOAuthUrl(provider: 'google' | 'facebook' | 'twitch' | 'apple', clientId: string, redirectUri: string, nonce: string, state?: string): string;
/**
 * 验证配置
 */
export declare function validateConfig(config: Partial<ZkLoginConfig>): void;
/**
 * 错误处理工具
 */
export declare class ZkLoginError extends Error {
    code?: string | undefined;
    step?: number | undefined;
    constructor(message: string, code?: string | undefined, step?: number | undefined);
}
//# sourceMappingURL=index.d.ts.map