Documentation
¶
Index ¶
- type Signer
- func (s *Signer) AggregateThresholdShares(ctx context.Context, message []byte, shares []threshold.SignatureShare) (threshold.Signature, error)
- func (s *Signer) BLSSecretKey() *bls.SecretKey
- func (s *Signer) GetBLSPublicKey() []byte
- func (s *Signer) HasThresholdKey() bool
- func (s *Signer) SetThresholdKeyShare(keyShare threshold.KeyShare) error
- func (s *Signer) SignBLS(message []byte) ([]byte, error)
- func (s *Signer) SignThresholdShare(ctx context.Context, message []byte, signers []int) (threshold.SignatureShare, error)
- func (s *Signer) ThresholdGroupKey() threshold.PublicKey
- func (s *Signer) ThresholdIndex() int
- func (s *Signer) ThresholdPublicShare() []byte
- func (s *Signer) ThresholdSchemeID() threshold.SchemeID
- func (s *Signer) ThresholdSeed() []byte
- func (s *Signer) VerifyBLS(message, signature []byte) bool
- func (s *Signer) VerifyThreshold(message []byte, signature threshold.Signature) bool
- func (s *Signer) VerifyThresholdBytes(message, signature []byte) bool
- func (s *Signer) VerifyThresholdShare(message []byte, share threshold.SignatureShare, publicShare []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer provides BLS signing for Lux consensus. Threshold signing is coordinated through the consensus layer using github.com/luxfi/threshold protocols.
func NewSignerWithThreshold ¶
NewSignerWithThreshold creates a signer with a threshold key share.
func (*Signer) AggregateThresholdShares ¶
func (s *Signer) AggregateThresholdShares(ctx context.Context, message []byte, shares []threshold.SignatureShare) (threshold.Signature, error)
AggregateThresholdShares combines signature shares into a final signature. Returns an error if no threshold key is configured.
func (*Signer) BLSSecretKey ¶
BLSSecretKey returns the underlying BLS secret key for advanced operations
func (*Signer) GetBLSPublicKey ¶
GetBLSPublicKey returns the BLS public key bytes
func (*Signer) HasThresholdKey ¶
HasThresholdKey returns true if this signer has a threshold key share.
func (*Signer) SetThresholdKeyShare ¶
SetThresholdKeyShare sets the threshold key share for this signer.
func (*Signer) SignThresholdShare ¶
func (s *Signer) SignThresholdShare(ctx context.Context, message []byte, signers []int) (threshold.SignatureShare, error)
SignThresholdShare creates a threshold signature share for the given message. The signers parameter contains the indices of all parties participating in this signing. Returns an error if no threshold key is configured.
func (*Signer) ThresholdGroupKey ¶
ThresholdGroupKey returns the threshold group public key. Returns nil if no threshold key is configured.
func (*Signer) ThresholdIndex ¶
ThresholdIndex returns this signer's index in the threshold scheme. Returns -1 if no threshold key is configured.
func (*Signer) ThresholdPublicShare ¶
ThresholdPublicShare returns this signer's public key share. Returns nil if no threshold key is configured.
func (*Signer) ThresholdSchemeID ¶
ThresholdSchemeID returns the threshold scheme ID if a key share is set. Returns SchemeUnknown if no threshold key is configured.
func (*Signer) ThresholdSeed ¶
ThresholdSeed returns the seed for threshold protocol key derivation. Use with github.com/luxfi/threshold to participate in threshold signing.
func (*Signer) VerifyThreshold ¶
VerifyThreshold verifies a complete threshold signature. Returns false if no threshold key is configured.
func (*Signer) VerifyThresholdBytes ¶
VerifyThresholdBytes verifies a serialized threshold signature. Returns false if no threshold key is configured.
func (*Signer) VerifyThresholdShare ¶
func (s *Signer) VerifyThresholdShare(message []byte, share threshold.SignatureShare, publicShare []byte) error
VerifyThresholdShare verifies a single signature share. Returns an error if no threshold key is configured or the share is invalid.