Versions in this module Expand all Collapse all v1 v1.2.0 Mar 8, 2026 Changes in this version + func ComputeEthereumSignedMessageHash(message []byte) []byte + type Address interface + Equals func(other Address) bool + func RecoverAddressFromHash(hash []byte, sig Signature) (Address, error) + type AddressRecoverer interface + RecoverAddress func(message []byte, signature Signature) (Address, error) + func NewAddressRecoverer(sigType Type) (AddressRecoverer, error) + func NewAddressRecovererFromSignature(signature Signature) (AddressRecoverer, error) + type EthereumAddress struct + func NewEthereumAddress(addr common.Address) EthereumAddress + func NewEthereumAddressFromHex(hexAddr string) EthereumAddress + func (a EthereumAddress) Equals(other Address) bool + func (a EthereumAddress) String() string + type EthereumMsgAddressRecoverer struct + func (r *EthereumMsgAddressRecoverer) RecoverAddress(message []byte, signature Signature) (Address, error) + type EthereumMsgSigner struct + func (s *EthereumMsgSigner) Sign(hash []byte) (Signature, error) + type EthereumPublicKey struct + func NewEthereumPublicKey(pub *ecdsa.PublicKey) EthereumPublicKey + func NewEthereumPublicKeyFromBytes(pubBytes []byte) (EthereumPublicKey, error) + func (p EthereumPublicKey) Address() Address + func (p EthereumPublicKey) Bytes() []byte + type EthereumRawAddressRecoverer struct + func (r *EthereumRawAddressRecoverer) RecoverAddress(message []byte, signature Signature) (Address, error) + type EthereumRawSigner struct + func (s *EthereumRawSigner) PublicKey() PublicKey + func (s *EthereumRawSigner) Sign(hash []byte) (Signature, error) + type MockAddress struct + func NewMockAddress(id string) *MockAddress + func (m *MockAddress) Equals(other Address) bool + func (m *MockAddress) String() string + type MockPublicKey struct + func NewMockPublicKey(id string) *MockPublicKey + func (m *MockPublicKey) Address() Address + func (m *MockPublicKey) Bytes() []byte + type MockSigner struct + func NewMockSigner(id string) *MockSigner + func (m *MockSigner) PublicKey() PublicKey + func (m *MockSigner) Sign(data []byte) (Signature, error) + type PublicKey interface + Address func() Address + Bytes func() []byte + type SigValidator struct + func NewSigValidator(sigType Type) (*SigValidator, error) + func (s *SigValidator) Recover(data, sig []byte) (string, error) + func (s *SigValidator) Verify(wallet string, data, sig []byte) error + type Signature []byte + func (s *Signature) UnmarshalJSON(data []byte) error + func (s Signature) MarshalJSON() ([]byte, error) + func (s Signature) String() string + func (s Signature) Type() Type + type Signer interface + PublicKey func() PublicKey + Sign func(data []byte) (Signature, error) + func NewEthereumMsgSigner(privateKeyHex string) (Signer, error) + func NewEthereumMsgSignerFromRaw(signer Signer) (Signer, error) + func NewEthereumRawSigner(privateKeyHex string) (Signer, error) + type Type uint8 + const TypeEthereumMsg + const TypeRawEthereum + const TypeUnknown + func (t Type) String() string