CacheKeyGenerator
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / CacheKeyGenerator
Class: CacheKeyGenerator
Section titled “Class: CacheKeyGenerator”Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:3147
Generates deterministic cache keys from proof input components
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CacheKeyGenerator():
CacheKeyGenerator
Returns
Section titled “Returns”CacheKeyGenerator
Methods
Section titled “Methods”generate()
Section titled “generate()”generate(
components):CacheKey
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:3151
Generate a cache key from components
Parameters
Section titled “Parameters”components
Section titled “components”Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”parse()
Section titled “parse()”parse(
key):CacheKeyComponents|null
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:3155
Parse a cache key string back to components
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”CacheKeyComponents | null
Implementation of
Section titled “Implementation of”hashInputs()
Section titled “hashInputs()”hashInputs(
inputs):string
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:3159
Hash input data deterministically
Parameters
Section titled “Parameters”inputs
Section titled “inputs”Record<string, unknown>
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”generateFromInputs()
Section titled “generateFromInputs()”generateFromInputs(
system,circuitId,privateInputs,publicInputs,version?):CacheKey
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:3163
Generate a cache key from raw inputs
Parameters
Section titled “Parameters”system
Section titled “system”circuitId
Section titled “circuitId”string
privateInputs
Section titled “privateInputs”Record<string, unknown>
publicInputs
Section titled “publicInputs”Record<string, unknown>
version?
Section titled “version?”string
Returns
Section titled “Returns”equals()
Section titled “equals()”equals(
a,b):boolean
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:3167
Check if two cache keys are equal
Parameters
Section titled “Parameters”string | CacheKey
string | CacheKey
Returns
Section titled “Returns”boolean
matches()
Section titled “matches()”matches(
key,pattern):boolean
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:3171
Check if a key matches a pattern (glob-style)
Parameters
Section titled “Parameters”string
pattern
Section titled “pattern”string
Returns
Section titled “Returns”boolean