ethsecp256k1

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

sdk-go/pkg/crypto/ethsecp256k1/ethsecp256k1.go

Index

Constants

View Source
const (
	PrivKeySize = 32
	PubKeySize  = 33 // compressed
	KeyType     = "eth_secp256k1"

	// Proto type URLs - must match Injective's registration
	PubKeyName  = "injective.crypto.v1beta1.ethsecp256k1.PubKey"
	PrivKeyName = "injective.crypto.v1beta1.ethsecp256k1.PrivKey"
)

Variables

This section is empty.

Functions

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the ethsecp256k1 types with Injective's type URLs

Types

type PrivKey

type PrivKey struct {
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

func (*PrivKey) Bytes

func (privKey *PrivKey) Bytes() []byte

func (*PrivKey) Equals

func (privKey *PrivKey) Equals(other cryptotypes.LedgerPrivKey) bool

func (*PrivKey) ProtoMessage

func (privKey *PrivKey) ProtoMessage()

func (*PrivKey) PubKey

func (privKey *PrivKey) PubKey() cryptotypes.PubKey

func (*PrivKey) Reset

func (privKey *PrivKey) Reset()

Proto methods

func (*PrivKey) Sign

func (privKey *PrivKey) Sign(digestBz []byte) ([]byte, error)

func (*PrivKey) String

func (privKey *PrivKey) String() string

func (*PrivKey) Type

func (privKey *PrivKey) Type() string

func (*PrivKey) XXX_MessageName

func (*PrivKey) XXX_MessageName() string

XXX_MessageName returns the proto message name for proper type URL registration

type PubKey

type PubKey struct {
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}

PubKey defines a secp256k1 public key using Ethereum's format

func (*PubKey) Address

func (pubKey *PubKey) Address() cryptotypes.Address

func (*PubKey) Bytes

func (pubKey *PubKey) Bytes() []byte

func (*PubKey) Equals

func (pubKey *PubKey) Equals(other cryptotypes.PubKey) bool

func (*PubKey) ProtoMessage

func (pubKey *PubKey) ProtoMessage()

func (*PubKey) Reset

func (pubKey *PubKey) Reset()

Proto methods

func (*PubKey) String

func (pubKey *PubKey) String() string

func (*PubKey) Type

func (pubKey *PubKey) Type() string

func (*PubKey) VerifySignature

func (pubKey *PubKey) VerifySignature(msg, sig []byte) bool

func (*PubKey) XXX_MessageName

func (*PubKey) XXX_MessageName() string

XXX_MessageName returns the proto message name for proper type URL registration

Jump to

Keyboard shortcuts

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