network

package
v0.0.0-...-214c9eb Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Broadcast_BroadcastType_name = map[int32]string{
	0: "TRANSACTION",
	1: "BLOCK_PROPOSAL",
	2: "CHECKPOINT_VOTE",
	3: "NEW_CONTRACT",
	4: "WITHDRAW",
	5: "MERKLE_ROOTS_SIGNED",
	6: "SCHNORR",
	7: "SIGN_SCHNORR",
	8: "MERKLE_PROOF",
	9: "MONEY_WITHDRAW",
}
View Source
var Broadcast_BroadcastType_value = map[string]int32{
	"TRANSACTION":         0,
	"BLOCK_PROPOSAL":      1,
	"CHECKPOINT_VOTE":     2,
	"NEW_CONTRACT":        3,
	"WITHDRAW":            4,
	"MERKLE_ROOTS_SIGNED": 5,
	"SCHNORR":             6,
	"SIGN_SCHNORR":        7,
	"MERKLE_PROOF":        8,
	"MONEY_WITHDRAW":      9,
}
View Source
var Envelope_ContentType_name = map[int32]string{
	0: "BROADCAST",
	1: "OTHER",
	2: "REQUEST",
	3: "INTERESTS",
	4: "NEIGHBOUR_INTERESTS",
}
View Source
var Envelope_ContentType_value = map[string]int32{
	"BROADCAST":           0,
	"OTHER":               1,
	"REQUEST":             2,
	"INTERESTS":           3,
	"NEIGHBOUR_INTERESTS": 4,
}
View Source
var Request_MessageTypes_name = map[int32]string{
	0: "GET_BLOCKCHAIN_LEN",
	1: "GET_BLOCK",
	2: "GET_PEERS",
	3: "GET_WALLET_STATUS",
	4: "GET_VERSION",
	5: "GET_CONTRACT_CODE",
	6: "GET_CONTRACT_STATE",
	7: "GET_INTERESTS",
	8: "HASH_EXIST",
	9: "GET_WALLET",
}
View Source
var Request_MessageTypes_value = map[string]int32{
	"GET_BLOCKCHAIN_LEN": 0,
	"GET_BLOCK":          1,
	"GET_PEERS":          2,
	"GET_WALLET_STATUS":  3,
	"GET_VERSION":        4,
	"GET_CONTRACT_CODE":  5,
	"GET_CONTRACT_STATE": 6,
	"GET_INTERESTS":      7,
	"HASH_EXIST":         8,
	"GET_WALLET":         9,
}

Functions

This section is empty.

Types

type Broadcast

type Broadcast struct {
	Type                 Broadcast_BroadcastType `protobuf:"varint,1,opt,name=type,proto3,enum=Broadcast_BroadcastType" json:"type,omitempty"`
	Data                 []byte                  `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Address              []byte                  `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	ShardAddress         uint32                  `protobuf:"varint,5,opt,name=shardAddress,proto3" json:"shardAddress,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*Broadcast) Descriptor

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

func (*Broadcast) GetAddress

func (m *Broadcast) GetAddress() []byte

func (*Broadcast) GetData

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

func (*Broadcast) GetShardAddress

func (m *Broadcast) GetShardAddress() uint32

func (*Broadcast) GetType

func (m *Broadcast) GetType() Broadcast_BroadcastType

func (*Broadcast) ProtoMessage

func (*Broadcast) ProtoMessage()

func (*Broadcast) Reset

func (m *Broadcast) Reset()

func (*Broadcast) String

func (m *Broadcast) String() string

func (*Broadcast) XXX_DiscardUnknown

func (m *Broadcast) XXX_DiscardUnknown()

func (*Broadcast) XXX_Marshal

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

func (*Broadcast) XXX_Merge

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

func (*Broadcast) XXX_Size

func (m *Broadcast) XXX_Size() int

func (*Broadcast) XXX_Unmarshal

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

type Broadcast_BroadcastType

type Broadcast_BroadcastType int32
const (
	Broadcast_TRANSACTION         Broadcast_BroadcastType = 0
	Broadcast_BLOCK_PROPOSAL      Broadcast_BroadcastType = 1
	Broadcast_CHECKPOINT_VOTE     Broadcast_BroadcastType = 2
	Broadcast_NEW_CONTRACT        Broadcast_BroadcastType = 3
	Broadcast_WITHDRAW            Broadcast_BroadcastType = 4
	Broadcast_MERKLE_ROOTS_SIGNED Broadcast_BroadcastType = 5
	Broadcast_SCHNORR             Broadcast_BroadcastType = 6
	Broadcast_SIGN_SCHNORR        Broadcast_BroadcastType = 7
	Broadcast_MERKLE_PROOF        Broadcast_BroadcastType = 8
	Broadcast_MONEY_WITHDRAW      Broadcast_BroadcastType = 9
)

func (Broadcast_BroadcastType) EnumDescriptor

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

func (Broadcast_BroadcastType) String

func (x Broadcast_BroadcastType) String() string

type Envelope

type Envelope struct {
	Type                 Envelope_ContentType `protobuf:"varint,1,opt,name=type,proto3,enum=Envelope_ContentType" json:"type,omitempty"`
	Data                 []byte               `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Shard                uint32               `protobuf:"varint,3,opt,name=shard,proto3" json:"shard,omitempty"`
	Identity             *Signature           `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"`
	TTL                  uint32               `protobuf:"varint,5,opt,name=TTL,proto3" json:"TTL,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Envelope) Descriptor

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

func (*Envelope) GetData

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

func (*Envelope) GetIdentity

func (m *Envelope) GetIdentity() *Signature

func (*Envelope) GetShard

func (m *Envelope) GetShard() uint32

func (*Envelope) GetTTL

func (m *Envelope) GetTTL() uint32

func (*Envelope) GetType

func (m *Envelope) GetType() Envelope_ContentType

func (*Envelope) ProtoMessage

func (*Envelope) ProtoMessage()

func (*Envelope) Reset

func (m *Envelope) Reset()

func (*Envelope) String

func (m *Envelope) String() string

func (*Envelope) XXX_DiscardUnknown

func (m *Envelope) XXX_DiscardUnknown()

func (*Envelope) XXX_Marshal

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

func (*Envelope) XXX_Merge

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

func (*Envelope) XXX_Size

func (m *Envelope) XXX_Size() int

func (*Envelope) XXX_Unmarshal

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

type Envelope_ContentType

type Envelope_ContentType int32
const (
	Envelope_BROADCAST           Envelope_ContentType = 0
	Envelope_OTHER               Envelope_ContentType = 1
	Envelope_REQUEST             Envelope_ContentType = 2
	Envelope_INTERESTS           Envelope_ContentType = 3
	Envelope_NEIGHBOUR_INTERESTS Envelope_ContentType = 4
)

func (Envelope_ContentType) EnumDescriptor

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

func (Envelope_ContentType) String

func (x Envelope_ContentType) String() string

type Interests

type Interests struct {
	Keys                 []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
	Address              []byte   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	ShardAddress         uint32   `protobuf:"varint,3,opt,name=shardAddress,proto3" json:"shardAddress,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Interests) Descriptor

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

func (*Interests) GetAddress

func (m *Interests) GetAddress() []byte

func (*Interests) GetKeys

func (m *Interests) GetKeys() []string

func (*Interests) GetShardAddress

func (m *Interests) GetShardAddress() uint32

func (*Interests) ProtoMessage

func (*Interests) ProtoMessage()

func (*Interests) Reset

func (m *Interests) Reset()

func (*Interests) String

func (m *Interests) String() string

func (*Interests) XXX_DiscardUnknown

func (m *Interests) XXX_DiscardUnknown()

func (*Interests) XXX_Marshal

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

func (*Interests) XXX_Merge

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

func (*Interests) XXX_Size

func (m *Interests) XXX_Size() int

func (*Interests) XXX_Unmarshal

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

type Peers

type Peers struct {
	Ip                   []string `protobuf:"bytes,1,rep,name=ip,proto3" json:"ip,omitempty"`
	Address              []byte   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	ShardAddress         uint32   `protobuf:"varint,3,opt,name=shardAddress,proto3" json:"shardAddress,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Peers) Descriptor

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

func (*Peers) GetAddress

func (m *Peers) GetAddress() []byte

func (*Peers) GetIp

func (m *Peers) GetIp() []string

func (*Peers) GetShardAddress

func (m *Peers) GetShardAddress() uint32

func (*Peers) ProtoMessage

func (*Peers) ProtoMessage()

func (*Peers) Reset

func (m *Peers) Reset()

func (*Peers) String

func (m *Peers) String() string

func (*Peers) XXX_DiscardUnknown

func (m *Peers) XXX_DiscardUnknown()

func (*Peers) XXX_Marshal

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

func (*Peers) XXX_Merge

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

func (*Peers) XXX_Size

func (m *Peers) XXX_Size() int

func (*Peers) XXX_Unmarshal

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

type PeersAndInterests

type PeersAndInterests struct {
	Keys                 []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
	Ips                  []string `protobuf:"bytes,2,rep,name=ips,proto3" json:"ips,omitempty"`
	Address              []byte   `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	ShardAddress         uint32   `protobuf:"varint,4,opt,name=shardAddress,proto3" json:"shardAddress,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeersAndInterests) Descriptor

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

func (*PeersAndInterests) GetAddress

func (m *PeersAndInterests) GetAddress() []byte

func (*PeersAndInterests) GetIps

func (m *PeersAndInterests) GetIps() []string

func (*PeersAndInterests) GetKeys

func (m *PeersAndInterests) GetKeys() []string

func (*PeersAndInterests) GetShardAddress

func (m *PeersAndInterests) GetShardAddress() uint32

func (*PeersAndInterests) ProtoMessage

func (*PeersAndInterests) ProtoMessage()

func (*PeersAndInterests) Reset

func (m *PeersAndInterests) Reset()

func (*PeersAndInterests) String

func (m *PeersAndInterests) String() string

func (*PeersAndInterests) XXX_DiscardUnknown

func (m *PeersAndInterests) XXX_DiscardUnknown()

func (*PeersAndInterests) XXX_Marshal

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

func (*PeersAndInterests) XXX_Merge

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

func (*PeersAndInterests) XXX_Size

func (m *PeersAndInterests) XXX_Size() int

func (*PeersAndInterests) XXX_Unmarshal

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

type Request

type Request struct {
	Type                 Request_MessageTypes `protobuf:"varint,1,opt,name=type,proto3,enum=Request_MessageTypes" json:"type,omitempty"`
	Data                 []byte               `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Address              []byte               `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	ShardAddress         uint32               `protobuf:"varint,5,opt,name=shardAddress,proto3" json:"shardAddress,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Request) Descriptor

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

func (*Request) GetAddress

func (m *Request) GetAddress() []byte

func (*Request) GetData

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

func (*Request) GetShardAddress

func (m *Request) GetShardAddress() uint32

func (*Request) GetType

func (m *Request) GetType() Request_MessageTypes

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

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

func (*Request) XXX_Merge

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

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

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

type Request_MessageTypes

type Request_MessageTypes int32
const (
	Request_GET_BLOCKCHAIN_LEN Request_MessageTypes = 0
	Request_GET_BLOCK          Request_MessageTypes = 1
	Request_GET_PEERS          Request_MessageTypes = 2
	Request_GET_WALLET_STATUS  Request_MessageTypes = 3
	Request_GET_VERSION        Request_MessageTypes = 4
	Request_GET_CONTRACT_CODE  Request_MessageTypes = 5
	Request_GET_CONTRACT_STATE Request_MessageTypes = 6
	Request_GET_INTERESTS      Request_MessageTypes = 7
	Request_HASH_EXIST         Request_MessageTypes = 8
	Request_GET_WALLET         Request_MessageTypes = 9
)

func (Request_MessageTypes) EnumDescriptor

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

func (Request_MessageTypes) String

func (x Request_MessageTypes) String() string

type Signature

type Signature struct {
	Pubkey               []byte   `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	R                    []byte   `protobuf:"bytes,2,opt,name=r,proto3" json:"r,omitempty"`
	S                    []byte   `protobuf:"bytes,3,opt,name=s,proto3" json:"s,omitempty"`
	Data                 []byte   `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Signature) Descriptor

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

func (*Signature) GetData

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

func (*Signature) GetPubkey

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

func (*Signature) GetR

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

func (*Signature) GetS

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

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) Reset

func (m *Signature) Reset()

func (*Signature) String

func (m *Signature) String() string

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

Jump to

Keyboard shortcuts

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