coder

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 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 {
	// GenerateBlockData generates transaction data, contains block hash and block header bytes
	GenerateBlockData(header common.Header) (*storage.BlockData, error)

	// DeserializeBlockHeader deserializes binary bytes to block header
	DeserializeBlockHeader(headerBz []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(transactionBz []byte, extraDataBz []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