Definition at line 296 of file zksnark.py.
◆ extended_proof_from_proto()
ExtendedProof zeth.core.zksnark.PGHR13.extended_proof_from_proto |
( |
snark_messages_pb2.ExtendedProof |
ext_proof_proto | ) |
|
|
static |
Reimplemented from zeth.core.zksnark.IZKSnarkProvider.
Definition at line 437 of file zksnark.py.
437 def extended_proof_from_proto(
438 ext_proof_proto: snark_messages_pb2.ExtendedProof) -> ExtendedProof:
439 ext_proof = ext_proof_proto.pghr13_extended_proof
440 return ExtendedProof(
450 inputs=cast(List[str], json.loads(ext_proof.inputs)))
◆ extended_proof_to_proto()
snark_messages_pb2.ExtendedProof zeth.core.zksnark.PGHR13.extended_proof_to_proto |
( |
ExtendedProof |
ext_proof | ) |
|
|
static |
Reimplemented from zeth.core.zksnark.IZKSnarkProvider.
Definition at line 453 of file zksnark.py.
453 def extended_proof_to_proto(
454 ext_proof: ExtendedProof) -> snark_messages_pb2.ExtendedProof:
455 proof = ext_proof.proof
456 assert isinstance(proof, PGHR13.Proof)
457 extproof_proto = snark_messages_pb2.ExtendedProof()
458 proof_proto = extproof_proto.pghr13_extended_proof \
468 proof_proto.inputs = json.dumps(ext_proof.inputs)
469 return extproof_proto
◆ get_contract_name()
Get the verifier and mixer contracts for this SNARK.
Reimplemented from zeth.core.zksnark.IZKSnarkProvider.
Definition at line 388 of file zksnark.py.
388 def get_contract_name(pp: PairingParameters) -> str:
389 return _contract_name(
"Pghr13", pp)
◆ proof_from_json_dict()
PGHR13.Proof zeth.core.zksnark.PGHR13.proof_from_json_dict |
( |
Dict[str, Any] |
json_dict | ) |
|
|
static |
◆ proof_to_contract_parameters()
Generate the leading parameters to the mix function for this SNARK, from a
GenericProof object.
Reimplemented from zeth.core.zksnark.IZKSnarkProvider.
Definition at line 472 of file zksnark.py.
472 def proof_to_contract_parameters(
473 proof: IProof, pp: PairingParameters) -> List[int]:
474 assert isinstance(proof, PGHR13.Proof)
◆ verification_key_from_json_dict()
Reimplemented from zeth.core.zksnark.IZKSnarkProvider.
Definition at line 428 of file zksnark.py.
428 def verification_key_from_json_dict(
429 json_dict: Dict[str, Any]) -> PGHR13.VerificationKey:
430 return PGHR13.VerificationKey.from_json_dict(json_dict)
◆ verification_key_from_proto()
PGHR13.VerificationKey zeth.core.zksnark.PGHR13.verification_key_from_proto |
( |
snark_messages_pb2.VerificationKey |
vk_obj | ) |
|
|
static |
Definition at line 408 of file zksnark.py.
408 def verification_key_from_proto(
409 vk_obj: snark_messages_pb2.VerificationKey) -> PGHR13.VerificationKey:
410 vk = vk_obj.pghr13_verification_key
411 return PGHR13.VerificationKey(
419 ic=[G1Point.from_json_list(ic)
420 for ic
in json.loads(vk.ic)])
◆ verification_key_to_contract_parameters()
Reimplemented from zeth.core.zksnark.IZKSnarkProvider.
Definition at line 392 of file zksnark.py.
392 def verification_key_to_contract_parameters(
393 vk: IVerificationKey,
394 pp: PairingParameters) -> List[int]:
395 assert isinstance(vk, PGHR13.VerificationKey)
405 for ic
in vk.ic], [])
◆ verification_key_to_proto()
snark_messages_pb2.VerificationKey zeth.core.zksnark.PGHR13.verification_key_to_proto |
( |
IVerificationKey |
vk | ) |
|
|
static |
Reimplemented from zeth.core.zksnark.IZKSnarkProvider.
Definition at line 423 of file zksnark.py.
423 def verification_key_to_proto(
424 vk: IVerificationKey) -> snark_messages_pb2.VerificationKey:
425 raise Exception(
"not implemented")
The documentation for this class was generated from the following file:
- /home/runner/work/zeth/zeth/client/zeth/core/zksnark.py