corepb

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBlock = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBlock   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type Block

type Block struct {
	Header           *BlockHeader      `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Txs              []*Transaction    `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"`
	Height           uint32            `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
	Signature        []byte            `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	IrreversibleInfo *IrreversibleInfo `protobuf:"bytes,5,opt,name=irreversible_info,json=irreversibleInfo,proto3" json:"irreversible_info,omitempty"`
}

func (*Block) Descriptor

func (*Block) Descriptor() ([]byte, []int)

func (*Block) GetHeader

func (m *Block) GetHeader() *BlockHeader

func (*Block) GetHeight

func (m *Block) GetHeight() uint32

func (*Block) GetIrreversibleInfo added in v0.3.0

func (m *Block) GetIrreversibleInfo() *IrreversibleInfo

func (*Block) GetSignature

func (m *Block) GetSignature() []byte

func (*Block) GetTxs

func (m *Block) GetTxs() []*Transaction

func (*Block) Marshal

func (m *Block) Marshal() (dAtA []byte, err error)

func (*Block) MarshalTo

func (m *Block) MarshalTo(dAtA []byte) (int, error)

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) Reset

func (m *Block) Reset()

func (*Block) Size

func (m *Block) Size() (n int)

func (*Block) String

func (m *Block) String() string

func (*Block) Unmarshal

func (m *Block) Unmarshal(dAtA []byte) error

func (*Block) XXX_DiscardUnknown

func (m *Block) XXX_DiscardUnknown()

func (*Block) XXX_Marshal

func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Block) XXX_Merge

func (m *Block) XXX_Merge(src proto.Message)

func (*Block) XXX_Size

func (m *Block) XXX_Size() int

func (*Block) XXX_Unmarshal

func (m *Block) XXX_Unmarshal(b []byte) error

type BlockHeader

type BlockHeader struct {
	Version        int32  `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	PrevBlockHash  []byte `protobuf:"bytes,2,opt,name=prev_block_hash,json=prevBlockHash,proto3" json:"prev_block_hash,omitempty"`
	TxsRoot        []byte `protobuf:"bytes,3,opt,name=txs_root,json=txsRoot,proto3" json:"txs_root,omitempty"`
	TimeStamp      int64  `protobuf:"varint,4,opt,name=time_stamp,json=timeStamp,proto3" json:"time_stamp,omitempty"`
	Magic          uint32 `protobuf:"varint,5,opt,name=magic,proto3" json:"magic,omitempty"`
	PeriodHash     []byte `protobuf:"bytes,6,opt,name=period_hash,json=periodHash,proto3" json:"period_hash,omitempty"`
	CandidatesHash []byte `protobuf:"bytes,7,opt,name=candidates_hash,json=candidatesHash,proto3" json:"candidates_hash,omitempty"`
}

func (*BlockHeader) Descriptor

func (*BlockHeader) Descriptor() ([]byte, []int)

func (*BlockHeader) GetCandidatesHash

func (m *BlockHeader) GetCandidatesHash() []byte

func (*BlockHeader) GetMagic

func (m *BlockHeader) GetMagic() uint32

func (*BlockHeader) GetPeriodHash

func (m *BlockHeader) GetPeriodHash() []byte

func (*BlockHeader) GetPrevBlockHash

func (m *BlockHeader) GetPrevBlockHash() []byte

func (*BlockHeader) GetTimeStamp

func (m *BlockHeader) GetTimeStamp() int64

func (*BlockHeader) GetTxsRoot

func (m *BlockHeader) GetTxsRoot() []byte

func (*BlockHeader) GetVersion

func (m *BlockHeader) GetVersion() int32

func (*BlockHeader) Marshal

func (m *BlockHeader) Marshal() (dAtA []byte, err error)

func (*BlockHeader) MarshalTo

func (m *BlockHeader) MarshalTo(dAtA []byte) (int, error)

func (*BlockHeader) ProtoMessage

func (*BlockHeader) ProtoMessage()

func (*BlockHeader) Reset

func (m *BlockHeader) Reset()

func (*BlockHeader) Size

func (m *BlockHeader) Size() (n int)

func (*BlockHeader) String

func (m *BlockHeader) String() string

func (*BlockHeader) Unmarshal

func (m *BlockHeader) Unmarshal(dAtA []byte) error

func (*BlockHeader) XXX_DiscardUnknown

func (m *BlockHeader) XXX_DiscardUnknown()

func (*BlockHeader) XXX_Marshal

func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockHeader) XXX_Merge

func (m *BlockHeader) XXX_Merge(src proto.Message)

func (*BlockHeader) XXX_Size

func (m *BlockHeader) XXX_Size() int

func (*BlockHeader) XXX_Unmarshal

func (m *BlockHeader) XXX_Unmarshal(b []byte) error

type Data

type Data struct {
	Type    int32  `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
	Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
}

func (*Data) Descriptor

func (*Data) Descriptor() ([]byte, []int)

func (*Data) GetContent

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

func (*Data) GetType

func (m *Data) GetType() int32

func (*Data) Marshal

func (m *Data) Marshal() (dAtA []byte, err error)

func (*Data) MarshalTo

func (m *Data) MarshalTo(dAtA []byte) (int, error)

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) Reset

func (m *Data) Reset()

func (*Data) Size

func (m *Data) Size() (n int)

func (*Data) String

func (m *Data) String() string

func (*Data) Unmarshal

func (m *Data) Unmarshal(dAtA []byte) error

func (*Data) XXX_DiscardUnknown

func (m *Data) XXX_DiscardUnknown()

func (*Data) XXX_Marshal

func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Data) XXX_Merge

func (m *Data) XXX_Merge(src proto.Message)

func (*Data) XXX_Size

func (m *Data) XXX_Size() int

func (*Data) XXX_Unmarshal

func (m *Data) XXX_Unmarshal(b []byte) error

type IrreversibleInfo added in v0.3.0

type IrreversibleInfo struct {
	Hash       []byte   `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Signatures [][]byte `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
}

func (*IrreversibleInfo) Descriptor added in v0.3.0

func (*IrreversibleInfo) Descriptor() ([]byte, []int)

func (*IrreversibleInfo) GetHash added in v0.3.0

func (m *IrreversibleInfo) GetHash() []byte

func (*IrreversibleInfo) GetSignatures added in v0.3.0

func (m *IrreversibleInfo) GetSignatures() [][]byte

func (*IrreversibleInfo) Marshal added in v0.3.0

func (m *IrreversibleInfo) Marshal() (dAtA []byte, err error)

func (*IrreversibleInfo) MarshalTo added in v0.3.0

func (m *IrreversibleInfo) MarshalTo(dAtA []byte) (int, error)

func (*IrreversibleInfo) ProtoMessage added in v0.3.0

func (*IrreversibleInfo) ProtoMessage()

func (*IrreversibleInfo) Reset added in v0.3.0

func (m *IrreversibleInfo) Reset()

func (*IrreversibleInfo) Size added in v0.3.0

func (m *IrreversibleInfo) Size() (n int)

func (*IrreversibleInfo) String added in v0.3.0

func (m *IrreversibleInfo) String() string

func (*IrreversibleInfo) Unmarshal added in v0.3.0

func (m *IrreversibleInfo) Unmarshal(dAtA []byte) error

func (*IrreversibleInfo) XXX_DiscardUnknown added in v0.3.0

func (m *IrreversibleInfo) XXX_DiscardUnknown()

func (*IrreversibleInfo) XXX_Marshal added in v0.3.0

func (m *IrreversibleInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IrreversibleInfo) XXX_Merge added in v0.3.0

func (m *IrreversibleInfo) XXX_Merge(src proto.Message)

func (*IrreversibleInfo) XXX_Size added in v0.3.0

func (m *IrreversibleInfo) XXX_Size() int

func (*IrreversibleInfo) XXX_Unmarshal added in v0.3.0

func (m *IrreversibleInfo) XXX_Unmarshal(b []byte) error

type OutPoint

type OutPoint struct {
	Hash  []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
}

func (*OutPoint) Descriptor

func (*OutPoint) Descriptor() ([]byte, []int)

func (*OutPoint) GetHash

func (m *OutPoint) GetHash() []byte

func (*OutPoint) GetIndex

func (m *OutPoint) GetIndex() uint32

func (*OutPoint) Marshal

func (m *OutPoint) Marshal() (dAtA []byte, err error)

func (*OutPoint) MarshalTo

func (m *OutPoint) MarshalTo(dAtA []byte) (int, error)

func (*OutPoint) ProtoMessage

func (*OutPoint) ProtoMessage()

func (*OutPoint) Reset

func (m *OutPoint) Reset()

func (*OutPoint) Size

func (m *OutPoint) Size() (n int)

func (*OutPoint) String

func (m *OutPoint) String() string

func (*OutPoint) Unmarshal

func (m *OutPoint) Unmarshal(dAtA []byte) error

func (*OutPoint) XXX_DiscardUnknown

func (m *OutPoint) XXX_DiscardUnknown()

func (*OutPoint) XXX_Marshal

func (m *OutPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OutPoint) XXX_Merge

func (m *OutPoint) XXX_Merge(src proto.Message)

func (*OutPoint) XXX_Size

func (m *OutPoint) XXX_Size() int

func (*OutPoint) XXX_Unmarshal

func (m *OutPoint) XXX_Unmarshal(b []byte) error

type TokenTag added in v0.3.0

type TokenTag struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Symbol   string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Supply   uint64 `protobuf:"varint,3,opt,name=supply,proto3" json:"supply,omitempty"`
	Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"`
}

func (*TokenTag) Descriptor added in v0.3.0

func (*TokenTag) Descriptor() ([]byte, []int)

func (*TokenTag) GetDecimals added in v0.3.0

func (m *TokenTag) GetDecimals() uint32

func (*TokenTag) GetName added in v0.3.0

func (m *TokenTag) GetName() string

func (*TokenTag) GetSupply added in v0.3.0

func (m *TokenTag) GetSupply() uint64

func (*TokenTag) GetSymbol added in v0.3.0

func (m *TokenTag) GetSymbol() string

func (*TokenTag) Marshal added in v0.3.0

func (m *TokenTag) Marshal() (dAtA []byte, err error)

func (*TokenTag) MarshalTo added in v0.3.0

func (m *TokenTag) MarshalTo(dAtA []byte) (int, error)

func (*TokenTag) ProtoMessage added in v0.3.0

func (*TokenTag) ProtoMessage()

func (*TokenTag) Reset added in v0.3.0

func (m *TokenTag) Reset()

func (*TokenTag) Size added in v0.3.0

func (m *TokenTag) Size() (n int)

func (*TokenTag) String added in v0.3.0

func (m *TokenTag) String() string

func (*TokenTag) Unmarshal added in v0.3.0

func (m *TokenTag) Unmarshal(dAtA []byte) error

func (*TokenTag) XXX_DiscardUnknown added in v0.3.0

func (m *TokenTag) XXX_DiscardUnknown()

func (*TokenTag) XXX_Marshal added in v0.3.0

func (m *TokenTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TokenTag) XXX_Merge added in v0.3.0

func (m *TokenTag) XXX_Merge(src proto.Message)

func (*TokenTag) XXX_Size added in v0.3.0

func (m *TokenTag) XXX_Size() int

func (*TokenTag) XXX_Unmarshal added in v0.3.0

func (m *TokenTag) XXX_Unmarshal(b []byte) error

type Transaction

type Transaction struct {
	Version  int32    `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Vin      []*TxIn  `protobuf:"bytes,2,rep,name=vin,proto3" json:"vin,omitempty"`
	Vout     []*TxOut `protobuf:"bytes,3,rep,name=vout,proto3" json:"vout,omitempty"`
	Data     *Data    `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	Magic    uint32   `protobuf:"varint,5,opt,name=magic,proto3" json:"magic,omitempty"`
	LockTime int64    `protobuf:"varint,6,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`
}

func (*Transaction) Descriptor

func (*Transaction) Descriptor() ([]byte, []int)

func (*Transaction) GetData

func (m *Transaction) GetData() *Data

func (*Transaction) GetLockTime

func (m *Transaction) GetLockTime() int64

func (*Transaction) GetMagic

func (m *Transaction) GetMagic() uint32

func (*Transaction) GetVersion

func (m *Transaction) GetVersion() int32

func (*Transaction) GetVin

func (m *Transaction) GetVin() []*TxIn

func (*Transaction) GetVout

func (m *Transaction) GetVout() []*TxOut

func (*Transaction) Marshal

func (m *Transaction) Marshal() (dAtA []byte, err error)

func (*Transaction) MarshalTo

func (m *Transaction) MarshalTo(dAtA []byte) (int, error)

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) Reset

func (m *Transaction) Reset()

func (*Transaction) Size

func (m *Transaction) Size() (n int)

func (*Transaction) String

func (m *Transaction) String() string

func (*Transaction) Unmarshal

func (m *Transaction) Unmarshal(dAtA []byte) error

func (*Transaction) XXX_DiscardUnknown

func (m *Transaction) XXX_DiscardUnknown()

func (*Transaction) XXX_Marshal

func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Transaction) XXX_Merge

func (m *Transaction) XXX_Merge(src proto.Message)

func (*Transaction) XXX_Size

func (m *Transaction) XXX_Size() int

func (*Transaction) XXX_Unmarshal

func (m *Transaction) XXX_Unmarshal(b []byte) error

type TxIn

type TxIn struct {
	PrevOutPoint *OutPoint `protobuf:"bytes,1,opt,name=prev_out_point,json=prevOutPoint,proto3" json:"prev_out_point,omitempty"`
	ScriptSig    []byte    `protobuf:"bytes,2,opt,name=script_sig,json=scriptSig,proto3" json:"script_sig,omitempty"`
	Sequence     uint32    `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"`
}

func (*TxIn) Descriptor

func (*TxIn) Descriptor() ([]byte, []int)

func (*TxIn) GetPrevOutPoint

func (m *TxIn) GetPrevOutPoint() *OutPoint

func (*TxIn) GetScriptSig

func (m *TxIn) GetScriptSig() []byte

func (*TxIn) GetSequence

func (m *TxIn) GetSequence() uint32

func (*TxIn) Marshal

func (m *TxIn) Marshal() (dAtA []byte, err error)

func (*TxIn) MarshalTo

func (m *TxIn) MarshalTo(dAtA []byte) (int, error)

func (*TxIn) ProtoMessage

func (*TxIn) ProtoMessage()

func (*TxIn) Reset

func (m *TxIn) Reset()

func (*TxIn) Size

func (m *TxIn) Size() (n int)

func (*TxIn) String

func (m *TxIn) String() string

func (*TxIn) Unmarshal

func (m *TxIn) Unmarshal(dAtA []byte) error

func (*TxIn) XXX_DiscardUnknown

func (m *TxIn) XXX_DiscardUnknown()

func (*TxIn) XXX_Marshal

func (m *TxIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxIn) XXX_Merge

func (m *TxIn) XXX_Merge(src proto.Message)

func (*TxIn) XXX_Size

func (m *TxIn) XXX_Size() int

func (*TxIn) XXX_Unmarshal

func (m *TxIn) XXX_Unmarshal(b []byte) error

type TxOut

type TxOut struct {
	Value        uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	ScriptPubKey []byte `protobuf:"bytes,2,opt,name=script_pub_key,json=scriptPubKey,proto3" json:"script_pub_key,omitempty"`
}

func (*TxOut) Descriptor

func (*TxOut) Descriptor() ([]byte, []int)

func (*TxOut) GetScriptPubKey

func (m *TxOut) GetScriptPubKey() []byte

func (*TxOut) GetValue

func (m *TxOut) GetValue() uint64

func (*TxOut) Marshal

func (m *TxOut) Marshal() (dAtA []byte, err error)

func (*TxOut) MarshalTo

func (m *TxOut) MarshalTo(dAtA []byte) (int, error)

func (*TxOut) ProtoMessage

func (*TxOut) ProtoMessage()

func (*TxOut) Reset

func (m *TxOut) Reset()

func (*TxOut) Size

func (m *TxOut) Size() (n int)

func (*TxOut) String

func (m *TxOut) String() string

func (*TxOut) Unmarshal

func (m *TxOut) Unmarshal(dAtA []byte) error

func (*TxOut) XXX_DiscardUnknown

func (m *TxOut) XXX_DiscardUnknown()

func (*TxOut) XXX_Marshal

func (m *TxOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxOut) XXX_Merge

func (m *TxOut) XXX_Merge(src proto.Message)

func (*TxOut) XXX_Size

func (m *TxOut) XXX_Size() int

func (*TxOut) XXX_Unmarshal

func (m *TxOut) XXX_Unmarshal(b []byte) error

type UtxoWrap

type UtxoWrap struct {
	Output      *TxOut `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"`
	BlockHeight uint32 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	IsSpent     bool   `protobuf:"varint,3,opt,name=is_spent,json=isSpent,proto3" json:"is_spent,omitempty"`
	IsCoinbase  bool   `protobuf:"varint,4,opt,name=is_coinbase,json=isCoinbase,proto3" json:"is_coinbase,omitempty"`
}

func (*UtxoWrap) Descriptor

func (*UtxoWrap) Descriptor() ([]byte, []int)

func (*UtxoWrap) GetBlockHeight

func (m *UtxoWrap) GetBlockHeight() uint32

func (*UtxoWrap) GetIsCoinbase

func (m *UtxoWrap) GetIsCoinbase() bool

func (*UtxoWrap) GetIsSpent

func (m *UtxoWrap) GetIsSpent() bool

func (*UtxoWrap) GetOutput

func (m *UtxoWrap) GetOutput() *TxOut

func (*UtxoWrap) Marshal

func (m *UtxoWrap) Marshal() (dAtA []byte, err error)

func (*UtxoWrap) MarshalTo

func (m *UtxoWrap) MarshalTo(dAtA []byte) (int, error)

func (*UtxoWrap) ProtoMessage

func (*UtxoWrap) ProtoMessage()

func (*UtxoWrap) Reset

func (m *UtxoWrap) Reset()

func (*UtxoWrap) Size

func (m *UtxoWrap) Size() (n int)

func (*UtxoWrap) String

func (m *UtxoWrap) String() string

func (*UtxoWrap) Unmarshal

func (m *UtxoWrap) Unmarshal(dAtA []byte) error

func (*UtxoWrap) XXX_DiscardUnknown

func (m *UtxoWrap) XXX_DiscardUnknown()

func (*UtxoWrap) XXX_Marshal

func (m *UtxoWrap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UtxoWrap) XXX_Merge

func (m *UtxoWrap) XXX_Merge(src proto.Message)

func (*UtxoWrap) XXX_Size

func (m *UtxoWrap) XXX_Size() int

func (*UtxoWrap) XXX_Unmarshal

func (m *UtxoWrap) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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