NoirProofConverter
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / NoirProofConverter
Class: NoirProofConverter
Section titled “Class: NoirProofConverter”Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2496
Converter for Noir proofs (Barretenberg backend)
Example
Section titled “Example”const converter = new NoirProofConverter()
// Convert to SIP formatconst result = converter.toSIP(noirProof)if (result.success) { console.log('SIP Proof:', result.result)}
// Convert back to Noir formatconst nativeResult = converter.fromSIP(sipProof)if (nativeResult.success) { console.log('Noir Proof:', nativeResult.result)}Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new NoirProofConverter():
NoirProofConverter
Returns
Section titled “Returns”NoirProofConverter
Properties
Section titled “Properties”system
Section titled “system”
readonlysystem:"noir"
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2497
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:2498
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:2502
Convert Noir 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<NoirNativeProof>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2506
Convert SIP unified format to Noir native proof
Parameters
Section titled “Parameters”sipProof
Section titled “sipProof”options?
Section titled “options?”Returns
Section titled “Returns”ConversionResult<NoirNativeProof>
Implementation of
Section titled “Implementation of”validateNative()
Section titled “validateNative()”validateNative(
nativeProof):ConverterValidationResult
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2510
Validate a Noir 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:2514
Check if a SIP proof can be converted to Noir 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:2518
Get supported Noir versions
Returns
Section titled “Returns”string[]