Documentation
¶
Overview ¶
Package blsSigner provides BLS signature functionality for EigenLayer multichain operations. This package defines interfaces and implementations for signing data using BLS signatures on the BN254 curve, which are used for cryptographic proofs in the EigenLayer protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IBLSSigner ¶
type IBLSSigner interface {
// SignBytes signs the provided data using BLS signature scheme on the BN254 curve.
// Returns a BN254 signature that can be verified against the signer's public key.
SignBytes(data [32]byte) (*bn254.Signature, error)
// GetPublicKey returns the BLS public key associated with this signer.
// This public key can be used to verify signatures created by SignBytes.
GetPublicKey() (*bn254.PublicKey, error)
}
IBLSSigner defines the interface for BLS signature operations used in EigenLayer. Implementations of this interface provide the ability to sign arbitrary data and return the associated public key for verification purposes.
type InMemoryBLSSigner ¶
type InMemoryBLSSigner struct {
// contains filtered or unexported fields
}
InMemoryBLSSigner implements IBLSSigner using an in-memory BLS private key. This implementation stores the BLS private key in memory and provides fast signing operations suitable for development and testing environments. For production use with enhanced security, consider using AWS HSM implementations.
func NewInMemoryBLSSigner ¶
func NewInMemoryBLSSigner(privateKey *bn254.PrivateKey) (*InMemoryBLSSigner, error)
NewInMemoryBLSSigner creates a new InMemoryBLSSigner from a BN254 private key. The provided private key is stored in memory and used for all signing operations. The corresponding public key is automatically derived and cached.
Parameters:
- privateKey: A BN254 private key from the crypto-libs package
Returns:
- *InMemoryBLSSigner: A new signer instance
- error: An error if the private key is nil or invalid
func (*InMemoryBLSSigner) GetPublicKey ¶
func (s *InMemoryBLSSigner) GetPublicKey() (*bn254.PublicKey, error)
GetPublicKey returns the public key associated with this signer. This method implements the IBLSSigner interface and returns the BLS public key that corresponds to the private key used for signing.
Returns:
- *bn254.PublicKey: The BLS public key for signature verification
func (*InMemoryBLSSigner) SignBytes ¶
func (s *InMemoryBLSSigner) SignBytes(data [32]byte) (*bn254.Signature, error)
SignBytes signs the given data using the BLS private key. This method implements the IBLSSigner interface and provides BLS signature functionality for the provided data bytes.
Parameters:
- data: The byte array to be signed
Returns:
- *bn254.Signature: The BLS signature of the data
- error: An error if signing fails or private key is invalid
type MockIBLSSigner ¶ added in v0.0.10
MockIBLSSigner is an autogenerated mock type for the IBLSSigner type
func NewMockIBLSSigner ¶ added in v0.0.10
func NewMockIBLSSigner(t interface {
mock.TestingT
Cleanup(func())
}) *MockIBLSSigner
NewMockIBLSSigner creates a new instance of MockIBLSSigner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockIBLSSigner) GetPublicKey ¶ added in v0.0.10
func (_m *MockIBLSSigner) GetPublicKey() (*bn254.PublicKey, error)
GetPublicKey provides a mock function with given fields:
Directories
¶
| Path | Synopsis |
|---|---|
|
Package awsSMBLSSigner provides AWS Secrets Manager-based BLS signature functionality.
|
Package awsSMBLSSigner provides AWS Secrets Manager-based BLS signature functionality. |