import { type OwnedBytes } from '../backend-contract/primitives'; export interface NativeBinaryReference { readonly ownerToken: string; readonly operationCorrelation: string; readonly byteOffset: number; readonly byteLength: number; readonly ownership: 'nativeOwnedCopy'; } export interface NativeProtocolBinaryRuntime { retain(operationCorrelation: string, value: Uint8Array): NativeBinaryReference; copy(reference: NativeBinaryReference): Uint8Array; release(reference: NativeBinaryReference): boolean; submit(command: Uint8Array): void; setEventSink(listener: (record: Uint8Array) => void): void; setFatalSink(listener: (reason: string) => void): void; retainedByteCount(): number; retainedPayloadCount(): number; } declare global { var __unifiedBleNativeProtocolV2: NativeProtocolBinaryRuntime | undefined; } /** Returns the installed Android JSI binary transport and rejects every absent/stale boundary. */ export declare function requireNativeProtocolBinaryRuntime(): NativeProtocolBinaryRuntime; /** Copies caller-owned bytes into the native protocol before radio dispatch. */ export declare function retainNativeProtocolBytes(operationCorrelation: string, value: Readonly): NativeBinaryReference; /** Returns an independently owned JS copy of bytes retained by the native protocol. */ export declare function copyNativeProtocolBytes(reference: NativeBinaryReference): OwnedBytes; /** Releases a retained payload exactly once; stale/foreign references fail closed in native code. */ export declare function releaseNativeProtocolBytes(reference: NativeBinaryReference): boolean; /** Submits one already-validated canonical command record to the Android radio dispatcher. */ export declare function submitNativeProtocolCommand(command: Uint8Array): void; /** Installs the single attachment-scoped native event sink. */ export declare function setNativeProtocolEventSink(listener: (record: Uint8Array) => void): void; /** Installs the attachment-fatal path used when JSI can no longer deliver terminals safely. */ export declare function setNativeProtocolFatalSink(listener: (reason: string) => void): void; //# sourceMappingURL=rn-jsi-binary-runtime.d.ts.map