mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-12-27 09:05:18 +00:00
20 lines
783 B
Go
20 lines
783 B
Go
package vdf
|
|
|
|
import (
|
|
generated "source.quilibrium.com/quilibrium/cermonyclient/vdf/generated/vdf"
|
|
)
|
|
|
|
//go:generate ./generate.sh
|
|
|
|
// WesolowskiSolve Solve and prove with the Wesolowski VDF using the given parameters.
|
|
// Outputs the concatenated solution and proof (in this order).
|
|
func WesolowskiSolve(intSizeBits uint16, challenge []uint8, difficulty uint64) []uint8 {
|
|
return generated.WesolowskiSolve(intSizeBits, challenge, difficulty)
|
|
}
|
|
|
|
// WesolowskiVerify Verify with the Wesolowski VDF using the given parameters.
|
|
// `allegedSolution` is the output of `WesolowskiSolve`.
|
|
func WesolowskiVerify(intSizeBits uint16, challenge []uint8, difficulty uint64, allegedSolution []uint8) bool {
|
|
return generated.WesolowskiVerify(intSizeBits, challenge, difficulty, allegedSolution)
|
|
}
|