rlp

package
v0.0.0-...-7a2c074 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

type Value struct {
	// Only one of String or List is valid.  If String is "" then List is assumed valid.
	String string
	List   []Value
}

Value represents a decoded RLP value, which is either a String or List.

func From

func From(input string) (*Value, error)

From parses a 0x prefixed hex string into an rlp.Value

func (Value) Encode

func (v Value) Encode() (string, error)

Encode returns the 0x prefixed hex string of the RLP value

func (Value) Hash

func (v Value) Hash() (string, error)

Hash returns the keccak256 hash of the encoded RLP value as a hexadecimal string prefixed with 0x

func (Value) HashToBytes

func (v Value) HashToBytes() ([]byte, error)

HashToBytes returns the keccak256 hash of the encoded RLP as a byte slice

func (*Value) IsList

func (v *Value) IsList() bool

func (*Value) IsString

func (v *Value) IsString() bool

Jump to

Keyboard shortcuts

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