ethsecp256k1

package
v0.0.0-...-61460eb Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PrivKeyName defines the amino encoding name for the EthSecp256k1 private key
	PrivKeyName = "ethermint/PrivKeyEthSecp256k1"
	// PubKeyName defines the amino encoding name for the EthSecp256k1 public key
	PubKeyName = "ethermint/PubKeyEthSecp256k1"
)

Amino encoding names

Variables

This section is empty.

Functions

func RegisterCodec

func RegisterCodec(cdc *amino.Codec)

RegisterCodec registers all the necessary types with amino for the given codec.

Types

type PrivKey

type PrivKey []byte

PrivKey defines a type alias for an ecdsa.PrivateKey that implements Tendermint's PrivateKey interface.

func (PrivKey) Bytes

func (privkey PrivKey) Bytes() []byte

Bytes returns the raw ECDSA private key bytes.

func (PrivKey) Equals

func (privkey PrivKey) Equals(other tendermint.PrivKey) bool

Equals returns true if two ECDSA private keys are equal and false otherwise.

func (PrivKey) PubKey

func (privkey PrivKey) PubKey() tendermint.PubKey

PubKey returns the ECDSA private key's public key.

type PubKey

type PubKey []byte

PubKey defines a type alias for an ecdsa.PublicKey that implements Tendermint's PubKey interface. It represents the 33-byte compressed public key format.

func (PubKey) Address

func (key PubKey) Address() tendermint.Address

Address returns the address of the ECDSA public key. The function will panic if the public key is invalid.

func (PubKey) Bytes

func (key PubKey) Bytes() []byte

Bytes returns the raw bytes of the ECDSA public key. The function panics if the key cannot be marshaled to bytes.

func (PubKey) Equals

func (key PubKey) Equals(other tendermint.PubKey) bool

Equals returns true if two ECDSA public keys are equal and false otherwise.

Jump to

Keyboard shortcuts

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