Documentation
¶
Index ¶
- Constants
- Variables
- func AnnouncementsLen(types []byte, sizes []uint32, hashes []byte) int
- func BeInt(payload []byte, pos, length int) (int, error)
- func EncodeAnnouncements(types []byte, sizes []uint32, hashes []byte, encodeBuf []byte) int
- func EncodeByteArrayAsRlp(raw []byte, w io.Writer, prefixBuf []byte) (int, error)
- func EncodeHash(h, to []byte) int
- func EncodeHashes(hashes []byte, encodeBuf []byte) int
- func EncodeListPrefix(dataLen int, to []byte) int
- func EncodeString(s []byte, to []byte) int
- func EncodeU32(i uint32, to []byte) int
- func EncodeU64(i uint64, to []byte) int
- func GenerateStructLen(buffer []byte, l int) int
- func HashesLen(hashes []byte) int
- func IsRLPError(err error) bool
- func List(payload []byte, pos int) (dataPos, dataLen int, err error)
- func ListPrefixLen(dataLen int) int
- func ParseAnnouncements(payload []byte, pos int) ([]byte, []uint32, []byte, int, error)
- func ParseHash(payload []byte, pos int, hashbuf []byte) (int, error)
- func Prefix(payload []byte, pos int) (dataPos int, dataLen int, isList bool, err error)
- func String(payload []byte, pos int) (dataPos, dataLen int, err error)
- func StringLen(s []byte) int
- func StringOfLen(payload []byte, pos, expectedLen int) (dataPos int, err error)
- func U256(payload []byte, pos int, x *uint256.Int) (int, error)
- func U256Len(z *uint256.Int) int
- func U32(payload []byte, pos int) (int, uint32, error)
- func U32Len(i uint32) int
- func U64(payload []byte, pos int) (int, uint64, error)
- func U64Len(i uint64) int
- type RlpEncodedBytes
- type RlpSerializable
- type RlpSerializableBytes
Constants ¶
View Source
const ParseAnnouncementsErrorPrefix = "parse announcement payload"
View Source
const ParseHashErrorPrefix = "parse hash payload"
Variables ¶
Functions ¶
func BeInt ¶
BeInt parses Big Endian representation of an integer from given payload at given position
func EncodeAnnouncements ¶
EIP-5793: eth/68 - Add tx type to tx announcement
func EncodeByteArrayAsRlp ¶
func EncodeHash ¶
EncodeHash assumes that `to` buffer is already 32bytes long
func EncodeHashes ¶
func EncodeListPrefix ¶
func EncodeString ¶
func GenerateStructLen ¶
func IsRLPError ¶
func ListPrefixLen ¶
func ParseAnnouncements ¶
func Prefix ¶
Prefix parses RLP Prefix from given payload at given position. It returns the offset and length of the RLP element as well as the indication of whether it is a list of string
Types ¶
type RlpEncodedBytes ¶
type RlpEncodedBytes []byte
func (RlpEncodedBytes) DoubleRLPLen ¶
func (b RlpEncodedBytes) DoubleRLPLen() int
func (RlpEncodedBytes) RawBytes ¶
func (b RlpEncodedBytes) RawBytes() []byte
func (RlpEncodedBytes) ToDoubleRLP ¶
func (b RlpEncodedBytes) ToDoubleRLP(w io.Writer, prefixBuf []byte) error
type RlpSerializable ¶
type RlpSerializable interface { ToDoubleRLP(io.Writer, []byte) error DoubleRLPLen() int RawBytes() []byte }
RlpSerializable is a value that can be double-RLP coded.
type RlpSerializableBytes ¶
type RlpSerializableBytes []byte
func (RlpSerializableBytes) DoubleRLPLen ¶
func (b RlpSerializableBytes) DoubleRLPLen() int
func (RlpSerializableBytes) RawBytes ¶
func (b RlpSerializableBytes) RawBytes() []byte
func (RlpSerializableBytes) ToDoubleRLP ¶
func (b RlpSerializableBytes) ToDoubleRLP(w io.Writer, prefixBuf []byte) error
Click to show internal directories.
Click to hide internal directories.