wirepb

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublicKeyLengthS256    = 33
	PublicKeyLengthBLS     = 48
	SignatureLengthS256Min = pocec.MinSigLen
	SignatureLengthS256Max = 80
	SignatureLengthBLS     = 96
)

Variables

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

Functions

func ProtoToBigInt

func ProtoToBigInt(pb *BigInt, bi *big.Int) error

ProtoToBigInt get golang big.Int from proto BigInt

func ProtoToProof

func ProtoToProof(pb *Proof, proof *poc.Proof) error

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

func BigIntToProto(x *big.Int) *BigInt

BigIntToProto get proto BigInt from golang big.Int

func (*BigInt) Bytes

func (m *BigInt) Bytes() []byte

func (*BigInt) Descriptor

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

func (*BigInt) GetRaw

func (m *BigInt) GetRaw() []byte

func (*BigInt) Marshal

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

func (*BigInt) MarshalTo

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

func (*BigInt) ProtoMessage

func (*BigInt) ProtoMessage()

func (*BigInt) Reset

func (m *BigInt) Reset()

func (*BigInt) Size

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

func (*BigInt) String

func (m *BigInt) String() string

func (*BigInt) Unmarshal

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

func (*BigInt) XXX_DiscardUnknown

func (m *BigInt) XXX_DiscardUnknown()

func (*BigInt) XXX_Marshal

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

func (*BigInt) XXX_Merge

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

func (*BigInt) XXX_Size

func (m *BigInt) XXX_Size() int

func (*BigInt) XXX_Unmarshal

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

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) Bytes

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

func (*Block) Descriptor

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

func (*Block) GetHeader

func (m *Block) GetHeader() *BlockHeader

func (*Block) GetProposals

func (m *Block) GetProposals() *ProposalArea

func (*Block) GetTransactions

func (m *Block) GetTransactions() []*Tx

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) Write

func (m *Block) Write(w io.Writer) (int, 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 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) Descriptor() ([]byte, []int)

func (*BlockBase) GetHeader

func (m *BlockBase) GetHeader() *BlockHeader

func (*BlockBase) GetProposals

func (m *BlockBase) GetProposals() *ProposalArea

func (*BlockBase) Marshal

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

func (*BlockBase) MarshalTo

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

func (*BlockBase) ProtoMessage

func (*BlockBase) ProtoMessage()

func (*BlockBase) Reset

func (m *BlockBase) Reset()

func (*BlockBase) Size

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

func (*BlockBase) String

func (m *BlockBase) String() string

func (*BlockBase) Unmarshal

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

func (*BlockBase) XXX_DiscardUnknown

func (m *BlockBase) XXX_DiscardUnknown()

func (*BlockBase) XXX_Marshal

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

func (*BlockBase) XXX_Merge

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

func (*BlockBase) XXX_Size

func (m *BlockBase) XXX_Size() int

func (*BlockBase) XXX_Unmarshal

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

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) 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) Write

func (m *BlockHeader) Write(w io.Writer) (int, error)

func (*BlockHeader) WritePoC

func (m *BlockHeader) WritePoC(w io.Writer) (int, 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) Bytes

func (m *Hash) Bytes() []byte

func (*Hash) Descriptor

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

func (*Hash) GetS0

func (m *Hash) GetS0() uint64

func (*Hash) GetS1

func (m *Hash) GetS1() uint64

func (*Hash) GetS2

func (m *Hash) GetS2() uint64

func (*Hash) GetS3

func (m *Hash) GetS3() uint64

func (*Hash) Marshal

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

func (*Hash) MarshalTo

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

func (*Hash) ProtoMessage

func (*Hash) ProtoMessage()

func (*Hash) Reset

func (m *Hash) Reset()

func (*Hash) Size

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

func (*Hash) String

func (m *Hash) String() string

func (*Hash) Unmarshal

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

func (*Hash) XXX_DiscardUnknown

func (m *Hash) XXX_DiscardUnknown()

func (*Hash) XXX_Marshal

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

func (*Hash) XXX_Merge

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

func (*Hash) XXX_Size

func (m *Hash) XXX_Size() int

func (*Hash) XXX_Unmarshal

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

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) Bytes

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

func (*OutPoint) Descriptor

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

func (*OutPoint) GetHash

func (m *OutPoint) GetHash() *Hash

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 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 ProofToProto(proof poc.Proof) *Proof

func (*Proof) Bytes

func (m *Proof) Bytes() []byte

func (*Proof) Descriptor

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

func (*Proof) GetBitLength

func (m *Proof) GetBitLength() uint32

func (*Proof) GetX

func (m *Proof) GetX() []byte

func (*Proof) GetXPrime

func (m *Proof) GetXPrime() []byte

func (*Proof) Marshal

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

func (*Proof) MarshalTo

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

func (*Proof) ProtoMessage

func (*Proof) ProtoMessage()

func (*Proof) Reset

func (m *Proof) Reset()

func (*Proof) Size

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

func (*Proof) String

func (m *Proof) String() string

func (*Proof) Unmarshal

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

func (*Proof) XXX_DiscardUnknown

func (m *Proof) XXX_DiscardUnknown()

func (*Proof) XXX_Marshal

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

func (*Proof) XXX_Merge

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

func (*Proof) XXX_Size

func (m *Proof) XXX_Size() int

func (*Proof) XXX_Unmarshal

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

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) Bytes

func (m *Proposal) Bytes() []byte

func (*Proposal) Descriptor

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

func (*Proposal) GetContent

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

func (*Proposal) GetType

func (m *Proposal) GetType() uint32

func (*Proposal) GetVersion

func (m *Proposal) GetVersion() uint32

func (*Proposal) Marshal

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

func (*Proposal) MarshalTo

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

func (*Proposal) ProtoMessage

func (*Proposal) ProtoMessage()

func (*Proposal) Reset

func (m *Proposal) Reset()

func (*Proposal) Size

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

func (*Proposal) String

func (m *Proposal) String() string

func (*Proposal) Unmarshal

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

func (*Proposal) Write

func (m *Proposal) Write(w io.Writer) (int, error)

func (*Proposal) XXX_DiscardUnknown

func (m *Proposal) XXX_DiscardUnknown()

func (*Proposal) XXX_Marshal

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

func (*Proposal) XXX_Merge

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

func (*Proposal) XXX_Size

func (m *Proposal) XXX_Size() int

func (*Proposal) XXX_Unmarshal

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

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) MarshalTo

func (m *ProposalArea) MarshalTo(dAtA []byte) (int, 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) Write

func (m *ProposalArea) Write(w io.Writer) (int, 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) Bytes

func (m *PublicKey) Bytes() []byte

func (*PublicKey) Descriptor

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

func (*PublicKey) GetRaw

func (m *PublicKey) GetRaw() []byte

func (*PublicKey) Marshal

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

func (*PublicKey) MarshalTo

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

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) Reset

func (m *PublicKey) Reset()

func (*PublicKey) Size

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

func (*PublicKey) String

func (m *PublicKey) String() string

func (*PublicKey) Unmarshal

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

func (*PublicKey) XXX_DiscardUnknown

func (m *PublicKey) XXX_DiscardUnknown()

func (*PublicKey) XXX_Marshal

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

func (*PublicKey) XXX_Merge

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

func (*PublicKey) XXX_Size

func (m *PublicKey) XXX_Size() int

func (*PublicKey) XXX_Unmarshal

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

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) MarshalTo

func (m *Punishment) MarshalTo(dAtA []byte) (int, 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) Write

func (m *Punishment) Write(w io.Writer) (int, 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) Bytes

func (m *Signature) Bytes() []byte

func (*Signature) Descriptor

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

func (*Signature) GetRaw

func (m *Signature) GetRaw() []byte

func (*Signature) Marshal

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

func (*Signature) MarshalTo

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

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) Reset

func (m *Signature) Reset()

func (*Signature) Size

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

func (*Signature) String

func (m *Signature) String() string

func (*Signature) Unmarshal

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

func (*Signature) XXX_DiscardUnknown

func (m *Signature) XXX_DiscardUnknown()

func (*Signature) XXX_Marshal

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

func (*Signature) XXX_Merge

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

func (*Signature) XXX_Size

func (m *Signature) XXX_Size() int

func (*Signature) XXX_Unmarshal

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

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) Bytes

func (m *Tx) Bytes() []byte

func (*Tx) BytesNoWitness

func (m *Tx) BytesNoWitness() []byte

func (*Tx) Descriptor

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

func (*Tx) GetLockTime

func (m *Tx) GetLockTime() uint64

func (*Tx) GetPayload

func (m *Tx) GetPayload() []byte

func (*Tx) GetTxIn

func (m *Tx) GetTxIn() []*TxIn

func (*Tx) GetTxOut

func (m *Tx) GetTxOut() []*TxOut

func (*Tx) GetVersion

func (m *Tx) GetVersion() uint32

func (*Tx) Marshal

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

func (*Tx) MarshalTo

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

func (*Tx) ProtoMessage

func (*Tx) ProtoMessage()

func (*Tx) Reset

func (m *Tx) Reset()

func (*Tx) Size

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

func (*Tx) String

func (m *Tx) String() string

func (*Tx) Unmarshal

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

func (*Tx) Write

func (m *Tx) Write(w io.Writer) (int, error)

func (*Tx) WriteNoWitness

func (m *Tx) WriteNoWitness(w io.Writer) (int, error)

func (*Tx) XXX_DiscardUnknown

func (m *Tx) XXX_DiscardUnknown()

func (*Tx) XXX_Marshal

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

func (*Tx) XXX_Merge

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

func (*Tx) XXX_Size

func (m *Tx) XXX_Size() int

func (*Tx) XXX_Unmarshal

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

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) Bytes

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

func (*TxIn) BytesNoWitness

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

func (*TxIn) Descriptor

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

func (*TxIn) GetPreviousOutPoint

func (m *TxIn) GetPreviousOutPoint() *OutPoint

func (*TxIn) GetSequence

func (m *TxIn) GetSequence() uint64

func (*TxIn) GetWitness

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

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                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) Bytes

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

func (*TxOut) Descriptor

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

func (*TxOut) GetPkScript

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

func (*TxOut) GetValue

func (m *TxOut) GetValue() int64

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

Jump to

Keyboard shortcuts

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