web3

package
v0.0.0-...-111f7df Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDecrypt = errors.New("could not decrypt key with given passphrase")
)

Errors

Functions

This section is empty.

Types

type Encoding

type Encoding struct {
	// contains filtered or unexported fields
}

func Light

func Light() *Encoding

Light get light web3 encoding

func Standard

func Standard() *Encoding

Standard get standard web3 encoding

func (*Encoding) Decode

func (encoding *Encoding) Decode(attrs Property, reader io.Reader) ([]byte, error)

func (*Encoding) DecryptBytes

func (encoding *Encoding) DecryptBytes(attrs Property, reader io.Reader) ([]byte, error)

func (*Encoding) Encode

func (encoding *Encoding) Encode(privKey []byte, attrs Property, writer io.Writer) error

func (*Encoding) EncryptBytes

func (encoding *Encoding) EncryptBytes(keyBytes []byte, attrs Property, writer io.Writer) error

func (*Encoding) Name

func (encoding *Encoding) Name() string

type KdfParams

type KdfParams struct {
	DkLen int    `json:"dklen"` // DK length
	Salt  string `json:"salt"`  // salt string
}

KdfParams .

type Property

type Property map[string]string

Jump to

Keyboard shortcuts

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