Versions in this module Expand all Collapse all v0 v0.5.0 Mar 23, 2021 Changes in this version + var ErrInvalidPubkeyShares = errors.New("groupShares contains repeated public keys") + var ErrInvalidSignature = errors.New("signature validation failed") + var ErrPrivkNotSet = errors.New("privk not set") + var ErrPubkeyGroupNotSet = errors.New("groupPubk not set") + func CalcThreshold(n int) int + func GetAccount(pubk []byte) []byte + func Hasher(data ...[]byte) []byte + type BNGroupSigner struct + func (bns *BNGroupSigner) Aggregate(sigs [][]byte, groupShares [][]byte) ([]byte, error) + func (bns *BNGroupSigner) PubkeyGroup() ([]byte, error) + func (bns *BNGroupSigner) PubkeyShare() ([]byte, error) + func (bns *BNGroupSigner) SetGroupPubk(groupPubk []byte) error + func (bns *BNGroupSigner) SetPrivk(privk []byte) + func (bns *BNGroupSigner) Sign(msg []byte) ([]byte, error) + func (bns *BNGroupSigner) VerifyGroupShares(groupShares [][]byte) error + type BNGroupValidator struct + func (bnv *BNGroupValidator) PubkeyFromSig(sig []byte) ([]byte, error) + func (bnv *BNGroupValidator) Validate(msg []byte, sig []byte) ([]byte, error) + type BNSigner struct + func (bns *BNSigner) Pubkey() ([]byte, error) + func (bns *BNSigner) SetPrivk(privk []byte) + func (bns *BNSigner) Sign(msg []byte) ([]byte, error) + type BNValidator struct + func (bnv *BNValidator) PubkeyFromSig(sig []byte) ([]byte, error) + func (bnv *BNValidator) Validate(msg []byte, sig []byte) ([]byte, error) + type Secp256k1Signer struct + func (secps *Secp256k1Signer) Pubkey() ([]byte, error) + func (secps *Secp256k1Signer) SetPrivk(privk []byte) error + func (secps *Secp256k1Signer) Sign(msg []byte) ([]byte, error) + type Secp256k1Validator struct + func (secpv *Secp256k1Validator) PubkeyFromSig(msg []byte, sig []byte) ([]byte, error) + func (secpv *Secp256k1Validator) Validate(msg []byte, sig []byte) ([]byte, error)