Skip to content

NoirProofConverter

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / NoirProofConverter

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

Converter for Noir proofs (Barretenberg backend)

const converter = new NoirProofConverter()
// Convert to SIP format
const result = converter.toSIP(noirProof)
if (result.success) {
console.log('SIP Proof:', result.result)
}
// Convert back to Noir format
const nativeResult = converter.fromSIP(sipProof)
if (nativeResult.success) {
console.log('Noir Proof:', nativeResult.result)
}

new NoirProofConverter(): NoirProofConverter

NoirProofConverter

readonly system: "noir"

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

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:2498

Converter version for tracking

ProofConverter.version

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

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

Convert Noir native proof to SIP unified format

NoirNativeProof

ConversionOptions

ConversionResult<SingleProof>

ProofConverter.toSIP


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

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

Convert SIP unified format to Noir native proof

SingleProof

ConversionOptions

ConversionResult<NoirNativeProof>

ProofConverter.fromSIP


validateNative(nativeProof): ConverterValidationResult

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

Validate a Noir native proof structure

NoirNativeProof

ConverterValidationResult

ProofConverter.validateNative


canConvertFromSIP(sipProof): boolean

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

Check if a SIP proof can be converted to Noir format

SingleProof

boolean

ProofConverter.canConvertFromSIP


getSupportedVersions(): string[]

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

Get supported Noir versions

string[]

ProofConverter.getSupportedVersions