common

package
v0.0.0-...-c8e9c26 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyAndSendTx

func VerifyAndSendTx(txn *types.Transaction) ontErrors.ErrCode

Types

type AmountMap

type AmountMap struct {
	Key   common.Uint256
	Value common.Fixed64
}

type BalanceOfRsp

type BalanceOfRsp struct {
	Ont       string `json:"ont"`
	Ong       string `json:"ong"`
	OngAppove string `json:"ong_appove"`
}

type BlockHead

type BlockHead struct {
	Version          uint32
	PrevBlockHash    string
	TransactionsRoot string
	BlockRoot        string
	Timestamp        uint32
	Height           uint32
	ConsensusData    uint64
	NextBookkeeper   string

	Bookkeepers []string
	SigData     []string

	Hash string
}

type BlockInfo

type BlockInfo struct {
	Hash         string
	Header       *BlockHead
	Transactions []*Transactions
}

func GetBlockInfo

func GetBlockInfo(block *types.Block) BlockInfo

type BookKeepingInfo

type BookKeepingInfo struct {
	Nonce uint64
}

implement PayloadInfo define BookKeepingInfo

type BookkeeperInfo

type BookkeeperInfo struct {
	PubKey     string
	Action     string
	Issuer     string
	Controller string
}

type Claim

type Claim struct {
	Claims []*UTXOTxInput
}

type ConsensusInfo

type ConsensusInfo struct {
}

type DataFileInfo

type DataFileInfo struct {
	IPFSPath string
	Filename string
	Note     string
	Issuer   string
}

type DeployCodeInfo

type DeployCodeInfo struct {
	VmType      int
	Code        string
	NeedStorage bool
	Name        string
	CodeVersion string
	Author      string
	Email       string
	Description string
}

type Fee

type Fee struct {
	Amount common.Fixed64
	Payer  string
}

type InvokeCodeInfo

type InvokeCodeInfo struct {
	Code     string
	GasLimit uint64
	VmType   int
}

type IssueAssetInfo

type IssueAssetInfo struct {
}

implement PayloadInfo define IssueAssetInfo

type NodeInfo

type NodeInfo struct {
	NodeState   uint   // node status
	NodePort    uint16 // The nodes's port
	ID          uint64 // The nodes's id
	NodeTime    int64
	NodeVersion uint32   // The network protocol the node used
	NodeType    uint64   // The services the node supplied
	Relay       bool     // The relay capability of the node (merge into capbility flag)
	Height      uint32   // The node latest block height
	TxnCnt      []uint64 // The transactions be transmit by this node

}

type PayloadInfo

type PayloadInfo interface{}

func TransPayloadToHex

func TransPayloadToHex(p types.Payload) PayloadInfo

type PrivacyPayloadInfo

type PrivacyPayloadInfo struct {
	PayloadType uint8
	Payload     string
	EncryptType uint8
	EncryptAttr string
}

type RecordInfo

type RecordInfo struct {
	RecordType string
	RecordData string
}

type Sig

type Sig struct {
	PubKeys []string
	M       uint8
	SigData []string
}

type TXNAttrInfo

type TXNAttrInfo struct {
	Height  uint32
	Type    int
	ErrCode int
}

type TXNEntryInfo

type TXNEntryInfo struct {
	Txn   Transactions  // transaction which has been verified
	Fee   int64         // Total fee per transaction
	Attrs []TXNAttrInfo // the result from each validator
}

type Transactions

type Transactions struct {
	Version    byte
	Nonce      uint32
	TxType     types.TransactionType
	Payload    PayloadInfo
	Attributes []TxAttributeInfo
	Fee        []Fee
	NetworkFee common.Fixed64
	Sigs       []Sig
	Hash       string
}

func TransArryByteToHexString

func TransArryByteToHexString(ptx *types.Transaction) *Transactions

type TransferAssetInfo

type TransferAssetInfo struct {
}

implement PayloadInfo define TransferAssetInfo

type TxAttributeInfo

type TxAttributeInfo struct {
	Usage types.TransactionAttributeUsage
	Data  string
}

type UTXOTxInput

type UTXOTxInput struct {
	ReferTxID          string
	ReferTxOutputIndex uint16
}

type VoteInfo

type VoteInfo struct {
	PubKeys []string
	Voter   string
}

Jump to

Keyboard shortcuts

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