Halo2ProofConverter
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / Halo2ProofConverter
Class: Halo2ProofConverter
Section titled “Class: 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.
Example
Section titled “Example”const converter = new Halo2ProofConverter()
// Convert to SIP formatconst result = converter.toSIP(halo2Proof)if (result.success) { console.log('SIP Proof:', result.result)}Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Halo2ProofConverter():
Halo2ProofConverter
Returns
Section titled “Returns”Halo2ProofConverter
Properties
Section titled “Properties”system
Section titled “system”
readonlysystem:"halo2"
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2554
The proof system this converter handles
Implementation of
Section titled “Implementation of”version
Section titled “version”
readonlyversion:"1.0.0"="1.0.0"
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2555
Converter version for tracking
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”toSIP()
Section titled “toSIP()”toSIP(
nativeProof,options?):ConversionResult<SingleProof>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2559
Convert Halo2 native proof to SIP unified format
Parameters
Section titled “Parameters”nativeProof
Section titled “nativeProof”options?
Section titled “options?”Returns
Section titled “Returns”ConversionResult<SingleProof>
Implementation of
Section titled “Implementation of”fromSIP()
Section titled “fromSIP()”fromSIP(
sipProof,options?):ConversionResult<Halo2NativeProof>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2563
Convert SIP unified format to Halo2 native proof
Parameters
Section titled “Parameters”sipProof
Section titled “sipProof”options?
Section titled “options?”Returns
Section titled “Returns”ConversionResult<Halo2NativeProof>
Implementation of
Section titled “Implementation of”validateNative()
Section titled “validateNative()”validateNative(
nativeProof):ConverterValidationResult
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2567
Validate a Halo2 native proof structure
Parameters
Section titled “Parameters”nativeProof
Section titled “nativeProof”Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”canConvertFromSIP()
Section titled “canConvertFromSIP()”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
Parameters
Section titled “Parameters”sipProof
Section titled “sipProof”Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”ProofConverter.canConvertFromSIP
getSupportedVersions()
Section titled “getSupportedVersions()”getSupportedVersions():
string[]
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2575
Get supported Halo2 versions
Returns
Section titled “Returns”string[]