lib

package
v0.0.0-...-8cf5a7b Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeABI

func DecodeABI(txInput string, abiReader io.Reader) (map[string]interface{}, error)

DecodeABI decodes the given transaction input using the abi provided.

func DecodePublicKey

func DecodePublicKey(pubkey string) (*ecdsa.PublicKey, error)

func DecryptPrivateKey

func DecryptPrivateKey(in io.Reader, secret []byte, out io.Writer) error

DecryptPrivateKey decrypts the encrypted private key read from the given io.Reader and writes the decrypted output (i.e the plaintext) to the given io.Writer.

func EncodeABI

func EncodeABI(method string, args []interface{}, abiReader io.Reader) (string, error)

EncodeABI encodes the given method and arguments using the abi provided.

func GenPair

func GenPair() (*ecdsa.PrivateKey, stdcrypto.PublicKey, error)

GenPair generates a (private, public) key pair suitable for use on any ethereum network.

func GetAddress

func GetAddress(privKey string) (string, error)

func SaveAddress

func SaveAddress(pubKey stdcrypto.PublicKey, out io.Writer) error

SaveAddress generates the EIP55-compliant hex string representation of the address associated with the given public key and saves it to the given io.Writer.

func SavePrivateKey

func SavePrivateKey(privKey *ecdsa.PrivateKey, secret []byte, out io.Writer) error

SavePrivateKey encrypts the private key with the given secret using AES and writes the encrypted output to the given io.Writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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