Module: types
EZKLServiceConfig
Bases: BaseModel
Configuration for loading EZKL Proving Artifacts. If a model source & repo_id are provided, those are loaded & used as the default artifact.
Attributes:
Name | Type | Description |
---|---|---|
ARTIFACT_DIRECTORY |
Optional[str]
|
Defaults to |
HF_TOKEN |
Optional[str]
|
Defaults to |
Source code in src/infernet_ml/zk/ezkl/types.py
EZKLVerifyProofRequest
Bases: BaseModel
Data representing a request to verify an EZKL proof. Used in the EZKL Proof Service.
Attributes:
Name | Type | Description |
---|---|---|
repo_id |
str
|
RitualRepoId id of the repository containing EZKL artifacts |
proof |
str
|
Dict[str, Any] The ezkl proof to verify |
Source code in src/infernet_ml/zk/ezkl/types.py
WitnessInputData
Bases: BaseModel
data required to generate a EZKL request witness - specifically, an input vector, and an output vector.
Attributes:
Name | Type | Description |
---|---|---|
input_data |
RitualVector
|
the input vector |
output_data |
Optional[RitualVector]
|
the output vector |
Source code in src/infernet_ml/zk/ezkl/types.py
to_abi_encoded: bytes
property
Encode the WitnessInputData object as an ABI-encoded byte string.
Returns:
Name | Type | Description |
---|---|---|
bytes |
bytes
|
the ABI-encoded byte string |
from_abi_encoded(input_hex)
classmethod
Create a WitnessInputData object from an ABI-encoded byte string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_hex |
str | bytes
|
the ABI-encoded byte string |
required |
Returns:
Name | Type | Description |
---|---|---|
WitnessInputData |
WitnessInputData
|
the WitnessInputData object |
Source code in src/infernet_ml/zk/ezkl/types.py
from_numpy(input_vector, output_vector=None)
classmethod
Create a WitnessInputData object from numpy arrays.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_vector |
FloatNumpy
|
the input vector |
required |
output_vector |
Optional[FloatNumpy]
|
the output vector |
None
|
Returns:
Name | Type | Description |
---|---|---|
WitnessInputData |
WitnessInputData
|
the WitnessInputData object |