Versions in this module Expand all Collapse all v1 v1.0.0 Jun 28, 2023 Changes in this version + var EOL = errors.New("rlp: end of list") + var EmptyList = []byte + var EmptyString = []byte + var ErrCanonInt = errors.New("rlp: non-canonical integer format") + var ErrCanonSize = errors.New("rlp: non-canonical size information") + var ErrElemTooLarge = errors.New("rlp: element is larger than containing list") + var ErrExpectedList = errors.New("rlp: expected List") + var ErrExpectedString = errors.New("rlp: expected String or Byte") + var ErrMoreThanOneValue = errors.New("rlp: input contains more than one value") + var ErrNegativeBigInt = errors.New("rlp: cannot encode negative big.Int") + var ErrValueTooLarge = errors.New("rlp: value size exceeds available input length") + func AppendUint64(b []byte, i uint64) []byte + func BytesSize(b []byte) uint64 + func CountValues(b []byte) (int, error) + func Decode(r io.Reader, val interface{}) error + func DecodeBytes(b []byte, val interface{}) error + func Encode(w io.Writer, val interface{}) error + func EncodeToBytes(val interface{}) ([]byte, error) + func EncodeToReader(val interface{}) (size int, r io.Reader, err error) + func IntSize(x uint64) int + func ListSize(contentSize uint64) uint64 + func NewListIterator(data RawValue) (*listIterator, error) + func SplitList(b []byte) (content, rest []byte, err error) + func SplitString(b []byte) (content, rest []byte, err error) + func SplitUint64(b []byte) (x uint64, rest []byte, err error) + func StringSize(s string) uint64 + type ByteReader interface + type Decoder interface + DecodeRLP func(*Stream) error + type Encoder interface + EncodeRLP func(io.Writer) error + type EncoderBuffer struct + func NewEncoderBuffer(dst io.Writer) EncoderBuffer + func (w *EncoderBuffer) AppendToBytes(dst []byte) []byte + func (w *EncoderBuffer) Flush() error + func (w *EncoderBuffer) Reset(dst io.Writer) + func (w *EncoderBuffer) ToBytes() []byte + func (w EncoderBuffer) List() int + func (w EncoderBuffer) ListEnd(index int) + func (w EncoderBuffer) Write(b []byte) (int, error) + func (w EncoderBuffer) WriteBigInt(i *big.Int) + func (w EncoderBuffer) WriteBool(b bool) + func (w EncoderBuffer) WriteBytes(b []byte) + func (w EncoderBuffer) WriteString(s string) + func (w EncoderBuffer) WriteUint256(i *uint256.Int) + func (w EncoderBuffer) WriteUint64(i uint64) + type Kind int8 + const Byte + const List + const String + func Split(b []byte) (k Kind, content, rest []byte, err error) + func (k Kind) String() string + type RawValue []byte + type Stream struct + func NewListStream(r io.Reader, len uint64) *Stream + func NewStream(r io.Reader, inputLimit uint64) *Stream + func (s *Stream) BigInt() (*big.Int, error) + func (s *Stream) Bool() (bool, error) + func (s *Stream) Bytes() ([]byte, error) + func (s *Stream) Decode(val interface{}) error + func (s *Stream) Kind() (kind Kind, size uint64, err error) + func (s *Stream) List() (size uint64, err error) + func (s *Stream) ListEnd() error + func (s *Stream) MoreDataInList() bool + func (s *Stream) Raw() ([]byte, error) + func (s *Stream) ReadBytes(b []byte) error + func (s *Stream) ReadUint256(dst *uint256.Int) error + func (s *Stream) Reset(r io.Reader, inputLimit uint64) + func (s *Stream) Uint() (uint64, error) + func (s *Stream) Uint16() (uint16, error) + func (s *Stream) Uint32() (uint32, error) + func (s *Stream) Uint64() (uint64, error) + func (s *Stream) Uint8() (uint8, error)