Skip to content

Halo2ProofConverter

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / Halo2ProofConverter

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

Converter for Halo2 proofs

Halo2 is a zkSNARK proving system used by Zcash and other projects. It uses the PLONK arithmetization with custom gates.

const converter = new Halo2ProofConverter()
// Convert to SIP format
const result = converter.toSIP(halo2Proof)
if (result.success) {
console.log('SIP Proof:', result.result)
}

new Halo2ProofConverter(): Halo2ProofConverter

Halo2ProofConverter

readonly system: "halo2"

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

The proof system this converter handles

ProofConverter.system


readonly version: "1.0.0" = "1.0.0"

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

Converter version for tracking

ProofConverter.version

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

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

Convert Halo2 native proof to SIP unified format

Halo2NativeProof

ConversionOptions

ConversionResult<SingleProof>

ProofConverter.toSIP


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

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

Convert SIP unified format to Halo2 native proof

SingleProof

ConversionOptions

ConversionResult<Halo2NativeProof>

ProofConverter.fromSIP


validateNative(nativeProof): ConverterValidationResult

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

Validate a Halo2 native proof structure

Halo2NativeProof

ConverterValidationResult

ProofConverter.validateNative


canConvertFromSIP(sipProof): boolean

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

Check if a SIP proof can be converted to Halo2 format

SingleProof

boolean

ProofConverter.canConvertFromSIP


getSupportedVersions(): string[]

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

Get supported Halo2 versions

string[]

ProofConverter.getSupportedVersions