Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

rlp source pure

Constants 1

Variables 1

var ErrExpectedString, ErrExpectedList, ErrCanonSize, ErrCanonInt, ErrValueTooLarge, ErrTrailingBytes, ErrUnexpectedEOF, ErrDepthLimit

 1var (
 2	ErrExpectedString = errors.New("rlp: expected string")
 3	ErrExpectedList   = errors.New("rlp: expected list")
 4	ErrCanonSize      = errors.New("rlp: non-canonical size")
 5	ErrCanonInt       = errors.New("rlp: non-canonical integer")
 6	ErrValueTooLarge  = errors.New("rlp: value too large")
 7	ErrTrailingBytes  = errors.New("rlp: trailing bytes")
 8	ErrUnexpectedEOF  = errors.New("rlp: unexpected eof")
 9	ErrDepthLimit     = errors.New("rlp: depth limit exceeded")
10)
source

Functions 3

func EncodeBytes

1func EncodeBytes(b []byte) []byte
source

EncodeBytes returns the RLP string encoding of b.

func EncodeList

1func EncodeList(items ...[]byte) []byte
source

EncodeList returns the RLP list encoding of already-encoded items.

func DecodeValue

1func DecodeValue(b []byte) (Value, error)
source

DecodeValue decodes exactly one RLP item.

Types 2

type Kind

ident
1type Kind int
source

Kind identifies the RLP item kind after reading the leading tag.

type Value

struct
1type Value struct {
2	Kind  Kind
3	Bytes []byte
4	List  []Value
5}
source

Value is a decoded RLP item. Bytes holds the payload for byte/string items. List holds child items for lists.

Imports 1

  • errors stdlib

Source Files 4