UnifiedProofConverter
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / UnifiedProofConverter
Class: UnifiedProofConverter
Section titled “Class: UnifiedProofConverter”Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2668
Unified converter that routes to the appropriate system-specific converter
Example
Section titled “Example”const converter = new UnifiedProofConverter()
// Convert any native proof to SIP formatconst noirResult = converter.toSIP(noirProof)const halo2Result = converter.toSIP(halo2Proof)const kimchiResult = converter.toSIP(kimchiProof)
// Convert SIP proof back to native formatconst nativeResult = converter.fromSIP(sipProof)Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UnifiedProofConverter():
UnifiedProofConverter
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2670
Returns
Section titled “Returns”UnifiedProofConverter
Methods
Section titled “Methods”toSIP()
Section titled “toSIP()”toSIP(
nativeProof,options?):ConversionResult<SingleProof>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2674
Convert a native proof to SIP unified format
Parameters
Section titled “Parameters”nativeProof
Section titled “nativeProof”options?
Section titled “options?”Returns
Section titled “Returns”ConversionResult<SingleProof>
fromSIP()
Section titled “fromSIP()”fromSIP(
sipProof,options?):ConversionResult<AnyNativeProof>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2678
Convert a SIP proof to native format
Parameters
Section titled “Parameters”sipProof
Section titled “sipProof”options?
Section titled “options?”Returns
Section titled “Returns”ConversionResult<AnyNativeProof>
getConverter()
Section titled “getConverter()”getConverter(
system):ProofConverter<AnyNativeProof> |undefined
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2682
Get converter for a specific proof system
Parameters
Section titled “Parameters”system
Section titled “system”Returns
Section titled “Returns”ProofConverter<AnyNativeProof> | undefined
getSupportedSystems()
Section titled “getSupportedSystems()”getSupportedSystems():
ProofSystem[]
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2686
Get all supported proof systems
Returns
Section titled “Returns”isSystemSupported()
Section titled “isSystemSupported()”isSystemSupported(
system):boolean
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2690
Check if a proof system is supported
Parameters
Section titled “Parameters”system
Section titled “system”Returns
Section titled “Returns”boolean
registerConverter()
Section titled “registerConverter()”registerConverter(
system,converter):void
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:2694
Register a custom converter for a proof system
Parameters
Section titled “Parameters”system
Section titled “system”converter
Section titled “converter”ProofConverter<AnyNativeProof>
Returns
Section titled “Returns”void