operator

package
v1.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 5 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EthereumKeyToOperatorKey

func EthereumKeyToOperatorKey(ethereumKey *keystore.Key) (*PrivateKey, *PublicKey)

EthereumKeyToOperatorKey transforms a `go-ethereum`-based ECDSA key into the format supported by all packages used in keep-core.

func GenerateKeyPair

func GenerateKeyPair() (*PrivateKey, *PublicKey, error)

GenerateKeyPair generates a new, random static key based on secp256k1 ethereum curve.

func Marshal

func Marshal(publicKey *PublicKey) []byte

Marshal takes an operator's PublicKey and produces an uncompressed public key as a slice of bytes (as specified in ANSI X9.62).

Types

type PrivateKey

type PrivateKey = ecdsa.PrivateKey

PrivateKey represents peer's static key associated with an on-chain stake. It is used to authenticate the peer and for attributability (signing).

type PublicKey

type PublicKey = ecdsa.PublicKey

PublicKey represents peer's static key associated with an on-chain stake. It is used to authenticate the peer and for attributability (verification).

func Unmarshal

func Unmarshal(data []byte) (*PublicKey, error)

Unmarshal takes raw bytes and produces an uncompressed, operator's PublicKey. Unmarshal assumes the PublicKey's curve is of type S256 as defined in geth.

Jump to

Keyboard shortcuts

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