account

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MultiCodecType = uint64(cid.EthAccountSnapshot) // 0x97
	MultiHashType  = uint64(multihash.KECCAK_256)
)

Functions

func AddSupportToChooser

AddSupportToChooser takes an existing node prototype chooser and subs in Account for the eth state account multicodec code.

func AppendEncode

func AppendEncode(enc []byte, inNode ipld.Node) ([]byte, error)

AppendEncode is like Encode, but it uses a destination buffer directly. This means less copying of bytes, and if the destination has enough capacity, fewer allocations.

func Decode

func Decode(na ipld.NodeAssembler, in io.Reader) error

Decode provides an IPLD codec decode interface for eth state account IPLDs. This function is registered via the go-ipld-prime link loader for multicodec code 0x97 when this package is invoked via init.

func DecodeAccount

func DecodeAccount(na ipld.NodeAssembler, header types.StateAccount) error

DecodeAccount unpacks a go-ethereum Account into a NodeAssembler

func DecodeBytes

func DecodeBytes(na ipld.NodeAssembler, src []byte) error

DecodeBytes is like Decode, but it uses an input buffer directly. Decode will grab or read all the bytes from an io.Reader anyway, so this can save having to copy the bytes or create a bytes.Buffer.

func Decoder deprecated

func Decoder(na ipld.NodeAssembler, r io.Reader) error

Deprecated: use Decode instead.

func Encode

func Encode(node ipld.Node, w io.Writer) error

Encode provides an IPLD codec encode interface for eth state account IPLDs. This function is registered via the go-ipld-prime link loader for multicodec code 0x97 when this package is invoked via init.

func EncodeAccount

func EncodeAccount(header *types.StateAccount, inNode ipld.Node) error

EncodeAccount packs the node into the provided go-ethereum Account

func Encoder deprecated

func Encoder(inNode ipld.Node, w io.Writer) error

Deprecated: use Encode instead.

func Marshal deprecated

func Marshal(inNode ipld.Node, w io.Writer) error

Deprecated: use Encode instead.

func Unmarshal deprecated

func Unmarshal(na ipld.NodeAssembler, r io.Reader) error

Deprecated: use Decode instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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