operator

package
v0.14.0-rc Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 5 Imported by: 3 modules, 17 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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