import type { IapPlatform } from '../types'; import { type PurchaseError, type PurchaseErrorProps } from './errorMapping'; /** * Prefix shared with the native Expo bridges. Expo Modules only transports an * exception code and message for rejected async functions, so native bridges * append the canonical PurchaseError payload to the message with this marker. */ export declare const OPENIAP_ERROR_ENVELOPE_PREFIX = "OPENIAP_ERROR_JSON:"; /** * Rebuild a canonical PurchaseError from an Expo Modules Promise rejection, * read from the message envelope (see OPENIAP_ERROR_ENVELOPE_PREFIX). Direct * fields are accepted too, for the Vega/Onside adapters and older native builds. */ export declare const createPurchaseErrorFromNativeException: (error: unknown, platform: IapPlatform, fallback?: PurchaseErrorProps) => PurchaseError; /** * Run a native call and rethrow its OpenIAP rejection as a PurchaseError. * JavaScript errors without native error fields keep their identity. */ export declare const invokeNativeWithPurchaseError: (operation: () => Promise, platform: IapPlatform, fallback?: PurchaseErrorProps) => Promise; //# sourceMappingURL=nativeError.d.ts.map