ProofProvider
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / ProofProvider
Interface: ProofProvider
Section titled “Interface: ProofProvider”Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:149
Proof Provider Interface
Implementations of this interface provide ZK proof generation and verification. The SDK uses this interface to remain agnostic to the underlying ZK framework.
Example
Section titled “Example”// Use mock provider for testingconst mockProvider = new MockProofProvider()
// Use Noir provider for productionconst noirProvider = new NoirProofProvider()
// Configure SIP client with providerconst sip = new SIP({ network: 'testnet', proofProvider: noirProvider,})Properties
Section titled “Properties”framework
Section titled “framework”
readonlyframework:ProofFramework
Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:153
The ZK framework this provider uses
isReady
Section titled “isReady”
readonlyisReady:boolean
Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:158
Whether the provider is ready to generate proofs (e.g., circuits compiled, keys loaded)
Methods
Section titled “Methods”initialize()
Section titled “initialize()”initialize():
Promise<void>
Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:164
Initialize the provider (compile circuits, load keys, etc.)
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”Error if initialization fails
generateFundingProof()
Section titled “generateFundingProof()”generateFundingProof(
params):Promise<ProofResult>
Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:176
Generate a Funding Proof
Proves that the user has sufficient balance without revealing the exact amount.
Parameters
Section titled “Parameters”params
Section titled “params”Funding proof parameters
Returns
Section titled “Returns”Promise<ProofResult>
The generated proof with public inputs
Throws
Section titled “Throws”ProofGenerationError if proof generation fails
docs/specs/FUNDING-PROOF.md (~22,000 constraints)
generateValidityProof()
Section titled “generateValidityProof()”generateValidityProof(
params):Promise<ProofResult>
Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:188
Generate a Validity Proof
Proves that the intent is authorized without revealing the sender.
Parameters
Section titled “Parameters”params
Section titled “params”Validity proof parameters
Returns
Section titled “Returns”Promise<ProofResult>
The generated proof with public inputs
Throws
Section titled “Throws”ProofGenerationError if proof generation fails
docs/specs/VALIDITY-PROOF.md (~72,000 constraints)
generateFulfillmentProof()
Section titled “generateFulfillmentProof()”generateFulfillmentProof(
params):Promise<ProofResult>
Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:200
Generate a Fulfillment Proof
Proves that the solver correctly delivered the output.
Parameters
Section titled “Parameters”params
Section titled “params”Fulfillment proof parameters
Returns
Section titled “Returns”Promise<ProofResult>
The generated proof with public inputs
Throws
Section titled “Throws”ProofGenerationError if proof generation fails
docs/specs/FULFILLMENT-PROOF.md (~22,000 constraints)
verifyProof()
Section titled “verifyProof()”verifyProof(
proof):Promise<boolean>
Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:207
Verify a proof
Parameters
Section titled “Parameters”The proof to verify
Returns
Section titled “Returns”Promise<boolean>
true if the proof is valid, false otherwise