package
0.0.0-20220616152218-3da4c06c590a
Repository: https://github.com/astra-net/astra-network.git
Documentation: pkg.go.dev
# Functions
AggregateMasks computes the bitwise OR of the two given participation masks.
AggregateSig aggregates all the BLS signature into a single multi-signature.
BytesToBLSPublicKey converts bytes into bls.PublicKey pointer.
FromLibBLSPublicKeyUnsafe could give back nil, use only in cases when have invariant that return value won't be nil.
NewMask returns a new participation bitmask for cosigning where all cosigners are disabled by default.
NewThresholdPolicy returns a new ThresholdPolicy with the given threshold.
RandPrivateKey returns a random private key.
SeparateSigAndMask parse the commit signature data into signature and bitmap.
WrapperFromPrivateKey makes a PrivateKeyWrapper from bls secret key.
WrapperPublicKeyFromString makes a PublicKeyWrapper from public key hex string.
# Variables
BLSPubKeyCache is the Cache of the Deserialized BLS PubKey.
# Structs
CompletePolicy is the default policy requiring that all participants have cosigned to make a collective signature valid.
Mask represents a cosigning participation bitmask.
PrivateKeyWrapper combines the bls private key and the corresponding public key.
PublicKeyWrapper defines the bls public key in both serialized and deserialized form.
ThresholdPolicy allows to specify a simple t-of-n policy requring that at least the given threshold number of participants t have cosigned to make a collective signature valid.
# Interfaces
Policy represents a fully customizable cosigning policy deciding what cosigner sets are and aren't sufficient for a collective signature to be considered acceptable to a verifier.
# Type aliases
SerializedPublicKey defines the serialized bls public key.
SerializedSignature defines the bls signature.