Skip to content

UnifiedProofConverter

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / UnifiedProofConverter

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2668

Unified converter that routes to the appropriate system-specific converter

const converter = new UnifiedProofConverter()
// Convert any native proof to SIP format
const noirResult = converter.toSIP(noirProof)
const halo2Result = converter.toSIP(halo2Proof)
const kimchiResult = converter.toSIP(kimchiProof)
// Convert SIP proof back to native format
const nativeResult = converter.fromSIP(sipProof)

new UnifiedProofConverter(): UnifiedProofConverter

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2670

UnifiedProofConverter

toSIP(nativeProof, options?): ConversionResult<SingleProof>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2674

Convert a native proof to SIP unified format

AnyNativeProof

ConversionOptions

ConversionResult<SingleProof>


fromSIP(sipProof, options?): ConversionResult<AnyNativeProof>

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2678

Convert a SIP proof to native format

SingleProof

ConversionOptions

ConversionResult<AnyNativeProof>


getConverter(system): ProofConverter<AnyNativeProof> | undefined

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2682

Get converter for a specific proof system

ProofSystem

ProofConverter<AnyNativeProof> | undefined


getSupportedSystems(): ProofSystem[]

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2686

Get all supported proof systems

ProofSystem[]


isSystemSupported(system): boolean

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2690

Check if a proof system is supported

ProofSystem

boolean


registerConverter(system, converter): void

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2694

Register a custom converter for a proof system

ProofSystem

ProofConverter<AnyNativeProof>

void