Documentation ¶
Index ¶
- Variables
- type Block
- func (*Block) Descriptor() ([]byte, []int)
- func (m *Block) GetHeader() *BlockHeader
- func (m *Block) GetHeight() uint32
- func (m *Block) GetSignature() []byte
- func (m *Block) GetTxs() []*Transaction
- func (m *Block) Marshal() (dAtA []byte, err error)
- func (m *Block) MarshalTo(dAtA []byte) (int, error)
- func (*Block) ProtoMessage()
- func (m *Block) Reset()
- func (m *Block) Size() (n int)
- func (m *Block) String() string
- func (m *Block) Unmarshal(dAtA []byte) error
- func (m *Block) XXX_DiscardUnknown()
- func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Block) XXX_Merge(src proto.Message)
- func (m *Block) XXX_Size() int
- func (m *Block) XXX_Unmarshal(b []byte) error
- type BlockHeader
- func (*BlockHeader) Descriptor() ([]byte, []int)
- func (m *BlockHeader) GetCandidatesHash() []byte
- func (m *BlockHeader) GetMagic() uint32
- func (m *BlockHeader) GetPeriodHash() []byte
- func (m *BlockHeader) GetPrevBlockHash() []byte
- func (m *BlockHeader) GetTimeStamp() int64
- func (m *BlockHeader) GetTxsRoot() []byte
- func (m *BlockHeader) GetVersion() int32
- func (m *BlockHeader) Marshal() (dAtA []byte, err error)
- func (m *BlockHeader) MarshalTo(dAtA []byte) (int, error)
- func (*BlockHeader) ProtoMessage()
- func (m *BlockHeader) Reset()
- func (m *BlockHeader) Size() (n int)
- func (m *BlockHeader) String() string
- func (m *BlockHeader) Unmarshal(dAtA []byte) error
- func (m *BlockHeader) XXX_DiscardUnknown()
- func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *BlockHeader) XXX_Merge(src proto.Message)
- func (m *BlockHeader) XXX_Size() int
- func (m *BlockHeader) XXX_Unmarshal(b []byte) error
- type Data
- func (*Data) Descriptor() ([]byte, []int)
- func (m *Data) GetContent() []byte
- func (m *Data) GetType() int32
- func (m *Data) Marshal() (dAtA []byte, err error)
- func (m *Data) MarshalTo(dAtA []byte) (int, error)
- func (*Data) ProtoMessage()
- func (m *Data) Reset()
- func (m *Data) Size() (n int)
- func (m *Data) String() string
- func (m *Data) Unmarshal(dAtA []byte) error
- func (m *Data) XXX_DiscardUnknown()
- func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Data) XXX_Merge(src proto.Message)
- func (m *Data) XXX_Size() int
- func (m *Data) XXX_Unmarshal(b []byte) error
- type OutPoint
- func (*OutPoint) Descriptor() ([]byte, []int)
- func (m *OutPoint) GetHash() []byte
- func (m *OutPoint) GetIndex() uint32
- func (m *OutPoint) Marshal() (dAtA []byte, err error)
- func (m *OutPoint) MarshalTo(dAtA []byte) (int, error)
- func (*OutPoint) ProtoMessage()
- func (m *OutPoint) Reset()
- func (m *OutPoint) Size() (n int)
- func (m *OutPoint) String() string
- func (m *OutPoint) Unmarshal(dAtA []byte) error
- func (m *OutPoint) XXX_DiscardUnknown()
- func (m *OutPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *OutPoint) XXX_Merge(src proto.Message)
- func (m *OutPoint) XXX_Size() int
- func (m *OutPoint) XXX_Unmarshal(b []byte) error
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)
- func (m *Transaction) GetData() *Data
- func (m *Transaction) GetLockTime() int64
- func (m *Transaction) GetMagic() uint32
- func (m *Transaction) GetVersion() int32
- func (m *Transaction) GetVin() []*TxIn
- func (m *Transaction) GetVout() []*TxOut
- func (m *Transaction) Marshal() (dAtA []byte, err error)
- func (m *Transaction) MarshalTo(dAtA []byte) (int, error)
- func (*Transaction) ProtoMessage()
- func (m *Transaction) Reset()
- func (m *Transaction) Size() (n int)
- func (m *Transaction) String() string
- func (m *Transaction) Unmarshal(dAtA []byte) error
- func (m *Transaction) XXX_DiscardUnknown()
- func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Transaction) XXX_Merge(src proto.Message)
- func (m *Transaction) XXX_Size() int
- func (m *Transaction) XXX_Unmarshal(b []byte) error
- type TxIn
- func (*TxIn) Descriptor() ([]byte, []int)
- func (m *TxIn) GetPrevOutPoint() *OutPoint
- func (m *TxIn) GetScriptSig() []byte
- func (m *TxIn) GetSequence() uint32
- func (m *TxIn) Marshal() (dAtA []byte, err error)
- func (m *TxIn) MarshalTo(dAtA []byte) (int, error)
- func (*TxIn) ProtoMessage()
- func (m *TxIn) Reset()
- func (m *TxIn) Size() (n int)
- func (m *TxIn) String() string
- func (m *TxIn) Unmarshal(dAtA []byte) error
- func (m *TxIn) XXX_DiscardUnknown()
- func (m *TxIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TxIn) XXX_Merge(src proto.Message)
- func (m *TxIn) XXX_Size() int
- func (m *TxIn) XXX_Unmarshal(b []byte) error
- type TxOut
- func (*TxOut) Descriptor() ([]byte, []int)
- func (m *TxOut) GetScriptPubKey() []byte
- func (m *TxOut) GetValue() uint64
- func (m *TxOut) Marshal() (dAtA []byte, err error)
- func (m *TxOut) MarshalTo(dAtA []byte) (int, error)
- func (*TxOut) ProtoMessage()
- func (m *TxOut) Reset()
- func (m *TxOut) Size() (n int)
- func (m *TxOut) String() string
- func (m *TxOut) Unmarshal(dAtA []byte) error
- func (m *TxOut) XXX_DiscardUnknown()
- func (m *TxOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TxOut) XXX_Merge(src proto.Message)
- func (m *TxOut) XXX_Size() int
- func (m *TxOut) XXX_Unmarshal(b []byte) error
- type UtxoWrap
- func (*UtxoWrap) Descriptor() ([]byte, []int)
- func (m *UtxoWrap) GetBlockHeight() uint32
- func (m *UtxoWrap) GetIsCoinbase() bool
- func (m *UtxoWrap) GetIsModified() bool
- func (m *UtxoWrap) GetIsSpent() bool
- func (m *UtxoWrap) GetOutput() *TxOut
- func (m *UtxoWrap) Marshal() (dAtA []byte, err error)
- func (m *UtxoWrap) MarshalTo(dAtA []byte) (int, error)
- func (*UtxoWrap) ProtoMessage()
- func (m *UtxoWrap) Reset()
- func (m *UtxoWrap) Size() (n int)
- func (m *UtxoWrap) String() string
- func (m *UtxoWrap) Unmarshal(dAtA []byte) error
- func (m *UtxoWrap) XXX_DiscardUnknown()
- func (m *UtxoWrap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UtxoWrap) XXX_Merge(src proto.Message)
- func (m *UtxoWrap) XXX_Size() int
- func (m *UtxoWrap) XXX_Unmarshal(b []byte) error
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) GetHeader ¶
func (m *Block) GetHeader() *BlockHeader
func (*Block) GetSignature ¶
func (*Block) GetTxs ¶
func (m *Block) GetTxs() []*Transaction
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) XXX_DiscardUnknown ¶
func (m *Block) XXX_DiscardUnknown()
func (*Block) XXX_Marshal ¶
func (*Block) XXX_Unmarshal ¶
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) 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) GetContent ¶
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) XXX_DiscardUnknown ¶
func (m *Data) XXX_DiscardUnknown()
func (*Data) XXX_Unmarshal ¶
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) ProtoMessage ¶
func (*OutPoint) ProtoMessage()
func (*OutPoint) XXX_DiscardUnknown ¶
func (m *OutPoint) XXX_DiscardUnknown()
func (*OutPoint) XXX_Marshal ¶
func (*OutPoint) XXX_Unmarshal ¶
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) 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) GetPrevOutPoint ¶
func (*TxIn) GetScriptSig ¶
func (*TxIn) GetSequence ¶
func (*TxIn) ProtoMessage ¶
func (*TxIn) ProtoMessage()
func (*TxIn) XXX_DiscardUnknown ¶
func (m *TxIn) XXX_DiscardUnknown()
func (*TxIn) XXX_Unmarshal ¶
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) GetScriptPubKey ¶
func (*TxOut) ProtoMessage ¶
func (*TxOut) ProtoMessage()
func (*TxOut) XXX_DiscardUnknown ¶
func (m *TxOut) XXX_DiscardUnknown()
func (*TxOut) XXX_Marshal ¶
func (*TxOut) XXX_Unmarshal ¶
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) GetBlockHeight ¶
func (*UtxoWrap) GetIsCoinbase ¶
func (*UtxoWrap) GetIsModified ¶
func (*UtxoWrap) GetIsSpent ¶
func (*UtxoWrap) ProtoMessage ¶
func (*UtxoWrap) ProtoMessage()
func (*UtxoWrap) XXX_DiscardUnknown ¶
func (m *UtxoWrap) XXX_DiscardUnknown()
func (*UtxoWrap) XXX_Marshal ¶
func (*UtxoWrap) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.