Help us shape the future of Go! Take the 2026 Go Developer Survey

corepb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 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" json:"header,omitempty"`
	Txs       []*Transaction `protobuf:"bytes,2,rep,name=txs" 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"`
}

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) 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 (dst *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 (dst *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 (dst *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 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 (dst *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 Transaction

type Transaction struct {
	Version  int32    `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Vin      []*TxIn  `protobuf:"bytes,2,rep,name=vin" json:"vin,omitempty"`
	Vout     []*TxOut `protobuf:"bytes,3,rep,name=vout" json:"vout,omitempty"`
	Data     *Data    `protobuf:"bytes,4,opt,name=data" 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 (dst *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" 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 (dst *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 (dst *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" 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"`
	IsModified  bool   `protobuf:"varint,5,opt,name=is_modified,json=isModified,proto3" json:"is_modified,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) GetIsModified

func (m *UtxoWrap) GetIsModified() 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 (dst *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