wire

package
v0.0.0-...-103dbe2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION        = "version"
	VERACK         = "verack"
	ADDR           = "addr"
	ADDRV2         = "addrv2"
	SENDADDRV2     = "sendaddrv2"
	INV            = "inv"
	GETDATA        = "getdata"
	MERKLEBLOCK    = "merkleblock"
	GETBLOCKS      = "getblocks"
	GETHEADERS     = "getheaders"
	TX             = "tx"
	HEADERS        = "headers"
	BLOCK          = "block"
	GETADDR        = "getaddr"
	MEMPOOL        = "mempool"
	PING           = "ping"
	PONG           = "pong"
	NOTFOUND       = "notfound"
	FILTERLOAD     = "filterload"
	FILTERADD      = "filteradd"
	FILTERCLEAR    = "filterclear"
	SENDHEADERS    = "sendheaders"
	FEEFILTER      = "feefilter"
	SENDCMPCT      = "sendcmpct"
	CMPCTBLOCK     = "cmpctblock"
	GETBLOCKTXN    = "getblocktxn"
	BLOCKTXN       = "blocktxn"
	GETCFILTERS    = "getcfilters"
	CFILTER        = "cfilter"
	GETCFHEADERS   = "getcfheaders"
	CFHEADERS      = "cfheaders"
	GETCFCHEKCPT   = "getcfcheckpt"
	CFCHECKPT      = "cfcheckpt"
	ADDVALIDATOR   = "addvalidator"
	GETVALIDATORS  = "getvalidator"
	STAKE          = "stake"
	UNSTAKE        = "unstake"
	ANONPROXYRELAY = "anonproxyrelay"
)
View Source
const (
	SERVICE_NODE_NONE            = 0
	SERVICE_NODE_NETWORK         = 1 << 0
	SERVICE_NODE_UTXO            = 1 << 1
	SERVICE_NODE_BLOOM           = 1 << 2
	SERVICE_NODE_VALIDATOR       = 1 << 3
	SERVICE_NODE_NETWORK_LIMITED = 1 << 10
	SERVICE_NODE_WVM             = 1 << 6
)
View Source
const MaxMessagePayload = 1024 * 1024 * 1024 //max is 1gb for a message

Variables

This section is empty.

Functions

func CreateMessage

func CreateMessage(w io.Writer, m Message, ver uint32, network [4]byte, encoding MessageEncoding) (int, error)

func ServiceFlagsToString

func ServiceFlagsToString(sflags ...uint64) []string

Types

type EncryptionKey

type EncryptionKey []byte

type IMessage

type IMessage interface {
	WizeDecode(io.Reader, uint32, MessageEncoding) error
	WizeEncode(io.Writer, uint32, MessageEncoding) error
	WizeEncrypt(io.Writer, uint32, MessageEncoding, EncryptionKey) error
	WizeDecrypt(io.Reader, uint32, MessageEncoding, EncryptionKey) error
	Command() string
	MaxPayloadLength(uint32) uint32
}

type IMessageHeader

type IMessageHeader interface {
	Create(pchMessageStartIn uint, cmd string, messageSizeIn uint)
	GetCommand() string
	// contains filtered or unexported methods
}

type Message

type Message struct {
	IMessage
}

type MessageEncoding

type MessageEncoding uint32

type MessageHeader

type MessageHeader struct {
	// contains filtered or unexported fields
}

type Serializer

type Serializer interface {
}

Serializer ...

type Writer

type Writer struct {
	Buf bytes.Buffer
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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