add package comments (#236)

package comments added to all packages
This commit is contained in:
Dmitry Holodov
2022-12-02 00:43:32 -06:00
committed by GitHub
parent 4d95c4d9a9
commit 1e83673f23
37 changed files with 75 additions and 21 deletions

View File

@@ -1,3 +1,8 @@
// Package dleq provides a sub-api built on top of the go-dleq package for our atomic
// swaps. The API allows you to verify that a Monero public spend key on the ed25519 curve
// have the same discrete logarithm (same shared secret) as a public key on the secp256k1
// curve. A ZK DLEq proof is used to prove equivalence of the secret key corresponding to
// public keys on both curves.
package dleq
import (
@@ -25,14 +30,6 @@ func NewProofWithoutSecret(p []byte) *Proof {
}
}
// NewProofWithSecret returns a new Proof with the given secret.
// Note that the returned proof actually lacks the `proof` field.
func NewProofWithSecret(s [32]byte) *Proof {
return &Proof{
secret: s,
}
}
// Secret returns the proof's 32-byte secret
func (p *Proof) Secret() [32]byte {
var s [32]byte