appmessage

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 9 Imported by: 21

Documentation

Index

Constants

View Source
const (
	// DefaultServices describes the default services that are supported by
	// the server.
	DefaultServices = SFNodeNetwork | SFNodeBloom | SFNodeCF
)
View Source
const MaxAddressesPerMsg = 1000

Variables

View Source
var DefaultUserAgent = fmt.Sprintf("/Metchaind:%s/", version.Version())
View Source
var RPCMessageCommandToString = map[MessageCommand]string{}

Add all RPC commands here

Functions

This section is empty.

Types

type AcceptedTransactionIDs

type AcceptedTransactionIDs struct {
	AcceptingBlockHash     string
	AcceptedTransactionIDs []string
}

AcceptedTransactionIDs is a part of the GetVirtualSelectedParentChainFromBlockResponseMessage and VirtualSelectedParentChainChangedNotificationMessage appmessages

type AddPeerRequestMessage

type AddPeerRequestMessage struct {
	Address     string
	IsPermanent bool
	// contains filtered or unexported fields
}

AddPeerRequestMessage is an appmessage corresponding to its respective RPC message

func NewAddPeerRequestMessage

func NewAddPeerRequestMessage(address string, isPermanent bool) *AddPeerRequestMessage

NewAddPeerRequestMessage returns a instance of the message

func (*AddPeerRequestMessage) Command

func (msg *AddPeerRequestMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*AddPeerRequestMessage) MessageNumber

func (b *AddPeerRequestMessage) MessageNumber() uint64

func (*AddPeerRequestMessage) ReceivedAt

func (b *AddPeerRequestMessage) ReceivedAt() time.Time

func (*AddPeerRequestMessage) SetMessageNumber

func (b *AddPeerRequestMessage) SetMessageNumber(messageNumber uint64)

func (*AddPeerRequestMessage) SetReceivedAt

func (b *AddPeerRequestMessage) SetReceivedAt(receivedAt time.Time)

type AddPeerResponseMessage

type AddPeerResponseMessage struct {
	Error *RPCError
	// contains filtered or unexported fields
}

AddPeerResponseMessage is an appmessage corresponding to its respective RPC message

func NewAddPeerResponseMessage

func NewAddPeerResponseMessage() *AddPeerResponseMessage

NewAddPeerResponseMessage returns a instance of the message

func (*AddPeerResponseMessage) Command

func (msg *AddPeerResponseMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*AddPeerResponseMessage) MessageNumber

func (b *AddPeerResponseMessage) MessageNumber() uint64

func (*AddPeerResponseMessage) ReceivedAt

func (b *AddPeerResponseMessage) ReceivedAt() time.Time

func (*AddPeerResponseMessage) SetMessageNumber

func (b *AddPeerResponseMessage) SetMessageNumber(messageNumber uint64)

func (*AddPeerResponseMessage) SetReceivedAt

func (b *AddPeerResponseMessage) SetReceivedAt(receivedAt time.Time)

type BalancesByAddressesEntry

type BalancesByAddressesEntry struct {
	Address string
	Balance uint64
}

BalancesByAddressesEntry represents the balance of some address

type BanRequestMessage

type BanRequestMessage struct {
	IP string
	// contains filtered or unexported fields
}

BanRequestMessage is an appmessage corresponding to its respective RPC message

func NewBanRequestMessage

func NewBanRequestMessage(ip string) *BanRequestMessage

NewBanRequestMessage returns an instance of the message

func (*BanRequestMessage) Command

func (msg *BanRequestMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*BanRequestMessage) MessageNumber

func (b *BanRequestMessage) MessageNumber() uint64

func (*BanRequestMessage) ReceivedAt

func (b *BanRequestMessage) ReceivedAt() time.Time

func (*BanRequestMessage) SetMessageNumber

func (b *BanRequestMessage) SetMessageNumber(messageNumber uint64)

func (*BanRequestMessage) SetReceivedAt

func (b *BanRequestMessage) SetReceivedAt(receivedAt time.Time)

type BanResponseMessage

type BanResponseMessage struct {
	Error *RPCError
	// contains filtered or unexported fields
}

BanResponseMessage is an appmessage corresponding to its respective RPC message

func NewBanResponseMessage

func NewBanResponseMessage() *BanResponseMessage

NewBanResponseMessage returns a instance of the message

func (*BanResponseMessage) Command

func (msg *BanResponseMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*BanResponseMessage) MessageNumber

func (b *BanResponseMessage) MessageNumber() uint64

func (*BanResponseMessage) ReceivedAt

func (b *BanResponseMessage) ReceivedAt() time.Time

func (*BanResponseMessage) SetMessageNumber

func (b *BanResponseMessage) SetMessageNumber(messageNumber uint64)

func (*BanResponseMessage) SetReceivedAt

func (b *BanResponseMessage) SetReceivedAt(receivedAt time.Time)

type BlockAddedNotificationMessage

type BlockAddedNotificationMessage struct {
	Block *RPCBlock
	// contains filtered or unexported fields
}

BlockAddedNotificationMessage is an appmessage corresponding to its respective RPC message

func NewBlockAddedNotificationMessage

func NewBlockAddedNotificationMessage(block *RPCBlock) *BlockAddedNotificationMessage

NewBlockAddedNotificationMessage returns a instance of the message

func (*BlockAddedNotificationMessage) Command

Command returns the protocol command string for the message

func (*BlockAddedNotificationMessage) MessageNumber

func (b *BlockAddedNotificationMessage) MessageNumber() uint64

func (*BlockAddedNotificationMessage) ReceivedAt

func (b *BlockAddedNotificationMessage) ReceivedAt() time.Time

func (*BlockAddedNotificationMessage) SetMessageNumber

func (b *BlockAddedNotificationMessage) SetMessageNumber(messageNumber uint64)

func (*BlockAddedNotificationMessage) SetReceivedAt

func (b *BlockAddedNotificationMessage) SetReceivedAt(receivedAt time.Time)

type EstimateNetworkHashesPerSecondRequestMessage

type EstimateNetworkHashesPerSecondRequestMessage struct {
	StartHash  string
	WindowSize uint32
	// contains filtered or unexported fields
}

EstimateNetworkHashesPerSecondRequestMessage is an appmessage corresponding to its respective RPC message

func NewEstimateNetworkHashesPerSecondRequestMessage

func NewEstimateNetworkHashesPerSecondRequestMessage(startHash string, windowSize uint32) *EstimateNetworkHashesPerSecondRequestMessage

NewEstimateNetworkHashesPerSecondRequestMessage returns a instance of the message

func (*EstimateNetworkHashesPerSecondRequestMessage) Command

Command returns the protocol command string for the message

func (*EstimateNetworkHashesPerSecondRequestMessage) MessageNumber

func (b *EstimateNetworkHashesPerSecondRequestMessage) MessageNumber() uint64

func (*EstimateNetworkHashesPerSecondRequestMessage) ReceivedAt

func (b *EstimateNetworkHashesPerSecondRequestMessage) ReceivedAt() time.Time

func (*EstimateNetworkHashesPerSecondRequestMessage) SetMessageNumber

func (b *EstimateNetworkHashesPerSecondRequestMessage) SetMessageNumber(messageNumber uint64)

func (*EstimateNetworkHashesPerSecondRequestMessage) SetReceivedAt

func (b *EstimateNetworkHashesPerSecondRequestMessage) SetReceivedAt(receivedAt time.Time)

type EstimateNetworkHashesPerSecondResponseMessage

type EstimateNetworkHashesPerSecondResponseMessage struct {
	NetworkHashesPerSecond uint64

	Error *RPCError
	// contains filtered or unexported fields
}

EstimateNetworkHashesPerSecondResponseMessage is an appmessage corresponding to its respective RPC message

func NewEstimateNetworkHashesPerSecondResponseMessage

func NewEstimateNetworkHashesPerSecondResponseMessage(networkHashesPerSecond uint64) *EstimateNetworkHashesPerSecondResponseMessage

NewEstimateNetworkHashesPerSecondResponseMessage returns a instance of the message

func (*EstimateNetworkHashesPerSecondResponseMessage) Command

Command returns the protocol command string for the message

func (*EstimateNetworkHashesPerSecondResponseMessage) MessageNumber

func (b *EstimateNetworkHashesPerSecondResponseMessage) MessageNumber() uint64

func (*EstimateNetworkHashesPerSecondResponseMessage) ReceivedAt

func (b *EstimateNetworkHashesPerSecondResponseMessage) ReceivedAt() time.Time

func (*EstimateNetworkHashesPerSecondResponseMessage) SetMessageNumber

func (b *EstimateNetworkHashesPerSecondResponseMessage) SetMessageNumber(messageNumber uint64)

func (*EstimateNetworkHashesPerSecondResponseMessage) SetReceivedAt

func (b *EstimateNetworkHashesPerSecondResponseMessage) SetReceivedAt(receivedAt time.Time)

type FinalityConflictNotificationMessage

type FinalityConflictNotificationMessage struct {
	ViolatingBlockHash string
	// contains filtered or unexported fields
}

FinalityConflictNotificationMessage is an appmessage corresponding to its respective RPC message

func NewFinalityConflictNotificationMessage

func NewFinalityConflictNotificationMessage(violatingBlockHash string) *FinalityConflictNotificationMessage

NewFinalityConflictNotificationMessage returns a instance of the message

func (*FinalityConflictNotificationMessage) Command

Command returns the protocol command string for the message

func (*FinalityConflictNotificationMessage) MessageNumber

func (b *FinalityConflictNotificationMessage) MessageNumber() uint64

func (*FinalityConflictNotificationMessage) ReceivedAt

func (b *FinalityConflictNotificationMessage) ReceivedAt() time.Time

func (*FinalityConflictNotificationMessage) SetMessageNumber

func (b *FinalityConflictNotificationMessage) SetMessageNumber(messageNumber uint64)

func (*FinalityConflictNotificationMessage) SetReceivedAt

func (b *FinalityConflictNotificationMessage) SetReceivedAt(receivedAt time.Time)

type FinalityConflictResolvedNotificationMessage

type FinalityConflictResolvedNotificationMessage struct {
	FinalityBlockHash string
	// contains filtered or unexported fields
}

FinalityConflictResolvedNotificationMessage is an appmessage corresponding to its respective RPC message

func NewFinalityConflictResolvedNotificationMessage

func NewFinalityConflictResolvedNotificationMessage(finalityBlockHash string) *FinalityConflictResolvedNotificationMessage

NewFinalityConflictResolvedNotificationMessage returns a instance of the message

func (*FinalityConflictResolvedNotificationMessage) Command

Command returns the protocol command string for the message

func (*FinalityConflictResolvedNotificationMessage) MessageNumber

func (b *FinalityConflictResolvedNotificationMessage) MessageNumber() uint64

func (*FinalityConflictResolvedNotificationMessage) ReceivedAt

func (b *FinalityConflictResolvedNotificationMessage) ReceivedAt() time.Time

func (*FinalityConflictResolvedNotificationMessage) SetMessageNumber

func (b *FinalityConflictResolvedNotificationMessage) SetMessageNumber(messageNumber uint64)

func (*FinalityConflictResolvedNotificationMessage) SetReceivedAt

func (b *FinalityConflictResolvedNotificationMessage) SetReceivedAt(receivedAt time.Time)

type GetBalanceByAddressRequestMessage

type GetBalanceByAddressRequestMessage struct {
	Address string
	// contains filtered or unexported fields
}

GetBalanceByAddressRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetBalanceByAddressRequest

func NewGetBalanceByAddressRequest(address string) *GetBalanceByAddressRequestMessage

NewGetBalanceByAddressRequest returns a instance of the message

func (*GetBalanceByAddressRequestMessage) Command

Command returns the protocol command string for the message

func (*GetBalanceByAddressRequestMessage) MessageNumber

func (b *GetBalanceByAddressRequestMessage) MessageNumber() uint64

func (*GetBalanceByAddressRequestMessage) ReceivedAt

func (b *GetBalanceByAddressRequestMessage) ReceivedAt() time.Time

func (*GetBalanceByAddressRequestMessage) SetMessageNumber

func (b *GetBalanceByAddressRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetBalanceByAddressRequestMessage) SetReceivedAt

func (b *GetBalanceByAddressRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetBalanceByAddressResponseMessage

type GetBalanceByAddressResponseMessage struct {
	Balance uint64

	Error *RPCError
	// contains filtered or unexported fields
}

GetBalanceByAddressResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetBalanceByAddressResponse

func NewGetBalanceByAddressResponse(Balance uint64) *GetBalanceByAddressResponseMessage

NewGetBalanceByAddressResponse returns an instance of the message

func (*GetBalanceByAddressResponseMessage) Command

Command returns the protocol command string for the message

func (*GetBalanceByAddressResponseMessage) MessageNumber

func (b *GetBalanceByAddressResponseMessage) MessageNumber() uint64

func (*GetBalanceByAddressResponseMessage) ReceivedAt

func (b *GetBalanceByAddressResponseMessage) ReceivedAt() time.Time

func (*GetBalanceByAddressResponseMessage) SetMessageNumber

func (b *GetBalanceByAddressResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetBalanceByAddressResponseMessage) SetReceivedAt

func (b *GetBalanceByAddressResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetBalancesByAddressesRequestMessage

type GetBalancesByAddressesRequestMessage struct {
	Addresses []string
	// contains filtered or unexported fields
}

GetBalancesByAddressesRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetBalancesByAddressesRequest

func NewGetBalancesByAddressesRequest(addresses []string) *GetBalancesByAddressesRequestMessage

NewGetBalancesByAddressesRequest returns a instance of the message

func (*GetBalancesByAddressesRequestMessage) Command

Command returns the protocol command string for the message

func (*GetBalancesByAddressesRequestMessage) MessageNumber

func (b *GetBalancesByAddressesRequestMessage) MessageNumber() uint64

func (*GetBalancesByAddressesRequestMessage) ReceivedAt

func (b *GetBalancesByAddressesRequestMessage) ReceivedAt() time.Time

func (*GetBalancesByAddressesRequestMessage) SetMessageNumber

func (b *GetBalancesByAddressesRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetBalancesByAddressesRequestMessage) SetReceivedAt

func (b *GetBalancesByAddressesRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetBalancesByAddressesResponseMessage

type GetBalancesByAddressesResponseMessage struct {
	Entries []*BalancesByAddressesEntry

	Error *RPCError
	// contains filtered or unexported fields
}

GetBalancesByAddressesResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetBalancesByAddressesResponse

func NewGetBalancesByAddressesResponse(entries []*BalancesByAddressesEntry) *GetBalancesByAddressesResponseMessage

NewGetBalancesByAddressesResponse returns an instance of the message

func (*GetBalancesByAddressesResponseMessage) Command

Command returns the protocol command string for the message

func (*GetBalancesByAddressesResponseMessage) MessageNumber

func (b *GetBalancesByAddressesResponseMessage) MessageNumber() uint64

func (*GetBalancesByAddressesResponseMessage) ReceivedAt

func (b *GetBalancesByAddressesResponseMessage) ReceivedAt() time.Time

func (*GetBalancesByAddressesResponseMessage) SetMessageNumber

func (b *GetBalancesByAddressesResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetBalancesByAddressesResponseMessage) SetReceivedAt

func (b *GetBalancesByAddressesResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetBlockCountRequestMessage

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

GetBlockCountRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetBlockCountRequestMessage

func NewGetBlockCountRequestMessage() *GetBlockCountRequestMessage

NewGetBlockCountRequestMessage returns a instance of the message

func (*GetBlockCountRequestMessage) Command

Command returns the protocol command string for the message

func (*GetBlockCountRequestMessage) MessageNumber

func (b *GetBlockCountRequestMessage) MessageNumber() uint64

func (*GetBlockCountRequestMessage) ReceivedAt

func (b *GetBlockCountRequestMessage) ReceivedAt() time.Time

func (*GetBlockCountRequestMessage) SetMessageNumber

func (b *GetBlockCountRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetBlockCountRequestMessage) SetReceivedAt

func (b *GetBlockCountRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetBlockCountResponseMessage

type GetBlockCountResponseMessage struct {
	BlockCount  uint64
	HeaderCount uint64

	Error *RPCError
	// contains filtered or unexported fields
}

GetBlockCountResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetBlockCountResponseMessage

func NewGetBlockCountResponseMessage(syncInfo *external.SyncInfo) *GetBlockCountResponseMessage

NewGetBlockCountResponseMessage returns a instance of the message

func (*GetBlockCountResponseMessage) Command

Command returns the protocol command string for the message

func (*GetBlockCountResponseMessage) MessageNumber

func (b *GetBlockCountResponseMessage) MessageNumber() uint64

func (*GetBlockCountResponseMessage) ReceivedAt

func (b *GetBlockCountResponseMessage) ReceivedAt() time.Time

func (*GetBlockCountResponseMessage) SetMessageNumber

func (b *GetBlockCountResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetBlockCountResponseMessage) SetReceivedAt

func (b *GetBlockCountResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetBlockDAGInfoRequestMessage

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

GetBlockDAGInfoRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetBlockDAGInfoRequestMessage

func NewGetBlockDAGInfoRequestMessage() *GetBlockDAGInfoRequestMessage

NewGetBlockDAGInfoRequestMessage returns a instance of the message

func (*GetBlockDAGInfoRequestMessage) Command

Command returns the protocol command string for the message

func (*GetBlockDAGInfoRequestMessage) MessageNumber

func (b *GetBlockDAGInfoRequestMessage) MessageNumber() uint64

func (*GetBlockDAGInfoRequestMessage) ReceivedAt

func (b *GetBlockDAGInfoRequestMessage) ReceivedAt() time.Time

func (*GetBlockDAGInfoRequestMessage) SetMessageNumber

func (b *GetBlockDAGInfoRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetBlockDAGInfoRequestMessage) SetReceivedAt

func (b *GetBlockDAGInfoRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetBlockDAGInfoResponseMessage

type GetBlockDAGInfoResponseMessage struct {
	NetworkName         string
	BlockCount          uint64
	HeaderCount         uint64
	TipHashes           []string
	VirtualParentHashes []string
	Difficulty          float64
	PastMedianTime      int64
	PruningPointHash    string
	VirtualDAAScore     uint64

	Error *RPCError
	// contains filtered or unexported fields
}

GetBlockDAGInfoResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetBlockDAGInfoResponseMessage

func NewGetBlockDAGInfoResponseMessage() *GetBlockDAGInfoResponseMessage

NewGetBlockDAGInfoResponseMessage returns a instance of the message

func (*GetBlockDAGInfoResponseMessage) Command

Command returns the protocol command string for the message

func (*GetBlockDAGInfoResponseMessage) MessageNumber

func (b *GetBlockDAGInfoResponseMessage) MessageNumber() uint64

func (*GetBlockDAGInfoResponseMessage) ReceivedAt

func (b *GetBlockDAGInfoResponseMessage) ReceivedAt() time.Time

func (*GetBlockDAGInfoResponseMessage) SetMessageNumber

func (b *GetBlockDAGInfoResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetBlockDAGInfoResponseMessage) SetReceivedAt

func (b *GetBlockDAGInfoResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetBlockRequestMessage

type GetBlockRequestMessage struct {
	Hash                string
	IncludeTransactions bool
	// contains filtered or unexported fields
}

GetBlockRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetBlockRequestMessage

func NewGetBlockRequestMessage(hash string, includeTransactions bool) *GetBlockRequestMessage

NewGetBlockRequestMessage returns a instance of the message

func (*GetBlockRequestMessage) Command

func (msg *GetBlockRequestMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*GetBlockRequestMessage) MessageNumber

func (b *GetBlockRequestMessage) MessageNumber() uint64

func (*GetBlockRequestMessage) ReceivedAt

func (b *GetBlockRequestMessage) ReceivedAt() time.Time

func (*GetBlockRequestMessage) SetMessageNumber

func (b *GetBlockRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetBlockRequestMessage) SetReceivedAt

func (b *GetBlockRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetBlockResponseMessage

type GetBlockResponseMessage struct {
	Block *RPCBlock

	Error *RPCError
	// contains filtered or unexported fields
}

GetBlockResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetBlockResponseMessage

func NewGetBlockResponseMessage() *GetBlockResponseMessage

NewGetBlockResponseMessage returns a instance of the message

func (*GetBlockResponseMessage) Command

func (msg *GetBlockResponseMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*GetBlockResponseMessage) MessageNumber

func (b *GetBlockResponseMessage) MessageNumber() uint64

func (*GetBlockResponseMessage) ReceivedAt

func (b *GetBlockResponseMessage) ReceivedAt() time.Time

func (*GetBlockResponseMessage) SetMessageNumber

func (b *GetBlockResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetBlockResponseMessage) SetReceivedAt

func (b *GetBlockResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetBlockTemplateRequestMessage

type GetBlockTemplateRequestMessage struct {
	PayAddress string
	ExtraData  string
	// contains filtered or unexported fields
}

GetBlockTemplateRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetBlockTemplateRequestMessage

func NewGetBlockTemplateRequestMessage(payAddress, extraData string) *GetBlockTemplateRequestMessage

NewGetBlockTemplateRequestMessage returns a instance of the message

func (*GetBlockTemplateRequestMessage) Command

Command returns the protocol command string for the message

func (*GetBlockTemplateRequestMessage) MessageNumber

func (b *GetBlockTemplateRequestMessage) MessageNumber() uint64

func (*GetBlockTemplateRequestMessage) ReceivedAt

func (b *GetBlockTemplateRequestMessage) ReceivedAt() time.Time

func (*GetBlockTemplateRequestMessage) SetMessageNumber

func (b *GetBlockTemplateRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetBlockTemplateRequestMessage) SetReceivedAt

func (b *GetBlockTemplateRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetBlockTemplateResponseMessage

type GetBlockTemplateResponseMessage struct {
	Block    *RPCBlock
	IsSynced bool

	Error *RPCError
	// contains filtered or unexported fields
}

GetBlockTemplateResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetBlockTemplateResponseMessage

func NewGetBlockTemplateResponseMessage(block *RPCBlock, isSynced bool) *GetBlockTemplateResponseMessage

NewGetBlockTemplateResponseMessage returns a instance of the message

func (*GetBlockTemplateResponseMessage) Command

Command returns the protocol command string for the message

func (*GetBlockTemplateResponseMessage) MessageNumber

func (b *GetBlockTemplateResponseMessage) MessageNumber() uint64

func (*GetBlockTemplateResponseMessage) ReceivedAt

func (b *GetBlockTemplateResponseMessage) ReceivedAt() time.Time

func (*GetBlockTemplateResponseMessage) SetMessageNumber

func (b *GetBlockTemplateResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetBlockTemplateResponseMessage) SetReceivedAt

func (b *GetBlockTemplateResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetBlocksRequestMessage

type GetBlocksRequestMessage struct {
	LowHash             string
	IncludeBlocks       bool
	IncludeTransactions bool
	// contains filtered or unexported fields
}

GetBlocksRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetBlocksRequestMessage

func NewGetBlocksRequestMessage(lowHash string, includeBlocks bool,
	includeTransactions bool) *GetBlocksRequestMessage

NewGetBlocksRequestMessage returns a instance of the message

func (*GetBlocksRequestMessage) Command

func (msg *GetBlocksRequestMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*GetBlocksRequestMessage) MessageNumber

func (b *GetBlocksRequestMessage) MessageNumber() uint64

func (*GetBlocksRequestMessage) ReceivedAt

func (b *GetBlocksRequestMessage) ReceivedAt() time.Time

func (*GetBlocksRequestMessage) SetMessageNumber

func (b *GetBlocksRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetBlocksRequestMessage) SetReceivedAt

func (b *GetBlocksRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetBlocksResponseMessage

type GetBlocksResponseMessage struct {
	BlockHashes []string
	Blocks      []*RPCBlock

	Error *RPCError
	// contains filtered or unexported fields
}

GetBlocksResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetBlocksResponseMessage

func NewGetBlocksResponseMessage() *GetBlocksResponseMessage

NewGetBlocksResponseMessage returns a instance of the message

func (*GetBlocksResponseMessage) Command

Command returns the protocol command string for the message

func (*GetBlocksResponseMessage) MessageNumber

func (b *GetBlocksResponseMessage) MessageNumber() uint64

func (*GetBlocksResponseMessage) ReceivedAt

func (b *GetBlocksResponseMessage) ReceivedAt() time.Time

func (*GetBlocksResponseMessage) SetMessageNumber

func (b *GetBlocksResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetBlocksResponseMessage) SetReceivedAt

func (b *GetBlocksResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetCoinSupplyRequestMessage

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

GetCoinSupplyRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetCoinSupplyRequestMessage

func NewGetCoinSupplyRequestMessage() *GetCoinSupplyRequestMessage

NewGetCoinSupplyRequestMessage returns a instance of the message

func (*GetCoinSupplyRequestMessage) Command

Command returns the protocol command string for the message

func (*GetCoinSupplyRequestMessage) MessageNumber

func (b *GetCoinSupplyRequestMessage) MessageNumber() uint64

func (*GetCoinSupplyRequestMessage) ReceivedAt

func (b *GetCoinSupplyRequestMessage) ReceivedAt() time.Time

func (*GetCoinSupplyRequestMessage) SetMessageNumber

func (b *GetCoinSupplyRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetCoinSupplyRequestMessage) SetReceivedAt

func (b *GetCoinSupplyRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetCoinSupplyResponseMessage

type GetCoinSupplyResponseMessage struct {
	MaxSompi         uint64
	CirculatingSompi uint64

	Error *RPCError
	// contains filtered or unexported fields
}

GetCoinSupplyResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetCoinSupplyResponseMessage

func NewGetCoinSupplyResponseMessage(maxSompi uint64, circulatingSompi uint64) *GetCoinSupplyResponseMessage

NewGetCoinSupplyResponseMessage returns a instance of the message

func (*GetCoinSupplyResponseMessage) Command

Command returns the protocol command string for the message

func (*GetCoinSupplyResponseMessage) MessageNumber

func (b *GetCoinSupplyResponseMessage) MessageNumber() uint64

func (*GetCoinSupplyResponseMessage) ReceivedAt

func (b *GetCoinSupplyResponseMessage) ReceivedAt() time.Time

func (*GetCoinSupplyResponseMessage) SetMessageNumber

func (b *GetCoinSupplyResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetCoinSupplyResponseMessage) SetReceivedAt

func (b *GetCoinSupplyResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetConnectedPeerInfoMessage

type GetConnectedPeerInfoMessage struct {
	ID                        string
	Address                   string
	LastPingDuration          int64
	IsOutbound                bool
	TimeOffset                int64
	UserAgent                 string
	AdvertisedProtocolVersion uint32
	TimeConnected             int64
	IsIBDPeer                 bool
}

GetConnectedPeerInfoMessage holds information about a connected peer

type GetConnectedPeerInfoRequestMessage

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

GetConnectedPeerInfoRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetConnectedPeerInfoRequestMessage

func NewGetConnectedPeerInfoRequestMessage() *GetConnectedPeerInfoRequestMessage

NewGetConnectedPeerInfoRequestMessage returns a instance of the message

func (*GetConnectedPeerInfoRequestMessage) Command

Command returns the protocol command string for the message

func (*GetConnectedPeerInfoRequestMessage) MessageNumber

func (b *GetConnectedPeerInfoRequestMessage) MessageNumber() uint64

func (*GetConnectedPeerInfoRequestMessage) ReceivedAt

func (b *GetConnectedPeerInfoRequestMessage) ReceivedAt() time.Time

func (*GetConnectedPeerInfoRequestMessage) SetMessageNumber

func (b *GetConnectedPeerInfoRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetConnectedPeerInfoRequestMessage) SetReceivedAt

func (b *GetConnectedPeerInfoRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetConnectedPeerInfoResponseMessage

type GetConnectedPeerInfoResponseMessage struct {
	Infos []*GetConnectedPeerInfoMessage
	Error *RPCError
	// contains filtered or unexported fields
}

GetConnectedPeerInfoResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetConnectedPeerInfoResponseMessage

func NewGetConnectedPeerInfoResponseMessage(infos []*GetConnectedPeerInfoMessage) *GetConnectedPeerInfoResponseMessage

NewGetConnectedPeerInfoResponseMessage returns a instance of the message

func (*GetConnectedPeerInfoResponseMessage) Command

Command returns the protocol command string for the message

func (*GetConnectedPeerInfoResponseMessage) MessageNumber

func (b *GetConnectedPeerInfoResponseMessage) MessageNumber() uint64

func (*GetConnectedPeerInfoResponseMessage) ReceivedAt

func (b *GetConnectedPeerInfoResponseMessage) ReceivedAt() time.Time

func (*GetConnectedPeerInfoResponseMessage) SetMessageNumber

func (b *GetConnectedPeerInfoResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetConnectedPeerInfoResponseMessage) SetReceivedAt

func (b *GetConnectedPeerInfoResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetHeadersRequestMessage

type GetHeadersRequestMessage struct {
	StartHash   string
	Limit       uint64
	IsAscending bool
	// contains filtered or unexported fields
}

GetHeadersRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetHeadersRequestMessage

func NewGetHeadersRequestMessage(startHash string, limit uint64, isAscending bool) *GetHeadersRequestMessage

NewGetHeadersRequestMessage returns a instance of the message

func (*GetHeadersRequestMessage) Command

Command returns the protocol command string for the message

func (*GetHeadersRequestMessage) MessageNumber

func (b *GetHeadersRequestMessage) MessageNumber() uint64

func (*GetHeadersRequestMessage) ReceivedAt

func (b *GetHeadersRequestMessage) ReceivedAt() time.Time

func (*GetHeadersRequestMessage) SetMessageNumber

func (b *GetHeadersRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetHeadersRequestMessage) SetReceivedAt

func (b *GetHeadersRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetHeadersResponseMessage

type GetHeadersResponseMessage struct {
	Headers []string

	Error *RPCError
	// contains filtered or unexported fields
}

GetHeadersResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetHeadersResponseMessage

func NewGetHeadersResponseMessage(headers []string) *GetHeadersResponseMessage

NewGetHeadersResponseMessage returns a instance of the message

func (*GetHeadersResponseMessage) Command

Command returns the protocol command string for the message

func (*GetHeadersResponseMessage) MessageNumber

func (b *GetHeadersResponseMessage) MessageNumber() uint64

func (*GetHeadersResponseMessage) ReceivedAt

func (b *GetHeadersResponseMessage) ReceivedAt() time.Time

func (*GetHeadersResponseMessage) SetMessageNumber

func (b *GetHeadersResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetHeadersResponseMessage) SetReceivedAt

func (b *GetHeadersResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetInfoRequestMessage

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

GetInfoRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetInfoRequestMessage

func NewGetInfoRequestMessage() *GetInfoRequestMessage

NewGetInfoRequestMessage returns a instance of the message

func (*GetInfoRequestMessage) Command

func (msg *GetInfoRequestMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*GetInfoRequestMessage) MessageNumber

func (b *GetInfoRequestMessage) MessageNumber() uint64

func (*GetInfoRequestMessage) ReceivedAt

func (b *GetInfoRequestMessage) ReceivedAt() time.Time

func (*GetInfoRequestMessage) SetMessageNumber

func (b *GetInfoRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetInfoRequestMessage) SetReceivedAt

func (b *GetInfoRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetInfoResponseMessage

type GetInfoResponseMessage struct {
	P2PID         string
	MempoolSize   uint64
	ServerVersion string
	IsUtxoIndexed bool
	IsSynced      bool

	Error *RPCError
	// contains filtered or unexported fields
}

GetInfoResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetInfoResponseMessage

func NewGetInfoResponseMessage(p2pID string, mempoolSize uint64, serverVersion string, isUtxoIndexed bool, isSynced bool) *GetInfoResponseMessage

NewGetInfoResponseMessage returns a instance of the message

func (*GetInfoResponseMessage) Command

func (msg *GetInfoResponseMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*GetInfoResponseMessage) MessageNumber

func (b *GetInfoResponseMessage) MessageNumber() uint64

func (*GetInfoResponseMessage) ReceivedAt

func (b *GetInfoResponseMessage) ReceivedAt() time.Time

func (*GetInfoResponseMessage) SetMessageNumber

func (b *GetInfoResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetInfoResponseMessage) SetReceivedAt

func (b *GetInfoResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetPeerAddressesKnownAddressMessage

type GetPeerAddressesKnownAddressMessage struct {
	Addr string
}

GetPeerAddressesKnownAddressMessage is an appmessage corresponding to its respective RPC message

type GetPeerAddressesRequestMessage

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

GetPeerAddressesRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetPeerAddressesRequestMessage

func NewGetPeerAddressesRequestMessage() *GetPeerAddressesRequestMessage

NewGetPeerAddressesRequestMessage returns a instance of the message

func (*GetPeerAddressesRequestMessage) Command

Command returns the protocol command string for the message

func (*GetPeerAddressesRequestMessage) MessageNumber

func (b *GetPeerAddressesRequestMessage) MessageNumber() uint64

func (*GetPeerAddressesRequestMessage) ReceivedAt

func (b *GetPeerAddressesRequestMessage) ReceivedAt() time.Time

func (*GetPeerAddressesRequestMessage) SetMessageNumber

func (b *GetPeerAddressesRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetPeerAddressesRequestMessage) SetReceivedAt

func (b *GetPeerAddressesRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetPeerAddressesResponseMessage

type GetPeerAddressesResponseMessage struct {
	Addresses       []*GetPeerAddressesKnownAddressMessage
	BannedAddresses []*GetPeerAddressesKnownAddressMessage

	Error *RPCError
	// contains filtered or unexported fields
}

GetPeerAddressesResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetPeerAddressesResponseMessage

func NewGetPeerAddressesResponseMessage(addresses []*GetPeerAddressesKnownAddressMessage, bannedAddresses []*GetPeerAddressesKnownAddressMessage) *GetPeerAddressesResponseMessage

NewGetPeerAddressesResponseMessage returns a instance of the message

func (*GetPeerAddressesResponseMessage) Command

Command returns the protocol command string for the message

func (*GetPeerAddressesResponseMessage) MessageNumber

func (b *GetPeerAddressesResponseMessage) MessageNumber() uint64

func (*GetPeerAddressesResponseMessage) ReceivedAt

func (b *GetPeerAddressesResponseMessage) ReceivedAt() time.Time

func (*GetPeerAddressesResponseMessage) SetMessageNumber

func (b *GetPeerAddressesResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetPeerAddressesResponseMessage) SetReceivedAt

func (b *GetPeerAddressesResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetSelectedTipHashRequestMessage

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

GetSelectedTipHashRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetSelectedTipHashRequestMessage

func NewGetSelectedTipHashRequestMessage() *GetSelectedTipHashRequestMessage

NewGetSelectedTipHashRequestMessage returns a instance of the message

func (*GetSelectedTipHashRequestMessage) Command

Command returns the protocol command string for the message

func (*GetSelectedTipHashRequestMessage) MessageNumber

func (b *GetSelectedTipHashRequestMessage) MessageNumber() uint64

func (*GetSelectedTipHashRequestMessage) ReceivedAt

func (b *GetSelectedTipHashRequestMessage) ReceivedAt() time.Time

func (*GetSelectedTipHashRequestMessage) SetMessageNumber

func (b *GetSelectedTipHashRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetSelectedTipHashRequestMessage) SetReceivedAt

func (b *GetSelectedTipHashRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetSelectedTipHashResponseMessage

type GetSelectedTipHashResponseMessage struct {
	SelectedTipHash string

	Error *RPCError
	// contains filtered or unexported fields
}

GetSelectedTipHashResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetSelectedTipHashResponseMessage

func NewGetSelectedTipHashResponseMessage(selectedTipHash string) *GetSelectedTipHashResponseMessage

NewGetSelectedTipHashResponseMessage returns a instance of the message

func (*GetSelectedTipHashResponseMessage) Command

Command returns the protocol command string for the message

func (*GetSelectedTipHashResponseMessage) MessageNumber

func (b *GetSelectedTipHashResponseMessage) MessageNumber() uint64

func (*GetSelectedTipHashResponseMessage) ReceivedAt

func (b *GetSelectedTipHashResponseMessage) ReceivedAt() time.Time

func (*GetSelectedTipHashResponseMessage) SetMessageNumber

func (b *GetSelectedTipHashResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetSelectedTipHashResponseMessage) SetReceivedAt

func (b *GetSelectedTipHashResponseMessage) SetReceivedAt(receivedAt time.Time)

type GetVirtualSelectedParentChainFromBlockRequestMessage

type GetVirtualSelectedParentChainFromBlockRequestMessage struct {
	StartHash                     string
	IncludeAcceptedTransactionIDs bool
	// contains filtered or unexported fields
}

GetVirtualSelectedParentChainFromBlockRequestMessage is an appmessage corresponding to its respective RPC message

func NewGetVirtualSelectedParentChainFromBlockRequestMessage

func NewGetVirtualSelectedParentChainFromBlockRequestMessage(
	startHash string, includeAcceptedTransactionIDs bool) *GetVirtualSelectedParentChainFromBlockRequestMessage

NewGetVirtualSelectedParentChainFromBlockRequestMessage returns a instance of the message

func (*GetVirtualSelectedParentChainFromBlockRequestMessage) Command

Command returns the protocol command string for the message

func (*GetVirtualSelectedParentChainFromBlockRequestMessage) MessageNumber

func (b *GetVirtualSelectedParentChainFromBlockRequestMessage) MessageNumber() uint64

func (*GetVirtualSelectedParentChainFromBlockRequestMessage) ReceivedAt

func (b *GetVirtualSelectedParentChainFromBlockRequestMessage) ReceivedAt() time.Time

func (*GetVirtualSelectedParentChainFromBlockRequestMessage) SetMessageNumber

func (b *GetVirtualSelectedParentChainFromBlockRequestMessage) SetMessageNumber(messageNumber uint64)

func (*GetVirtualSelectedParentChainFromBlockRequestMessage) SetReceivedAt

func (b *GetVirtualSelectedParentChainFromBlockRequestMessage) SetReceivedAt(receivedAt time.Time)

type GetVirtualSelectedParentChainFromBlockResponseMessage

type GetVirtualSelectedParentChainFromBlockResponseMessage struct {
	RemovedChainBlockHashes []string
	AddedChainBlockHashes   []string
	AcceptedTransactionIDs  []*AcceptedTransactionIDs

	Error *RPCError
	// contains filtered or unexported fields
}

GetVirtualSelectedParentChainFromBlockResponseMessage is an appmessage corresponding to its respective RPC message

func NewGetVirtualSelectedParentChainFromBlockResponseMessage

func NewGetVirtualSelectedParentChainFromBlockResponseMessage(removedChainBlockHashes,
	addedChainBlockHashes []string, acceptedTransactionIDs []*AcceptedTransactionIDs) *GetVirtualSelectedParentChainFromBlockResponseMessage

NewGetVirtualSelectedParentChainFromBlockResponseMessage returns a instance of the message

func (*GetVirtualSelectedParentChainFromBlockResponseMessage) Command

Command returns the protocol command string for the message

func (*GetVirtualSelectedParentChainFromBlockResponseMessage) MessageNumber

func (b *GetVirtualSelectedParentChainFromBlockResponseMessage) MessageNumber() uint64

func (*GetVirtualSelectedParentChainFromBlockResponseMessage) ReceivedAt

func (b *GetVirtualSelectedParentChainFromBlockResponseMessage) ReceivedAt() time.Time

func (*GetVirtualSelectedParentChainFromBlockResponseMessage) SetMessageNumber

func (b *GetVirtualSelectedParentChainFromBlockResponseMessage) SetMessageNumber(messageNumber uint64)

func (*GetVirtualSelectedParentChainFromBlockResponseMessage) SetReceivedAt

func (b *GetVirtualSelectedParentChainFromBlockResponseMessage) SetReceivedAt(receivedAt time.Time)

type Message

type Message interface {
	Command() MessageCommand
	MessageNumber() uint64
	SetMessageNumber(index uint64)
	ReceivedAt() time.Time
	SetReceivedAt(receivedAt time.Time)
}

type MessageCommand

type MessageCommand uint32

MessageCommand is a number in the header of a message that represents its type.

const (
	// protocol
	CmdVersion MessageCommand = iota
	CmdVerAck
	CmdRequestAddresses
	CmdAddresses
	CmdReady
	CmdReject
	CmdNotifyNewBlockTemplateResponseMessage
	CmdNewBlockTemplateNotificationMessage
	CmdNotifyNewBlockTemplateRequestMessage
	CmdBlock
	CmdGetBlockTemplateRequestMessage
	CmdSubmitBlockResponseMessage
	CmdSubmitBlockRequestMessage
	CmdGetBlockTemplateResponseMessage
	CmdGetBlockDAGInfoResponseMessage
	CmdGetBlockDAGInfoRequestMessage
	CmdGetBalanceByAddressResponseMessage
	CmdGetBalanceByAddressRequestMessage
	CmdEstimateNetworkHashesPerSecondResponseMessage
	CmdEstimateNetworkHashesPerSecondRequestMessage

	//RPC
	CmdGetInfoRequestMessage
	CmdGetInfoResponseMessage

	//RPC Ban Peer
	CmdBanRequestMessage
	CmdBanResponseMessage

	//RPC Add Peer
	CmdAddPeerRequestMessage
	CmdAddPeerResponseMessage

	//RPC Get balance of multiple addresses
	CmdGetBalancesByAddressesRequestMessage
	CmdGetBalancesByAddressesResponseMessage

	//RPC Get block
	CmdGetBlockRequestMessage
	CmdGetBlockResponseMessage

	//RPC Get Block count
	CmdGetBlockCountRequestMessage
	CmdGetBlockCountResponseMessage

	//RPC Get Blocks
	CmdGetBlocksRequestMessage
	CmdGetBlocksResponseMessage

	//RPC Get Chain From Block
	CmdGetVirtualSelectedParentChainFromBlockRequestMessage
	CmdGetVirtualSelectedParentChainFromBlockResponseMessage

	//RPC Get Coin Supply
	CmdGetCoinSupplyRequestMessage
	CmdGetCoinSupplyResponseMessage

	//RPC Get Connected Peer info
	CmdGetConnectedPeerInfoRequestMessage
	CmdGetConnectedPeerInfoResponseMessage

	//RPC Get Header
	CmdGetHeadersRequestMessage
	CmdGetHeadersResponseMessage

	//RPC Get Peer Addresses
	CmdGetPeerAddressesRequestMessage
	CmdGetPeerAddressesResponseMessage

	//RPC Get Selected Tips Hash
	CmdGetSelectedTipHashRequestMessage
	CmdGetSelectedTipHashResponseMessage

	//RPC On Block Added
	CmdNotifyBlockAddedResponseMessage
	CmdNotifyBlockAddedRequestMessage
	CmdBlockAddedNotificationMessage

	// RPC Notify Finality Conflict
	CmdNotifyFinalityConflictsRequestMessage
	CmdNotifyFinalityConflictsResponseMessage
	CmdFinalityConflictNotificationMessage
	CmdFinalityConflictResolvedNotificationMessage

	//RPC Submit Transaction
	CmdSubmitTransactionRequestMessage
	CmdSubmitTransactionResponseMessage

	//RPC Unban
	CmdUnbanRequestMessage
	CmdUnbanResponseMessage
)

type MessageError

type MessageError struct {
	Func        string // Function name
	Description string // Human readable description of the issue
}

MessageError describes an issue with a message. An example of some potential issues are messages from the wrong Metchain network, invalid commands, mismatched checksums, and exceeding max payloads.

This provides a mechanism for the caller to type assert the error to differentiate between general io errors such as io.EOF and issues that resulted from malformed messages.

func (*MessageError) Error

func (e *MessageError) Error() string

Error satisfies the error interface and prints human-readable errors.

type MetchainNet

type MetchainNet uint32
const (
	Mainnet      MetchainNet = 0x3ddcf71d
	MaxInvPerMsg             = 1 << 17
)

type MsgAddresses

type MsgAddresses struct {
	AddressList []*NetAddress
	// contains filtered or unexported fields
}

MsgAddresses implements the Message interface and represents a Metchain Addresses message.

func NewMsgAddresses

func NewMsgAddresses(addressList []*NetAddress) *MsgAddresses

func (*MsgAddresses) Command

func (msg *MsgAddresses) Command() MessageCommand

Command returns the protocol command string for the message. This is part of the Message interface implementation.

func (*MsgAddresses) MessageNumber

func (b *MsgAddresses) MessageNumber() uint64

func (*MsgAddresses) ReceivedAt

func (b *MsgAddresses) ReceivedAt() time.Time

func (*MsgAddresses) SetMessageNumber

func (b *MsgAddresses) SetMessageNumber(messageNumber uint64)

func (*MsgAddresses) SetReceivedAt

func (b *MsgAddresses) SetReceivedAt(receivedAt time.Time)

type MsgReady

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

MsgReady implements the Message interface and represents a Metchain Ready message. It is used to notify that the peer is ready to receive messages.

This message has no payload.

func NewMsgReady

func NewMsgReady() *MsgReady

NewMsgReady returns a new Metchain Ready message that conforms to the Message interface.

func (*MsgReady) Command

func (msg *MsgReady) Command() MessageCommand

Command returns the protocol command string for the message. This is part of the Message interface implementation.

func (*MsgReady) MessageNumber

func (b *MsgReady) MessageNumber() uint64

func (*MsgReady) ReceivedAt

func (b *MsgReady) ReceivedAt() time.Time

func (*MsgReady) SetMessageNumber

func (b *MsgReady) SetMessageNumber(messageNumber uint64)

func (*MsgReady) SetReceivedAt

func (b *MsgReady) SetReceivedAt(receivedAt time.Time)

type MsgReject

type MsgReject struct {
	Reason string
	// contains filtered or unexported fields
}

MsgReject implements the Message interface and represents a Metchain Reject message. It is used to notify peers why they are banned.

func NewMsgReject

func NewMsgReject(reason string) *MsgReject

NewMsgReject returns a new Metchain Reject message that conforms to the Message interface.

func (*MsgReject) Command

func (msg *MsgReject) Command() MessageCommand

Command returns the protocol command string for the message. This is part of the Message interface implementation.

func (*MsgReject) MessageNumber

func (b *MsgReject) MessageNumber() uint64

func (*MsgReject) ReceivedAt

func (b *MsgReject) ReceivedAt() time.Time

func (*MsgReject) SetMessageNumber

func (b *MsgReject) SetMessageNumber(messageNumber uint64)

func (*MsgReject) SetReceivedAt

func (b *MsgReject) SetReceivedAt(receivedAt time.Time)

type MsgRequestAddresses

type MsgRequestAddresses struct {
	IncludeAllSubnetworks bool
	SubnetworkID          *external.DomainSubnetworkID
	// contains filtered or unexported fields
}

MsgRequestAddresses implements the Message interface and represents a Metchain RequestAddresses message. It is used to request a list of known active peers on the network from a peer to help identify potential nodes. The list is returned via one or more addr messages (MsgAddresses).

This message has no payload.

func NewMsgRequestAddresses

func NewMsgRequestAddresses(includeAllSubnetworks bool, subnetworkID *external.DomainSubnetworkID) *MsgRequestAddresses

NewMsgRequestAddresses returns a new Metchain RequestAddresses message that conforms to the Message interface. See MsgRequestAddresses for details.

func (*MsgRequestAddresses) Command

func (msg *MsgRequestAddresses) Command() MessageCommand

Command returns the protocol command string for the message. This is part of the Message interface implementation.

func (*MsgRequestAddresses) MessageNumber

func (b *MsgRequestAddresses) MessageNumber() uint64

func (*MsgRequestAddresses) ReceivedAt

func (b *MsgRequestAddresses) ReceivedAt() time.Time

func (*MsgRequestAddresses) SetMessageNumber

func (b *MsgRequestAddresses) SetMessageNumber(messageNumber uint64)

func (*MsgRequestAddresses) SetReceivedAt

func (b *MsgRequestAddresses) SetReceivedAt(receivedAt time.Time)

type MsgVerAck

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

func NewMsgVerAck

func NewMsgVerAck() *MsgVerAck

Message interface.

func (*MsgVerAck) Command

func (msg *MsgVerAck) Command() MessageCommand

Command returns the protocol command string for the message. This is part of the Message interface implementation.

func (*MsgVerAck) MessageNumber

func (b *MsgVerAck) MessageNumber() uint64

func (*MsgVerAck) ReceivedAt

func (b *MsgVerAck) ReceivedAt() time.Time

func (*MsgVerAck) SetMessageNumber

func (b *MsgVerAck) SetMessageNumber(messageNumber uint64)

func (*MsgVerAck) SetReceivedAt

func (b *MsgVerAck) SetReceivedAt(receivedAt time.Time)

type MsgVersion

type MsgVersion struct {

	// Version of the protocol the node is using.
	ProtocolVersion uint32

	// The peer's network (mainnet, testnet, etc.)
	Network string

	// Bitfield which identifies the enabled services.
	Services ServiceFlag

	// Time the message was generated. This is encoded as an int64 on the appmessage.
	Timestamp mstime.Time

	// Address of the local peer.
	Address *NetAddress

	// The peer unique ID
	ID *id.ID

	// The user agent that generated messsage. This is a encoded as a varString
	// on the appmessage. This has a max length of MaxUserAgentLen.
	UserAgent string

	// Don't announce transactions to peer.
	DisableRelayTx bool

	// The subnetwork of the generator of the version message. Should be nil in full nodes
	SubnetworkID *external.DomainSubnetworkID
	// contains filtered or unexported fields
}

func NewMsgVersion

func NewMsgVersion(addr *NetAddress, id *id.ID, network string,
	subnetworkID *external.DomainSubnetworkID, protocolVersion uint32) *MsgVersion

func (*MsgVersion) AddService

func (msg *MsgVersion) AddService(service ServiceFlag)

AddService adds service as a supported service by the peer generating the message.

func (*MsgVersion) AddUserAgent

func (msg *MsgVersion) AddUserAgent(name string, version string,
	comments ...string)

func (*MsgVersion) Command

func (msg *MsgVersion) Command() MessageCommand

Command returns the protocol command string for the message. This is part of the Message interface implementation.

func (*MsgVersion) HasService

func (msg *MsgVersion) HasService(service ServiceFlag) bool

HasService returns whether the specified service is supported by the peer that generated the message.

func (*MsgVersion) MessageNumber

func (b *MsgVersion) MessageNumber() uint64

func (*MsgVersion) ReceivedAt

func (b *MsgVersion) ReceivedAt() time.Time

func (*MsgVersion) SetMessageNumber

func (b *MsgVersion) SetMessageNumber(messageNumber uint64)

func (*MsgVersion) SetReceivedAt

func (b *MsgVersion) SetReceivedAt(receivedAt time.Time)

type NetAddress

type NetAddress struct {
	// Last time the address was seen.
	Timestamp mstime.Time

	// IP address of the peer.
	IP net.IP

	// Port the peer is using. This is encoded in big endian on the appmessage
	// which differs from most everything else.
	Port uint16
}

NetAddress defines information about a peer on the network including the time it was last seen, the services it supports, its IP address, and port.

func NewNetAddress

func NewNetAddress(addr *net.TCPAddr) *NetAddress

NewNetAddress returns a new NetAddress using the provided TCP address and supported services with defaults for the remaining fields.

func NewNetAddressIPPort

func NewNetAddressIPPort(ip net.IP, port uint16) *NetAddress

NewNetAddressIPPort returns a new NetAddress using the provided IP, port, and supported services with defaults for the remaining fields.

func NewNetAddressTimestamp

func NewNetAddressTimestamp(
	timestamp mstime.Time, ip net.IP, port uint16) *NetAddress

NewNetAddressTimestamp returns a new NetAddress using the provided timestamp, IP, port, and supported services. The timestamp is rounded to single millisecond precision.

func (NetAddress) String

func (na NetAddress) String() string

func (*NetAddress) TCPAddress

func (na *NetAddress) TCPAddress() *net.TCPAddr

TCPAddress converts the NetAddress to *net.TCPAddr

type NewBlockTemplateNotificationMessage

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

NewBlockTemplateNotificationMessage is an appmessage corresponding to its respective RPC message

func NewNewBlockTemplateNotificationMessage

func NewNewBlockTemplateNotificationMessage() *NewBlockTemplateNotificationMessage

NewNewBlockTemplateNotificationMessage returns an instance of the message

func (*NewBlockTemplateNotificationMessage) Command

Command returns the protocol command string for the message

func (*NewBlockTemplateNotificationMessage) MessageNumber

func (b *NewBlockTemplateNotificationMessage) MessageNumber() uint64

func (*NewBlockTemplateNotificationMessage) ReceivedAt

func (b *NewBlockTemplateNotificationMessage) ReceivedAt() time.Time

func (*NewBlockTemplateNotificationMessage) SetMessageNumber

func (b *NewBlockTemplateNotificationMessage) SetMessageNumber(messageNumber uint64)

func (*NewBlockTemplateNotificationMessage) SetReceivedAt

func (b *NewBlockTemplateNotificationMessage) SetReceivedAt(receivedAt time.Time)

type NotifyBlockAddedRequestMessage

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

NotifyBlockAddedRequestMessage is an appmessage corresponding to its respective RPC message

func NewNotifyBlockAddedRequestMessage

func NewNotifyBlockAddedRequestMessage() *NotifyBlockAddedRequestMessage

NewNotifyBlockAddedRequestMessage returns a instance of the message

func (*NotifyBlockAddedRequestMessage) Command

Command returns the protocol command string for the message

func (*NotifyBlockAddedRequestMessage) MessageNumber

func (b *NotifyBlockAddedRequestMessage) MessageNumber() uint64

func (*NotifyBlockAddedRequestMessage) ReceivedAt

func (b *NotifyBlockAddedRequestMessage) ReceivedAt() time.Time

func (*NotifyBlockAddedRequestMessage) SetMessageNumber

func (b *NotifyBlockAddedRequestMessage) SetMessageNumber(messageNumber uint64)

func (*NotifyBlockAddedRequestMessage) SetReceivedAt

func (b *NotifyBlockAddedRequestMessage) SetReceivedAt(receivedAt time.Time)

type NotifyBlockAddedResponseMessage

type NotifyBlockAddedResponseMessage struct {
	Error *RPCError
	// contains filtered or unexported fields
}

NotifyBlockAddedResponseMessage is an appmessage corresponding to its respective RPC message

func NewNotifyBlockAddedResponseMessage

func NewNotifyBlockAddedResponseMessage() *NotifyBlockAddedResponseMessage

NewNotifyBlockAddedResponseMessage returns a instance of the message

func (*NotifyBlockAddedResponseMessage) Command

Command returns the protocol command string for the message

func (*NotifyBlockAddedResponseMessage) MessageNumber

func (b *NotifyBlockAddedResponseMessage) MessageNumber() uint64

func (*NotifyBlockAddedResponseMessage) ReceivedAt

func (b *NotifyBlockAddedResponseMessage) ReceivedAt() time.Time

func (*NotifyBlockAddedResponseMessage) SetMessageNumber

func (b *NotifyBlockAddedResponseMessage) SetMessageNumber(messageNumber uint64)

func (*NotifyBlockAddedResponseMessage) SetReceivedAt

func (b *NotifyBlockAddedResponseMessage) SetReceivedAt(receivedAt time.Time)

type NotifyFinalityConflictsRequestMessage

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

NotifyFinalityConflictsRequestMessage is an appmessage corresponding to its respective RPC message

func NewNotifyFinalityConflictsRequestMessage

func NewNotifyFinalityConflictsRequestMessage() *NotifyFinalityConflictsRequestMessage

NewNotifyFinalityConflictsRequestMessage returns a instance of the message

func (*NotifyFinalityConflictsRequestMessage) Command

Command returns the protocol command string for the message

func (*NotifyFinalityConflictsRequestMessage) MessageNumber

func (b *NotifyFinalityConflictsRequestMessage) MessageNumber() uint64

func (*NotifyFinalityConflictsRequestMessage) ReceivedAt

func (b *NotifyFinalityConflictsRequestMessage) ReceivedAt() time.Time

func (*NotifyFinalityConflictsRequestMessage) SetMessageNumber

func (b *NotifyFinalityConflictsRequestMessage) SetMessageNumber(messageNumber uint64)

func (*NotifyFinalityConflictsRequestMessage) SetReceivedAt

func (b *NotifyFinalityConflictsRequestMessage) SetReceivedAt(receivedAt time.Time)

type NotifyFinalityConflictsResponseMessage

type NotifyFinalityConflictsResponseMessage struct {
	Error *RPCError
	// contains filtered or unexported fields
}

NotifyFinalityConflictsResponseMessage is an appmessage corresponding to its respective RPC message

func NewNotifyFinalityConflictsResponseMessage

func NewNotifyFinalityConflictsResponseMessage() *NotifyFinalityConflictsResponseMessage

NewNotifyFinalityConflictsResponseMessage returns a instance of the message

func (*NotifyFinalityConflictsResponseMessage) Command

Command returns the protocol command string for the message

func (*NotifyFinalityConflictsResponseMessage) MessageNumber

func (b *NotifyFinalityConflictsResponseMessage) MessageNumber() uint64

func (*NotifyFinalityConflictsResponseMessage) ReceivedAt

func (b *NotifyFinalityConflictsResponseMessage) ReceivedAt() time.Time

func (*NotifyFinalityConflictsResponseMessage) SetMessageNumber

func (b *NotifyFinalityConflictsResponseMessage) SetMessageNumber(messageNumber uint64)

func (*NotifyFinalityConflictsResponseMessage) SetReceivedAt

func (b *NotifyFinalityConflictsResponseMessage) SetReceivedAt(receivedAt time.Time)

type NotifyNewBlockTemplateRequestMessage

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

NotifyNewBlockTemplateRequestMessage is an appmessage corresponding to its respective RPC message

func NewNotifyNewBlockTemplateRequestMessage

func NewNotifyNewBlockTemplateRequestMessage() *NotifyNewBlockTemplateRequestMessage

NewNotifyNewBlockTemplateRequestMessage returns an instance of the message

func (*NotifyNewBlockTemplateRequestMessage) Command

Command returns the protocol command string for the message

func (*NotifyNewBlockTemplateRequestMessage) MessageNumber

func (b *NotifyNewBlockTemplateRequestMessage) MessageNumber() uint64

func (*NotifyNewBlockTemplateRequestMessage) ReceivedAt

func (b *NotifyNewBlockTemplateRequestMessage) ReceivedAt() time.Time

func (*NotifyNewBlockTemplateRequestMessage) SetMessageNumber

func (b *NotifyNewBlockTemplateRequestMessage) SetMessageNumber(messageNumber uint64)

func (*NotifyNewBlockTemplateRequestMessage) SetReceivedAt

func (b *NotifyNewBlockTemplateRequestMessage) SetReceivedAt(receivedAt time.Time)

type NotifyNewBlockTemplateResponseMessage

type NotifyNewBlockTemplateResponseMessage struct {
	Error *RPCError
	// contains filtered or unexported fields
}

NotifyNewBlockTemplateResponseMessage is an appmessage corresponding to its respective RPC message

func NewNotifyNewBlockTemplateResponseMessage

func NewNotifyNewBlockTemplateResponseMessage() *NotifyNewBlockTemplateResponseMessage

NewNotifyNewBlockTemplateResponseMessage returns an instance of the message

func (*NotifyNewBlockTemplateResponseMessage) Command

Command returns the protocol command string for the message

func (*NotifyNewBlockTemplateResponseMessage) MessageNumber

func (b *NotifyNewBlockTemplateResponseMessage) MessageNumber() uint64

func (*NotifyNewBlockTemplateResponseMessage) ReceivedAt

func (b *NotifyNewBlockTemplateResponseMessage) ReceivedAt() time.Time

func (*NotifyNewBlockTemplateResponseMessage) SetMessageNumber

func (b *NotifyNewBlockTemplateResponseMessage) SetMessageNumber(messageNumber uint64)

func (*NotifyNewBlockTemplateResponseMessage) SetReceivedAt

func (b *NotifyNewBlockTemplateResponseMessage) SetReceivedAt(receivedAt time.Time)

type RPCBlock

type RPCBlock struct {
	Header *RPCBlockHeader

	VerboseData *RPCBlockVerboseData
}

RPCBlock is a Metchaind block representation meant to be used over RPC

func DomainBlockToRPCBlock

func DomainBlockToRPCBlock(block *external.DomainBlock) (*RPCBlock, *external.DomainBlock)

type RPCBlockHeader

type RPCBlockHeader struct {
	Version              uint32
	Parents              []*RPCBlockLevelParents
	HashMerkleRoot       string
	AcceptedIDMerkleRoot string
	UTXOCommitment       string
	Timestamp            int64
	Bits                 uint32
	Nonce                uint64
}

RPCBlockHeader is a Metchaind block header representation meant to be used over RPC

type RPCBlockLevelParents

type RPCBlockLevelParents struct {
	ParentHashes []string
}

RPCBlockLevelParents holds parent hashes for one block level

type RPCBlockVerboseData

type RPCBlockVerboseData struct {
	Hash                string
	Difficulty          float64
	SelectedParentHash  string
	TransactionIDs      []string
	IsHeaderOnly        bool
	BlueScore           uint64
	ChildrenHashes      []string
	MergeSetBluesHashes []string
	MergeSetRedsHashes  []string
	IsChainBlock        bool
}

RPCBlockVerboseData holds verbose data about a block

type RPCError

type RPCError struct {
	Message string
}

RPCError represents an error arriving from the RPC

func RPCErrorf

func RPCErrorf(format string, args ...interface{}) *RPCError

RPCErrorf formats according to a format specifier and returns the string as an RPCError.

func (RPCError) Error

func (err RPCError) Error() string

type RPCOutpoint

type RPCOutpoint struct {
	TransactionID string
	Index         uint32
}

RPCOutpoint is a karlsend outpoint representation meant to be used over RPC

type RPCScriptPublicKey

type RPCScriptPublicKey struct {
	Version uint16
	Script  string
}

RPCScriptPublicKey is a karlsend ScriptPublicKey representation

type RPCTransaction

type RPCTransaction struct {
	Version      uint16
	Inputs       []*RPCTransactionInput
	Outputs      []*RPCTransactionOutput
	LockTime     uint64
	SubnetworkID string
	Gas          uint64
	Payload      string
	VerboseData  *RPCTransactionVerboseData
}

RPCTransaction is a karlsend transaction representation meant to be used over RPC

type RPCTransactionInput

type RPCTransactionInput struct {
	PreviousOutpoint *RPCOutpoint
	SignatureScript  string
	Sequence         uint64
	SigOpCount       byte
	VerboseData      *RPCTransactionInputVerboseData
}

RPCTransactionInput is a karlsend transaction input representation meant to be used over RPC

type RPCTransactionInputVerboseData

type RPCTransactionInputVerboseData struct {
}

RPCTransactionInputVerboseData holds data about a transaction input

type RPCTransactionOutput

type RPCTransactionOutput struct {
	Amount          uint64
	ScriptPublicKey *RPCScriptPublicKey
	VerboseData     *RPCTransactionOutputVerboseData
}

RPCTransactionOutput is a karlsend transaction output representation meant to be used over RPC

type RPCTransactionOutputVerboseData

type RPCTransactionOutputVerboseData struct {
	ScriptPublicKeyType    string
	ScriptPublicKeyAddress string
}

RPCTransactionOutputVerboseData holds data about a transaction output

type RPCTransactionVerboseData

type RPCTransactionVerboseData struct {
	TransactionID string
	Hash          string
	Mass          uint64
	BlockHash     string
	BlockTime     uint64
}

RPCTransactionVerboseData holds verbose data about a transaction

type RPCUTXOEntry

type RPCUTXOEntry struct {
	Amount          uint64
	ScriptPublicKey *RPCScriptPublicKey
	BlockDAAScore   uint64
	IsCoinbase      bool
}

RPCUTXOEntry is a karlsend utxo entry representation meant to be used over RPC

type RejectReason

type RejectReason byte

RejectReason describes the reason why a block sent by SubmitBlock was rejected

const (
	RejectReasonNone         RejectReason = 0
	RejectReasonBlockInvalid RejectReason = 1
	RejectReasonIsInIBD      RejectReason = 2
)

RejectReason constants Not using iota, since in the .proto file those are hardcoded

func (RejectReason) String

func (rr RejectReason) String() string

type ServiceFlag

type ServiceFlag uint64
const (
	// SFNodeNetwork is a flag used to indicate a peer is a full node.
	SFNodeNetwork ServiceFlag = 1 << iota

	// SFNodeGetUTXO is a flag used to indicate a peer supports the
	// getutxos and utxos commands (BIP0064).
	SFNodeGetUTXO

	// SFNodeBloom is a flag used to indicate a peer supports bloom
	// filtering.
	SFNodeBloom

	// SFNodeXthin is a flag used to indicate a peer supports xthin blocks.
	SFNodeXthin

	// SFNodeBit5 is a flag used to indicate a peer supports a service
	// defined by bit 5.
	SFNodeBit5

	// SFNodeCF is a flag used to indicate a peer supports committed
	// filters (CFs).
	SFNodeCF
)

type SubmitBlockRequestMessage

type SubmitBlockRequestMessage struct {
	Block             *RPCBlock
	AllowNonDAABlocks bool
	// contains filtered or unexported fields
}

func NewSubmitBlockRequestMessage

func NewSubmitBlockRequestMessage(block *RPCBlock, allowNonDAABlocks bool) *SubmitBlockRequestMessage

NewSubmitBlockRequestMessage returns a instance of the message

func (*SubmitBlockRequestMessage) Command

Command returns the protocol command string for the message

func (*SubmitBlockRequestMessage) MessageNumber

func (b *SubmitBlockRequestMessage) MessageNumber() uint64

func (*SubmitBlockRequestMessage) ReceivedAt

func (b *SubmitBlockRequestMessage) ReceivedAt() time.Time

func (*SubmitBlockRequestMessage) SetMessageNumber

func (b *SubmitBlockRequestMessage) SetMessageNumber(messageNumber uint64)

func (*SubmitBlockRequestMessage) SetReceivedAt

func (b *SubmitBlockRequestMessage) SetReceivedAt(receivedAt time.Time)

type SubmitBlockResponseMessage

type SubmitBlockResponseMessage struct {
	RejectReason RejectReason
	Error        *RPCError
	// contains filtered or unexported fields
}

SubmitBlockResponseMessage is an appmessage corresponding to its respective RPC message

func NewSubmitBlockResponseMessage

func NewSubmitBlockResponseMessage() *SubmitBlockResponseMessage

NewSubmitBlockResponseMessage returns an instance of the message

func (*SubmitBlockResponseMessage) Command

Command returns the protocol command string for the message

func (*SubmitBlockResponseMessage) MessageNumber

func (b *SubmitBlockResponseMessage) MessageNumber() uint64

func (*SubmitBlockResponseMessage) ReceivedAt

func (b *SubmitBlockResponseMessage) ReceivedAt() time.Time

func (*SubmitBlockResponseMessage) SetMessageNumber

func (b *SubmitBlockResponseMessage) SetMessageNumber(messageNumber uint64)

func (*SubmitBlockResponseMessage) SetReceivedAt

func (b *SubmitBlockResponseMessage) SetReceivedAt(receivedAt time.Time)

type SubmitTransactionRequestMessage

type SubmitTransactionRequestMessage struct {
	Transaction *RPCTransaction
	AllowOrphan bool
	// contains filtered or unexported fields
}

SubmitTransactionRequestMessage is an appmessage corresponding to its respective RPC message

func NewSubmitTransactionRequestMessage

func NewSubmitTransactionRequestMessage(transaction *RPCTransaction, allowOrphan bool) *SubmitTransactionRequestMessage

NewSubmitTransactionRequestMessage returns a instance of the message

func (*SubmitTransactionRequestMessage) Command

Command returns the protocol command string for the message

func (*SubmitTransactionRequestMessage) MessageNumber

func (b *SubmitTransactionRequestMessage) MessageNumber() uint64

func (*SubmitTransactionRequestMessage) ReceivedAt

func (b *SubmitTransactionRequestMessage) ReceivedAt() time.Time

func (*SubmitTransactionRequestMessage) SetMessageNumber

func (b *SubmitTransactionRequestMessage) SetMessageNumber(messageNumber uint64)

func (*SubmitTransactionRequestMessage) SetReceivedAt

func (b *SubmitTransactionRequestMessage) SetReceivedAt(receivedAt time.Time)

type SubmitTransactionResponseMessage

type SubmitTransactionResponseMessage struct {
	TransactionID string

	Error *RPCError
	// contains filtered or unexported fields
}

SubmitTransactionResponseMessage is an appmessage corresponding to its respective RPC message

func NewSubmitTransactionResponseMessage

func NewSubmitTransactionResponseMessage(transactionID string) *SubmitTransactionResponseMessage

NewSubmitTransactionResponseMessage returns a instance of the message

func (*SubmitTransactionResponseMessage) Command

Command returns the protocol command string for the message

func (*SubmitTransactionResponseMessage) MessageNumber

func (b *SubmitTransactionResponseMessage) MessageNumber() uint64

func (*SubmitTransactionResponseMessage) ReceivedAt

func (b *SubmitTransactionResponseMessage) ReceivedAt() time.Time

func (*SubmitTransactionResponseMessage) SetMessageNumber

func (b *SubmitTransactionResponseMessage) SetMessageNumber(messageNumber uint64)

func (*SubmitTransactionResponseMessage) SetReceivedAt

func (b *SubmitTransactionResponseMessage) SetReceivedAt(receivedAt time.Time)

type UnbanRequestMessage

type UnbanRequestMessage struct {
	IP string
	// contains filtered or unexported fields
}

UnbanRequestMessage is an appmessage corresponding to its respective RPC message

func NewUnbanRequestMessage

func NewUnbanRequestMessage(ip string) *UnbanRequestMessage

NewUnbanRequestMessage returns an instance of the message

func (*UnbanRequestMessage) Command

func (msg *UnbanRequestMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*UnbanRequestMessage) MessageNumber

func (b *UnbanRequestMessage) MessageNumber() uint64

func (*UnbanRequestMessage) ReceivedAt

func (b *UnbanRequestMessage) ReceivedAt() time.Time

func (*UnbanRequestMessage) SetMessageNumber

func (b *UnbanRequestMessage) SetMessageNumber(messageNumber uint64)

func (*UnbanRequestMessage) SetReceivedAt

func (b *UnbanRequestMessage) SetReceivedAt(receivedAt time.Time)

type UnbanResponseMessage

type UnbanResponseMessage struct {
	Error *RPCError
	// contains filtered or unexported fields
}

UnbanResponseMessage is an appmessage corresponding to its respective RPC message

func NewUnbanResponseMessage

func NewUnbanResponseMessage() *UnbanResponseMessage

NewUnbanResponseMessage returns a instance of the message

func (*UnbanResponseMessage) Command

func (msg *UnbanResponseMessage) Command() MessageCommand

Command returns the protocol command string for the message

func (*UnbanResponseMessage) MessageNumber

func (b *UnbanResponseMessage) MessageNumber() uint64

func (*UnbanResponseMessage) ReceivedAt

func (b *UnbanResponseMessage) ReceivedAt() time.Time

func (*UnbanResponseMessage) SetMessageNumber

func (b *UnbanResponseMessage) SetMessageNumber(messageNumber uint64)

func (*UnbanResponseMessage) SetReceivedAt

func (b *UnbanResponseMessage) SetReceivedAt(receivedAt time.Time)

Jump to

Keyboard shortcuts

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