Versions in this module Expand all Collapse all v0 v0.1.0 Aug 3, 2021 Changes in this version + const AddressSize + var ErrBadHashLength = errors.New("wrong block hash length") + var ErrInvalidLength = errors.New("invalid signature length") + func DecodeSecp256k1PrivateKey(data []byte) (*ecdsa.PrivateKey, error) + func EncodeSecp256k1PrivateKey(k *ecdsa.PrivateKey) []byte + func EncodeSecp256k1PublicKey(k *ecdsa.PublicKey) []byte + func GenerateSecp256k1Key() (*ecdsa.PrivateKey, error) + func LegacyKeccak256(data []byte) ([]byte, error) + func NewEthereumAddress(p ecdsa.PublicKey) ([]byte, error) + func NewOverlayAddress(p ecdsa.PublicKey, networkID uint64, blockHash []byte) (swarm.Address, error) + func NewOverlayFromEthereumAddress(ethAddr []byte, networkID uint64, blockHash []byte) swarm.Address + func Recover(signature, data []byte) (*ecdsa.PublicKey, error) + func RecoverEIP712(signature []byte, data *eip712.TypedData) (*ecdsa.PublicKey, error) + func Secp256k1PrivateKeyFromBytes(data []byte) *ecdsa.PrivateKey + type DH interface + SharedKey func(public *ecdsa.PublicKey, salt []byte) ([]byte, error) + func NewDH(key *ecdsa.PrivateKey) DH + type RecoverFunc func(signature, data []byte) (*ecdsa.PublicKey, error) + type Signer interface + EthereumAddress func() (common.Address, error) + PublicKey func() (*ecdsa.PublicKey, error) + Sign func(data []byte) ([]byte, error) + SignTx func(transaction *types.Transaction, chainID *big.Int) (*types.Transaction, error) + SignTypedData func(typedData *eip712.TypedData) ([]byte, error) + func NewDefaultSigner(key *ecdsa.PrivateKey) Signer