MockProofProvider
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / MockProofProvider
Class: MockProofProvider
Section titled “Class: MockProofProvider”Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:346
Mock Proof Provider for testing
Examples
Section titled “Examples”// Only use in testsconst provider = new MockProofProvider()await provider.initialize()
const result = await provider.generateFundingProof({ balance: 100n, minimumRequired: 50n, // ... other params})// SSR fallback (silent mode)const ssrFallback = new MockProofProvider({ silent: true })Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MockProofProvider(
options?):MockProofProvider
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:356
Create a new MockProofProvider
Parameters
Section titled “Parameters”options?
Section titled “options?”MockProofProviderOptions
Configuration options
Returns
Section titled “Returns”MockProofProvider
Properties
Section titled “Properties”framework
Section titled “framework”
readonlyframework:ProofFramework
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:347
The ZK framework this provider uses
Implementation of
Section titled “Implementation of”Accessors
Section titled “Accessors”isReady
Section titled “isReady”Get Signature
Section titled “Get Signature”get isReady():
boolean
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:357
Whether the provider is ready to generate proofs (e.g., circuits compiled, keys loaded)
Returns
Section titled “Returns”boolean
Whether the provider is ready to generate proofs (e.g., circuits compiled, keys loaded)
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”initialize()
Section titled “initialize()”initialize():
Promise<void>
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:363
Initialize the mock provider
Logs a warning to console about mock usage (unless silent mode is enabled).
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”generateFundingProof()
Section titled “generateFundingProof()”generateFundingProof(
params):Promise<ProofResult>
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:369
Generate a mock funding proof
⚠️ This proof provides NO cryptographic guarantees!
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<ProofResult>
Implementation of
Section titled “Implementation of”ProofProvider.generateFundingProof
generateValidityProof()
Section titled “generateValidityProof()”generateValidityProof(
params):Promise<ProofResult>
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:375
Generate a mock validity proof
⚠️ This proof provides NO cryptographic guarantees!
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<ProofResult>
Implementation of
Section titled “Implementation of”ProofProvider.generateValidityProof
generateFulfillmentProof()
Section titled “generateFulfillmentProof()”generateFulfillmentProof(
params):Promise<ProofResult>
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:381
Generate a mock fulfillment proof
⚠️ This proof provides NO cryptographic guarantees!
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<ProofResult>
Implementation of
Section titled “Implementation of”ProofProvider.generateFulfillmentProof
verifyProof()
Section titled “verifyProof()”verifyProof(
proof):Promise<boolean>
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:388
Verify a mock proof
Only verifies that the proof has the mock prefix. ⚠️ This provides NO cryptographic verification!
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”isMockProof()
Section titled “isMockProof()”
staticisMockProof(proof):boolean
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:392
Check if a proof is a mock proof
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean