outputpayload

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxVoteProducersPerTransaction = 36
)

Variables

View Source
var VoteTypes = []VoteType{
	Delegate,
	CRC,
}

Functions

This section is empty.

Types

type DefaultOutput

type DefaultOutput struct {
}

func (*DefaultOutput) Data

func (o *DefaultOutput) Data() []byte

func (*DefaultOutput) Deserialize

func (o *DefaultOutput) Deserialize(r io.Reader) error

func (*DefaultOutput) GetVersion

func (o *DefaultOutput) GetVersion() byte

func (*DefaultOutput) Serialize

func (o *DefaultOutput) Serialize(w io.Writer) error

func (*DefaultOutput) Validate

func (o *DefaultOutput) Validate() error

type Mapping added in v0.3.0

type Mapping struct {
	// Version indicates the version of Mapping payload.
	Version byte

	// OwnerPublicKey is the owner public key of the main chain producer.
	OwnerPublicKey []byte

	// SideProducerID indicates a piece of data represent the identity of the
	// side chain producer, whether it is a public key or address etc.
	SideProducerID []byte

	// Signature represents the signature of the mapping payload content.
	Signature []byte
}

Mapping output payload is defined to mapping the main chain producer's owner public key to a side chain producer.

func (*Mapping) Data added in v0.3.0

func (m *Mapping) Data() []byte

func (*Mapping) Deserialize added in v0.3.0

func (m *Mapping) Deserialize(r io.Reader) error

func (*Mapping) GetVersion added in v0.3.0

func (m *Mapping) GetVersion() byte

func (*Mapping) Serialize added in v0.3.0

func (m *Mapping) Serialize(w io.Writer) error

func (*Mapping) Validate added in v0.3.0

func (m *Mapping) Validate() error

type VoteContent

type VoteContent struct {
	VoteType   VoteType
	Candidates [][]byte
}

func (*VoteContent) Deserialize

func (vc *VoteContent) Deserialize(r io.Reader, version byte) error

func (*VoteContent) Serialize

func (vc *VoteContent) Serialize(w io.Writer, version byte) error

func (VoteContent) String

func (vc VoteContent) String() string

type VoteOutput

type VoteOutput struct {
	Version  byte
	Contents []VoteContent
}

func (*VoteOutput) Data

func (o *VoteOutput) Data() []byte

func (*VoteOutput) Deserialize

func (o *VoteOutput) Deserialize(r io.Reader) error

func (*VoteOutput) GetVersion

func (o *VoteOutput) GetVersion() byte

func (*VoteOutput) Serialize

func (o *VoteOutput) Serialize(w io.Writer) error

func (VoteOutput) String

func (o VoteOutput) String() string

func (*VoteOutput) Validate

func (o *VoteOutput) Validate() error

type VoteType

type VoteType byte
const (
	Delegate VoteType = 0x00
	CRC      VoteType = 0x01
)

Jump to

Keyboard shortcuts

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