/**
 * Resource-specific types for SDK operations
 */
import { Hex } from './common';
import { Point } from './crypto';
import type { PrivacyAddress } from './address';
import type { TransactionStatus, TransactionType } from './transaction';
import type { OnProgress } from './eth';
export interface ShieldParams {
    tokenAddress: Hex;
    amount: bigint;
    recipientMpk?: bigint;
    /** Progress callback for multi-step operations (wrap → approve → shield) */
    onProgress?: OnProgress;
}
export interface UnshieldParams {
    tokenAddress: Hex;
    amount: bigint;
    recipientAddress: Hex;
    /** Progress callback for multi-step operations */
    onProgress?: OnProgress;
    /**
     * When true, automatically waits for the unshield to complete on-chain,
     * then unwraps the received WETH to ETH. Requires `wethContractAddress` to be
     * configured. Reports progress via `onProgress` with `UnshieldStep.unwrapping`.
     */
    unwrapWeth?: boolean;
}
export interface ShieldResult {
    txHash: Hex;
    commitment: Hex;
    fee: bigint;
    /** On-chain shield request ID, from the ShieldRequested event */
    requestId: string;
    /** Transaction hash for wrap operation (only if ETH was wrapped to WETH) */
    wrapTxHash?: Hex;
}
export interface UnshieldResult {
    requestId: string;
    /** Local placeholder tx hash used to track pending status until the canonical hash exists */
    txHash: Hex;
    amount: bigint;
}
export interface VaultHistoryFilters {
    type?: TransactionType.shield | TransactionType.unshield;
    tokenAddress?: Hex;
    limit?: number;
}
export interface SendParams {
    to: PrivacyAddress;
    amount: bigint;
    tokenAddress: Hex;
}
export interface TransactionQuery {
    type?: TransactionType;
    status?: TransactionStatus;
    tokenAddress?: Hex;
    limit?: number;
}
export interface TransactionResult {
    requestId: string;
    /** Local placeholder tx hash used to track pending status until the canonical hash exists */
    txHash: Hex;
}
export type SessionRestoredEvent = {
    address: string;
    privacyAddress: string;
};
export type SessionExpiredEvent = {
    reason: 'jwt_expired' | 'account_changed' | 'chain_changed';
};
export interface AuthenticatedResult {
    status: 'authenticated';
    privacyAddress: string;
    mpk: string;
    isNewUser?: boolean;
    chainRegistrations?: Record<string, string>;
}
export interface CredentialRequiredResult {
    status: 'credentialRequired';
    action: 'setup' | 'unlock';
    unlockType: 'pin' | 'password';
    submit: (credential: string) => Promise<AuthenticatedResult>;
}
export interface MnemonicGeneratedResult {
    status: 'mnemonicGenerated';
    /** 12-word BIP39 mnemonic phrase */
    mnemonic: string;
    /**
     * Call to continue after user has seen the mnemonic. Signs vault backup,
     * completes setup.
     *
     * `credential` must be supplied (the user's PIN or password) when the SDK
     * is configured with `persistence.unlock = "pin"` or `"password"`. The
     * underlying unlock provider rejects an absent credential at setup with
     * "credential required for setup". For wallet-sig unlock, omit it.
     */
    proceed: (credential?: string) => Promise<AuthenticatedResult>;
}
export interface RecoveryRequiredResult {
    status: 'recoveryRequired';
    /** Human-readable reason for the failure. */
    reason: string;
    /** Re-authenticate with the user's recovery mnemonic to restore access. */
    recover: (mnemonic: string) => Promise<AuthenticatedResult>;
}
export type AuthResult = AuthenticatedResult | CredentialRequiredResult | MnemonicGeneratedResult | RecoveryRequiredResult;
/**
 * Re-export KeySource from core types.
 */
export type { KeySource } from '../core/types';
export interface PrivacyKeys {
    walletPublicKey: Point;
    viewingKey: bigint;
    viewingPublicKey: Point;
    nullifyingKey: bigint;
    nullifyingPublicKey: Point;
    mpk: bigint;
}
/**
 * Payload for server-mediated authentication.
 *
 * Contains ViewAuth data computed locally by the SDK. The customer's server
 * forwards this along with their own credentials to POST /auth/token.
 */
export interface PrepareLoginPayload {
    /** Master Public Key (hex with 0x prefix) */
    mpk: string;
    /** ViewAuth signature (hex) */
    viewauthSignature: string;
    /** Challenge nonce */
    nonce: string;
    /** Account ID (hex) */
    accountId: string;
    /** Viewing public key */
    viewingPublicKey: {
        x: string;
        y: string;
    };
    /** Nullifying key (hex) */
    nullifyingKey: string;
    /** Wallet address */
    walletAddress?: string;
    /** Auth public key X (for on-chain registration) */
    authPkX?: string;
    /** Auth public key Y (for on-chain registration) */
    authPkY?: string;
    /** Auth key expiry */
    authExpiry?: number;
    /** Auth key signature (hex) */
    authSignature?: string;
}
export interface TokenMetadata {
    address: Hex;
    symbol: string;
    decimals: number;
    name: string;
    priceUSD?: number;
    minShieldAmount?: string;
}
export interface RegisteredToken {
    id: number;
    tokenType: number;
    tokenAddress: Hex;
    tokenSubId: string;
    symbol?: string;
    priceUSD?: number;
    decimals?: number;
    minShieldAmount?: string;
}
export interface FeeRates {
    /** Flat transfer fee in token wei (string). Defaults to "0". */
    transferFeeFlat: string;
    unshieldFeeBps: number;
    feeModel?: 'user_pays' | 'app_pays';
    /** Effective minimum transfer amount in USD (per-app override or global default). */
    minTransferAmountUSD?: number;
}
export interface TokenBalance {
    tokenAddress: Hex;
    shieldedBalance: bigint;
    walletBalance: bigint;
    symbol?: string;
    decimals?: number;
    noteCount?: number;
}
/**
 * Result of an identity lookup via /identity/{identifier} API.
 *
 * Returns the user's public keys and derived privacy address
 * when looking up by Ethereum address or MPK.
 */
export interface IdentityResult {
    /** Master Public Key (32-byte hex) */
    mpk: Hex;
    /** Viewing public key X coordinate (32-byte hex) */
    viewingPublicKeyX: Hex;
    /** Viewing public key Y coordinate (32-byte hex) */
    viewingPublicKeyY: Hex;
    /** Full privacy address (MPK + viewing public key, 194 chars) */
    privacyAddress: PrivacyAddress;
    /** App-defined alias for this user (if set) */
    userAlias?: string;
}
//# sourceMappingURL=resources.d.ts.map