payload

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CoinBasePayloadVersion byte = 0x04
View Source
const DeployCodePayloadVersion byte = 0x00
View Source
const RecordPayloadVersion byte = 0x00
View Source
const RegisterPayloadVersion byte = 0x00
View Source
const SideChainPowPayloadVersion byte = 0x00
View Source
const TransferAssetayloadVersion byte = 0x00
View Source
const WithdrawFromSideChainPayloadVersion byte = 0x00

Variables

This section is empty.

Functions

This section is empty.

Types

type CoinBase

type CoinBase struct {
	CoinbaseData []byte
}

func (*CoinBase) Data

func (a *CoinBase) Data(version byte) []byte

func (*CoinBase) Deserialize

func (a *CoinBase) Deserialize(r io.Reader, version byte) error

func (*CoinBase) Serialize

func (a *CoinBase) Serialize(w io.Writer, version byte) error

type DeployCode

type DeployCode struct {
	Code        *FunctionCode
	Name        string
	CodeVersion string
	Author      string
	Email       string
	Description string
}

func (*DeployCode) Data

func (dc *DeployCode) Data(version byte) []byte

func (*DeployCode) Deserialize

func (dc *DeployCode) Deserialize(r io.Reader, version byte) error

func (*DeployCode) Serialize

func (dc *DeployCode) Serialize(w io.Writer, version byte) error

type Record

type Record struct {
	RecordType string
	RecordData []byte
}

func (*Record) Data

func (a *Record) Data(version byte) []byte

func (*Record) Deserialize

func (a *Record) Deserialize(r io.Reader, version byte) error

Deserialize is the implement of SignableData interface.

func (*Record) Serialize

func (a *Record) Serialize(w io.Writer, version byte) error

Serialize is the implement of SignableData interface.

type RegisterAsset

type RegisterAsset struct {
	Asset      *asset.Asset
	Amount     common.Fixed64
	Controller common.Uint168
}

func (*RegisterAsset) Data

func (a *RegisterAsset) Data(version byte) []byte

func (*RegisterAsset) Deserialize

func (a *RegisterAsset) Deserialize(r io.Reader, version byte) error

func (*RegisterAsset) Serialize

func (a *RegisterAsset) Serialize(w io.Writer, version byte) error

type SideChainPow added in v0.0.3

type SideChainPow struct {
	SideBlockHash   Uint256
	SideGenesisHash Uint256
	BlockHeight     uint32
	SignedData      []byte
}

func (*SideChainPow) Data added in v0.0.3

func (a *SideChainPow) Data(version byte) []byte

func (*SideChainPow) Deserialize added in v0.0.3

func (a *SideChainPow) Deserialize(r io.Reader, version byte) error

func (*SideChainPow) Serialize added in v0.0.3

func (a *SideChainPow) Serialize(w io.Writer, version byte) error

type TransferAsset

type TransferAsset struct {
}

func (*TransferAsset) Data

func (a *TransferAsset) Data(version byte) []byte

func (*TransferAsset) Deserialize

func (a *TransferAsset) Deserialize(r io.Reader, version byte) error

func (*TransferAsset) Serialize

func (a *TransferAsset) Serialize(w io.Writer, version byte) error

type TransferCrossChainAsset added in v0.0.3

type TransferCrossChainAsset struct {
	CrossChainAddresses []string
	OutputIndexes       []uint64
	CrossChainAmounts   []common.Fixed64
}

func (*TransferCrossChainAsset) Data added in v0.0.3

func (a *TransferCrossChainAsset) Data(version byte) []byte

func (*TransferCrossChainAsset) Deserialize added in v0.0.3

func (a *TransferCrossChainAsset) Deserialize(r io.Reader, version byte) error

func (*TransferCrossChainAsset) Serialize added in v0.0.3

func (a *TransferCrossChainAsset) Serialize(w io.Writer, version byte) error

type WithdrawFromSideChain added in v0.0.3

type WithdrawFromSideChain struct {
	BlockHeight                uint32
	GenesisBlockAddress        string
	SideChainTransactionHashes []common.Uint256
}

func (*WithdrawFromSideChain) Data added in v0.0.3

func (t *WithdrawFromSideChain) Data(version byte) []byte

func (*WithdrawFromSideChain) Deserialize added in v0.0.3

func (t *WithdrawFromSideChain) Deserialize(r io.Reader, version byte) error

func (*WithdrawFromSideChain) Serialize added in v0.0.3

func (t *WithdrawFromSideChain) Serialize(w io.Writer, version byte) error

Jump to

Keyboard shortcuts

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