bls_signer

package
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertBytesToString

func ConvertBytesToString(b []byte) string

func InitEthBLS

func InitEthBLS() error

func NewEthBLSKey

func NewEthBLSKey() *e2types.BLSPrivateKey

Types

type Account

type Account struct {
	KeyBLS
}

func NewSignerBLS

func NewSignerBLS() Account

func NewSignerBLSFromExistingKey

func NewSignerBLSFromExistingKey(skStr string) Account

type AggregatePublicKey

type AggregatePublicKey = blst.P1Aggregate

type AggregateSignature

type AggregateSignature = blst.P2Aggregate

type EthBLSAccount

type EthBLSAccount struct {
	*e2types.BLSPrivateKey
}

func NewEthBLSAccount

func NewEthBLSAccount() EthBLSAccount

func NewEthSignerBLSFromExistingKey

func NewEthSignerBLSFromExistingKey(sk string) EthBLSAccount

func NewEthSignerBLSFromExistingKeyBytes

func NewEthSignerBLSFromExistingKeyBytes(sk []byte) EthBLSAccount

func (*EthBLSAccount) PrivateKeyString

func (e *EthBLSAccount) PrivateKeyString() string

func (*EthBLSAccount) PublicKeyString

func (e *EthBLSAccount) PublicKeyString() string

func (*EthBLSAccount) ZeroXPrefixedPublicKeyString

func (e *EthBLSAccount) ZeroXPrefixedPublicKeyString() string

type KeyBLS

type KeyBLS struct {
	PublicKey PublicKey
	SecretKey SecretKey
}

func NewKeyBLS

func NewKeyBLS() KeyBLS

func (*KeyBLS) Sign

func (k *KeyBLS) Sign(msg []byte) *Signature

func (*KeyBLS) Verify

func (k *KeyBLS) Verify(sig Signature, msg []byte) bool

type PublicKey

type PublicKey struct {
	// contains filtered or unexported fields
}

func NewPubKey

func NewPubKey(pubKey blst.P1Affine) PublicKey

func PublicKeyFromBytes

func PublicKeyFromBytes(b []byte) PublicKey

func (*PublicKey) Serialize

func (k *PublicKey) Serialize() []byte

Serialize a public key into a LittleEndian byte slice.

func (*PublicKey) String

func (k *PublicKey) String() string

type SecretKey

type SecretKey struct {
	// contains filtered or unexported fields
}

func NewSecretKey

func NewSecretKey(sk *blst.SecretKey) SecretKey

func SecretKeyFromBytes

func SecretKeyFromBytes(b []byte) SecretKey

func (*SecretKey) Serialize

func (k *SecretKey) Serialize() []byte

Serialize a secret key into a LittleEndian byte slice.

func (*SecretKey) String

func (k *SecretKey) String() string

type Signature

type Signature struct {
	// contains filtered or unexported fields
}

func (*Signature) Serialize

func (s *Signature) Serialize() []byte

func (*Signature) String

func (s *Signature) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL