Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTxProof ¶
func VerifyTxProof ¶
Types ¶
type ThresholdSig ¶
type ThresholdSig struct {
// contains filtered or unexported fields
}
func NewThresholdSig ¶
func NewThresholdSig(threshold, total int) (*ThresholdSig, error)
func (*ThresholdSig) AggregateShares ¶
func (ts *ThresholdSig) AggregateShares(signatures map[int]*bls.Sign) (*bls.Sign, error)
func (*ThresholdSig) PublicKey ¶
func (ts *ThresholdSig) PublicKey() *bls.PublicKey
func (*ThresholdSig) Share ¶
func (ts *ThresholdSig) Share(index int) *bls.SecretKey
func (*ThresholdSig) Sign ¶
func (ts *ThresholdSig) Sign(message []byte) *bls.Sign
type TxValidityCircuit ¶
type TxValidityCircuit struct {
Amount frontend.Variable `gnark:",secret"`
Balance frontend.Variable `gnark:",public"`
Signature frontend.Variable `gnark:",secret"`
}
ZK Circuit for transaction validity
type ZKProof ¶
type ZKProof struct {
Proof groth16.Proof `json:"proof"`
PublicInputs []*bn256.Scalar `json:"public_inputs"`
Circuit string `json:"circuit"`
Message []byte `json:"message"`
Signature *bls.Sign `json:"signature"`
}
func (*ZKProof) VerifyThreshold ¶
type ZKThreshold ¶
type ZKThreshold struct {
// contains filtered or unexported fields
}
func NewZKThreshold ¶
func NewZKThreshold(threshold int, total int) (*ZKThreshold, error)
func (*ZKThreshold) SignZKProof ¶
Click to show internal directories.
Click to hide internal directories.