Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Groth16CommitmentProof ¶
type Groth16CommitmentProof struct {
Proof SolidityProof `json:"proof"`
Commitments [2]*big.Int `json:"commitments"`
CommitmentPok [2]*big.Int `json:"commitment_pok"`
}
Groth16CommitmentProof represents a Groth16 proof with commitments, for Solidity.
func (*Groth16CommitmentProof) ABIEncode ¶
func (p *Groth16CommitmentProof) ABIEncode() ([]byte, error)
ABIEncode encodes the Groth16CommitmentProof to an ABI-encoded byte slice matching Solidity’s (uint256[8],uint256[2],uint256[2]) layout.
func (*Groth16CommitmentProof) FromGnarkProof ¶
func (p *Groth16CommitmentProof) FromGnarkProof(proof groth16.Proof) error
FromGnarkProof converts a gnark groth16 proof to a Solidity‑compatible proof.
func (*Groth16CommitmentProof) String ¶
func (p *Groth16CommitmentProof) String() string
String returns a JSON representation of the Groth16CommitmentProof as a string. This is useful for debugging or logging purposes. If marshalling fails, it returns an empty JSON object as a string.
Click to show internal directories.
Click to hide internal directories.