coder

package
v0.0.0-...-f30a169 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package coder defines coding and decoding interface and contains the implementations of each chain

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coder

type Coder interface {
	// SerializeBlockHeader serializes block header to binary bytes
	SerializeBlockHeader(header common.Header) ([]byte, error)

	// DeserializeBlockHeader deserializes binary bytes to block header
	DeserializeBlockHeader(serializeBlockHeader []byte) (common.Header, error)

	// GenerateTransactionData generates transaction data, contains tx hash map, tx bytes map and
	// extra data(about each tx) bytes map with the txs in block
	GenerateTransactionData(blocker common.Blocker) (*storage.TransactionData, error)

	// DeserializeTransaction deserializes the binary bytes of transaction and extra data to transaction
	DeserializeTransaction(serializeTransaction []byte, serializeExtraData []byte) (common.Transactioner, error)
}

Coder defines coding and decoding interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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