iproto

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package iproto is a generated protocol buffer package.

It is generated from these files:

blockchain.proto
rpc.proto
utxo.proto

It has these top-level messages:

TxInputPb
TxOutputPb
TxPb
TransferPb
VotePb
ActionPb
BlockHeaderPb
BlockPb
BlockIndex
PingMsg
PongMsg
BlockSync
BlockContainer
ViewChangeMsg
TestPayload
CreateRawTransferRequest
CreateRawTransferResponse
SendTransferRequest
SendTransferResponse
UtxoPb
UtxoEntryPb
UtxoMapPb

Index

Constants

View Source
const (
	// UnknownProtoMsgType is an unknown message type that is not expected
	UnknownProtoMsgType uint32 = 0
	// MsgTxProtoMsgType is for transactions broadcasted within the network
	MsgTxProtoMsgType uint32 = 1
	// MsgBlockProtoMsgType is for blocks broadcasted within the network
	MsgBlockProtoMsgType uint32 = 2
	// ViewChangeMsgType is for consensus flows within the network
	ViewChangeMsgType uint32 = 3
	// MsgBlockSyncReqType is for requests among peers to sync blocks
	MsgBlockSyncReqType uint32 = 4
	// MsgBlockSyncDataType is the response to messages of type MsgBlockSyncReqType
	MsgBlockSyncDataType uint32 = 5
	// MsgActionType is the action message
	MsgActionType uint32 = 6
	// TestPayloadType is a test payload message type
	TestPayloadType uint32 = 10001
)
View Source
const (
	MagicBroadcastMsgHeader uint32 = 4689
)

Magic header to identify IoTex traffic

Variables

View Source
var ViewChangeMsg_ViewChangeType_name = map[int32]string{
	0: "INVALID_VIEW_CHANGE_TYPE",
	1: "PROPOSE",
	2: "PREVOTE",
	3: "VOTE",
}
View Source
var ViewChangeMsg_ViewChangeType_value = map[string]int32{
	"INVALID_VIEW_CHANGE_TYPE": 0,
	"PROPOSE":                  1,
	"PREVOTE":                  2,
	"VOTE":                     3,
}

Functions

func GetTypeFromProtoMsg

func GetTypeFromProtoMsg(msg proto.Message) (uint32, error)

GetTypeFromProtoMsg retrieves the proto message type

func RegisterChainServiceServer

func RegisterChainServiceServer(s *grpc.Server, srv ChainServiceServer)

func TypifyProtoMsg

func TypifyProtoMsg(tp uint32, msg []byte) (proto.Message, error)

TypifyProtoMsg unmarshal a proto message based on the given MessageType

Types

type ActionPb added in v0.2.0

type ActionPb struct {
	// Types that are valid to be assigned to Action:
	//	*ActionPb_Tx
	//	*ActionPb_Transfer
	//	*ActionPb_Vote
	Action isActionPb_Action `protobuf_oneof:"action"`
}

func (*ActionPb) Descriptor added in v0.2.0

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

func (*ActionPb) GetAction added in v0.2.0

func (m *ActionPb) GetAction() isActionPb_Action

func (*ActionPb) GetTransfer added in v0.2.0

func (m *ActionPb) GetTransfer() *TransferPb

func (*ActionPb) GetTx added in v0.2.0

func (m *ActionPb) GetTx() *TxPb

func (*ActionPb) GetVote added in v0.2.0

func (m *ActionPb) GetVote() *VotePb

func (*ActionPb) ProtoMessage added in v0.2.0

func (*ActionPb) ProtoMessage()

func (*ActionPb) Reset added in v0.2.0

func (m *ActionPb) Reset()

func (*ActionPb) String added in v0.2.0

func (m *ActionPb) String() string

func (*ActionPb) XXX_OneofFuncs added in v0.2.0

func (*ActionPb) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type ActionPb_Transfer added in v0.2.0

type ActionPb_Transfer struct {
	Transfer *TransferPb `protobuf:"bytes,2,opt,name=transfer,oneof"`
}

type ActionPb_Tx added in v0.2.0

type ActionPb_Tx struct {
	Tx *TxPb `protobuf:"bytes,1,opt,name=tx,oneof"`
}

type ActionPb_Vote added in v0.2.0

type ActionPb_Vote struct {
	Vote *VotePb `protobuf:"bytes,3,opt,name=vote,oneof"`
}

type BlockContainer

type BlockContainer struct {
	Block *BlockPb `protobuf:"bytes,1,opt,name=block" json:"block,omitempty"`
}

block container used to send old/existing blocks in block sync

func (*BlockContainer) Descriptor

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

func (*BlockContainer) GetBlock

func (m *BlockContainer) GetBlock() *BlockPb

func (*BlockContainer) ProtoMessage

func (*BlockContainer) ProtoMessage()

func (*BlockContainer) Reset

func (m *BlockContainer) Reset()

func (*BlockContainer) String

func (m *BlockContainer) String() string

type BlockHeaderPb

type BlockHeaderPb struct {
	Version       uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
	ChainID       uint32 `protobuf:"varint,2,opt,name=chainID" json:"chainID,omitempty"`
	Height        uint64 `protobuf:"varint,3,opt,name=height" json:"height,omitempty"`
	Timestamp     uint64 `protobuf:"varint,4,opt,name=timestamp" json:"timestamp,omitempty"`
	PrevBlockHash []byte `protobuf:"bytes,5,opt,name=prevBlockHash,proto3" json:"prevBlockHash,omitempty"`
	TxRoot        []byte `protobuf:"bytes,6,opt,name=txRoot,proto3" json:"txRoot,omitempty"`
	StateRoot     []byte `protobuf:"bytes,7,opt,name=stateRoot,proto3" json:"stateRoot,omitempty"`
	TrnxNumber    uint32 `protobuf:"varint,8,opt,name=trnxNumber" json:"trnxNumber,omitempty"`
	TrnxDataSize  uint32 `protobuf:"varint,9,opt,name=trnxDataSize" json:"trnxDataSize,omitempty"`
	Signature     []byte `protobuf:"bytes,10,opt,name=signature,proto3" json:"signature,omitempty"`
	Pubkey        []byte `protobuf:"bytes,11,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
}

header of a block

func (*BlockHeaderPb) Descriptor

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

func (*BlockHeaderPb) GetChainID

func (m *BlockHeaderPb) GetChainID() uint32

func (*BlockHeaderPb) GetHeight

func (m *BlockHeaderPb) GetHeight() uint64

func (*BlockHeaderPb) GetPrevBlockHash

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

func (*BlockHeaderPb) GetPubkey added in v0.2.0

func (m *BlockHeaderPb) GetPubkey() []byte

func (*BlockHeaderPb) GetSignature added in v0.2.0

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

func (*BlockHeaderPb) GetStateRoot added in v0.2.0

func (m *BlockHeaderPb) GetStateRoot() []byte

func (*BlockHeaderPb) GetTimestamp

func (m *BlockHeaderPb) GetTimestamp() uint64

func (*BlockHeaderPb) GetTrnxDataSize

func (m *BlockHeaderPb) GetTrnxDataSize() uint32

func (*BlockHeaderPb) GetTrnxNumber

func (m *BlockHeaderPb) GetTrnxNumber() uint32

func (*BlockHeaderPb) GetTxRoot added in v0.2.0

func (m *BlockHeaderPb) GetTxRoot() []byte

func (*BlockHeaderPb) GetVersion

func (m *BlockHeaderPb) GetVersion() uint32

func (*BlockHeaderPb) ProtoMessage

func (*BlockHeaderPb) ProtoMessage()

func (*BlockHeaderPb) Reset

func (m *BlockHeaderPb) Reset()

func (*BlockHeaderPb) String

func (m *BlockHeaderPb) String() string

type BlockIndex

type BlockIndex struct {
	Start  uint64   `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
	End    uint64   `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
	Offset []uint32 `protobuf:"varint,3,rep,packed,name=offset" json:"offset,omitempty"`
}

index of block raw data file

func (*BlockIndex) Descriptor

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

func (*BlockIndex) GetEnd

func (m *BlockIndex) GetEnd() uint64

func (*BlockIndex) GetOffset

func (m *BlockIndex) GetOffset() []uint32

func (*BlockIndex) GetStart

func (m *BlockIndex) GetStart() uint64

func (*BlockIndex) ProtoMessage

func (*BlockIndex) ProtoMessage()

func (*BlockIndex) Reset

func (m *BlockIndex) Reset()

func (*BlockIndex) String

func (m *BlockIndex) String() string

type BlockPb

type BlockPb struct {
	Header  *BlockHeaderPb `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
	Actions []*ActionPb    `protobuf:"bytes,2,rep,name=actions" json:"actions,omitempty"`
}

block consists of header followed by transactions hash of current block can be computed from header hence not stored

func (*BlockPb) Descriptor

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

func (*BlockPb) GetActions added in v0.2.0

func (m *BlockPb) GetActions() []*ActionPb

func (*BlockPb) GetHeader

func (m *BlockPb) GetHeader() *BlockHeaderPb

func (*BlockPb) ProtoMessage

func (*BlockPb) ProtoMessage()

func (*BlockPb) Reset

func (m *BlockPb) Reset()

func (*BlockPb) String

func (m *BlockPb) String() string

type BlockSync

type BlockSync struct {
	Start uint64 `protobuf:"varint,2,opt,name=start" json:"start,omitempty"`
	End   uint64 `protobuf:"varint,3,opt,name=end" json:"end,omitempty"`
}

func (*BlockSync) Descriptor

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

func (*BlockSync) GetEnd

func (m *BlockSync) GetEnd() uint64

func (*BlockSync) GetStart

func (m *BlockSync) GetStart() uint64

func (*BlockSync) ProtoMessage

func (*BlockSync) ProtoMessage()

func (*BlockSync) Reset

func (m *BlockSync) Reset()

func (*BlockSync) String

func (m *BlockSync) String() string

type ChainServiceClient

type ChainServiceClient interface {
	CreateRawTransfer(ctx context.Context, in *CreateRawTransferRequest, opts ...grpc.CallOption) (*CreateRawTransferResponse, error)
	CreateRawVote(ctx context.Context, in *CreateRawVoteRequest, opts ...grpc.CallOption) (*CreateRawVoteResponse, error)
	SendTransfer(ctx context.Context, in *SendTransferRequest, opts ...grpc.CallOption) (*SendTransferResponse, error)
	SendVote(ctx context.Context, in *SendVoteRequest, opts ...grpc.CallOption) (*SendVoteResponse, error)
}

func NewChainServiceClient

func NewChainServiceClient(cc *grpc.ClientConn) ChainServiceClient

type CreateRawTransferRequest added in v0.2.0

type CreateRawTransferRequest struct {
	Sender               string   `protobuf:"bytes,1,opt,name=sender" json:"sender,omitempty"`
	Recipient            string   `protobuf:"bytes,2,opt,name=recipient" json:"recipient,omitempty"`
	Amount               []byte   `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
	Nonce                uint64   `protobuf:"varint,4,opt,name=nonce" json:"nonce,omitempty"`
	Data                 []byte   `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateRawTransferRequest) Descriptor added in v0.2.0

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

func (*CreateRawTransferRequest) GetAmount added in v0.2.0

func (m *CreateRawTransferRequest) GetAmount() []byte

func (*CreateRawTransferRequest) GetData added in v0.2.0

func (m *CreateRawTransferRequest) GetData() []byte

func (*CreateRawTransferRequest) GetNonce added in v0.2.0

func (m *CreateRawTransferRequest) GetNonce() uint64

func (*CreateRawTransferRequest) GetRecipient added in v0.2.0

func (m *CreateRawTransferRequest) GetRecipient() string

func (*CreateRawTransferRequest) GetSender added in v0.2.0

func (m *CreateRawTransferRequest) GetSender() string

func (*CreateRawTransferRequest) ProtoMessage added in v0.2.0

func (*CreateRawTransferRequest) ProtoMessage()

func (*CreateRawTransferRequest) Reset added in v0.2.0

func (m *CreateRawTransferRequest) Reset()

func (*CreateRawTransferRequest) String added in v0.2.0

func (m *CreateRawTransferRequest) String() string

func (*CreateRawTransferRequest) XXX_DiscardUnknown added in v0.2.0

func (m *CreateRawTransferRequest) XXX_DiscardUnknown()

func (*CreateRawTransferRequest) XXX_Marshal added in v0.2.0

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

func (*CreateRawTransferRequest) XXX_Merge added in v0.2.0

func (dst *CreateRawTransferRequest) XXX_Merge(src proto.Message)

func (*CreateRawTransferRequest) XXX_Size added in v0.2.0

func (m *CreateRawTransferRequest) XXX_Size() int

func (*CreateRawTransferRequest) XXX_Unmarshal added in v0.2.0

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

type CreateRawTransferResponse added in v0.2.0

type CreateRawTransferResponse struct {
	SerializedTransfer   []byte   `protobuf:"bytes,1,opt,name=serialized_transfer,json=serializedTransfer,proto3" json:"serialized_transfer,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateRawTransferResponse) Descriptor added in v0.2.0

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

func (*CreateRawTransferResponse) GetSerializedTransfer added in v0.2.0

func (m *CreateRawTransferResponse) GetSerializedTransfer() []byte

func (*CreateRawTransferResponse) ProtoMessage added in v0.2.0

func (*CreateRawTransferResponse) ProtoMessage()

func (*CreateRawTransferResponse) Reset added in v0.2.0

func (m *CreateRawTransferResponse) Reset()

func (*CreateRawTransferResponse) String added in v0.2.0

func (m *CreateRawTransferResponse) String() string

func (*CreateRawTransferResponse) XXX_DiscardUnknown added in v0.2.0

func (m *CreateRawTransferResponse) XXX_DiscardUnknown()

func (*CreateRawTransferResponse) XXX_Marshal added in v0.2.0

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

func (*CreateRawTransferResponse) XXX_Merge added in v0.2.0

func (dst *CreateRawTransferResponse) XXX_Merge(src proto.Message)

func (*CreateRawTransferResponse) XXX_Size added in v0.2.0

func (m *CreateRawTransferResponse) XXX_Size() int

func (*CreateRawTransferResponse) XXX_Unmarshal added in v0.2.0

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

type CreateRawVoteRequest added in v0.2.0

type CreateRawVoteRequest struct {
	Voter                []byte   `protobuf:"bytes,1,opt,name=voter,proto3" json:"voter,omitempty"`
	Votee                []byte   `protobuf:"bytes,2,opt,name=votee,proto3" json:"votee,omitempty"`
	Nonce                uint64   `protobuf:"varint,3,opt,name=nonce" json:"nonce,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateRawVoteRequest) Descriptor added in v0.2.0

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

func (*CreateRawVoteRequest) GetNonce added in v0.2.0

func (m *CreateRawVoteRequest) GetNonce() uint64

func (*CreateRawVoteRequest) GetVotee added in v0.2.0

func (m *CreateRawVoteRequest) GetVotee() []byte

func (*CreateRawVoteRequest) GetVoter added in v0.2.0

func (m *CreateRawVoteRequest) GetVoter() []byte

func (*CreateRawVoteRequest) ProtoMessage added in v0.2.0

func (*CreateRawVoteRequest) ProtoMessage()

func (*CreateRawVoteRequest) Reset added in v0.2.0

func (m *CreateRawVoteRequest) Reset()

func (*CreateRawVoteRequest) String added in v0.2.0

func (m *CreateRawVoteRequest) String() string

func (*CreateRawVoteRequest) XXX_DiscardUnknown added in v0.2.0

func (m *CreateRawVoteRequest) XXX_DiscardUnknown()

func (*CreateRawVoteRequest) XXX_Marshal added in v0.2.0

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

func (*CreateRawVoteRequest) XXX_Merge added in v0.2.0

func (dst *CreateRawVoteRequest) XXX_Merge(src proto.Message)

func (*CreateRawVoteRequest) XXX_Size added in v0.2.0

func (m *CreateRawVoteRequest) XXX_Size() int

func (*CreateRawVoteRequest) XXX_Unmarshal added in v0.2.0

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

type CreateRawVoteResponse added in v0.2.0

type CreateRawVoteResponse struct {
	SerializedVote       []byte   `protobuf:"bytes,1,opt,name=serialized_vote,json=serializedVote,proto3" json:"serialized_vote,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateRawVoteResponse) Descriptor added in v0.2.0

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

func (*CreateRawVoteResponse) GetSerializedVote added in v0.2.0

func (m *CreateRawVoteResponse) GetSerializedVote() []byte

func (*CreateRawVoteResponse) ProtoMessage added in v0.2.0

func (*CreateRawVoteResponse) ProtoMessage()

func (*CreateRawVoteResponse) Reset added in v0.2.0

func (m *CreateRawVoteResponse) Reset()

func (*CreateRawVoteResponse) String added in v0.2.0

func (m *CreateRawVoteResponse) String() string

func (*CreateRawVoteResponse) XXX_DiscardUnknown added in v0.2.0

func (m *CreateRawVoteResponse) XXX_DiscardUnknown()

func (*CreateRawVoteResponse) XXX_Marshal added in v0.2.0

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

func (*CreateRawVoteResponse) XXX_Merge added in v0.2.0

func (dst *CreateRawVoteResponse) XXX_Merge(src proto.Message)

func (*CreateRawVoteResponse) XXX_Size added in v0.2.0

func (m *CreateRawVoteResponse) XXX_Size() int

func (*CreateRawVoteResponse) XXX_Unmarshal added in v0.2.0

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

type PingMsg

type PingMsg struct {
	Nonce uint64 `protobuf:"varint,1,opt,name=nonce" json:"nonce,omitempty"`
}

////////////////////////////////////////////////////////////////////////////////////////////////// BELOW ARE DEFINITIONS FOR ON-WIRE MESSAGES! //////////////////////////////////////////////////////////////////////////////////////////////////

func (*PingMsg) Descriptor

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

func (*PingMsg) GetNonce

func (m *PingMsg) GetNonce() uint64

func (*PingMsg) ProtoMessage

func (*PingMsg) ProtoMessage()

func (*PingMsg) Reset

func (m *PingMsg) Reset()

func (*PingMsg) String

func (m *PingMsg) String() string

type PongMsg

type PongMsg struct {
	AckNonce uint64 `protobuf:"varint,1,opt,name=ack_nonce,json=ackNonce" json:"ack_nonce,omitempty"`
}

func (*PongMsg) Descriptor

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

func (*PongMsg) GetAckNonce

func (m *PongMsg) GetAckNonce() uint64

func (*PongMsg) ProtoMessage

func (*PongMsg) ProtoMessage()

func (*PongMsg) Reset

func (m *PongMsg) Reset()

func (*PongMsg) String

func (m *PongMsg) String() string

type SendTransferRequest added in v0.2.0

type SendTransferRequest struct {
	SerializedTransfer   []byte   `protobuf:"bytes,1,opt,name=serialized_transfer,json=serializedTransfer,proto3" json:"serialized_transfer,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SendTransferRequest) Descriptor added in v0.2.0

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

func (*SendTransferRequest) GetSerializedTransfer added in v0.2.0

func (m *SendTransferRequest) GetSerializedTransfer() []byte

func (*SendTransferRequest) ProtoMessage added in v0.2.0

func (*SendTransferRequest) ProtoMessage()

func (*SendTransferRequest) Reset added in v0.2.0

func (m *SendTransferRequest) Reset()

func (*SendTransferRequest) String added in v0.2.0

func (m *SendTransferRequest) String() string

func (*SendTransferRequest) XXX_DiscardUnknown added in v0.2.0

func (m *SendTransferRequest) XXX_DiscardUnknown()

func (*SendTransferRequest) XXX_Marshal added in v0.2.0

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

func (*SendTransferRequest) XXX_Merge added in v0.2.0

func (dst *SendTransferRequest) XXX_Merge(src proto.Message)

func (*SendTransferRequest) XXX_Size added in v0.2.0

func (m *SendTransferRequest) XXX_Size() int

func (*SendTransferRequest) XXX_Unmarshal added in v0.2.0

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

type SendTransferResponse added in v0.2.0

type SendTransferResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SendTransferResponse) Descriptor added in v0.2.0

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

func (*SendTransferResponse) ProtoMessage added in v0.2.0

func (*SendTransferResponse) ProtoMessage()

func (*SendTransferResponse) Reset added in v0.2.0

func (m *SendTransferResponse) Reset()

func (*SendTransferResponse) String added in v0.2.0

func (m *SendTransferResponse) String() string

func (*SendTransferResponse) XXX_DiscardUnknown added in v0.2.0

func (m *SendTransferResponse) XXX_DiscardUnknown()

func (*SendTransferResponse) XXX_Marshal added in v0.2.0

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

func (*SendTransferResponse) XXX_Merge added in v0.2.0

func (dst *SendTransferResponse) XXX_Merge(src proto.Message)

func (*SendTransferResponse) XXX_Size added in v0.2.0

func (m *SendTransferResponse) XXX_Size() int

func (*SendTransferResponse) XXX_Unmarshal added in v0.2.0

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

type SendVoteRequest added in v0.2.0

type SendVoteRequest struct {
	SerializedVote       []byte   `protobuf:"bytes,1,opt,name=serialized_vote,json=serializedVote,proto3" json:"serialized_vote,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SendVoteRequest) Descriptor added in v0.2.0

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

func (*SendVoteRequest) GetSerializedVote added in v0.2.0

func (m *SendVoteRequest) GetSerializedVote() []byte

func (*SendVoteRequest) ProtoMessage added in v0.2.0

func (*SendVoteRequest) ProtoMessage()

func (*SendVoteRequest) Reset added in v0.2.0

func (m *SendVoteRequest) Reset()

func (*SendVoteRequest) String added in v0.2.0

func (m *SendVoteRequest) String() string

func (*SendVoteRequest) XXX_DiscardUnknown added in v0.2.0

func (m *SendVoteRequest) XXX_DiscardUnknown()

func (*SendVoteRequest) XXX_Marshal added in v0.2.0

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

func (*SendVoteRequest) XXX_Merge added in v0.2.0

func (dst *SendVoteRequest) XXX_Merge(src proto.Message)

func (*SendVoteRequest) XXX_Size added in v0.2.0

func (m *SendVoteRequest) XXX_Size() int

func (*SendVoteRequest) XXX_Unmarshal added in v0.2.0

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

type SendVoteResponse added in v0.2.0

type SendVoteResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SendVoteResponse) Descriptor added in v0.2.0

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

func (*SendVoteResponse) ProtoMessage added in v0.2.0

func (*SendVoteResponse) ProtoMessage()

func (*SendVoteResponse) Reset added in v0.2.0

func (m *SendVoteResponse) Reset()

func (*SendVoteResponse) String added in v0.2.0

func (m *SendVoteResponse) String() string

func (*SendVoteResponse) XXX_DiscardUnknown added in v0.2.0

func (m *SendVoteResponse) XXX_DiscardUnknown()

func (*SendVoteResponse) XXX_Marshal added in v0.2.0

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

func (*SendVoteResponse) XXX_Merge added in v0.2.0

func (dst *SendVoteResponse) XXX_Merge(src proto.Message)

func (*SendVoteResponse) XXX_Size added in v0.2.0

func (m *SendVoteResponse) XXX_Size() int

func (*SendVoteResponse) XXX_Unmarshal added in v0.2.0

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

type TestPayload

type TestPayload struct {
	MsgBody []byte `protobuf:"bytes,1,opt,name=msg_body,json=msgBody,proto3" json:"msg_body,omitempty"`
}

////////////////////////////////////////////////////////////////////////////////////////////////// BELOW ARE DEFINITIONS FOR TEST-ONLY MESSAGES! //////////////////////////////////////////////////////////////////////////////////////////////////

func (*TestPayload) Descriptor

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

func (*TestPayload) GetMsgBody

func (m *TestPayload) GetMsgBody() []byte

func (*TestPayload) ProtoMessage

func (*TestPayload) ProtoMessage()

func (*TestPayload) Reset

func (m *TestPayload) Reset()

func (*TestPayload) String

func (m *TestPayload) String() string

type TransferPb added in v0.2.0

type TransferPb struct {
	// TransferPb should share these three fields with other Actions
	// TODO: extract these three fields to ActionPb
	Version   uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
	Nonce     uint64 `protobuf:"varint,2,opt,name=nonce" json:"nonce,omitempty"`
	Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// used by state-based model
	Amount       []byte `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
	Sender       string `protobuf:"bytes,5,opt,name=sender" json:"sender,omitempty"`
	Recipient    string `protobuf:"bytes,6,opt,name=recipient" json:"recipient,omitempty"`
	Payload      []byte `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"`
	SenderPubKey []byte `protobuf:"bytes,8,opt,name=senderPubKey,proto3" json:"senderPubKey,omitempty"`
	IsCoinbase   bool   `protobuf:"varint,9,opt,name=isCoinbase" json:"isCoinbase,omitempty"`
}

func (*TransferPb) Descriptor added in v0.2.0

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

func (*TransferPb) GetAmount added in v0.2.0

func (m *TransferPb) GetAmount() []byte

func (*TransferPb) GetIsCoinbase added in v0.2.0

func (m *TransferPb) GetIsCoinbase() bool

func (*TransferPb) GetNonce added in v0.2.0

func (m *TransferPb) GetNonce() uint64

func (*TransferPb) GetPayload added in v0.2.0

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

func (*TransferPb) GetRecipient added in v0.2.0

func (m *TransferPb) GetRecipient() string

func (*TransferPb) GetSender added in v0.2.0

func (m *TransferPb) GetSender() string

func (*TransferPb) GetSenderPubKey added in v0.2.0

func (m *TransferPb) GetSenderPubKey() []byte

func (*TransferPb) GetSignature added in v0.2.0

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

func (*TransferPb) GetVersion added in v0.2.0

func (m *TransferPb) GetVersion() uint32

func (*TransferPb) ProtoMessage added in v0.2.0

func (*TransferPb) ProtoMessage()

func (*TransferPb) Reset added in v0.2.0

func (m *TransferPb) Reset()

func (*TransferPb) String added in v0.2.0

func (m *TransferPb) String() string

type TxInputPb

type TxInputPb struct {
	TxHash           []byte `protobuf:"bytes,1,opt,name=txHash,proto3" json:"txHash,omitempty"`
	OutIndex         int32  `protobuf:"varint,2,opt,name=outIndex" json:"outIndex,omitempty"`
	UnlockScriptSize uint32 `protobuf:"varint,3,opt,name=unlockScriptSize" json:"unlockScriptSize,omitempty"`
	UnlockScript     []byte `protobuf:"bytes,4,opt,name=unlockScript,proto3" json:"unlockScript,omitempty"`
	Sequence         uint32 `protobuf:"varint,5,opt,name=sequence" json:"sequence,omitempty"`
}

func (*TxInputPb) Descriptor

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

func (*TxInputPb) GetOutIndex

func (m *TxInputPb) GetOutIndex() int32

func (*TxInputPb) GetSequence

func (m *TxInputPb) GetSequence() uint32

func (*TxInputPb) GetTxHash

func (m *TxInputPb) GetTxHash() []byte

func (*TxInputPb) GetUnlockScript

func (m *TxInputPb) GetUnlockScript() []byte

func (*TxInputPb) GetUnlockScriptSize

func (m *TxInputPb) GetUnlockScriptSize() uint32

func (*TxInputPb) ProtoMessage

func (*TxInputPb) ProtoMessage()

func (*TxInputPb) Reset

func (m *TxInputPb) Reset()

func (*TxInputPb) String

func (m *TxInputPb) String() string

type TxOutputPb

type TxOutputPb struct {
	Value          uint64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
	LockScriptSize uint32 `protobuf:"varint,2,opt,name=lockScriptSize" json:"lockScriptSize,omitempty"`
	LockScript     []byte `protobuf:"bytes,3,opt,name=lockScript,proto3" json:"lockScript,omitempty"`
}

TxOutput stores “coins”. It is indivisible, which means that you cannot reference a part of its value. When an output is referenced in a new transaction, it’s spent as a whole. And if its value is greater than required, a change is generated and sent back to the sender.

func (*TxOutputPb) Descriptor

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

func (*TxOutputPb) GetLockScript

func (m *TxOutputPb) GetLockScript() []byte

func (*TxOutputPb) GetLockScriptSize

func (m *TxOutputPb) GetLockScriptSize() uint32

func (*TxOutputPb) GetValue

func (m *TxOutputPb) GetValue() uint64

func (*TxOutputPb) ProtoMessage

func (*TxOutputPb) ProtoMessage()

func (*TxOutputPb) Reset

func (m *TxOutputPb) Reset()

func (*TxOutputPb) String

func (m *TxOutputPb) String() string

type TxPb

type TxPb struct {
	Version  uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
	LockTime uint32 `protobuf:"varint,2,opt,name=lockTime" json:"lockTime,omitempty"`
	// used by utxo-based model
	TxIn  []*TxInputPb  `protobuf:"bytes,21,rep,name=txIn" json:"txIn,omitempty"`
	TxOut []*TxOutputPb `protobuf:"bytes,22,rep,name=txOut" json:"txOut,omitempty"`
}

func (*TxPb) Descriptor

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

func (*TxPb) GetLockTime

func (m *TxPb) GetLockTime() uint32

func (*TxPb) GetTxIn

func (m *TxPb) GetTxIn() []*TxInputPb

func (*TxPb) GetTxOut

func (m *TxPb) GetTxOut() []*TxOutputPb

func (*TxPb) GetVersion

func (m *TxPb) GetVersion() uint32

func (*TxPb) ProtoMessage

func (*TxPb) ProtoMessage()

func (*TxPb) Reset

func (m *TxPb) Reset()

func (*TxPb) String

func (m *TxPb) String() string

type UtxoEntryPb

type UtxoEntryPb struct {
	Hash []byte    `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Utxo []*UtxoPb `protobuf:"bytes,2,rep,name=utxo" json:"utxo,omitempty"`
}

func (*UtxoEntryPb) Descriptor

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

func (*UtxoEntryPb) GetHash

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

func (*UtxoEntryPb) GetUtxo

func (m *UtxoEntryPb) GetUtxo() []*UtxoPb

func (*UtxoEntryPb) ProtoMessage

func (*UtxoEntryPb) ProtoMessage()

func (*UtxoEntryPb) Reset

func (m *UtxoEntryPb) Reset()

func (*UtxoEntryPb) String

func (m *UtxoEntryPb) String() string

type UtxoMapPb

type UtxoMapPb struct {
	UtxoEntry []*UtxoEntryPb `protobuf:"bytes,1,rep,name=utxoEntry" json:"utxoEntry,omitempty"`
}

func (*UtxoMapPb) Descriptor

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

func (*UtxoMapPb) GetUtxoEntry

func (m *UtxoMapPb) GetUtxoEntry() []*UtxoEntryPb

func (*UtxoMapPb) ProtoMessage

func (*UtxoMapPb) ProtoMessage()

func (*UtxoMapPb) Reset

func (m *UtxoMapPb) Reset()

func (*UtxoMapPb) String

func (m *UtxoMapPb) String() string

type UtxoPb

type UtxoPb struct {
	Value          uint64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
	Index          int32  `protobuf:"varint,2,opt,name=index" json:"index,omitempty"`
	LockScriptSize uint32 `protobuf:"varint,3,opt,name=lockScriptSize" json:"lockScriptSize,omitempty"`
	LockScript     []byte `protobuf:"bytes,4,opt,name=lockScript,proto3" json:"lockScript,omitempty"`
}

func (*UtxoPb) Descriptor

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

func (*UtxoPb) GetIndex

func (m *UtxoPb) GetIndex() int32

func (*UtxoPb) GetLockScript

func (m *UtxoPb) GetLockScript() []byte

func (*UtxoPb) GetLockScriptSize

func (m *UtxoPb) GetLockScriptSize() uint32

func (*UtxoPb) GetValue

func (m *UtxoPb) GetValue() uint64

func (*UtxoPb) ProtoMessage

func (*UtxoPb) ProtoMessage()

func (*UtxoPb) Reset

func (m *UtxoPb) Reset()

func (*UtxoPb) String

func (m *UtxoPb) String() string

type ViewChangeMsg

type ViewChangeMsg struct {
	Vctype     ViewChangeMsg_ViewChangeType `protobuf:"varint,1,opt,name=vctype,enum=iproto.ViewChangeMsg_ViewChangeType" json:"vctype,omitempty"`
	Block      *BlockPb                     `protobuf:"bytes,2,opt,name=block" json:"block,omitempty"`
	BlockHash  []byte                       `protobuf:"bytes,3,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	SenderAddr string                       `protobuf:"bytes,4,opt,name=senderAddr" json:"senderAddr,omitempty"`
}

func (*ViewChangeMsg) Descriptor

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

func (*ViewChangeMsg) GetBlock

func (m *ViewChangeMsg) GetBlock() *BlockPb

func (*ViewChangeMsg) GetBlockHash

func (m *ViewChangeMsg) GetBlockHash() []byte

func (*ViewChangeMsg) GetSenderAddr

func (m *ViewChangeMsg) GetSenderAddr() string

func (*ViewChangeMsg) GetVctype

func (*ViewChangeMsg) ProtoMessage

func (*ViewChangeMsg) ProtoMessage()

func (*ViewChangeMsg) Reset

func (m *ViewChangeMsg) Reset()

func (*ViewChangeMsg) String

func (m *ViewChangeMsg) String() string

type ViewChangeMsg_ViewChangeType

type ViewChangeMsg_ViewChangeType int32
const (
	ViewChangeMsg_INVALID_VIEW_CHANGE_TYPE ViewChangeMsg_ViewChangeType = 0
	ViewChangeMsg_PROPOSE                  ViewChangeMsg_ViewChangeType = 1
	ViewChangeMsg_PREVOTE                  ViewChangeMsg_ViewChangeType = 2
	ViewChangeMsg_VOTE                     ViewChangeMsg_ViewChangeType = 3
)

func (ViewChangeMsg_ViewChangeType) EnumDescriptor

func (ViewChangeMsg_ViewChangeType) EnumDescriptor() ([]byte, []int)

func (ViewChangeMsg_ViewChangeType) String

type VotePb added in v0.2.0

type VotePb struct {
	// VotePb should share these three fields with other Actions
	// TODO: extract these three fields to ActionPb
	Version    uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
	Nonce      uint64 `protobuf:"varint,2,opt,name=nonce" json:"nonce,omitempty"`
	Signature  []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	Timestamp  uint64 `protobuf:"varint,4,opt,name=timestamp" json:"timestamp,omitempty"`
	SelfPubkey []byte `protobuf:"bytes,5,opt,name=selfPubkey,proto3" json:"selfPubkey,omitempty"`
	VotePubkey []byte `protobuf:"bytes,6,opt,name=votePubkey,proto3" json:"votePubkey,omitempty"`
}

func (*VotePb) Descriptor added in v0.2.0

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

func (*VotePb) GetNonce added in v0.2.0

func (m *VotePb) GetNonce() uint64

func (*VotePb) GetSelfPubkey added in v0.2.0

func (m *VotePb) GetSelfPubkey() []byte

func (*VotePb) GetSignature added in v0.2.0

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

func (*VotePb) GetTimestamp added in v0.2.0

func (m *VotePb) GetTimestamp() uint64

func (*VotePb) GetVersion added in v0.2.0

func (m *VotePb) GetVersion() uint32

func (*VotePb) GetVotePubkey added in v0.2.0

func (m *VotePb) GetVotePubkey() []byte

func (*VotePb) ProtoMessage added in v0.2.0

func (*VotePb) ProtoMessage()

func (*VotePb) Reset added in v0.2.0

func (m *VotePb) Reset()

func (*VotePb) String added in v0.2.0

func (m *VotePb) String() string

Jump to

Keyboard shortcuts

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