Skip to content

ProofProvider

SIP Protocol API Reference v0.7.0


SIP Protocol API Reference / 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.

// Use mock provider for testing
const mockProvider = new MockProofProvider()
// Use Noir provider for production
const noirProvider = new NoirProofProvider()
// Configure SIP client with provider
const sip = new SIP({
network: 'testnet',
proofProvider: noirProvider,
})

readonly framework: ProofFramework

Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:153

The ZK framework this provider uses


readonly isReady: 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)

initialize(): Promise<void>

Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:164

Initialize the provider (compile circuits, load keys, etc.)

Promise<void>

Error if initialization fails


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.

FundingProofParams

Funding proof parameters

Promise<ProofResult>

The generated proof with public inputs

ProofGenerationError if proof generation fails

docs/specs/FUNDING-PROOF.md (~22,000 constraints)


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.

ValidityProofParams

Validity proof parameters

Promise<ProofResult>

The generated proof with public inputs

ProofGenerationError if proof generation fails

docs/specs/VALIDITY-PROOF.md (~72,000 constraints)


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.

FulfillmentProofParams

Fulfillment proof parameters

Promise<ProofResult>

The generated proof with public inputs

ProofGenerationError if proof generation fails

docs/specs/FULFILLMENT-PROOF.md (~22,000 constraints)


verifyProof(proof): Promise<boolean>

Defined in: @sip-protocol/sdk/dist/noir-DKfEzWy9.d.ts:207

Verify a proof

ZKProof

The proof to verify

Promise<boolean>

true if the proof is valid, false otherwise