MockProofProvider
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / MockProofProvider
Class: MockProofProvider
Section titled “Class: MockProofProvider”Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:398
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-DXh2IGkz.d.ts:408
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-DXh2IGkz.d.ts:399
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-DXh2IGkz.d.ts:409
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-DXh2IGkz.d.ts:415
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”waitUntilReady()
Section titled “waitUntilReady()”waitUntilReady(
timeoutMs?):Promise<void>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:423
Wait for the provider to be ready, with optional timeout
For MockProofProvider, initialization is instant so this always resolves immediately.
Parameters
Section titled “Parameters”timeoutMs?
Section titled “timeoutMs?”number
Maximum time to wait (ignored for mock provider)
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-DXh2IGkz.d.ts:429
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-DXh2IGkz.d.ts:435
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-DXh2IGkz.d.ts:441
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-DXh2IGkz.d.ts:448
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-DXh2IGkz.d.ts:452
Check if a proof is a mock proof
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean