@reclaimprotocol/attestor-core
Version:
<div> <div> <img src="https://raw.githubusercontent.com/reclaimprotocol/.github/main/assets/banners/Attestor-Core.png" /> </div> </div>
22 lines (21 loc) • 872 B
TypeScript
import type { MessageReveal_OPRFRawMarker as OPRFRawMarker } from '../../proto/api.ts';
import type { Logger } from '../../types/index.ts';
export type OPRFRawResult = {
/** Location of the data that was OPRF'd */
dataLocation: {
fromIndex: number;
length: number;
};
/** The OPRF nullifier (hash output) */
nullifier: Uint8Array;
};
/**
* Compute OPRF for plaintext data marked with oprf-raw.
* This runs server-side since the attestor has access to the revealed plaintext.
*
* @param plaintext - The revealed plaintext from the TLS transcript
* @param markers - Positions in the plaintext to compute OPRF for
* @param logger - Logger instance
* @returns Array of OPRF results with nullifiers
*/
export declare function computeOPRFRaw(plaintext: Uint8Array, markers: OPRFRawMarker[], logger: Logger): Promise<OPRFRawResult[]>;