Documentation ¶
Index ¶
- Constants
- Variables
- func ProtoToBigInt(pb *BigInt, bi *big.Int) error
- func ProtoToProof(pb *Proof, proof *poc.Proof) error
- func ProtoToPublicKey(pb *PublicKey) (interfaces.PublicKey, error)
- func ProtoToSignature(pb *Signature) (interfaces.Signature, error)
- type BigInt
- func (m *BigInt) Bytes() []byte
- func (*BigInt) Descriptor() ([]byte, []int)
- func (m *BigInt) GetRaw() []byte
- func (m *BigInt) Marshal() (dAtA []byte, err error)
- func (m *BigInt) MarshalTo(dAtA []byte) (int, error)
- func (*BigInt) ProtoMessage()
- func (m *BigInt) Reset()
- func (m *BigInt) Size() (n int)
- func (m *BigInt) String() string
- func (m *BigInt) Unmarshal(dAtA []byte) error
- func (m *BigInt) XXX_DiscardUnknown()
- func (m *BigInt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BigInt) XXX_Merge(src proto.Message)
- func (m *BigInt) XXX_Size() int
- func (m *BigInt) XXX_Unmarshal(b []byte) error
- type Block
- func (m *Block) Bytes() []byte
- func (*Block) Descriptor() ([]byte, []int)
- func (m *Block) GetHeader() *BlockHeader
- func (m *Block) GetProposals() *ProposalArea
- func (m *Block) GetTransactions() []*Tx
- 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) Write(w io.Writer) (int, error)
- func (m *Block) XXX_DiscardUnknown()
- func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Block) XXX_Merge(src proto.Message)
- func (m *Block) XXX_Size() int
- func (m *Block) XXX_Unmarshal(b []byte) error
- type BlockBase
- func (*BlockBase) Descriptor() ([]byte, []int)
- func (m *BlockBase) GetHeader() *BlockHeader
- func (m *BlockBase) GetProposals() *ProposalArea
- func (m *BlockBase) Marshal() (dAtA []byte, err error)
- func (m *BlockBase) MarshalTo(dAtA []byte) (int, error)
- func (*BlockBase) ProtoMessage()
- func (m *BlockBase) Reset()
- func (m *BlockBase) Size() (n int)
- func (m *BlockBase) String() string
- func (m *BlockBase) Unmarshal(dAtA []byte) error
- func (m *BlockBase) XXX_DiscardUnknown()
- func (m *BlockBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockBase) XXX_Merge(src proto.Message)
- func (m *BlockBase) XXX_Size() int
- func (m *BlockBase) XXX_Unmarshal(b []byte) error
- type BlockHeader
- func (m *BlockHeader) Bytes() []byte
- func (m *BlockHeader) BytesChainID() []byte
- func (m *BlockHeader) BytesPoC() []byte
- func (*BlockHeader) Descriptor() ([]byte, []int)
- func (m *BlockHeader) GetBanList() []*PublicKey
- func (m *BlockHeader) GetBindingRoot() *Hash
- func (m *BlockHeader) GetChainID() *Hash
- func (m *BlockHeader) GetChallenge() *Hash
- func (m *BlockHeader) GetHeight() uint64
- func (m *BlockHeader) GetPrevious() *Hash
- func (m *BlockHeader) GetProof() *Proof
- func (m *BlockHeader) GetProposalRoot() *Hash
- func (m *BlockHeader) GetPubKey() *PublicKey
- func (m *BlockHeader) GetSignature() *Signature
- func (m *BlockHeader) GetTarget() *BigInt
- func (m *BlockHeader) GetTimestamp() uint64
- func (m *BlockHeader) GetTransactionRoot() *Hash
- func (m *BlockHeader) GetVersion() uint64
- func (m *BlockHeader) GetWitnessRoot() *Hash
- 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) Write(w io.Writer) (int, error)
- func (m *BlockHeader) WritePoC(w io.Writer) (int, error)
- func (m *BlockHeader) XXX_DiscardUnknown()
- func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockHeader) XXX_Merge(src proto.Message)
- func (m *BlockHeader) XXX_Size() int
- func (m *BlockHeader) XXX_Unmarshal(b []byte) error
- type Hash
- func (m *Hash) Bytes() []byte
- func (*Hash) Descriptor() ([]byte, []int)
- func (m *Hash) GetS0() uint64
- func (m *Hash) GetS1() uint64
- func (m *Hash) GetS2() uint64
- func (m *Hash) GetS3() uint64
- func (m *Hash) Marshal() (dAtA []byte, err error)
- func (m *Hash) MarshalTo(dAtA []byte) (int, error)
- func (*Hash) ProtoMessage()
- func (m *Hash) Reset()
- func (m *Hash) Size() (n int)
- func (m *Hash) String() string
- func (m *Hash) Unmarshal(dAtA []byte) error
- func (m *Hash) XXX_DiscardUnknown()
- func (m *Hash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Hash) XXX_Merge(src proto.Message)
- func (m *Hash) XXX_Size() int
- func (m *Hash) XXX_Unmarshal(b []byte) error
- type OutPoint
- func (m *OutPoint) Bytes() []byte
- func (*OutPoint) Descriptor() ([]byte, []int)
- func (m *OutPoint) GetHash() *Hash
- 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 (m *OutPoint) XXX_Merge(src proto.Message)
- func (m *OutPoint) XXX_Size() int
- func (m *OutPoint) XXX_Unmarshal(b []byte) error
- type Proof
- func (m *Proof) Bytes() []byte
- func (*Proof) Descriptor() ([]byte, []int)
- func (m *Proof) GetBitLength() uint32
- func (m *Proof) GetX() []byte
- func (m *Proof) GetXPrime() []byte
- func (m *Proof) Marshal() (dAtA []byte, err error)
- func (m *Proof) MarshalTo(dAtA []byte) (int, error)
- func (*Proof) ProtoMessage()
- func (m *Proof) Reset()
- func (m *Proof) Size() (n int)
- func (m *Proof) String() string
- func (m *Proof) Unmarshal(dAtA []byte) error
- func (m *Proof) XXX_DiscardUnknown()
- func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Proof) XXX_Merge(src proto.Message)
- func (m *Proof) XXX_Size() int
- func (m *Proof) XXX_Unmarshal(b []byte) error
- type Proposal
- func (m *Proposal) Bytes() []byte
- func (*Proposal) Descriptor() ([]byte, []int)
- func (m *Proposal) GetContent() []byte
- func (m *Proposal) GetType() uint32
- func (m *Proposal) GetVersion() uint32
- func (m *Proposal) Marshal() (dAtA []byte, err error)
- func (m *Proposal) MarshalTo(dAtA []byte) (int, error)
- func (*Proposal) ProtoMessage()
- func (m *Proposal) Reset()
- func (m *Proposal) Size() (n int)
- func (m *Proposal) String() string
- func (m *Proposal) Unmarshal(dAtA []byte) error
- func (m *Proposal) Write(w io.Writer) (int, error)
- func (m *Proposal) XXX_DiscardUnknown()
- func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Proposal) XXX_Merge(src proto.Message)
- func (m *Proposal) XXX_Size() int
- func (m *Proposal) XXX_Unmarshal(b []byte) error
- type ProposalArea
- func (m *ProposalArea) Bytes() []byte
- func (*ProposalArea) Descriptor() ([]byte, []int)
- func (m *ProposalArea) GetOtherProposals() []*Proposal
- func (m *ProposalArea) GetPunishments() []*Punishment
- func (m *ProposalArea) Marshal() (dAtA []byte, err error)
- func (m *ProposalArea) MarshalTo(dAtA []byte) (int, error)
- func (*ProposalArea) ProtoMessage()
- func (m *ProposalArea) Reset()
- func (m *ProposalArea) Size() (n int)
- func (m *ProposalArea) String() string
- func (m *ProposalArea) Unmarshal(dAtA []byte) error
- func (m *ProposalArea) Write(w io.Writer) (int, error)
- func (m *ProposalArea) XXX_DiscardUnknown()
- func (m *ProposalArea) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProposalArea) XXX_Merge(src proto.Message)
- func (m *ProposalArea) XXX_Size() int
- func (m *ProposalArea) XXX_Unmarshal(b []byte) error
- type PublicKey
- func (m *PublicKey) Bytes() []byte
- func (*PublicKey) Descriptor() ([]byte, []int)
- func (m *PublicKey) GetRaw() []byte
- func (m *PublicKey) Marshal() (dAtA []byte, err error)
- func (m *PublicKey) MarshalTo(dAtA []byte) (int, error)
- func (*PublicKey) ProtoMessage()
- func (m *PublicKey) Reset()
- func (m *PublicKey) Size() (n int)
- func (m *PublicKey) String() string
- func (m *PublicKey) Unmarshal(dAtA []byte) error
- func (m *PublicKey) XXX_DiscardUnknown()
- func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PublicKey) XXX_Merge(src proto.Message)
- func (m *PublicKey) XXX_Size() int
- func (m *PublicKey) XXX_Unmarshal(b []byte) error
- type Punishment
- func (m *Punishment) Bytes() []byte
- func (*Punishment) Descriptor() ([]byte, []int)
- func (m *Punishment) GetTestimonyA() *BlockHeader
- func (m *Punishment) GetTestimonyB() *BlockHeader
- func (m *Punishment) GetType() uint32
- func (m *Punishment) GetVersion() uint32
- func (m *Punishment) Marshal() (dAtA []byte, err error)
- func (m *Punishment) MarshalTo(dAtA []byte) (int, error)
- func (*Punishment) ProtoMessage()
- func (m *Punishment) Reset()
- func (m *Punishment) Size() (n int)
- func (m *Punishment) String() string
- func (m *Punishment) Unmarshal(dAtA []byte) error
- func (m *Punishment) Write(w io.Writer) (int, error)
- func (m *Punishment) XXX_DiscardUnknown()
- func (m *Punishment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Punishment) XXX_Merge(src proto.Message)
- func (m *Punishment) XXX_Size() int
- func (m *Punishment) XXX_Unmarshal(b []byte) error
- type Signature
- func (m *Signature) Bytes() []byte
- func (*Signature) Descriptor() ([]byte, []int)
- func (m *Signature) GetRaw() []byte
- func (m *Signature) Marshal() (dAtA []byte, err error)
- func (m *Signature) MarshalTo(dAtA []byte) (int, error)
- func (*Signature) ProtoMessage()
- func (m *Signature) Reset()
- func (m *Signature) Size() (n int)
- func (m *Signature) String() string
- func (m *Signature) Unmarshal(dAtA []byte) error
- func (m *Signature) XXX_DiscardUnknown()
- func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Signature) XXX_Merge(src proto.Message)
- func (m *Signature) XXX_Size() int
- func (m *Signature) XXX_Unmarshal(b []byte) error
- type Tx
- func (m *Tx) Bytes() []byte
- func (m *Tx) BytesNoWitness() []byte
- func (*Tx) Descriptor() ([]byte, []int)
- func (m *Tx) GetLockTime() uint64
- func (m *Tx) GetPayload() []byte
- func (m *Tx) GetTxIn() []*TxIn
- func (m *Tx) GetTxOut() []*TxOut
- func (m *Tx) GetVersion() uint32
- func (m *Tx) Marshal() (dAtA []byte, err error)
- func (m *Tx) MarshalTo(dAtA []byte) (int, error)
- func (*Tx) ProtoMessage()
- func (m *Tx) Reset()
- func (m *Tx) Size() (n int)
- func (m *Tx) String() string
- func (m *Tx) Unmarshal(dAtA []byte) error
- func (m *Tx) Write(w io.Writer) (int, error)
- func (m *Tx) WriteNoWitness(w io.Writer) (int, error)
- func (m *Tx) XXX_DiscardUnknown()
- func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Tx) XXX_Merge(src proto.Message)
- func (m *Tx) XXX_Size() int
- func (m *Tx) XXX_Unmarshal(b []byte) error
- type TxIn
- func (m *TxIn) Bytes() []byte
- func (m *TxIn) BytesNoWitness() []byte
- func (*TxIn) Descriptor() ([]byte, []int)
- func (m *TxIn) GetPreviousOutPoint() *OutPoint
- func (m *TxIn) GetSequence() uint64
- func (m *TxIn) GetWitness() [][]byte
- 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 (m *TxIn) XXX_Merge(src proto.Message)
- func (m *TxIn) XXX_Size() int
- func (m *TxIn) XXX_Unmarshal(b []byte) error
- type TxOut
- func (m *TxOut) Bytes() []byte
- func (*TxOut) Descriptor() ([]byte, []int)
- func (m *TxOut) GetPkScript() []byte
- func (m *TxOut) GetValue() int64
- 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 (m *TxOut) XXX_Merge(src proto.Message)
- func (m *TxOut) XXX_Size() int
- func (m *TxOut) XXX_Unmarshal(b []byte) error
Constants ¶
const ( PublicKeyLengthS256 = 33 PublicKeyLengthBLS = 48 SignatureLengthS256Min = pocec.MinSigLen SignatureLengthS256Max = 80 SignatureLengthBLS = 96 )
Variables ¶
var ( ErrInvalidLengthWirepb = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowWirepb = fmt.Errorf("proto: integer overflow") )
Functions ¶
func ProtoToBigInt ¶
ProtoToBigInt get golang big.Int from proto BigInt
func ProtoToPublicKey ¶
func ProtoToPublicKey(pb *PublicKey) (interfaces.PublicKey, error)
ProtoToPublicKey accepts a proto PublicKey and a pocec/chiapos PublicKey, fills content into the latter
func ProtoToSignature ¶
func ProtoToSignature(pb *Signature) (interfaces.Signature, error)
ProtoToSignature accepts a proto Signture and a pocec/chiapos Signture, fills content into the latter
Types ¶
type BigInt ¶
type BigInt struct { Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Proto for BigInt
func BigIntToProto ¶
BigIntToProto get proto BigInt from golang big.Int
func (*BigInt) Descriptor ¶
func (*BigInt) ProtoMessage ¶
func (*BigInt) ProtoMessage()
func (*BigInt) XXX_DiscardUnknown ¶
func (m *BigInt) XXX_DiscardUnknown()
func (*BigInt) XXX_Marshal ¶
func (*BigInt) XXX_Unmarshal ¶
type Block ¶
type Block struct { Header *BlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` Proposals *ProposalArea `protobuf:"bytes,2,opt,name=Proposals,proto3" json:"Proposals"` Transactions []*Tx `protobuf:"bytes,3,rep,name=Transactions,proto3" json:"Transactions"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Proto for Blocks
func (*Block) Descriptor ¶
func (*Block) GetHeader ¶
func (m *Block) GetHeader() *BlockHeader
func (*Block) GetProposals ¶
func (m *Block) GetProposals() *ProposalArea
func (*Block) GetTransactions ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) XXX_DiscardUnknown ¶
func (m *Block) XXX_DiscardUnknown()
func (*Block) XXX_Marshal ¶
func (*Block) XXX_Unmarshal ¶
type BlockBase ¶
type BlockBase struct { Header *BlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` Proposals *ProposalArea `protobuf:"bytes,2,opt,name=proposals,proto3" json:"proposals"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BlockBase) Descriptor ¶
func (*BlockBase) GetHeader ¶
func (m *BlockBase) GetHeader() *BlockHeader
func (*BlockBase) GetProposals ¶
func (m *BlockBase) GetProposals() *ProposalArea
func (*BlockBase) ProtoMessage ¶
func (*BlockBase) ProtoMessage()
func (*BlockBase) XXX_DiscardUnknown ¶
func (m *BlockBase) XXX_DiscardUnknown()
func (*BlockBase) XXX_Marshal ¶
func (*BlockBase) XXX_Unmarshal ¶
type BlockHeader ¶
type BlockHeader struct { ChainID *Hash `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id"` Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version"` Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height"` Timestamp uint64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp"` Previous *Hash `protobuf:"bytes,5,opt,name=previous,proto3" json:"previous"` TransactionRoot *Hash `protobuf:"bytes,6,opt,name=transaction_root,json=transactionRoot,proto3" json:"transaction_root"` WitnessRoot *Hash `protobuf:"bytes,7,opt,name=witness_root,json=witnessRoot,proto3" json:"witness_root"` ProposalRoot *Hash `protobuf:"bytes,8,opt,name=proposal_root,json=proposalRoot,proto3" json:"proposal_root"` Target *BigInt `protobuf:"bytes,9,opt,name=target,proto3" json:"target"` Challenge *Hash `protobuf:"bytes,10,opt,name=challenge,proto3" json:"challenge"` PubKey *PublicKey `protobuf:"bytes,11,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"` Proof *Proof `protobuf:"bytes,12,opt,name=proof,proto3" json:"proof"` Signature *Signature `protobuf:"bytes,14,opt,name=signature,proto3" json:"signature"` BanList []*PublicKey `protobuf:"bytes,15,rep,name=ban_list,json=banList,proto3" json:"ban_list"` BindingRoot *Hash `protobuf:"bytes,16,opt,name=binding_root,json=bindingRoot,proto3" json:"binding_root"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Proto for BlockHeaders
func (*BlockHeader) Bytes ¶
func (m *BlockHeader) Bytes() []byte
func (*BlockHeader) BytesChainID ¶
func (m *BlockHeader) BytesChainID() []byte
func (*BlockHeader) BytesPoC ¶
func (m *BlockHeader) BytesPoC() []byte
func (*BlockHeader) Descriptor ¶
func (*BlockHeader) Descriptor() ([]byte, []int)
func (*BlockHeader) GetBanList ¶
func (m *BlockHeader) GetBanList() []*PublicKey
func (*BlockHeader) GetBindingRoot ¶
func (m *BlockHeader) GetBindingRoot() *Hash
func (*BlockHeader) GetChainID ¶
func (m *BlockHeader) GetChainID() *Hash
func (*BlockHeader) GetChallenge ¶
func (m *BlockHeader) GetChallenge() *Hash
func (*BlockHeader) GetHeight ¶
func (m *BlockHeader) GetHeight() uint64
func (*BlockHeader) GetPrevious ¶
func (m *BlockHeader) GetPrevious() *Hash
func (*BlockHeader) GetProof ¶
func (m *BlockHeader) GetProof() *Proof
func (*BlockHeader) GetProposalRoot ¶
func (m *BlockHeader) GetProposalRoot() *Hash
func (*BlockHeader) GetPubKey ¶
func (m *BlockHeader) GetPubKey() *PublicKey
func (*BlockHeader) GetSignature ¶
func (m *BlockHeader) GetSignature() *Signature
func (*BlockHeader) GetTarget ¶
func (m *BlockHeader) GetTarget() *BigInt
func (*BlockHeader) GetTimestamp ¶
func (m *BlockHeader) GetTimestamp() uint64
func (*BlockHeader) GetTransactionRoot ¶
func (m *BlockHeader) GetTransactionRoot() *Hash
func (*BlockHeader) GetVersion ¶
func (m *BlockHeader) GetVersion() uint64
func (*BlockHeader) GetWitnessRoot ¶
func (m *BlockHeader) GetWitnessRoot() *Hash
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 (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 Hash ¶
type Hash struct { S0 uint64 `protobuf:"fixed64,1,opt,name=s0,proto3" json:"s0"` S1 uint64 `protobuf:"fixed64,2,opt,name=s1,proto3" json:"s1"` S2 uint64 `protobuf:"fixed64,3,opt,name=s2,proto3" json:"s2"` S3 uint64 `protobuf:"fixed64,4,opt,name=s3,proto3" json:"s3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Proto for Hashes
func (*Hash) Descriptor ¶
func (*Hash) ProtoMessage ¶
func (*Hash) ProtoMessage()
func (*Hash) XXX_DiscardUnknown ¶
func (m *Hash) XXX_DiscardUnknown()
func (*Hash) XXX_Unmarshal ¶
type OutPoint ¶
type OutPoint struct { Hash *Hash `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash"` Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 Proof ¶
type Proof struct { X []byte `protobuf:"bytes,1,opt,name=x,proto3" json:"x"` XPrime []byte `protobuf:"bytes,2,opt,name=x_prime,json=xPrime,proto3" json:"x_prime"` BitLength uint32 `protobuf:"varint,3,opt,name=bit_length,json=bitLength,proto3" json:"bit_length"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Proto for Proofs
func ProofToProto ¶
func (*Proof) Descriptor ¶
func (*Proof) GetBitLength ¶
func (*Proof) ProtoMessage ¶
func (*Proof) ProtoMessage()
func (*Proof) XXX_DiscardUnknown ¶
func (m *Proof) XXX_DiscardUnknown()
func (*Proof) XXX_Marshal ¶
func (*Proof) XXX_Unmarshal ¶
type Proposal ¶
type Proposal struct { Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version"` Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type"` Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Proposal) Descriptor ¶
func (*Proposal) GetContent ¶
func (*Proposal) GetVersion ¶
func (*Proposal) ProtoMessage ¶
func (*Proposal) ProtoMessage()
func (*Proposal) XXX_DiscardUnknown ¶
func (m *Proposal) XXX_DiscardUnknown()
func (*Proposal) XXX_Marshal ¶
func (*Proposal) XXX_Unmarshal ¶
type ProposalArea ¶
type ProposalArea struct { Punishments []*Punishment `protobuf:"bytes,1,rep,name=punishments,proto3" json:"punishments"` OtherProposals []*Proposal `protobuf:"bytes,2,rep,name=other_proposals,json=otherProposals,proto3" json:"other_proposals"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Proto for ProposalAreas
func (*ProposalArea) Bytes ¶
func (m *ProposalArea) Bytes() []byte
func (*ProposalArea) Descriptor ¶
func (*ProposalArea) Descriptor() ([]byte, []int)
func (*ProposalArea) GetOtherProposals ¶
func (m *ProposalArea) GetOtherProposals() []*Proposal
func (*ProposalArea) GetPunishments ¶
func (m *ProposalArea) GetPunishments() []*Punishment
func (*ProposalArea) Marshal ¶
func (m *ProposalArea) Marshal() (dAtA []byte, err error)
func (*ProposalArea) ProtoMessage ¶
func (*ProposalArea) ProtoMessage()
func (*ProposalArea) Reset ¶
func (m *ProposalArea) Reset()
func (*ProposalArea) Size ¶
func (m *ProposalArea) Size() (n int)
func (*ProposalArea) String ¶
func (m *ProposalArea) String() string
func (*ProposalArea) Unmarshal ¶
func (m *ProposalArea) Unmarshal(dAtA []byte) error
func (*ProposalArea) XXX_DiscardUnknown ¶
func (m *ProposalArea) XXX_DiscardUnknown()
func (*ProposalArea) XXX_Marshal ¶
func (m *ProposalArea) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProposalArea) XXX_Merge ¶
func (m *ProposalArea) XXX_Merge(src proto.Message)
func (*ProposalArea) XXX_Size ¶
func (m *ProposalArea) XXX_Size() int
func (*ProposalArea) XXX_Unmarshal ¶
func (m *ProposalArea) XXX_Unmarshal(b []byte) error
type PublicKey ¶
type PublicKey struct { Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Proto for Crypto
func NewEmptyPublicKey ¶
func NewEmptyPublicKey() *PublicKey
NewEmptyPublicKey returns new empty initialized proto PublicKey
func PublicKeyToProto ¶
func PublicKeyToProto(pub interfaces.PublicKey) *PublicKey
PublicKeyToProto accespts a pocec/chiapos PublicKey, returns a proto PublicKey
func (*PublicKey) Descriptor ¶
func (*PublicKey) ProtoMessage ¶
func (*PublicKey) ProtoMessage()
func (*PublicKey) XXX_DiscardUnknown ¶
func (m *PublicKey) XXX_DiscardUnknown()
func (*PublicKey) XXX_Marshal ¶
func (*PublicKey) XXX_Unmarshal ¶
type Punishment ¶
type Punishment struct { Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version"` Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type"` TestimonyA *BlockHeader `protobuf:"bytes,3,opt,name=testimony_a,json=testimonyA,proto3" json:"testimony_a"` TestimonyB *BlockHeader `protobuf:"bytes,4,opt,name=testimony_b,json=testimonyB,proto3" json:"testimony_b"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Punishment) Bytes ¶
func (m *Punishment) Bytes() []byte
func (*Punishment) Descriptor ¶
func (*Punishment) Descriptor() ([]byte, []int)
func (*Punishment) GetTestimonyA ¶
func (m *Punishment) GetTestimonyA() *BlockHeader
func (*Punishment) GetTestimonyB ¶
func (m *Punishment) GetTestimonyB() *BlockHeader
func (*Punishment) GetType ¶
func (m *Punishment) GetType() uint32
func (*Punishment) GetVersion ¶
func (m *Punishment) GetVersion() uint32
func (*Punishment) Marshal ¶
func (m *Punishment) Marshal() (dAtA []byte, err error)
func (*Punishment) ProtoMessage ¶
func (*Punishment) ProtoMessage()
func (*Punishment) Reset ¶
func (m *Punishment) Reset()
func (*Punishment) Size ¶
func (m *Punishment) Size() (n int)
func (*Punishment) String ¶
func (m *Punishment) String() string
func (*Punishment) Unmarshal ¶
func (m *Punishment) Unmarshal(dAtA []byte) error
func (*Punishment) XXX_DiscardUnknown ¶
func (m *Punishment) XXX_DiscardUnknown()
func (*Punishment) XXX_Marshal ¶
func (m *Punishment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Punishment) XXX_Merge ¶
func (m *Punishment) XXX_Merge(src proto.Message)
func (*Punishment) XXX_Size ¶
func (m *Punishment) XXX_Size() int
func (*Punishment) XXX_Unmarshal ¶
func (m *Punishment) XXX_Unmarshal(b []byte) error
type Signature ¶
type Signature struct { Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewEmptySignature ¶
func NewEmptySignature() *Signature
NewEmptySignature returns new empty initialized proto Signature
func SignatureToProto ¶
func SignatureToProto(sig interfaces.Signature) *Signature
SignatureToProto accepts a pocec/chiapos Signature, returns a proto Signature
func (*Signature) Descriptor ¶
func (*Signature) ProtoMessage ¶
func (*Signature) ProtoMessage()
func (*Signature) XXX_DiscardUnknown ¶
func (m *Signature) XXX_DiscardUnknown()
func (*Signature) XXX_Marshal ¶
func (*Signature) XXX_Unmarshal ¶
type Tx ¶
type Tx struct { Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version"` TxIn []*TxIn `protobuf:"bytes,2,rep,name=tx_in,json=txIn,proto3" json:"tx_in"` TxOut []*TxOut `protobuf:"bytes,3,rep,name=tx_out,json=txOut,proto3" json:"tx_out"` LockTime uint64 `protobuf:"varint,4,opt,name=lock_time,json=lockTime,proto3" json:"lock_time"` Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Proto for Transactions
func (*Tx) BytesNoWitness ¶
func (*Tx) Descriptor ¶
func (*Tx) GetLockTime ¶
func (*Tx) GetPayload ¶
func (*Tx) GetVersion ¶
func (*Tx) ProtoMessage ¶
func (*Tx) ProtoMessage()
func (*Tx) XXX_DiscardUnknown ¶
func (m *Tx) XXX_DiscardUnknown()
func (*Tx) XXX_Unmarshal ¶
type TxIn ¶
type TxIn struct { PreviousOutPoint *OutPoint `protobuf:"bytes,1,opt,name=previous_out_point,json=previousOutPoint,proto3" json:"previous_out_point"` Witness [][]byte `protobuf:"bytes,2,rep,name=witness,proto3" json:"witness"` Sequence uint64 `protobuf:"fixed64,3,opt,name=sequence,proto3" json:"sequence"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TxIn) BytesNoWitness ¶
func (*TxIn) Descriptor ¶
func (*TxIn) GetPreviousOutPoint ¶
func (*TxIn) GetSequence ¶
func (*TxIn) GetWitness ¶
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 int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value"` PkScript []byte `protobuf:"bytes,2,opt,name=pk_script,json=pkScript,proto3" json:"pk_script"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TxOut) Descriptor ¶
func (*TxOut) GetPkScript ¶
func (*TxOut) ProtoMessage ¶
func (*TxOut) ProtoMessage()
func (*TxOut) XXX_DiscardUnknown ¶
func (m *TxOut) XXX_DiscardUnknown()