Documentation ¶
Overview ¶
Package appmessage implements the ice appmessage protocol.
At a high level, this package provides support for marshalling and unmarshalling supported ice messages to and from the appmessage. This package does not deal with the specifics of message handling such as what to do when a message is received. This provides the caller with a high level of flexibility.
Ice Message Overview ¶
The ice protocol consists of exchanging messages between peers. Each message is preceded by a header which identifies information about it such as which ice network it is a part of, its type, how big it is, and a checksum to verify validity. All encoding and decoding of message headers is handled by this package.
To accomplish this, there is a generic interface for ice messages named Message which allows messages of any type to be read, written, or passed around through channels, functions, etc. In addition, concrete implementations of most of the currently supported ice messages are provided. For these supported messages, all of the details of marshalling and unmarshalling to and from the appmessage using ice encoding are handled so the caller doesn't have to concern themselves with the specifics.
Message Interaction ¶
The following provides a quick summary of how the ice messages are intended to interact with one another. As stated above, these interactions are not directly handled by this package.
The initial handshake consists of two peers sending each other a version message (MsgVersion) followed by responding with a verack message (MsgVerAck). Both peers use the information in the version message (MsgVersion) to negotiate things such as protocol version and supported services with each other. Once the initial handshake is complete, the following chart indicates message interactions in no particular order.
Peer A Sends Peer B Responds ---------------------------------------------------------------------------- getaddr message (MsgRequestAddresses) addr message (MsgAddresses) getblockinvs message (MsgGetBlockInvs) inv message (MsgInv) inv message (MsgInv) getdata message (MsgGetData) getdata message (MsgGetData) block message (MsgBlock) -or- tx message (MsgTx) -or- notfound message (MsgNotFound) ping message (MsgPing) pong message (MsgPong)
Common Parameters ¶
There are several common parameters that arise when using this package to read and write ice messages. The following sections provide a quick overview of these parameters so the next sections can build on them.
Protocol Version ¶
The protocol version should be negotiated with the remote peer at a higher level than this package via the version (MsgVersion) message exchange, however, this package provides the appmessage.ProtocolVersion constant which indicates the latest protocol version this package supports and is typically the value to use for all outbound connections before a potentially lower protocol version is negotiated.
Ice Network ¶
The ice network is a magic number which is used to identify the start of a message and which ice network the message applies to. This package provides the following constants:
appmessage.Mainnet appmessage.Testnet (Test network) appmessage.Simnet (Simulation test network) appmessage.Devnet (Development network)
Determining Message Type ¶
As discussed in the ice message overview section, this package reads and writes ice messages using a generic interface named Message. In order to determine the actual concrete type of the message, use a type switch or type assertion. An example of a type switch follows:
// Assumes msg is already a valid concrete message such as one created // via NewMsgVersion or read via ReadMessage. switch msg := msg.(type) { case *appmessage.MsgVersion: // The message is a pointer to a MsgVersion struct. fmt.Printf("Protocol version: %d", msg.ProtocolVersion) case *appmessage.MsgBlock: // The message is a pointer to a MsgBlock struct. fmt.Printf("Number of tx in block: %d", msg.Header.TxnCount) }
Reading Messages ¶
In order to unmarshall ice messages from the appmessage, use the ReadMessage function. It accepts any io.Reader, but typically this will be a net.Conn to a remote node running a ice peer. Example syntax is:
// Reads and validates the next ice message from conn using the // protocol version pver and the ice network iceNet. The returns // are a appmessage.Message, a []byte which contains the unmarshalled // raw payload, and a possible error. msg, rawPayload, err := appmessage.ReadMessage(conn, pver, iceNet) if err != nil { // Log and handle the error }
Writing Messages ¶
In order to marshall ice messages to the appmessage, use the WriteMessage function. It accepts any io.Writer, but typically this will be a net.Conn to a remote node running a ice peer. Example syntax to request addresses from a remote peer is:
// Create a new getaddr ice message. msg := appmessage.NewMsgRequestAddresses() // Writes a ice message msg to conn using the protocol version // pver, and the ice network iceNet. The return is a possible // error. err := appmessage.WriteMessage(conn, msg, pver, iceNet) if err != nil { // Log and handle the error }
Errors ¶
Errors returned by this package are either the raw errors provided by underlying calls to read/write from streams such as io.EOF, io.ErrUnexpectedEOF, and io.ErrShortWrite, or of type appmessage.MessageError. This allows the caller to differentiate between general IO errors and malformed messages through type assertions.
Index ¶
- Constants
- Variables
- func BlockHeaderToDomainBlockHeader(blockHeader *MsgBlockHeader) externalapi.BlockHeader
- func BlockWithTrustedDataToDomainBlockWithTrustedData(block *MsgBlockWithTrustedData) *externalapi.BlockWithTrustedData
- func GHOSTDAGHashPairToDomainGHOSTDAGHashPair(datum *BlockGHOSTDAGDataHashPair) *externalapi.BlockGHOSTDAGDataHashPair
- func MsgBlockToDomainBlock(msgBlock *MsgBlock) *externalapi.DomainBlock
- func MsgPruningPointProofToDomainPruningPointProof(pruningPointProofMessage *MsgPruningPointProof) *externalapi.PruningPointProof
- func MsgTxToDomainTransaction(msgTx *MsgTx) *externalapi.DomainTransaction
- func OutpointAndUTXOEntryPairsToDomainOutpointAndUTXOEntryPairs(outpointAndUTXOEntryPairs []*OutpointAndUTXOEntryPair) []*externalapi.OutpointAndUTXOEntryPair
- func RPCBlockToDomainBlock(block *RPCBlock) (*externalapi.DomainBlock, error)
- func RPCOutpointToDomainOutpoint(outpoint *RPCOutpoint) (*externalapi.DomainOutpoint, error)
- func RPCTransactionToDomainTransaction(rpcTransaction *RPCTransaction) (*externalapi.DomainTransaction, error)
- func RPCUTXOEntryToUTXOEntry(entry *RPCUTXOEntry) (externalapi.UTXOEntry, error)
- func TrustedDataDataDAABlockV4ToTrustedDataDataDAAHeader(daaBlock *TrustedDataDAAHeader) *externalapi.TrustedDataDataDAAHeader
- func ValidateUserAgent(userAgent string) error
- type AcceptedTransactionIDs
- type AddPeerRequestMessage
- func (msg *AddPeerRequestMessage) Command() MessageCommand
- func (b *AddPeerRequestMessage) MessageNumber() uint64
- func (b *AddPeerRequestMessage) ReceivedAt() time.Time
- func (b *AddPeerRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *AddPeerRequestMessage) SetReceivedAt(receivedAt time.Time)
- type AddPeerResponseMessage
- func (msg *AddPeerResponseMessage) Command() MessageCommand
- func (b *AddPeerResponseMessage) MessageNumber() uint64
- func (b *AddPeerResponseMessage) ReceivedAt() time.Time
- func (b *AddPeerResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *AddPeerResponseMessage) SetReceivedAt(receivedAt time.Time)
- type BalancesByAddressesEntry
- type BanRequestMessage
- type BanResponseMessage
- type BlockAddedNotificationMessage
- func (msg *BlockAddedNotificationMessage) Command() MessageCommand
- func (b *BlockAddedNotificationMessage) MessageNumber() uint64
- func (b *BlockAddedNotificationMessage) ReceivedAt() time.Time
- func (b *BlockAddedNotificationMessage) SetMessageNumber(messageNumber uint64)
- func (b *BlockAddedNotificationMessage) SetReceivedAt(receivedAt time.Time)
- type BlockGHOSTDAGData
- type BlockGHOSTDAGDataHashPair
- type BlockHeadersMessage
- type BluesAnticoneSizes
- type EstimateNetworkHashesPerSecondRequestMessage
- func (msg *EstimateNetworkHashesPerSecondRequestMessage) Command() MessageCommand
- func (b *EstimateNetworkHashesPerSecondRequestMessage) MessageNumber() uint64
- func (b *EstimateNetworkHashesPerSecondRequestMessage) ReceivedAt() time.Time
- func (b *EstimateNetworkHashesPerSecondRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *EstimateNetworkHashesPerSecondRequestMessage) SetReceivedAt(receivedAt time.Time)
- type EstimateNetworkHashesPerSecondResponseMessage
- func (msg *EstimateNetworkHashesPerSecondResponseMessage) Command() MessageCommand
- func (b *EstimateNetworkHashesPerSecondResponseMessage) MessageNumber() uint64
- func (b *EstimateNetworkHashesPerSecondResponseMessage) ReceivedAt() time.Time
- func (b *EstimateNetworkHashesPerSecondResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *EstimateNetworkHashesPerSecondResponseMessage) SetReceivedAt(receivedAt time.Time)
- type FinalityConflictNotificationMessage
- func (msg *FinalityConflictNotificationMessage) Command() MessageCommand
- func (b *FinalityConflictNotificationMessage) MessageNumber() uint64
- func (b *FinalityConflictNotificationMessage) ReceivedAt() time.Time
- func (b *FinalityConflictNotificationMessage) SetMessageNumber(messageNumber uint64)
- func (b *FinalityConflictNotificationMessage) SetReceivedAt(receivedAt time.Time)
- type FinalityConflictResolvedNotificationMessage
- func (msg *FinalityConflictResolvedNotificationMessage) Command() MessageCommand
- func (b *FinalityConflictResolvedNotificationMessage) MessageNumber() uint64
- func (b *FinalityConflictResolvedNotificationMessage) ReceivedAt() time.Time
- func (b *FinalityConflictResolvedNotificationMessage) SetMessageNumber(messageNumber uint64)
- func (b *FinalityConflictResolvedNotificationMessage) SetReceivedAt(receivedAt time.Time)
- type GetBalanceByAddressRequestMessage
- func (msg *GetBalanceByAddressRequestMessage) Command() MessageCommand
- func (b *GetBalanceByAddressRequestMessage) MessageNumber() uint64
- func (b *GetBalanceByAddressRequestMessage) ReceivedAt() time.Time
- func (b *GetBalanceByAddressRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBalanceByAddressRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetBalanceByAddressResponseMessage
- func (msg *GetBalanceByAddressResponseMessage) Command() MessageCommand
- func (b *GetBalanceByAddressResponseMessage) MessageNumber() uint64
- func (b *GetBalanceByAddressResponseMessage) ReceivedAt() time.Time
- func (b *GetBalanceByAddressResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBalanceByAddressResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetBalancesByAddressesRequestMessage
- func (msg *GetBalancesByAddressesRequestMessage) Command() MessageCommand
- func (b *GetBalancesByAddressesRequestMessage) MessageNumber() uint64
- func (b *GetBalancesByAddressesRequestMessage) ReceivedAt() time.Time
- func (b *GetBalancesByAddressesRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBalancesByAddressesRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetBalancesByAddressesResponseMessage
- func (msg *GetBalancesByAddressesResponseMessage) Command() MessageCommand
- func (b *GetBalancesByAddressesResponseMessage) MessageNumber() uint64
- func (b *GetBalancesByAddressesResponseMessage) ReceivedAt() time.Time
- func (b *GetBalancesByAddressesResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBalancesByAddressesResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetBlockCountRequestMessage
- func (msg *GetBlockCountRequestMessage) Command() MessageCommand
- func (b *GetBlockCountRequestMessage) MessageNumber() uint64
- func (b *GetBlockCountRequestMessage) ReceivedAt() time.Time
- func (b *GetBlockCountRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBlockCountRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetBlockCountResponseMessage
- func (msg *GetBlockCountResponseMessage) Command() MessageCommand
- func (b *GetBlockCountResponseMessage) MessageNumber() uint64
- func (b *GetBlockCountResponseMessage) ReceivedAt() time.Time
- func (b *GetBlockCountResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBlockCountResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetBlockDAGInfoRequestMessage
- func (msg *GetBlockDAGInfoRequestMessage) Command() MessageCommand
- func (b *GetBlockDAGInfoRequestMessage) MessageNumber() uint64
- func (b *GetBlockDAGInfoRequestMessage) ReceivedAt() time.Time
- func (b *GetBlockDAGInfoRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBlockDAGInfoRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetBlockDAGInfoResponseMessage
- func (msg *GetBlockDAGInfoResponseMessage) Command() MessageCommand
- func (b *GetBlockDAGInfoResponseMessage) MessageNumber() uint64
- func (b *GetBlockDAGInfoResponseMessage) ReceivedAt() time.Time
- func (b *GetBlockDAGInfoResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBlockDAGInfoResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetBlockRequestMessage
- func (msg *GetBlockRequestMessage) Command() MessageCommand
- func (b *GetBlockRequestMessage) MessageNumber() uint64
- func (b *GetBlockRequestMessage) ReceivedAt() time.Time
- func (b *GetBlockRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBlockRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetBlockResponseMessage
- func (msg *GetBlockResponseMessage) Command() MessageCommand
- func (b *GetBlockResponseMessage) MessageNumber() uint64
- func (b *GetBlockResponseMessage) ReceivedAt() time.Time
- func (b *GetBlockResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBlockResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetBlockTemplateRequestMessage
- func (msg *GetBlockTemplateRequestMessage) Command() MessageCommand
- func (b *GetBlockTemplateRequestMessage) MessageNumber() uint64
- func (b *GetBlockTemplateRequestMessage) ReceivedAt() time.Time
- func (b *GetBlockTemplateRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBlockTemplateRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetBlockTemplateResponseMessage
- func (msg *GetBlockTemplateResponseMessage) Command() MessageCommand
- func (b *GetBlockTemplateResponseMessage) MessageNumber() uint64
- func (b *GetBlockTemplateResponseMessage) ReceivedAt() time.Time
- func (b *GetBlockTemplateResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBlockTemplateResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetBlocksRequestMessage
- func (msg *GetBlocksRequestMessage) Command() MessageCommand
- func (b *GetBlocksRequestMessage) MessageNumber() uint64
- func (b *GetBlocksRequestMessage) ReceivedAt() time.Time
- func (b *GetBlocksRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBlocksRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetBlocksResponseMessage
- func (msg *GetBlocksResponseMessage) Command() MessageCommand
- func (b *GetBlocksResponseMessage) MessageNumber() uint64
- func (b *GetBlocksResponseMessage) ReceivedAt() time.Time
- func (b *GetBlocksResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetBlocksResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetCoinSupplyRequestMessage
- func (msg *GetCoinSupplyRequestMessage) Command() MessageCommand
- func (b *GetCoinSupplyRequestMessage) MessageNumber() uint64
- func (b *GetCoinSupplyRequestMessage) ReceivedAt() time.Time
- func (b *GetCoinSupplyRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetCoinSupplyRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetCoinSupplyResponseMessage
- func (msg *GetCoinSupplyResponseMessage) Command() MessageCommand
- func (b *GetCoinSupplyResponseMessage) MessageNumber() uint64
- func (b *GetCoinSupplyResponseMessage) ReceivedAt() time.Time
- func (b *GetCoinSupplyResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetCoinSupplyResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetConnectedPeerInfoMessage
- type GetConnectedPeerInfoRequestMessage
- func (msg *GetConnectedPeerInfoRequestMessage) Command() MessageCommand
- func (b *GetConnectedPeerInfoRequestMessage) MessageNumber() uint64
- func (b *GetConnectedPeerInfoRequestMessage) ReceivedAt() time.Time
- func (b *GetConnectedPeerInfoRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetConnectedPeerInfoRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetConnectedPeerInfoResponseMessage
- func (msg *GetConnectedPeerInfoResponseMessage) Command() MessageCommand
- func (b *GetConnectedPeerInfoResponseMessage) MessageNumber() uint64
- func (b *GetConnectedPeerInfoResponseMessage) ReceivedAt() time.Time
- func (b *GetConnectedPeerInfoResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetConnectedPeerInfoResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetCurrentNetworkRequestMessage
- func (msg *GetCurrentNetworkRequestMessage) Command() MessageCommand
- func (b *GetCurrentNetworkRequestMessage) MessageNumber() uint64
- func (b *GetCurrentNetworkRequestMessage) ReceivedAt() time.Time
- func (b *GetCurrentNetworkRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetCurrentNetworkRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetCurrentNetworkResponseMessage
- func (msg *GetCurrentNetworkResponseMessage) Command() MessageCommand
- func (b *GetCurrentNetworkResponseMessage) MessageNumber() uint64
- func (b *GetCurrentNetworkResponseMessage) ReceivedAt() time.Time
- func (b *GetCurrentNetworkResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetCurrentNetworkResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetHeadersRequestMessage
- func (msg *GetHeadersRequestMessage) Command() MessageCommand
- func (b *GetHeadersRequestMessage) MessageNumber() uint64
- func (b *GetHeadersRequestMessage) ReceivedAt() time.Time
- func (b *GetHeadersRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetHeadersRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetHeadersResponseMessage
- func (msg *GetHeadersResponseMessage) Command() MessageCommand
- func (b *GetHeadersResponseMessage) MessageNumber() uint64
- func (b *GetHeadersResponseMessage) ReceivedAt() time.Time
- func (b *GetHeadersResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetHeadersResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetInfoRequestMessage
- func (msg *GetInfoRequestMessage) Command() MessageCommand
- func (b *GetInfoRequestMessage) MessageNumber() uint64
- func (b *GetInfoRequestMessage) ReceivedAt() time.Time
- func (b *GetInfoRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetInfoRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetInfoResponseMessage
- func (msg *GetInfoResponseMessage) Command() MessageCommand
- func (b *GetInfoResponseMessage) MessageNumber() uint64
- func (b *GetInfoResponseMessage) ReceivedAt() time.Time
- func (b *GetInfoResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetInfoResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetMempoolEntriesByAddressesRequestMessage
- func (msg *GetMempoolEntriesByAddressesRequestMessage) Command() MessageCommand
- func (b *GetMempoolEntriesByAddressesRequestMessage) MessageNumber() uint64
- func (b *GetMempoolEntriesByAddressesRequestMessage) ReceivedAt() time.Time
- func (b *GetMempoolEntriesByAddressesRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetMempoolEntriesByAddressesRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetMempoolEntriesByAddressesResponseMessage
- func (msg *GetMempoolEntriesByAddressesResponseMessage) Command() MessageCommand
- func (b *GetMempoolEntriesByAddressesResponseMessage) MessageNumber() uint64
- func (b *GetMempoolEntriesByAddressesResponseMessage) ReceivedAt() time.Time
- func (b *GetMempoolEntriesByAddressesResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetMempoolEntriesByAddressesResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetMempoolEntriesRequestMessage
- func (msg *GetMempoolEntriesRequestMessage) Command() MessageCommand
- func (b *GetMempoolEntriesRequestMessage) MessageNumber() uint64
- func (b *GetMempoolEntriesRequestMessage) ReceivedAt() time.Time
- func (b *GetMempoolEntriesRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetMempoolEntriesRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetMempoolEntriesResponseMessage
- func (msg *GetMempoolEntriesResponseMessage) Command() MessageCommand
- func (b *GetMempoolEntriesResponseMessage) MessageNumber() uint64
- func (b *GetMempoolEntriesResponseMessage) ReceivedAt() time.Time
- func (b *GetMempoolEntriesResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetMempoolEntriesResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetMempoolEntryRequestMessage
- func (msg *GetMempoolEntryRequestMessage) Command() MessageCommand
- func (b *GetMempoolEntryRequestMessage) MessageNumber() uint64
- func (b *GetMempoolEntryRequestMessage) ReceivedAt() time.Time
- func (b *GetMempoolEntryRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetMempoolEntryRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetMempoolEntryResponseMessage
- func (msg *GetMempoolEntryResponseMessage) Command() MessageCommand
- func (b *GetMempoolEntryResponseMessage) MessageNumber() uint64
- func (b *GetMempoolEntryResponseMessage) ReceivedAt() time.Time
- func (b *GetMempoolEntryResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetMempoolEntryResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetPeerAddressesKnownAddressMessage
- type GetPeerAddressesRequestMessage
- func (msg *GetPeerAddressesRequestMessage) Command() MessageCommand
- func (b *GetPeerAddressesRequestMessage) MessageNumber() uint64
- func (b *GetPeerAddressesRequestMessage) ReceivedAt() time.Time
- func (b *GetPeerAddressesRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetPeerAddressesRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetPeerAddressesResponseMessage
- func (msg *GetPeerAddressesResponseMessage) Command() MessageCommand
- func (b *GetPeerAddressesResponseMessage) MessageNumber() uint64
- func (b *GetPeerAddressesResponseMessage) ReceivedAt() time.Time
- func (b *GetPeerAddressesResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetPeerAddressesResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetSelectedTipHashRequestMessage
- func (msg *GetSelectedTipHashRequestMessage) Command() MessageCommand
- func (b *GetSelectedTipHashRequestMessage) MessageNumber() uint64
- func (b *GetSelectedTipHashRequestMessage) ReceivedAt() time.Time
- func (b *GetSelectedTipHashRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetSelectedTipHashRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetSelectedTipHashResponseMessage
- func (msg *GetSelectedTipHashResponseMessage) Command() MessageCommand
- func (b *GetSelectedTipHashResponseMessage) MessageNumber() uint64
- func (b *GetSelectedTipHashResponseMessage) ReceivedAt() time.Time
- func (b *GetSelectedTipHashResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetSelectedTipHashResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetSubnetworkRequestMessage
- func (msg *GetSubnetworkRequestMessage) Command() MessageCommand
- func (b *GetSubnetworkRequestMessage) MessageNumber() uint64
- func (b *GetSubnetworkRequestMessage) ReceivedAt() time.Time
- func (b *GetSubnetworkRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetSubnetworkRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetSubnetworkResponseMessage
- func (msg *GetSubnetworkResponseMessage) Command() MessageCommand
- func (b *GetSubnetworkResponseMessage) MessageNumber() uint64
- func (b *GetSubnetworkResponseMessage) ReceivedAt() time.Time
- func (b *GetSubnetworkResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetSubnetworkResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetUTXOsByAddressesRequestMessage
- func (msg *GetUTXOsByAddressesRequestMessage) Command() MessageCommand
- func (b *GetUTXOsByAddressesRequestMessage) MessageNumber() uint64
- func (b *GetUTXOsByAddressesRequestMessage) ReceivedAt() time.Time
- func (b *GetUTXOsByAddressesRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetUTXOsByAddressesRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetUTXOsByAddressesResponseMessage
- func (msg *GetUTXOsByAddressesResponseMessage) Command() MessageCommand
- func (b *GetUTXOsByAddressesResponseMessage) MessageNumber() uint64
- func (b *GetUTXOsByAddressesResponseMessage) ReceivedAt() time.Time
- func (b *GetUTXOsByAddressesResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetUTXOsByAddressesResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetVirtualSelectedParentBlueScoreRequestMessage
- func (msg *GetVirtualSelectedParentBlueScoreRequestMessage) Command() MessageCommand
- func (b *GetVirtualSelectedParentBlueScoreRequestMessage) MessageNumber() uint64
- func (b *GetVirtualSelectedParentBlueScoreRequestMessage) ReceivedAt() time.Time
- func (b *GetVirtualSelectedParentBlueScoreRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetVirtualSelectedParentBlueScoreRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetVirtualSelectedParentBlueScoreResponseMessage
- func (msg *GetVirtualSelectedParentBlueScoreResponseMessage) Command() MessageCommand
- func (b *GetVirtualSelectedParentBlueScoreResponseMessage) MessageNumber() uint64
- func (b *GetVirtualSelectedParentBlueScoreResponseMessage) ReceivedAt() time.Time
- func (b *GetVirtualSelectedParentBlueScoreResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetVirtualSelectedParentBlueScoreResponseMessage) SetReceivedAt(receivedAt time.Time)
- type GetVirtualSelectedParentChainFromBlockRequestMessage
- func (msg *GetVirtualSelectedParentChainFromBlockRequestMessage) Command() MessageCommand
- func (b *GetVirtualSelectedParentChainFromBlockRequestMessage) MessageNumber() uint64
- func (b *GetVirtualSelectedParentChainFromBlockRequestMessage) ReceivedAt() time.Time
- func (b *GetVirtualSelectedParentChainFromBlockRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetVirtualSelectedParentChainFromBlockRequestMessage) SetReceivedAt(receivedAt time.Time)
- type GetVirtualSelectedParentChainFromBlockResponseMessage
- func (msg *GetVirtualSelectedParentChainFromBlockResponseMessage) Command() MessageCommand
- func (b *GetVirtualSelectedParentChainFromBlockResponseMessage) MessageNumber() uint64
- func (b *GetVirtualSelectedParentChainFromBlockResponseMessage) ReceivedAt() time.Time
- func (b *GetVirtualSelectedParentChainFromBlockResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *GetVirtualSelectedParentChainFromBlockResponseMessage) SetReceivedAt(receivedAt time.Time)
- type IceNet
- type MempoolEntry
- type MempoolEntryByAddress
- type Message
- type MessageCommand
- type MessageError
- type MsgAddresses
- type MsgBlock
- func (msg *MsgBlock) AddTransaction(tx *MsgTx)
- func (msg *MsgBlock) ClearTransactions()
- func (msg *MsgBlock) Command() MessageCommand
- func (msg *MsgBlock) ConvertToPartial(subnetworkID *externalapi.DomainSubnetworkID)
- func (msg *MsgBlock) MaxPayloadLength(pver uint32) uint32
- func (b *MsgBlock) MessageNumber() uint64
- func (b *MsgBlock) ReceivedAt() time.Time
- func (b *MsgBlock) SetMessageNumber(messageNumber uint64)
- func (b *MsgBlock) SetReceivedAt(receivedAt time.Time)
- type MsgBlockHeader
- type MsgBlockLocator
- type MsgBlockWithTrustedData
- func (msg *MsgBlockWithTrustedData) Command() MessageCommand
- func (b *MsgBlockWithTrustedData) MessageNumber() uint64
- func (b *MsgBlockWithTrustedData) ReceivedAt() time.Time
- func (b *MsgBlockWithTrustedData) SetMessageNumber(messageNumber uint64)
- func (b *MsgBlockWithTrustedData) SetReceivedAt(receivedAt time.Time)
- type MsgBlockWithTrustedDataV4
- func (msg *MsgBlockWithTrustedDataV4) Command() MessageCommand
- func (b *MsgBlockWithTrustedDataV4) MessageNumber() uint64
- func (b *MsgBlockWithTrustedDataV4) ReceivedAt() time.Time
- func (b *MsgBlockWithTrustedDataV4) SetMessageNumber(messageNumber uint64)
- func (b *MsgBlockWithTrustedDataV4) SetReceivedAt(receivedAt time.Time)
- type MsgDoneBlocksWithTrustedData
- func (msg *MsgDoneBlocksWithTrustedData) Command() MessageCommand
- func (b *MsgDoneBlocksWithTrustedData) MessageNumber() uint64
- func (b *MsgDoneBlocksWithTrustedData) ReceivedAt() time.Time
- func (b *MsgDoneBlocksWithTrustedData) SetMessageNumber(messageNumber uint64)
- func (b *MsgDoneBlocksWithTrustedData) SetReceivedAt(receivedAt time.Time)
- type MsgDoneHeaders
- type MsgDonePruningPointUTXOSetChunks
- func (msg *MsgDonePruningPointUTXOSetChunks) Command() MessageCommand
- func (b *MsgDonePruningPointUTXOSetChunks) MessageNumber() uint64
- func (b *MsgDonePruningPointUTXOSetChunks) ReceivedAt() time.Time
- func (b *MsgDonePruningPointUTXOSetChunks) SetMessageNumber(messageNumber uint64)
- func (b *MsgDonePruningPointUTXOSetChunks) SetReceivedAt(receivedAt time.Time)
- type MsgIBDBlock
- func (msg *MsgIBDBlock) Command() MessageCommand
- func (msg *MsgIBDBlock) MaxPayloadLength(pver uint32) uint32
- func (b *MsgIBDBlock) MessageNumber() uint64
- func (b *MsgIBDBlock) ReceivedAt() time.Time
- func (b *MsgIBDBlock) SetMessageNumber(messageNumber uint64)
- func (b *MsgIBDBlock) SetReceivedAt(receivedAt time.Time)
- type MsgIBDBlockLocator
- type MsgIBDBlockLocatorHighestHash
- func (msg *MsgIBDBlockLocatorHighestHash) Command() MessageCommand
- func (b *MsgIBDBlockLocatorHighestHash) MessageNumber() uint64
- func (b *MsgIBDBlockLocatorHighestHash) ReceivedAt() time.Time
- func (b *MsgIBDBlockLocatorHighestHash) SetMessageNumber(messageNumber uint64)
- func (b *MsgIBDBlockLocatorHighestHash) SetReceivedAt(receivedAt time.Time)
- type MsgIBDBlockLocatorHighestHashNotFound
- func (msg *MsgIBDBlockLocatorHighestHashNotFound) Command() MessageCommand
- func (b *MsgIBDBlockLocatorHighestHashNotFound) MessageNumber() uint64
- func (b *MsgIBDBlockLocatorHighestHashNotFound) ReceivedAt() time.Time
- func (b *MsgIBDBlockLocatorHighestHashNotFound) SetMessageNumber(messageNumber uint64)
- func (b *MsgIBDBlockLocatorHighestHashNotFound) SetReceivedAt(receivedAt time.Time)
- type MsgIBDChainBlockLocator
- func (msg *MsgIBDChainBlockLocator) Command() MessageCommand
- func (b *MsgIBDChainBlockLocator) MessageNumber() uint64
- func (b *MsgIBDChainBlockLocator) ReceivedAt() time.Time
- func (b *MsgIBDChainBlockLocator) SetMessageNumber(messageNumber uint64)
- func (b *MsgIBDChainBlockLocator) SetReceivedAt(receivedAt time.Time)
- type MsgInvRelayBlock
- type MsgInvTransaction
- type MsgPing
- type MsgPong
- type MsgPruningPointProof
- func (msg *MsgPruningPointProof) Command() MessageCommand
- func (b *MsgPruningPointProof) MessageNumber() uint64
- func (b *MsgPruningPointProof) ReceivedAt() time.Time
- func (b *MsgPruningPointProof) SetMessageNumber(messageNumber uint64)
- func (b *MsgPruningPointProof) SetReceivedAt(receivedAt time.Time)
- type MsgPruningPointUTXOSetChunk
- func (msg *MsgPruningPointUTXOSetChunk) Command() MessageCommand
- func (b *MsgPruningPointUTXOSetChunk) MessageNumber() uint64
- func (b *MsgPruningPointUTXOSetChunk) ReceivedAt() time.Time
- func (b *MsgPruningPointUTXOSetChunk) SetMessageNumber(messageNumber uint64)
- func (b *MsgPruningPointUTXOSetChunk) SetReceivedAt(receivedAt time.Time)
- type MsgPruningPoints
- type MsgReady
- type MsgReject
- type MsgRequestAddresses
- type MsgRequestAnticone
- type MsgRequestIBDChainBlockLocator
- func (msg *MsgRequestIBDChainBlockLocator) Command() MessageCommand
- func (b *MsgRequestIBDChainBlockLocator) MessageNumber() uint64
- func (b *MsgRequestIBDChainBlockLocator) ReceivedAt() time.Time
- func (b *MsgRequestIBDChainBlockLocator) SetMessageNumber(messageNumber uint64)
- func (b *MsgRequestIBDChainBlockLocator) SetReceivedAt(receivedAt time.Time)
- type MsgRequestNextHeaders
- func (msg *MsgRequestNextHeaders) Command() MessageCommand
- func (b *MsgRequestNextHeaders) MessageNumber() uint64
- func (b *MsgRequestNextHeaders) ReceivedAt() time.Time
- func (b *MsgRequestNextHeaders) SetMessageNumber(messageNumber uint64)
- func (b *MsgRequestNextHeaders) SetReceivedAt(receivedAt time.Time)
- type MsgRequestNextPruningPointAndItsAnticoneBlocks
- func (msg *MsgRequestNextPruningPointAndItsAnticoneBlocks) Command() MessageCommand
- func (b *MsgRequestNextPruningPointAndItsAnticoneBlocks) MessageNumber() uint64
- func (b *MsgRequestNextPruningPointAndItsAnticoneBlocks) ReceivedAt() time.Time
- func (b *MsgRequestNextPruningPointAndItsAnticoneBlocks) SetMessageNumber(messageNumber uint64)
- func (b *MsgRequestNextPruningPointAndItsAnticoneBlocks) SetReceivedAt(receivedAt time.Time)
- type MsgRequestNextPruningPointUTXOSetChunk
- func (msg *MsgRequestNextPruningPointUTXOSetChunk) Command() MessageCommand
- func (b *MsgRequestNextPruningPointUTXOSetChunk) MessageNumber() uint64
- func (b *MsgRequestNextPruningPointUTXOSetChunk) ReceivedAt() time.Time
- func (b *MsgRequestNextPruningPointUTXOSetChunk) SetMessageNumber(messageNumber uint64)
- func (b *MsgRequestNextPruningPointUTXOSetChunk) SetReceivedAt(receivedAt time.Time)
- type MsgRequestPruningPointAndItsAnticone
- func (msg *MsgRequestPruningPointAndItsAnticone) Command() MessageCommand
- func (b *MsgRequestPruningPointAndItsAnticone) MessageNumber() uint64
- func (b *MsgRequestPruningPointAndItsAnticone) ReceivedAt() time.Time
- func (b *MsgRequestPruningPointAndItsAnticone) SetMessageNumber(messageNumber uint64)
- func (b *MsgRequestPruningPointAndItsAnticone) SetReceivedAt(receivedAt time.Time)
- type MsgRequestPruningPointProof
- func (msg *MsgRequestPruningPointProof) Command() MessageCommand
- func (b *MsgRequestPruningPointProof) MessageNumber() uint64
- func (b *MsgRequestPruningPointProof) ReceivedAt() time.Time
- func (b *MsgRequestPruningPointProof) SetMessageNumber(messageNumber uint64)
- func (b *MsgRequestPruningPointProof) SetReceivedAt(receivedAt time.Time)
- type MsgRequestPruningPointUTXOSet
- func (msg *MsgRequestPruningPointUTXOSet) Command() MessageCommand
- func (b *MsgRequestPruningPointUTXOSet) MessageNumber() uint64
- func (b *MsgRequestPruningPointUTXOSet) ReceivedAt() time.Time
- func (b *MsgRequestPruningPointUTXOSet) SetMessageNumber(messageNumber uint64)
- func (b *MsgRequestPruningPointUTXOSet) SetReceivedAt(receivedAt time.Time)
- type MsgRequestRelayBlocks
- func (msg *MsgRequestRelayBlocks) Command() MessageCommand
- func (b *MsgRequestRelayBlocks) MessageNumber() uint64
- func (b *MsgRequestRelayBlocks) ReceivedAt() time.Time
- func (b *MsgRequestRelayBlocks) SetMessageNumber(messageNumber uint64)
- func (b *MsgRequestRelayBlocks) SetReceivedAt(receivedAt time.Time)
- type MsgRequestTransactions
- func (msg *MsgRequestTransactions) Command() MessageCommand
- func (b *MsgRequestTransactions) MessageNumber() uint64
- func (b *MsgRequestTransactions) ReceivedAt() time.Time
- func (b *MsgRequestTransactions) SetMessageNumber(messageNumber uint64)
- func (b *MsgRequestTransactions) SetReceivedAt(receivedAt time.Time)
- type MsgTransactionNotFound
- func (msg *MsgTransactionNotFound) Command() MessageCommand
- func (b *MsgTransactionNotFound) MessageNumber() uint64
- func (b *MsgTransactionNotFound) ReceivedAt() time.Time
- func (b *MsgTransactionNotFound) SetMessageNumber(messageNumber uint64)
- func (b *MsgTransactionNotFound) SetReceivedAt(receivedAt time.Time)
- type MsgTrustedData
- type MsgTx
- func DomainTransactionToMsgTx(domainTransaction *externalapi.DomainTransaction) *MsgTx
- func NewNativeMsgTx(version uint16, txIn []*TxIn, txOut []*TxOut) *MsgTx
- func NewNativeMsgTxWithLocktime(version uint16, txIn []*TxIn, txOut []*TxOut, locktime uint64) *MsgTx
- func NewRegistryMsgTx(version uint16, txIn []*TxIn, txOut []*TxOut, gasLimit uint64) *MsgTx
- func NewSubnetworkMsgTx(version uint16, txIn []*TxIn, txOut []*TxOut, ...) *MsgTx
- func (msg *MsgTx) AddTxIn(ti *TxIn)
- func (msg *MsgTx) AddTxOut(to *TxOut)
- func (msg *MsgTx) Command() MessageCommand
- func (msg *MsgTx) Copy() *MsgTx
- func (msg *MsgTx) IsCoinBase() bool
- func (msg *MsgTx) IsSubnetworkCompatible(subnetworkID *externalapi.DomainSubnetworkID) bool
- func (msg *MsgTx) MaxPayloadLength(pver uint32) uint32
- func (b *MsgTx) MessageNumber() uint64
- func (b *MsgTx) ReceivedAt() time.Time
- func (b *MsgTx) SetMessageNumber(messageNumber uint64)
- func (b *MsgTx) SetReceivedAt(receivedAt time.Time)
- func (msg *MsgTx) TxHash() *externalapi.DomainHash
- func (msg *MsgTx) TxID() *externalapi.DomainTransactionID
- type MsgUnexpectedPruningPoint
- func (msg *MsgUnexpectedPruningPoint) Command() MessageCommand
- func (b *MsgUnexpectedPruningPoint) MessageNumber() uint64
- func (b *MsgUnexpectedPruningPoint) ReceivedAt() time.Time
- func (b *MsgUnexpectedPruningPoint) SetMessageNumber(messageNumber uint64)
- func (b *MsgUnexpectedPruningPoint) SetReceivedAt(receivedAt time.Time)
- type MsgVerAck
- type MsgVersion
- func (msg *MsgVersion) AddService(service ServiceFlag)
- func (msg *MsgVersion) AddUserAgent(name string, version string, comments ...string)
- func (msg *MsgVersion) Command() MessageCommand
- func (msg *MsgVersion) HasService(service ServiceFlag) bool
- func (b *MsgVersion) MessageNumber() uint64
- func (b *MsgVersion) ReceivedAt() time.Time
- func (b *MsgVersion) SetMessageNumber(messageNumber uint64)
- func (b *MsgVersion) SetReceivedAt(receivedAt time.Time)
- type NetAddress
- type NewBlockTemplateNotificationMessage
- func (msg *NewBlockTemplateNotificationMessage) Command() MessageCommand
- func (b *NewBlockTemplateNotificationMessage) MessageNumber() uint64
- func (b *NewBlockTemplateNotificationMessage) ReceivedAt() time.Time
- func (b *NewBlockTemplateNotificationMessage) SetMessageNumber(messageNumber uint64)
- func (b *NewBlockTemplateNotificationMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyBlockAddedRequestMessage
- func (msg *NotifyBlockAddedRequestMessage) Command() MessageCommand
- func (b *NotifyBlockAddedRequestMessage) MessageNumber() uint64
- func (b *NotifyBlockAddedRequestMessage) ReceivedAt() time.Time
- func (b *NotifyBlockAddedRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyBlockAddedRequestMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyBlockAddedResponseMessage
- func (msg *NotifyBlockAddedResponseMessage) Command() MessageCommand
- func (b *NotifyBlockAddedResponseMessage) MessageNumber() uint64
- func (b *NotifyBlockAddedResponseMessage) ReceivedAt() time.Time
- func (b *NotifyBlockAddedResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyBlockAddedResponseMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyFinalityConflictsRequestMessage
- func (msg *NotifyFinalityConflictsRequestMessage) Command() MessageCommand
- func (b *NotifyFinalityConflictsRequestMessage) MessageNumber() uint64
- func (b *NotifyFinalityConflictsRequestMessage) ReceivedAt() time.Time
- func (b *NotifyFinalityConflictsRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyFinalityConflictsRequestMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyFinalityConflictsResponseMessage
- func (msg *NotifyFinalityConflictsResponseMessage) Command() MessageCommand
- func (b *NotifyFinalityConflictsResponseMessage) MessageNumber() uint64
- func (b *NotifyFinalityConflictsResponseMessage) ReceivedAt() time.Time
- func (b *NotifyFinalityConflictsResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyFinalityConflictsResponseMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyNewBlockTemplateRequestMessage
- func (msg *NotifyNewBlockTemplateRequestMessage) Command() MessageCommand
- func (b *NotifyNewBlockTemplateRequestMessage) MessageNumber() uint64
- func (b *NotifyNewBlockTemplateRequestMessage) ReceivedAt() time.Time
- func (b *NotifyNewBlockTemplateRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyNewBlockTemplateRequestMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyNewBlockTemplateResponseMessage
- func (msg *NotifyNewBlockTemplateResponseMessage) Command() MessageCommand
- func (b *NotifyNewBlockTemplateResponseMessage) MessageNumber() uint64
- func (b *NotifyNewBlockTemplateResponseMessage) ReceivedAt() time.Time
- func (b *NotifyNewBlockTemplateResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyNewBlockTemplateResponseMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyPruningPointUTXOSetOverrideRequestMessage
- func (msg *NotifyPruningPointUTXOSetOverrideRequestMessage) Command() MessageCommand
- func (b *NotifyPruningPointUTXOSetOverrideRequestMessage) MessageNumber() uint64
- func (b *NotifyPruningPointUTXOSetOverrideRequestMessage) ReceivedAt() time.Time
- func (b *NotifyPruningPointUTXOSetOverrideRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyPruningPointUTXOSetOverrideRequestMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyPruningPointUTXOSetOverrideResponseMessage
- func (msg *NotifyPruningPointUTXOSetOverrideResponseMessage) Command() MessageCommand
- func (b *NotifyPruningPointUTXOSetOverrideResponseMessage) MessageNumber() uint64
- func (b *NotifyPruningPointUTXOSetOverrideResponseMessage) ReceivedAt() time.Time
- func (b *NotifyPruningPointUTXOSetOverrideResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyPruningPointUTXOSetOverrideResponseMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyUTXOsChangedRequestMessage
- func (msg *NotifyUTXOsChangedRequestMessage) Command() MessageCommand
- func (b *NotifyUTXOsChangedRequestMessage) MessageNumber() uint64
- func (b *NotifyUTXOsChangedRequestMessage) ReceivedAt() time.Time
- func (b *NotifyUTXOsChangedRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyUTXOsChangedRequestMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyUTXOsChangedResponseMessage
- func (msg *NotifyUTXOsChangedResponseMessage) Command() MessageCommand
- func (b *NotifyUTXOsChangedResponseMessage) MessageNumber() uint64
- func (b *NotifyUTXOsChangedResponseMessage) ReceivedAt() time.Time
- func (b *NotifyUTXOsChangedResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyUTXOsChangedResponseMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyVirtualDaaScoreChangedRequestMessage
- func (msg *NotifyVirtualDaaScoreChangedRequestMessage) Command() MessageCommand
- func (b *NotifyVirtualDaaScoreChangedRequestMessage) MessageNumber() uint64
- func (b *NotifyVirtualDaaScoreChangedRequestMessage) ReceivedAt() time.Time
- func (b *NotifyVirtualDaaScoreChangedRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyVirtualDaaScoreChangedRequestMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyVirtualDaaScoreChangedResponseMessage
- func (msg *NotifyVirtualDaaScoreChangedResponseMessage) Command() MessageCommand
- func (b *NotifyVirtualDaaScoreChangedResponseMessage) MessageNumber() uint64
- func (b *NotifyVirtualDaaScoreChangedResponseMessage) ReceivedAt() time.Time
- func (b *NotifyVirtualDaaScoreChangedResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyVirtualDaaScoreChangedResponseMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyVirtualSelectedParentBlueScoreChangedRequestMessage
- func (msg *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) Command() MessageCommand
- func (b *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) MessageNumber() uint64
- func (b *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) ReceivedAt() time.Time
- func (b *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyVirtualSelectedParentBlueScoreChangedResponseMessage
- func (msg *NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) Command() MessageCommand
- func (b *NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) MessageNumber() uint64
- func (b *NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) ReceivedAt() time.Time
- func (b *NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyVirtualSelectedParentChainChangedRequestMessage
- func (msg *NotifyVirtualSelectedParentChainChangedRequestMessage) Command() MessageCommand
- func (b *NotifyVirtualSelectedParentChainChangedRequestMessage) MessageNumber() uint64
- func (b *NotifyVirtualSelectedParentChainChangedRequestMessage) ReceivedAt() time.Time
- func (b *NotifyVirtualSelectedParentChainChangedRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyVirtualSelectedParentChainChangedRequestMessage) SetReceivedAt(receivedAt time.Time)
- type NotifyVirtualSelectedParentChainChangedResponseMessage
- func (msg *NotifyVirtualSelectedParentChainChangedResponseMessage) Command() MessageCommand
- func (b *NotifyVirtualSelectedParentChainChangedResponseMessage) MessageNumber() uint64
- func (b *NotifyVirtualSelectedParentChainChangedResponseMessage) ReceivedAt() time.Time
- func (b *NotifyVirtualSelectedParentChainChangedResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *NotifyVirtualSelectedParentChainChangedResponseMessage) SetReceivedAt(receivedAt time.Time)
- type Outpoint
- type OutpointAndUTXOEntryPair
- type PruningPointUTXOSetOverrideNotificationMessage
- func (msg *PruningPointUTXOSetOverrideNotificationMessage) Command() MessageCommand
- func (b *PruningPointUTXOSetOverrideNotificationMessage) MessageNumber() uint64
- func (b *PruningPointUTXOSetOverrideNotificationMessage) ReceivedAt() time.Time
- func (b *PruningPointUTXOSetOverrideNotificationMessage) SetMessageNumber(messageNumber uint64)
- func (b *PruningPointUTXOSetOverrideNotificationMessage) SetReceivedAt(receivedAt time.Time)
- type RPCBlock
- type RPCBlockHeader
- type RPCBlockLevelParents
- type RPCBlockVerboseData
- type RPCError
- type RPCOutpoint
- type RPCScriptPublicKey
- type RPCTransaction
- type RPCTransactionInput
- type RPCTransactionInputVerboseData
- type RPCTransactionOutput
- type RPCTransactionOutputVerboseData
- type RPCTransactionVerboseData
- type RPCUTXOEntry
- type RejectReason
- type ResolveFinalityConflictRequestMessage
- func (msg *ResolveFinalityConflictRequestMessage) Command() MessageCommand
- func (b *ResolveFinalityConflictRequestMessage) MessageNumber() uint64
- func (b *ResolveFinalityConflictRequestMessage) ReceivedAt() time.Time
- func (b *ResolveFinalityConflictRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *ResolveFinalityConflictRequestMessage) SetReceivedAt(receivedAt time.Time)
- type ResolveFinalityConflictResponseMessage
- func (msg *ResolveFinalityConflictResponseMessage) Command() MessageCommand
- func (b *ResolveFinalityConflictResponseMessage) MessageNumber() uint64
- func (b *ResolveFinalityConflictResponseMessage) ReceivedAt() time.Time
- func (b *ResolveFinalityConflictResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *ResolveFinalityConflictResponseMessage) SetReceivedAt(receivedAt time.Time)
- type ServiceFlag
- type ShutDownRequestMessage
- func (msg *ShutDownRequestMessage) Command() MessageCommand
- func (b *ShutDownRequestMessage) MessageNumber() uint64
- func (b *ShutDownRequestMessage) ReceivedAt() time.Time
- func (b *ShutDownRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *ShutDownRequestMessage) SetReceivedAt(receivedAt time.Time)
- type ShutDownResponseMessage
- func (msg *ShutDownResponseMessage) Command() MessageCommand
- func (b *ShutDownResponseMessage) MessageNumber() uint64
- func (b *ShutDownResponseMessage) ReceivedAt() time.Time
- func (b *ShutDownResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *ShutDownResponseMessage) SetReceivedAt(receivedAt time.Time)
- type StopNotifyingPruningPointUTXOSetOverrideRequestMessage
- func (msg *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) Command() MessageCommand
- func (b *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) MessageNumber() uint64
- func (b *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) ReceivedAt() time.Time
- func (b *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) SetReceivedAt(receivedAt time.Time)
- type StopNotifyingPruningPointUTXOSetOverrideResponseMessage
- func (msg *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) Command() MessageCommand
- func (b *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) MessageNumber() uint64
- func (b *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) ReceivedAt() time.Time
- func (b *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) SetReceivedAt(receivedAt time.Time)
- type StopNotifyingUTXOsChangedRequestMessage
- func (msg *StopNotifyingUTXOsChangedRequestMessage) Command() MessageCommand
- func (b *StopNotifyingUTXOsChangedRequestMessage) MessageNumber() uint64
- func (b *StopNotifyingUTXOsChangedRequestMessage) ReceivedAt() time.Time
- func (b *StopNotifyingUTXOsChangedRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *StopNotifyingUTXOsChangedRequestMessage) SetReceivedAt(receivedAt time.Time)
- type StopNotifyingUTXOsChangedResponseMessage
- func (msg *StopNotifyingUTXOsChangedResponseMessage) Command() MessageCommand
- func (b *StopNotifyingUTXOsChangedResponseMessage) MessageNumber() uint64
- func (b *StopNotifyingUTXOsChangedResponseMessage) ReceivedAt() time.Time
- func (b *StopNotifyingUTXOsChangedResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *StopNotifyingUTXOsChangedResponseMessage) SetReceivedAt(receivedAt time.Time)
- type SubmitBlockRequestMessage
- func (msg *SubmitBlockRequestMessage) Command() MessageCommand
- func (b *SubmitBlockRequestMessage) MessageNumber() uint64
- func (b *SubmitBlockRequestMessage) ReceivedAt() time.Time
- func (b *SubmitBlockRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *SubmitBlockRequestMessage) SetReceivedAt(receivedAt time.Time)
- type SubmitBlockResponseMessage
- func (msg *SubmitBlockResponseMessage) Command() MessageCommand
- func (b *SubmitBlockResponseMessage) MessageNumber() uint64
- func (b *SubmitBlockResponseMessage) ReceivedAt() time.Time
- func (b *SubmitBlockResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *SubmitBlockResponseMessage) SetReceivedAt(receivedAt time.Time)
- type SubmitTransactionRequestMessage
- func (msg *SubmitTransactionRequestMessage) Command() MessageCommand
- func (b *SubmitTransactionRequestMessage) MessageNumber() uint64
- func (b *SubmitTransactionRequestMessage) ReceivedAt() time.Time
- func (b *SubmitTransactionRequestMessage) SetMessageNumber(messageNumber uint64)
- func (b *SubmitTransactionRequestMessage) SetReceivedAt(receivedAt time.Time)
- type SubmitTransactionResponseMessage
- func (msg *SubmitTransactionResponseMessage) Command() MessageCommand
- func (b *SubmitTransactionResponseMessage) MessageNumber() uint64
- func (b *SubmitTransactionResponseMessage) ReceivedAt() time.Time
- func (b *SubmitTransactionResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *SubmitTransactionResponseMessage) SetReceivedAt(receivedAt time.Time)
- type TrustedDataDAAHeader
- type TrustedDataDataDAABlock
- type TxIn
- type TxLoc
- type TxOut
- type UTXOEntry
- type UTXOsByAddressesEntry
- type UTXOsChangedNotificationMessage
- func (msg *UTXOsChangedNotificationMessage) Command() MessageCommand
- func (b *UTXOsChangedNotificationMessage) MessageNumber() uint64
- func (b *UTXOsChangedNotificationMessage) ReceivedAt() time.Time
- func (b *UTXOsChangedNotificationMessage) SetMessageNumber(messageNumber uint64)
- func (b *UTXOsChangedNotificationMessage) SetReceivedAt(receivedAt time.Time)
- type UnbanRequestMessage
- type UnbanResponseMessage
- func (msg *UnbanResponseMessage) Command() MessageCommand
- func (b *UnbanResponseMessage) MessageNumber() uint64
- func (b *UnbanResponseMessage) ReceivedAt() time.Time
- func (b *UnbanResponseMessage) SetMessageNumber(messageNumber uint64)
- func (b *UnbanResponseMessage) SetReceivedAt(receivedAt time.Time)
- type VirtualDaaScoreChangedNotificationMessage
- func (msg *VirtualDaaScoreChangedNotificationMessage) Command() MessageCommand
- func (b *VirtualDaaScoreChangedNotificationMessage) MessageNumber() uint64
- func (b *VirtualDaaScoreChangedNotificationMessage) ReceivedAt() time.Time
- func (b *VirtualDaaScoreChangedNotificationMessage) SetMessageNumber(messageNumber uint64)
- func (b *VirtualDaaScoreChangedNotificationMessage) SetReceivedAt(receivedAt time.Time)
- type VirtualSelectedParentBlueScoreChangedNotificationMessage
- func (msg *VirtualSelectedParentBlueScoreChangedNotificationMessage) Command() MessageCommand
- func (b *VirtualSelectedParentBlueScoreChangedNotificationMessage) MessageNumber() uint64
- func (b *VirtualSelectedParentBlueScoreChangedNotificationMessage) ReceivedAt() time.Time
- func (b *VirtualSelectedParentBlueScoreChangedNotificationMessage) SetMessageNumber(messageNumber uint64)
- func (b *VirtualSelectedParentBlueScoreChangedNotificationMessage) SetReceivedAt(receivedAt time.Time)
- type VirtualSelectedParentChainChangedNotificationMessage
- func (msg *VirtualSelectedParentChainChangedNotificationMessage) Command() MessageCommand
- func (b *VirtualSelectedParentChainChangedNotificationMessage) MessageNumber() uint64
- func (b *VirtualSelectedParentChainChangedNotificationMessage) ReceivedAt() time.Time
- func (b *VirtualSelectedParentChainChangedNotificationMessage) SetMessageNumber(messageNumber uint64)
- func (b *VirtualSelectedParentChainChangedNotificationMessage) SetReceivedAt(receivedAt time.Time)
Constants ¶
const ( // MaxPrevOutIndex is the maximum index the index field of a previous // outpoint can be. MaxPrevOutIndex uint32 = 0xffffffff // MinTxOutPayload is the minimum payload size for a transaction output. // Value 8 bytes + version 2 bytes + Varint for ScriptPublicKey length 1 byte. MinTxOutPayload = 11 )
const BaseBlockHeaderPayload = 25 + 3*(externalapi.DomainHashSize)
BaseBlockHeaderPayload is the base number of bytes a block header can be, not including the list of parent block headers. Version 4 bytes + Timestamp 8 bytes + Bits 4 bytes + Nonce 8 bytes + + NumParentBlocks 1 byte + HashMerkleRoot hash + + AcceptedIDMerkleRoot hash + UTXOCommitment hash. To get total size of block header len(ParentHashes) * externalapi.DomainHashSize should be added to this value
const ( // DefaultServices describes the default services that are supported by // the server. DefaultServices = SFNodeNetwork | SFNodeBloom | SFNodeCF )
const MaxAddressesPerMsg = 1000
MaxAddressesPerMsg is the maximum number of addresses that can be in a single ice Addresses message (MsgAddresses).
const MaxBlockHeaderPayload = BaseBlockHeaderPayload + (MaxNumParentBlocks * externalapi.DomainHashSize)
MaxBlockHeaderPayload is the maximum number of bytes a block header can be. BaseBlockHeaderPayload + up to MaxNumParentBlocks hashes of parent blocks
const MaxBlockLocatorsPerMsg = 500
MaxBlockLocatorsPerMsg is the maximum number of block locator hashes allowed per message.
const MaxInvPerMsg = 1 << 17
MaxInvPerMsg is the maximum number of inventory vectors that can be in any type of ice inv message.
const MaxInvPerRequestTransactionsMsg = MaxInvPerMsg
MaxInvPerRequestTransactionsMsg is the maximum number of hashes that can be in a single CmdInvTransaction message.
const MaxInvPerTxInvMsg = MaxInvPerMsg
MaxInvPerTxInvMsg is the maximum number of hashes that can be in a single CmdInvTransaction message.
const MaxMessagePayload = 1024 * 1024 * 32 // 32MB
MaxMessagePayload is the maximum bytes a message can be regardless of other individual limits imposed by messages themselves.
const MaxNumParentBlocks = 255
MaxNumParentBlocks is the maximum number of parent blocks a block can reference. Currently set to 255 as the maximum number NumParentBlocks can be due to it being a byte
const MaxRequestRelayBlocksHashes = MaxInvPerMsg
MaxRequestRelayBlocksHashes is the maximum number of hashes that can be in a single RequestRelayBlocks message.
const MaxUserAgentLen = 256
MaxUserAgentLen is the maximum allowed length for the user agent field in a version message (MsgVersion).
Variables ¶
var DefaultUserAgent = fmt.Sprintf("/kaspad:%s/", version.Version())
DefaultUserAgent for appmessage in the stack
var ProtocolMessageCommandToString = map[MessageCommand]string{ CmdVersion: "Version", CmdVerAck: "VerAck", CmdRequestAddresses: "RequestAddresses", CmdAddresses: "Addresses", CmdRequestHeaders: "CmdRequestHeaders", CmdBlock: "Block", CmdTx: "Tx", CmdPing: "Ping", CmdPong: "Pong", CmdRequestBlockLocator: "RequestBlockLocator", CmdBlockLocator: "BlockLocator", CmdInvRelayBlock: "InvRelayBlock", CmdRequestRelayBlocks: "RequestRelayBlocks", CmdInvTransaction: "InvTransaction", CmdRequestTransactions: "RequestTransactions", CmdDoneHeaders: "DoneHeaders", CmdTransactionNotFound: "TransactionNotFound", CmdReject: "Reject", CmdRequestNextHeaders: "RequestNextHeaders", CmdRequestPruningPointUTXOSet: "RequestPruningPointUTXOSet", CmdPruningPointUTXOSetChunk: "PruningPointUTXOSetChunk", CmdUnexpectedPruningPoint: "UnexpectedPruningPoint", CmdIBDBlockLocator: "IBDBlockLocator", CmdIBDBlockLocatorHighestHash: "IBDBlockLocatorHighestHash", CmdIBDBlockLocatorHighestHashNotFound: "IBDBlockLocatorHighestHashNotFound", CmdBlockHeaders: "BlockHeaders", CmdRequestNextPruningPointUTXOSetChunk: "RequestNextPruningPointUTXOSetChunk", CmdDonePruningPointUTXOSetChunks: "DonePruningPointUTXOSetChunks", CmdBlockWithTrustedData: "BlockWithTrustedData", CmdDoneBlocksWithTrustedData: "DoneBlocksWithTrustedData", CmdRequestPruningPointAndItsAnticone: "RequestPruningPointAndItsAnticoneHeaders", CmdIBDBlock: "IBDBlock", CmdRequestIBDBlocks: "RequestIBDBlocks", CmdPruningPoints: "PruningPoints", CmdRequestPruningPointProof: "RequestPruningPointProof", CmdPruningPointProof: "PruningPointProof", CmdReady: "Ready", CmdTrustedData: "TrustedData", CmdBlockWithTrustedDataV4: "BlockWithTrustedDataV4", CmdRequestNextPruningPointAndItsAnticoneBlocks: "RequestNextPruningPointAndItsAnticoneBlocks", CmdRequestIBDChainBlockLocator: "RequestIBDChainBlockLocator", CmdIBDChainBlockLocator: "IBDChainBlockLocator", CmdRequestAnticone: "RequestAnticone", }
ProtocolMessageCommandToString maps all MessageCommands to their string representation
var RPCMessageCommandToString = map[MessageCommand]string{ CmdGetCurrentNetworkRequestMessage: "GetCurrentNetworkRequest", CmdGetCurrentNetworkResponseMessage: "GetCurrentNetworkResponse", CmdSubmitBlockRequestMessage: "SubmitBlockRequest", CmdSubmitBlockResponseMessage: "SubmitBlockResponse", CmdGetBlockTemplateRequestMessage: "GetBlockTemplateRequest", CmdGetBlockTemplateResponseMessage: "GetBlockTemplateResponse", CmdGetBlockTemplateTransactionMessage: "CmdGetBlockTemplateTransaction", CmdNotifyBlockAddedRequestMessage: "NotifyBlockAddedRequest", CmdNotifyBlockAddedResponseMessage: "NotifyBlockAddedResponse", CmdBlockAddedNotificationMessage: "BlockAddedNotification", CmdGetPeerAddressesRequestMessage: "GetPeerAddressesRequest", CmdGetPeerAddressesResponseMessage: "GetPeerAddressesResponse", CmdGetSelectedTipHashRequestMessage: "GetSelectedTipHashRequest", CmdGetSelectedTipHashResponseMessage: "GetSelectedTipHashResponse", CmdGetMempoolEntryRequestMessage: "GetMempoolEntryRequest", CmdGetMempoolEntryResponseMessage: "GetMempoolEntryResponse", CmdGetConnectedPeerInfoRequestMessage: "GetConnectedPeerInfoRequest", CmdGetConnectedPeerInfoResponseMessage: "GetConnectedPeerInfoResponse", CmdAddPeerRequestMessage: "AddPeerRequest", CmdAddPeerResponseMessage: "AddPeerResponse", CmdSubmitTransactionRequestMessage: "SubmitTransactionRequest", CmdSubmitTransactionResponseMessage: "SubmitTransactionResponse", CmdNotifyVirtualSelectedParentChainChangedRequestMessage: "NotifyVirtualSelectedParentChainChangedRequest", CmdNotifyVirtualSelectedParentChainChangedResponseMessage: "NotifyVirtualSelectedParentChainChangedResponse", CmdVirtualSelectedParentChainChangedNotificationMessage: "VirtualSelectedParentChainChangedNotification", CmdGetBlockRequestMessage: "GetBlockRequest", CmdGetBlockResponseMessage: "GetBlockResponse", CmdGetSubnetworkRequestMessage: "GetSubnetworkRequest", CmdGetSubnetworkResponseMessage: "GetSubnetworkResponse", CmdGetVirtualSelectedParentChainFromBlockRequestMessage: "GetVirtualSelectedParentChainFromBlockRequest", CmdGetVirtualSelectedParentChainFromBlockResponseMessage: "GetVirtualSelectedParentChainFromBlockResponse", CmdGetBlocksRequestMessage: "GetBlocksRequest", CmdGetBlocksResponseMessage: "GetBlocksResponse", CmdGetBlockCountRequestMessage: "GetBlockCountRequest", CmdGetBlockCountResponseMessage: "GetBlockCountResponse", CmdGetBlockDAGInfoRequestMessage: "GetBlockDAGInfoRequest", CmdGetBlockDAGInfoResponseMessage: "GetBlockDAGInfoResponse", CmdResolveFinalityConflictRequestMessage: "ResolveFinalityConflictRequest", CmdResolveFinalityConflictResponseMessage: "ResolveFinalityConflictResponse", CmdNotifyFinalityConflictsRequestMessage: "NotifyFinalityConflictsRequest", CmdNotifyFinalityConflictsResponseMessage: "NotifyFinalityConflictsResponse", CmdFinalityConflictNotificationMessage: "FinalityConflictNotification", CmdFinalityConflictResolvedNotificationMessage: "FinalityConflictResolvedNotification", CmdGetMempoolEntriesRequestMessage: "GetMempoolEntriesRequest", CmdGetMempoolEntriesResponseMessage: "GetMempoolEntriesResponse", CmdGetHeadersRequestMessage: "GetHeadersRequest", CmdGetHeadersResponseMessage: "GetHeadersResponse", CmdNotifyUTXOsChangedRequestMessage: "NotifyUTXOsChangedRequest", CmdNotifyUTXOsChangedResponseMessage: "NotifyUTXOsChangedResponse", CmdUTXOsChangedNotificationMessage: "UTXOsChangedNotification", CmdStopNotifyingUTXOsChangedRequestMessage: "StopNotifyingUTXOsChangedRequest", CmdStopNotifyingUTXOsChangedResponseMessage: "StopNotifyingUTXOsChangedResponse", CmdGetUTXOsByAddressesRequestMessage: "GetUTXOsByAddressesRequest", CmdGetUTXOsByAddressesResponseMessage: "GetUTXOsByAddressesResponse", CmdGetBalanceByAddressRequestMessage: "GetBalanceByAddressRequest", CmdGetBalanceByAddressResponseMessage: "GetBalancesByAddressResponse", CmdGetVirtualSelectedParentBlueScoreRequestMessage: "GetVirtualSelectedParentBlueScoreRequest", CmdGetVirtualSelectedParentBlueScoreResponseMessage: "GetVirtualSelectedParentBlueScoreResponse", CmdNotifyVirtualSelectedParentBlueScoreChangedRequestMessage: "NotifyVirtualSelectedParentBlueScoreChangedRequest", CmdNotifyVirtualSelectedParentBlueScoreChangedResponseMessage: "NotifyVirtualSelectedParentBlueScoreChangedResponse", CmdVirtualSelectedParentBlueScoreChangedNotificationMessage: "VirtualSelectedParentBlueScoreChangedNotification", CmdBanRequestMessage: "BanRequest", CmdBanResponseMessage: "BanResponse", CmdUnbanRequestMessage: "UnbanRequest", CmdUnbanResponseMessage: "UnbanResponse", CmdGetInfoRequestMessage: "GetInfoRequest", CmdGetInfoResponseMessage: "GeInfoResponse", CmdNotifyPruningPointUTXOSetOverrideRequestMessage: "NotifyPruningPointUTXOSetOverrideRequest", CmdNotifyPruningPointUTXOSetOverrideResponseMessage: "NotifyPruningPointUTXOSetOverrideResponse", CmdPruningPointUTXOSetOverrideNotificationMessage: "PruningPointUTXOSetOverrideNotification", CmdStopNotifyingPruningPointUTXOSetOverrideRequestMessage: "StopNotifyingPruningPointUTXOSetOverrideRequest", CmdStopNotifyingPruningPointUTXOSetOverrideResponseMessage: "StopNotifyingPruningPointUTXOSetOverrideResponse", CmdEstimateNetworkHashesPerSecondRequestMessage: "EstimateNetworkHashesPerSecondRequest", CmdEstimateNetworkHashesPerSecondResponseMessage: "EstimateNetworkHashesPerSecondResponse", CmdNotifyVirtualDaaScoreChangedRequestMessage: "NotifyVirtualDaaScoreChangedRequest", CmdNotifyVirtualDaaScoreChangedResponseMessage: "NotifyVirtualDaaScoreChangedResponse", CmdVirtualDaaScoreChangedNotificationMessage: "VirtualDaaScoreChangedNotification", CmdGetBalancesByAddressesRequestMessage: "GetBalancesByAddressesRequest", CmdGetBalancesByAddressesResponseMessage: "GetBalancesByAddressesResponse", CmdNotifyNewBlockTemplateRequestMessage: "NotifyNewBlockTemplateRequest", CmdNotifyNewBlockTemplateResponseMessage: "NotifyNewBlockTemplateResponse", CmdNewBlockTemplateNotificationMessage: "NewBlockTemplateNotification", CmdGetMempoolEntriesByAddressesRequestMessage: "GetMempoolEntriesByAddressesRequest", CmdGetMempoolEntriesByAddressesResponseMessage: "GetMempoolEntriesByAddressesResponse", CmdGetCoinSupplyRequestMessage: "GetCoinSupplyRequest", CmdGetCoinSupplyResponseMessage: "GetCoinSupplyResponse", }
RPCMessageCommandToString maps all MessageCommands to their string representation
Functions ¶
func BlockHeaderToDomainBlockHeader ¶
func BlockHeaderToDomainBlockHeader(blockHeader *MsgBlockHeader) externalapi.BlockHeader
BlockHeaderToDomainBlockHeader converts a MsgBlockHeader to externalapi.BlockHeader
func BlockWithTrustedDataToDomainBlockWithTrustedData ¶
func BlockWithTrustedDataToDomainBlockWithTrustedData(block *MsgBlockWithTrustedData) *externalapi.BlockWithTrustedData
BlockWithTrustedDataToDomainBlockWithTrustedData converts *MsgBlockWithTrustedData to *externalapi.BlockWithTrustedData
func GHOSTDAGHashPairToDomainGHOSTDAGHashPair ¶
func GHOSTDAGHashPairToDomainGHOSTDAGHashPair(datum *BlockGHOSTDAGDataHashPair) *externalapi.BlockGHOSTDAGDataHashPair
GHOSTDAGHashPairToDomainGHOSTDAGHashPair converts *BlockGHOSTDAGDataHashPair to *externalapi.BlockGHOSTDAGDataHashPair
func MsgBlockToDomainBlock ¶
func MsgBlockToDomainBlock(msgBlock *MsgBlock) *externalapi.DomainBlock
MsgBlockToDomainBlock converts a MsgBlock to externalapi.DomainBlock
func MsgPruningPointProofToDomainPruningPointProof ¶
func MsgPruningPointProofToDomainPruningPointProof(pruningPointProofMessage *MsgPruningPointProof) *externalapi.PruningPointProof
MsgPruningPointProofToDomainPruningPointProof converts *MsgPruningPointProof to *externalapi.PruningPointProof
func MsgTxToDomainTransaction ¶
func MsgTxToDomainTransaction(msgTx *MsgTx) *externalapi.DomainTransaction
MsgTxToDomainTransaction converts an MsgTx into externalapi.DomainTransaction
func OutpointAndUTXOEntryPairsToDomainOutpointAndUTXOEntryPairs ¶
func OutpointAndUTXOEntryPairsToDomainOutpointAndUTXOEntryPairs( outpointAndUTXOEntryPairs []*OutpointAndUTXOEntryPair) []*externalapi.OutpointAndUTXOEntryPair
OutpointAndUTXOEntryPairsToDomainOutpointAndUTXOEntryPairs converts OutpointAndUTXOEntryPairs to domain OutpointAndUTXOEntryPairs
func RPCBlockToDomainBlock ¶
func RPCBlockToDomainBlock(block *RPCBlock) (*externalapi.DomainBlock, error)
RPCBlockToDomainBlock converts `block` into a DomainBlock
func RPCOutpointToDomainOutpoint ¶
func RPCOutpointToDomainOutpoint(outpoint *RPCOutpoint) (*externalapi.DomainOutpoint, error)
RPCOutpointToDomainOutpoint converts RPCOutpoint to DomainOutpoint
func RPCTransactionToDomainTransaction ¶
func RPCTransactionToDomainTransaction(rpcTransaction *RPCTransaction) (*externalapi.DomainTransaction, error)
RPCTransactionToDomainTransaction converts RPCTransactions to DomainTransactions
func RPCUTXOEntryToUTXOEntry ¶
func RPCUTXOEntryToUTXOEntry(entry *RPCUTXOEntry) (externalapi.UTXOEntry, error)
RPCUTXOEntryToUTXOEntry converts RPCUTXOEntry to UTXOEntry
func TrustedDataDataDAABlockV4ToTrustedDataDataDAAHeader ¶
func TrustedDataDataDAABlockV4ToTrustedDataDataDAAHeader(daaBlock *TrustedDataDAAHeader) *externalapi.TrustedDataDataDAAHeader
TrustedDataDataDAABlockV4ToTrustedDataDataDAAHeader converts *TrustedDataDAAHeader to *externalapi.TrustedDataDataDAAHeader
func ValidateUserAgent ¶
ValidateUserAgent checks userAgent length against MaxUserAgentLen
Types ¶
type AcceptedTransactionIDs ¶
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 (*AddPeerRequestMessage) SetMessageNumber ¶
func (b *AddPeerRequestMessage) SetMessageNumber(messageNumber uint64)
func (*AddPeerRequestMessage) SetReceivedAt ¶
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 (*AddPeerResponseMessage) SetMessageNumber ¶
func (b *AddPeerResponseMessage) SetMessageNumber(messageNumber uint64)
func (*AddPeerResponseMessage) SetReceivedAt ¶
type BalancesByAddressesEntry ¶
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 (*BanRequestMessage) SetMessageNumber ¶
func (b *BanRequestMessage) SetMessageNumber(messageNumber uint64)
func (*BanRequestMessage) SetReceivedAt ¶
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 (*BanResponseMessage) SetMessageNumber ¶
func (b *BanResponseMessage) SetMessageNumber(messageNumber uint64)
func (*BanResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *BlockAddedNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*BlockAddedNotificationMessage) MessageNumber ¶
func (b *BlockAddedNotificationMessage) MessageNumber() uint64
func (*BlockAddedNotificationMessage) ReceivedAt ¶
func (*BlockAddedNotificationMessage) SetMessageNumber ¶
func (b *BlockAddedNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*BlockAddedNotificationMessage) SetReceivedAt ¶
type BlockGHOSTDAGData ¶
type BlockGHOSTDAGData struct { BlueScore uint64 BlueWork *big.Int SelectedParent *externalapi.DomainHash MergeSetBlues []*externalapi.DomainHash MergeSetReds []*externalapi.DomainHash BluesAnticoneSizes []*BluesAnticoneSizes }
BlockGHOSTDAGData is an appmessage representation of externalapi.BlockGHOSTDAGData
type BlockGHOSTDAGDataHashPair ¶
type BlockGHOSTDAGDataHashPair struct { Hash *externalapi.DomainHash GHOSTDAGData *BlockGHOSTDAGData }
BlockGHOSTDAGDataHashPair is an appmessage representation of externalapi.BlockGHOSTDAGDataHashPair
type BlockHeadersMessage ¶
type BlockHeadersMessage struct { BlockHeaders []*MsgBlockHeader // contains filtered or unexported fields }
BlockHeadersMessage represents a ice BlockHeaders message
func NewBlockHeadersMessage ¶
func NewBlockHeadersMessage(blockHeaders []*MsgBlockHeader) *BlockHeadersMessage
NewBlockHeadersMessage returns a new ice BlockHeaders message
func (*BlockHeadersMessage) Command ¶
func (msg *BlockHeadersMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*BlockHeadersMessage) MessageNumber ¶
func (b *BlockHeadersMessage) MessageNumber() uint64
func (*BlockHeadersMessage) ReceivedAt ¶
func (*BlockHeadersMessage) SetMessageNumber ¶
func (b *BlockHeadersMessage) SetMessageNumber(messageNumber uint64)
func (*BlockHeadersMessage) SetReceivedAt ¶
type BluesAnticoneSizes ¶
type BluesAnticoneSizes struct { BlueHash *externalapi.DomainHash AnticoneSize externalapi.KType }
BluesAnticoneSizes is an appmessage representation of the BluesAnticoneSizes part of GHOSTDAG data.
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 ¶
func (msg *EstimateNetworkHashesPerSecondRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*EstimateNetworkHashesPerSecondRequestMessage) MessageNumber ¶
func (b *EstimateNetworkHashesPerSecondRequestMessage) MessageNumber() uint64
func (*EstimateNetworkHashesPerSecondRequestMessage) ReceivedAt ¶
func (*EstimateNetworkHashesPerSecondRequestMessage) SetMessageNumber ¶
func (b *EstimateNetworkHashesPerSecondRequestMessage) SetMessageNumber(messageNumber uint64)
func (*EstimateNetworkHashesPerSecondRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *EstimateNetworkHashesPerSecondResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*EstimateNetworkHashesPerSecondResponseMessage) MessageNumber ¶
func (b *EstimateNetworkHashesPerSecondResponseMessage) MessageNumber() uint64
func (*EstimateNetworkHashesPerSecondResponseMessage) ReceivedAt ¶
func (*EstimateNetworkHashesPerSecondResponseMessage) SetMessageNumber ¶
func (b *EstimateNetworkHashesPerSecondResponseMessage) SetMessageNumber(messageNumber uint64)
func (*EstimateNetworkHashesPerSecondResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *FinalityConflictNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*FinalityConflictNotificationMessage) MessageNumber ¶
func (b *FinalityConflictNotificationMessage) MessageNumber() uint64
func (*FinalityConflictNotificationMessage) ReceivedAt ¶
func (*FinalityConflictNotificationMessage) SetMessageNumber ¶
func (b *FinalityConflictNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*FinalityConflictNotificationMessage) SetReceivedAt ¶
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 ¶
func (msg *FinalityConflictResolvedNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*FinalityConflictResolvedNotificationMessage) MessageNumber ¶
func (b *FinalityConflictResolvedNotificationMessage) MessageNumber() uint64
func (*FinalityConflictResolvedNotificationMessage) ReceivedAt ¶
func (*FinalityConflictResolvedNotificationMessage) SetMessageNumber ¶
func (b *FinalityConflictResolvedNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*FinalityConflictResolvedNotificationMessage) SetReceivedAt ¶
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 ¶
func (msg *GetBalanceByAddressRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBalanceByAddressRequestMessage) MessageNumber ¶
func (b *GetBalanceByAddressRequestMessage) MessageNumber() uint64
func (*GetBalanceByAddressRequestMessage) ReceivedAt ¶
func (*GetBalanceByAddressRequestMessage) SetMessageNumber ¶
func (b *GetBalanceByAddressRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetBalanceByAddressRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetBalanceByAddressResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBalanceByAddressResponseMessage) MessageNumber ¶
func (b *GetBalanceByAddressResponseMessage) MessageNumber() uint64
func (*GetBalanceByAddressResponseMessage) ReceivedAt ¶
func (*GetBalanceByAddressResponseMessage) SetMessageNumber ¶
func (b *GetBalanceByAddressResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetBalanceByAddressResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *GetBalancesByAddressesRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBalancesByAddressesRequestMessage) MessageNumber ¶
func (b *GetBalancesByAddressesRequestMessage) MessageNumber() uint64
func (*GetBalancesByAddressesRequestMessage) ReceivedAt ¶
func (*GetBalancesByAddressesRequestMessage) SetMessageNumber ¶
func (b *GetBalancesByAddressesRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetBalancesByAddressesRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetBalancesByAddressesResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBalancesByAddressesResponseMessage) MessageNumber ¶
func (b *GetBalancesByAddressesResponseMessage) MessageNumber() uint64
func (*GetBalancesByAddressesResponseMessage) ReceivedAt ¶
func (*GetBalancesByAddressesResponseMessage) SetMessageNumber ¶
func (b *GetBalancesByAddressesResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetBalancesByAddressesResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *GetBlockCountRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBlockCountRequestMessage) MessageNumber ¶
func (b *GetBlockCountRequestMessage) MessageNumber() uint64
func (*GetBlockCountRequestMessage) ReceivedAt ¶
func (*GetBlockCountRequestMessage) SetMessageNumber ¶
func (b *GetBlockCountRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetBlockCountRequestMessage) SetReceivedAt ¶
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 *externalapi.SyncInfo) *GetBlockCountResponseMessage
NewGetBlockCountResponseMessage returns a instance of the message
func (*GetBlockCountResponseMessage) Command ¶
func (msg *GetBlockCountResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBlockCountResponseMessage) MessageNumber ¶
func (b *GetBlockCountResponseMessage) MessageNumber() uint64
func (*GetBlockCountResponseMessage) ReceivedAt ¶
func (*GetBlockCountResponseMessage) SetMessageNumber ¶
func (b *GetBlockCountResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetBlockCountResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *GetBlockDAGInfoRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBlockDAGInfoRequestMessage) MessageNumber ¶
func (b *GetBlockDAGInfoRequestMessage) MessageNumber() uint64
func (*GetBlockDAGInfoRequestMessage) ReceivedAt ¶
func (*GetBlockDAGInfoRequestMessage) SetMessageNumber ¶
func (b *GetBlockDAGInfoRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetBlockDAGInfoRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetBlockDAGInfoResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBlockDAGInfoResponseMessage) MessageNumber ¶
func (b *GetBlockDAGInfoResponseMessage) MessageNumber() uint64
func (*GetBlockDAGInfoResponseMessage) ReceivedAt ¶
func (*GetBlockDAGInfoResponseMessage) SetMessageNumber ¶
func (b *GetBlockDAGInfoResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetBlockDAGInfoResponseMessage) SetReceivedAt ¶
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 (*GetBlockRequestMessage) SetMessageNumber ¶
func (b *GetBlockRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetBlockRequestMessage) SetReceivedAt ¶
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 (*GetBlockResponseMessage) SetMessageNumber ¶
func (b *GetBlockResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetBlockResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *GetBlockTemplateRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBlockTemplateRequestMessage) MessageNumber ¶
func (b *GetBlockTemplateRequestMessage) MessageNumber() uint64
func (*GetBlockTemplateRequestMessage) ReceivedAt ¶
func (*GetBlockTemplateRequestMessage) SetMessageNumber ¶
func (b *GetBlockTemplateRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetBlockTemplateRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetBlockTemplateResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBlockTemplateResponseMessage) MessageNumber ¶
func (b *GetBlockTemplateResponseMessage) MessageNumber() uint64
func (*GetBlockTemplateResponseMessage) ReceivedAt ¶
func (*GetBlockTemplateResponseMessage) SetMessageNumber ¶
func (b *GetBlockTemplateResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetBlockTemplateResponseMessage) SetReceivedAt ¶
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 (*GetBlocksRequestMessage) SetMessageNumber ¶
func (b *GetBlocksRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetBlocksRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetBlocksResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBlocksResponseMessage) MessageNumber ¶
func (b *GetBlocksResponseMessage) MessageNumber() uint64
func (*GetBlocksResponseMessage) ReceivedAt ¶
func (*GetBlocksResponseMessage) SetMessageNumber ¶
func (b *GetBlocksResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetBlocksResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *GetCoinSupplyRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetCoinSupplyRequestMessage) MessageNumber ¶
func (b *GetCoinSupplyRequestMessage) MessageNumber() uint64
func (*GetCoinSupplyRequestMessage) ReceivedAt ¶
func (*GetCoinSupplyRequestMessage) SetMessageNumber ¶
func (b *GetCoinSupplyRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetCoinSupplyRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetCoinSupplyResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetCoinSupplyResponseMessage) MessageNumber ¶
func (b *GetCoinSupplyResponseMessage) MessageNumber() uint64
func (*GetCoinSupplyResponseMessage) ReceivedAt ¶
func (*GetCoinSupplyResponseMessage) SetMessageNumber ¶
func (b *GetCoinSupplyResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetCoinSupplyResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *GetConnectedPeerInfoRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetConnectedPeerInfoRequestMessage) MessageNumber ¶
func (b *GetConnectedPeerInfoRequestMessage) MessageNumber() uint64
func (*GetConnectedPeerInfoRequestMessage) ReceivedAt ¶
func (*GetConnectedPeerInfoRequestMessage) SetMessageNumber ¶
func (b *GetConnectedPeerInfoRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetConnectedPeerInfoRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetConnectedPeerInfoResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetConnectedPeerInfoResponseMessage) MessageNumber ¶
func (b *GetConnectedPeerInfoResponseMessage) MessageNumber() uint64
func (*GetConnectedPeerInfoResponseMessage) ReceivedAt ¶
func (*GetConnectedPeerInfoResponseMessage) SetMessageNumber ¶
func (b *GetConnectedPeerInfoResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetConnectedPeerInfoResponseMessage) SetReceivedAt ¶
type GetCurrentNetworkRequestMessage ¶
type GetCurrentNetworkRequestMessage struct {
// contains filtered or unexported fields
}
GetCurrentNetworkRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetCurrentNetworkRequestMessage ¶
func NewGetCurrentNetworkRequestMessage() *GetCurrentNetworkRequestMessage
NewGetCurrentNetworkRequestMessage returns a instance of the message
func (*GetCurrentNetworkRequestMessage) Command ¶
func (msg *GetCurrentNetworkRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetCurrentNetworkRequestMessage) MessageNumber ¶
func (b *GetCurrentNetworkRequestMessage) MessageNumber() uint64
func (*GetCurrentNetworkRequestMessage) ReceivedAt ¶
func (*GetCurrentNetworkRequestMessage) SetMessageNumber ¶
func (b *GetCurrentNetworkRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetCurrentNetworkRequestMessage) SetReceivedAt ¶
type GetCurrentNetworkResponseMessage ¶
type GetCurrentNetworkResponseMessage struct { CurrentNetwork string Error *RPCError // contains filtered or unexported fields }
GetCurrentNetworkResponseMessage is an appmessage corresponding to its respective RPC message
func NewGetCurrentNetworkResponseMessage ¶
func NewGetCurrentNetworkResponseMessage(currentNetwork string) *GetCurrentNetworkResponseMessage
NewGetCurrentNetworkResponseMessage returns a instance of the message
func (*GetCurrentNetworkResponseMessage) Command ¶
func (msg *GetCurrentNetworkResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetCurrentNetworkResponseMessage) MessageNumber ¶
func (b *GetCurrentNetworkResponseMessage) MessageNumber() uint64
func (*GetCurrentNetworkResponseMessage) ReceivedAt ¶
func (*GetCurrentNetworkResponseMessage) SetMessageNumber ¶
func (b *GetCurrentNetworkResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetCurrentNetworkResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *GetHeadersRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetHeadersRequestMessage) MessageNumber ¶
func (b *GetHeadersRequestMessage) MessageNumber() uint64
func (*GetHeadersRequestMessage) ReceivedAt ¶
func (*GetHeadersRequestMessage) SetMessageNumber ¶
func (b *GetHeadersRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetHeadersRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetHeadersResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetHeadersResponseMessage) MessageNumber ¶
func (b *GetHeadersResponseMessage) MessageNumber() uint64
func (*GetHeadersResponseMessage) ReceivedAt ¶
func (*GetHeadersResponseMessage) SetMessageNumber ¶
func (b *GetHeadersResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetHeadersResponseMessage) SetReceivedAt ¶
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 (*GetInfoRequestMessage) SetMessageNumber ¶
func (b *GetInfoRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetInfoRequestMessage) SetReceivedAt ¶
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 (*GetInfoResponseMessage) SetMessageNumber ¶
func (b *GetInfoResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetInfoResponseMessage) SetReceivedAt ¶
type GetMempoolEntriesByAddressesRequestMessage ¶
type GetMempoolEntriesByAddressesRequestMessage struct { Addresses []string IncludeOrphanPool bool FilterTransactionPool bool // contains filtered or unexported fields }
GetMempoolEntriesByAddressesRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetMempoolEntriesByAddressesRequestMessage ¶
func NewGetMempoolEntriesByAddressesRequestMessage(addresses []string, includeOrphanPool bool, filterTransactionPool bool) *GetMempoolEntriesByAddressesRequestMessage
NewGetMempoolEntriesByAddressesRequestMessage returns a instance of the message
func (*GetMempoolEntriesByAddressesRequestMessage) Command ¶
func (msg *GetMempoolEntriesByAddressesRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetMempoolEntriesByAddressesRequestMessage) MessageNumber ¶
func (b *GetMempoolEntriesByAddressesRequestMessage) MessageNumber() uint64
func (*GetMempoolEntriesByAddressesRequestMessage) ReceivedAt ¶
func (*GetMempoolEntriesByAddressesRequestMessage) SetMessageNumber ¶
func (b *GetMempoolEntriesByAddressesRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetMempoolEntriesByAddressesRequestMessage) SetReceivedAt ¶
type GetMempoolEntriesByAddressesResponseMessage ¶
type GetMempoolEntriesByAddressesResponseMessage struct { Entries []*MempoolEntryByAddress Error *RPCError // contains filtered or unexported fields }
GetMempoolEntriesByAddressesResponseMessage is an appmessage corresponding to its respective RPC message
func NewGetMempoolEntriesByAddressesResponseMessage ¶
func NewGetMempoolEntriesByAddressesResponseMessage(entries []*MempoolEntryByAddress) *GetMempoolEntriesByAddressesResponseMessage
NewGetMempoolEntriesByAddressesResponseMessage returns a instance of the message
func (*GetMempoolEntriesByAddressesResponseMessage) Command ¶
func (msg *GetMempoolEntriesByAddressesResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetMempoolEntriesByAddressesResponseMessage) MessageNumber ¶
func (b *GetMempoolEntriesByAddressesResponseMessage) MessageNumber() uint64
func (*GetMempoolEntriesByAddressesResponseMessage) ReceivedAt ¶
func (*GetMempoolEntriesByAddressesResponseMessage) SetMessageNumber ¶
func (b *GetMempoolEntriesByAddressesResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetMempoolEntriesByAddressesResponseMessage) SetReceivedAt ¶
type GetMempoolEntriesRequestMessage ¶
type GetMempoolEntriesRequestMessage struct { IncludeOrphanPool bool FilterTransactionPool bool // contains filtered or unexported fields }
GetMempoolEntriesRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetMempoolEntriesRequestMessage ¶
func NewGetMempoolEntriesRequestMessage(includeOrphanPool bool, filterTransactionPool bool) *GetMempoolEntriesRequestMessage
NewGetMempoolEntriesRequestMessage returns a instance of the message
func (*GetMempoolEntriesRequestMessage) Command ¶
func (msg *GetMempoolEntriesRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetMempoolEntriesRequestMessage) MessageNumber ¶
func (b *GetMempoolEntriesRequestMessage) MessageNumber() uint64
func (*GetMempoolEntriesRequestMessage) ReceivedAt ¶
func (*GetMempoolEntriesRequestMessage) SetMessageNumber ¶
func (b *GetMempoolEntriesRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetMempoolEntriesRequestMessage) SetReceivedAt ¶
type GetMempoolEntriesResponseMessage ¶
type GetMempoolEntriesResponseMessage struct { Entries []*MempoolEntry Error *RPCError // contains filtered or unexported fields }
GetMempoolEntriesResponseMessage is an appmessage corresponding to its respective RPC message
func NewGetMempoolEntriesResponseMessage ¶
func NewGetMempoolEntriesResponseMessage(entries []*MempoolEntry) *GetMempoolEntriesResponseMessage
NewGetMempoolEntriesResponseMessage returns a instance of the message
func (*GetMempoolEntriesResponseMessage) Command ¶
func (msg *GetMempoolEntriesResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetMempoolEntriesResponseMessage) MessageNumber ¶
func (b *GetMempoolEntriesResponseMessage) MessageNumber() uint64
func (*GetMempoolEntriesResponseMessage) ReceivedAt ¶
func (*GetMempoolEntriesResponseMessage) SetMessageNumber ¶
func (b *GetMempoolEntriesResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetMempoolEntriesResponseMessage) SetReceivedAt ¶
type GetMempoolEntryRequestMessage ¶
type GetMempoolEntryRequestMessage struct { TxID string IncludeOrphanPool bool FilterTransactionPool bool // contains filtered or unexported fields }
GetMempoolEntryRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetMempoolEntryRequestMessage ¶
func NewGetMempoolEntryRequestMessage(txID string, includeOrphanPool bool, filterTransactionPool bool) *GetMempoolEntryRequestMessage
NewGetMempoolEntryRequestMessage returns a instance of the message
func (*GetMempoolEntryRequestMessage) Command ¶
func (msg *GetMempoolEntryRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetMempoolEntryRequestMessage) MessageNumber ¶
func (b *GetMempoolEntryRequestMessage) MessageNumber() uint64
func (*GetMempoolEntryRequestMessage) ReceivedAt ¶
func (*GetMempoolEntryRequestMessage) SetMessageNumber ¶
func (b *GetMempoolEntryRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetMempoolEntryRequestMessage) SetReceivedAt ¶
type GetMempoolEntryResponseMessage ¶
type GetMempoolEntryResponseMessage struct { Entry *MempoolEntry Error *RPCError // contains filtered or unexported fields }
GetMempoolEntryResponseMessage is an appmessage corresponding to its respective RPC message
func NewGetMempoolEntryResponseMessage ¶
func NewGetMempoolEntryResponseMessage(fee uint64, transaction *RPCTransaction, isOrphan bool) *GetMempoolEntryResponseMessage
NewGetMempoolEntryResponseMessage returns a instance of the message
func (*GetMempoolEntryResponseMessage) Command ¶
func (msg *GetMempoolEntryResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetMempoolEntryResponseMessage) MessageNumber ¶
func (b *GetMempoolEntryResponseMessage) MessageNumber() uint64
func (*GetMempoolEntryResponseMessage) ReceivedAt ¶
func (*GetMempoolEntryResponseMessage) SetMessageNumber ¶
func (b *GetMempoolEntryResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetMempoolEntryResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *GetPeerAddressesRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetPeerAddressesRequestMessage) MessageNumber ¶
func (b *GetPeerAddressesRequestMessage) MessageNumber() uint64
func (*GetPeerAddressesRequestMessage) ReceivedAt ¶
func (*GetPeerAddressesRequestMessage) SetMessageNumber ¶
func (b *GetPeerAddressesRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetPeerAddressesRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetPeerAddressesResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetPeerAddressesResponseMessage) MessageNumber ¶
func (b *GetPeerAddressesResponseMessage) MessageNumber() uint64
func (*GetPeerAddressesResponseMessage) ReceivedAt ¶
func (*GetPeerAddressesResponseMessage) SetMessageNumber ¶
func (b *GetPeerAddressesResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetPeerAddressesResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *GetSelectedTipHashRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetSelectedTipHashRequestMessage) MessageNumber ¶
func (b *GetSelectedTipHashRequestMessage) MessageNumber() uint64
func (*GetSelectedTipHashRequestMessage) ReceivedAt ¶
func (*GetSelectedTipHashRequestMessage) SetMessageNumber ¶
func (b *GetSelectedTipHashRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetSelectedTipHashRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetSelectedTipHashResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetSelectedTipHashResponseMessage) MessageNumber ¶
func (b *GetSelectedTipHashResponseMessage) MessageNumber() uint64
func (*GetSelectedTipHashResponseMessage) ReceivedAt ¶
func (*GetSelectedTipHashResponseMessage) SetMessageNumber ¶
func (b *GetSelectedTipHashResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetSelectedTipHashResponseMessage) SetReceivedAt ¶
type GetSubnetworkRequestMessage ¶
type GetSubnetworkRequestMessage struct { SubnetworkID string // contains filtered or unexported fields }
GetSubnetworkRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetSubnetworkRequestMessage ¶
func NewGetSubnetworkRequestMessage(subnetworkID string) *GetSubnetworkRequestMessage
NewGetSubnetworkRequestMessage returns a instance of the message
func (*GetSubnetworkRequestMessage) Command ¶
func (msg *GetSubnetworkRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetSubnetworkRequestMessage) MessageNumber ¶
func (b *GetSubnetworkRequestMessage) MessageNumber() uint64
func (*GetSubnetworkRequestMessage) ReceivedAt ¶
func (*GetSubnetworkRequestMessage) SetMessageNumber ¶
func (b *GetSubnetworkRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetSubnetworkRequestMessage) SetReceivedAt ¶
type GetSubnetworkResponseMessage ¶
type GetSubnetworkResponseMessage struct { GasLimit uint64 Error *RPCError // contains filtered or unexported fields }
GetSubnetworkResponseMessage is an appmessage corresponding to its respective RPC message
func NewGetSubnetworkResponseMessage ¶
func NewGetSubnetworkResponseMessage(gasLimit uint64) *GetSubnetworkResponseMessage
NewGetSubnetworkResponseMessage returns a instance of the message
func (*GetSubnetworkResponseMessage) Command ¶
func (msg *GetSubnetworkResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetSubnetworkResponseMessage) MessageNumber ¶
func (b *GetSubnetworkResponseMessage) MessageNumber() uint64
func (*GetSubnetworkResponseMessage) ReceivedAt ¶
func (*GetSubnetworkResponseMessage) SetMessageNumber ¶
func (b *GetSubnetworkResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetSubnetworkResponseMessage) SetReceivedAt ¶
type GetUTXOsByAddressesRequestMessage ¶
type GetUTXOsByAddressesRequestMessage struct { Addresses []string // contains filtered or unexported fields }
GetUTXOsByAddressesRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetUTXOsByAddressesRequestMessage ¶
func NewGetUTXOsByAddressesRequestMessage(addresses []string) *GetUTXOsByAddressesRequestMessage
NewGetUTXOsByAddressesRequestMessage returns a instance of the message
func (*GetUTXOsByAddressesRequestMessage) Command ¶
func (msg *GetUTXOsByAddressesRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetUTXOsByAddressesRequestMessage) MessageNumber ¶
func (b *GetUTXOsByAddressesRequestMessage) MessageNumber() uint64
func (*GetUTXOsByAddressesRequestMessage) ReceivedAt ¶
func (*GetUTXOsByAddressesRequestMessage) SetMessageNumber ¶
func (b *GetUTXOsByAddressesRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetUTXOsByAddressesRequestMessage) SetReceivedAt ¶
type GetUTXOsByAddressesResponseMessage ¶
type GetUTXOsByAddressesResponseMessage struct { Entries []*UTXOsByAddressesEntry Error *RPCError // contains filtered or unexported fields }
GetUTXOsByAddressesResponseMessage is an appmessage corresponding to its respective RPC message
func NewGetUTXOsByAddressesResponseMessage ¶
func NewGetUTXOsByAddressesResponseMessage(entries []*UTXOsByAddressesEntry) *GetUTXOsByAddressesResponseMessage
NewGetUTXOsByAddressesResponseMessage returns a instance of the message
func (*GetUTXOsByAddressesResponseMessage) Command ¶
func (msg *GetUTXOsByAddressesResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetUTXOsByAddressesResponseMessage) MessageNumber ¶
func (b *GetUTXOsByAddressesResponseMessage) MessageNumber() uint64
func (*GetUTXOsByAddressesResponseMessage) ReceivedAt ¶
func (*GetUTXOsByAddressesResponseMessage) SetMessageNumber ¶
func (b *GetUTXOsByAddressesResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetUTXOsByAddressesResponseMessage) SetReceivedAt ¶
type GetVirtualSelectedParentBlueScoreRequestMessage ¶
type GetVirtualSelectedParentBlueScoreRequestMessage struct {
// contains filtered or unexported fields
}
GetVirtualSelectedParentBlueScoreRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetVirtualSelectedParentBlueScoreRequestMessage ¶
func NewGetVirtualSelectedParentBlueScoreRequestMessage() *GetVirtualSelectedParentBlueScoreRequestMessage
NewGetVirtualSelectedParentBlueScoreRequestMessage returns a instance of the message
func (*GetVirtualSelectedParentBlueScoreRequestMessage) Command ¶
func (msg *GetVirtualSelectedParentBlueScoreRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetVirtualSelectedParentBlueScoreRequestMessage) MessageNumber ¶
func (b *GetVirtualSelectedParentBlueScoreRequestMessage) MessageNumber() uint64
func (*GetVirtualSelectedParentBlueScoreRequestMessage) ReceivedAt ¶
func (*GetVirtualSelectedParentBlueScoreRequestMessage) SetMessageNumber ¶
func (b *GetVirtualSelectedParentBlueScoreRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetVirtualSelectedParentBlueScoreRequestMessage) SetReceivedAt ¶
type GetVirtualSelectedParentBlueScoreResponseMessage ¶
type GetVirtualSelectedParentBlueScoreResponseMessage struct { BlueScore uint64 Error *RPCError // contains filtered or unexported fields }
GetVirtualSelectedParentBlueScoreResponseMessage is an appmessage corresponding to its respective RPC message
func NewGetVirtualSelectedParentBlueScoreResponseMessage ¶
func NewGetVirtualSelectedParentBlueScoreResponseMessage(blueScore uint64) *GetVirtualSelectedParentBlueScoreResponseMessage
NewGetVirtualSelectedParentBlueScoreResponseMessage returns a instance of the message
func (*GetVirtualSelectedParentBlueScoreResponseMessage) Command ¶
func (msg *GetVirtualSelectedParentBlueScoreResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetVirtualSelectedParentBlueScoreResponseMessage) MessageNumber ¶
func (b *GetVirtualSelectedParentBlueScoreResponseMessage) MessageNumber() uint64
func (*GetVirtualSelectedParentBlueScoreResponseMessage) ReceivedAt ¶
func (*GetVirtualSelectedParentBlueScoreResponseMessage) SetMessageNumber ¶
func (b *GetVirtualSelectedParentBlueScoreResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetVirtualSelectedParentBlueScoreResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *GetVirtualSelectedParentChainFromBlockRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetVirtualSelectedParentChainFromBlockRequestMessage) MessageNumber ¶
func (b *GetVirtualSelectedParentChainFromBlockRequestMessage) MessageNumber() uint64
func (*GetVirtualSelectedParentChainFromBlockRequestMessage) ReceivedAt ¶
func (*GetVirtualSelectedParentChainFromBlockRequestMessage) SetMessageNumber ¶
func (b *GetVirtualSelectedParentChainFromBlockRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetVirtualSelectedParentChainFromBlockRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *GetVirtualSelectedParentChainFromBlockResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetVirtualSelectedParentChainFromBlockResponseMessage) MessageNumber ¶
func (b *GetVirtualSelectedParentChainFromBlockResponseMessage) MessageNumber() uint64
func (*GetVirtualSelectedParentChainFromBlockResponseMessage) ReceivedAt ¶
func (*GetVirtualSelectedParentChainFromBlockResponseMessage) SetMessageNumber ¶
func (b *GetVirtualSelectedParentChainFromBlockResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetVirtualSelectedParentChainFromBlockResponseMessage) SetReceivedAt ¶
type IceNet ¶
type IceNet uint32
IceNet represents which ice network a message belongs to.
const ( // Mainnet represents the main ice network. Mainnet IceNet = 0x3ddcf71d // Testnet represents the test network. Testnet IceNet = 0xddb8af8f // Simnet represents the simulation test network. Simnet IceNet = 0x374dcf1c // Devnet represents the development test network. Devnet IceNet = 0x732d87e1 )
Constants used to indicate the message ice network. They can also be used to seek to the next message when a stream's state is unknown, but this package does not provide that functionality since it's generally a better idea to simply disconnect clients that are misbehaving over TCP.
type MempoolEntry ¶
type MempoolEntry struct { Fee uint64 Transaction *RPCTransaction IsOrphan bool }
MempoolEntry represents a transaction in the mempool.
type MempoolEntryByAddress ¶
type MempoolEntryByAddress struct { Address string Receiving []*MempoolEntry Sending []*MempoolEntry }
MempoolEntryByAddress represents MempoolEntries associated with some address
type Message ¶
type Message interface { Command() MessageCommand MessageNumber() uint64 SetMessageNumber(index uint64) ReceivedAt() time.Time SetReceivedAt(receivedAt time.Time) }
Message is an interface that describes a ice message. A type that implements Message has complete control over the representation of its data and may therefore contain additional or fewer fields than those which are used directly in the protocol encoded message.
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 CmdRequestHeaders CmdBlock CmdTx CmdPing CmdPong CmdRequestBlockLocator CmdBlockLocator CmdInvRelayBlock CmdRequestRelayBlocks CmdInvTransaction CmdRequestTransactions CmdDoneHeaders CmdTransactionNotFound CmdReject CmdRequestNextHeaders CmdRequestPruningPointUTXOSet CmdPruningPointUTXOSetChunk CmdUnexpectedPruningPoint CmdIBDBlockLocator CmdIBDBlockLocatorHighestHash CmdIBDBlockLocatorHighestHashNotFound CmdBlockHeaders CmdRequestNextPruningPointUTXOSetChunk CmdDonePruningPointUTXOSetChunks CmdBlockWithTrustedData CmdDoneBlocksWithTrustedData CmdRequestPruningPointAndItsAnticone CmdIBDBlock CmdRequestIBDBlocks CmdPruningPoints CmdRequestPruningPointProof CmdPruningPointProof CmdReady CmdTrustedData CmdBlockWithTrustedDataV4 CmdRequestNextPruningPointAndItsAnticoneBlocks CmdRequestIBDChainBlockLocator CmdIBDChainBlockLocator CmdRequestAnticone // rpc CmdGetCurrentNetworkRequestMessage CmdGetCurrentNetworkResponseMessage CmdSubmitBlockRequestMessage CmdSubmitBlockResponseMessage CmdGetBlockTemplateRequestMessage CmdGetBlockTemplateResponseMessage CmdGetBlockTemplateTransactionMessage CmdNotifyBlockAddedRequestMessage CmdNotifyBlockAddedResponseMessage CmdBlockAddedNotificationMessage CmdGetPeerAddressesRequestMessage CmdGetPeerAddressesResponseMessage CmdGetSelectedTipHashRequestMessage CmdGetSelectedTipHashResponseMessage CmdGetMempoolEntryRequestMessage CmdGetMempoolEntryResponseMessage CmdGetConnectedPeerInfoRequestMessage CmdGetConnectedPeerInfoResponseMessage CmdAddPeerRequestMessage CmdAddPeerResponseMessage CmdSubmitTransactionRequestMessage CmdSubmitTransactionResponseMessage CmdNotifyVirtualSelectedParentChainChangedRequestMessage CmdNotifyVirtualSelectedParentChainChangedResponseMessage CmdVirtualSelectedParentChainChangedNotificationMessage CmdGetBlockRequestMessage CmdGetBlockResponseMessage CmdGetSubnetworkRequestMessage CmdGetSubnetworkResponseMessage CmdGetVirtualSelectedParentChainFromBlockRequestMessage CmdGetVirtualSelectedParentChainFromBlockResponseMessage CmdGetBlocksRequestMessage CmdGetBlocksResponseMessage CmdGetBlockCountRequestMessage CmdGetBlockCountResponseMessage CmdGetBlockDAGInfoRequestMessage CmdGetBlockDAGInfoResponseMessage CmdResolveFinalityConflictRequestMessage CmdResolveFinalityConflictResponseMessage CmdNotifyFinalityConflictsRequestMessage CmdNotifyFinalityConflictsResponseMessage CmdFinalityConflictNotificationMessage CmdFinalityConflictResolvedNotificationMessage CmdGetMempoolEntriesRequestMessage CmdGetMempoolEntriesResponseMessage CmdShutDownRequestMessage CmdShutDownResponseMessage CmdGetHeadersRequestMessage CmdGetHeadersResponseMessage CmdNotifyUTXOsChangedRequestMessage CmdNotifyUTXOsChangedResponseMessage CmdUTXOsChangedNotificationMessage CmdStopNotifyingUTXOsChangedRequestMessage CmdStopNotifyingUTXOsChangedResponseMessage CmdGetUTXOsByAddressesRequestMessage CmdGetUTXOsByAddressesResponseMessage CmdGetBalanceByAddressRequestMessage CmdGetBalanceByAddressResponseMessage CmdGetVirtualSelectedParentBlueScoreRequestMessage CmdGetVirtualSelectedParentBlueScoreResponseMessage CmdNotifyVirtualSelectedParentBlueScoreChangedRequestMessage CmdNotifyVirtualSelectedParentBlueScoreChangedResponseMessage CmdVirtualSelectedParentBlueScoreChangedNotificationMessage CmdBanRequestMessage CmdBanResponseMessage CmdUnbanRequestMessage CmdUnbanResponseMessage CmdGetInfoRequestMessage CmdGetInfoResponseMessage CmdNotifyPruningPointUTXOSetOverrideRequestMessage CmdNotifyPruningPointUTXOSetOverrideResponseMessage CmdPruningPointUTXOSetOverrideNotificationMessage CmdStopNotifyingPruningPointUTXOSetOverrideRequestMessage CmdStopNotifyingPruningPointUTXOSetOverrideResponseMessage CmdEstimateNetworkHashesPerSecondRequestMessage CmdEstimateNetworkHashesPerSecondResponseMessage CmdNotifyVirtualDaaScoreChangedRequestMessage CmdNotifyVirtualDaaScoreChangedResponseMessage CmdVirtualDaaScoreChangedNotificationMessage CmdGetBalancesByAddressesRequestMessage CmdGetBalancesByAddressesResponseMessage CmdNotifyNewBlockTemplateRequestMessage CmdNotifyNewBlockTemplateResponseMessage CmdNewBlockTemplateNotificationMessage CmdGetMempoolEntriesByAddressesRequestMessage CmdGetMempoolEntriesByAddressesResponseMessage CmdGetCoinSupplyRequestMessage CmdGetCoinSupplyResponseMessage )
Commands used in ice message headers which describe the type of message.
func (MessageCommand) String ¶
func (cmd MessageCommand) String() string
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 ice 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 MsgAddresses ¶
type MsgAddresses struct { AddressList []*NetAddress // contains filtered or unexported fields }
MsgAddresses implements the Message interface and represents a ice Addresses message.
func NewMsgAddresses ¶
func NewMsgAddresses(addressList []*NetAddress) *MsgAddresses
NewMsgAddresses returns a new ice Addresses message that conforms to the Message interface. See MsgAddresses for details.
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 (*MsgAddresses) SetMessageNumber ¶
func (b *MsgAddresses) SetMessageNumber(messageNumber uint64)
func (*MsgAddresses) SetReceivedAt ¶
type MsgBlock ¶
type MsgBlock struct { Header MsgBlockHeader Transactions []*MsgTx // contains filtered or unexported fields }
MsgBlock implements the Message interface and represents a ice block message. It is used to deliver block and transaction information in response to a getdata message (MsgGetData) for a given block hash.
func DomainBlockToMsgBlock ¶
func DomainBlockToMsgBlock(domainBlock *externalapi.DomainBlock) *MsgBlock
DomainBlockToMsgBlock converts an externalapi.DomainBlock to MsgBlock
func NewMsgBlock ¶
func NewMsgBlock(blockHeader *MsgBlockHeader) *MsgBlock
NewMsgBlock returns a new ice block message that conforms to the Message interface. See MsgBlock for details.
func (*MsgBlock) AddTransaction ¶
AddTransaction adds a transaction to the message.
func (*MsgBlock) ClearTransactions ¶
func (msg *MsgBlock) ClearTransactions()
ClearTransactions removes all transactions from the message.
func (*MsgBlock) Command ¶
func (msg *MsgBlock) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgBlock) ConvertToPartial ¶
func (msg *MsgBlock) ConvertToPartial(subnetworkID *externalapi.DomainSubnetworkID)
ConvertToPartial clears out all the payloads of the subnetworks that are incompatible with the given subnetwork ID. Note: this operation modifies the block in place.
func (*MsgBlock) MaxPayloadLength ¶
MaxPayloadLength returns the maximum length the payload can be for the receiver. This is part of the Message interface implementation.
func (*MsgBlock) MessageNumber ¶
func (b *MsgBlock) MessageNumber() uint64
func (*MsgBlock) ReceivedAt ¶
func (*MsgBlock) SetMessageNumber ¶
func (b *MsgBlock) SetMessageNumber(messageNumber uint64)
func (*MsgBlock) SetReceivedAt ¶
type MsgBlockHeader ¶
type MsgBlockHeader struct { // Version of the block. This is not the same as the protocol version. Version uint16 // Parents are the parent block hashes of the block in the DAG per superblock level. Parents []externalapi.BlockLevelParents // HashMerkleRoot is the merkle tree reference to hash of all transactions for the block. HashMerkleRoot *externalapi.DomainHash // AcceptedIDMerkleRoot is merkle tree reference to hash all transactions // accepted form the block.Blues AcceptedIDMerkleRoot *externalapi.DomainHash // UTXOCommitment is an ECMH UTXO commitment to the block UTXO. UTXOCommitment *externalapi.DomainHash // Time the block was created. Timestamp mstime.Time // Difficulty target for the block. Bits uint32 // Nonce used to generate the block. Nonce uint64 // DAASCore is the DAA score of the block. DAAScore uint64 BlueScore uint64 // BlueWork is the blue work of the block. BlueWork *big.Int PruningPoint *externalapi.DomainHash // contains filtered or unexported fields }
MsgBlockHeader defines information about a block and is used in the ice block (MsgBlock) and headers (MsgHeader) messages.
func DomainBlockHeaderToBlockHeader ¶
func DomainBlockHeaderToBlockHeader(domainBlockHeader externalapi.BlockHeader) *MsgBlockHeader
DomainBlockHeaderToBlockHeader converts an externalapi.BlockHeader to MsgBlockHeader
func NewBlockHeader ¶
func NewBlockHeader(version uint16, parents []externalapi.BlockLevelParents, hashMerkleRoot *externalapi.DomainHash, acceptedIDMerkleRoot *externalapi.DomainHash, utxoCommitment *externalapi.DomainHash, bits uint32, nonce, daaScore, blueScore uint64, blueWork *big.Int, pruningPoint *externalapi.DomainHash) *MsgBlockHeader
NewBlockHeader returns a new MsgBlockHeader using the provided version, previous block hash, hash merkle root, accepted ID merkle root, difficulty bits, and nonce used to generate the block with defaults or calclulated values for the remaining fields.
func (*MsgBlockHeader) BlockHash ¶
func (h *MsgBlockHeader) BlockHash() *externalapi.DomainHash
BlockHash computes the block identifier hash for the given block header.
func (*MsgBlockHeader) MessageNumber ¶
func (b *MsgBlockHeader) MessageNumber() uint64
func (*MsgBlockHeader) ReceivedAt ¶
func (*MsgBlockHeader) SetMessageNumber ¶
func (b *MsgBlockHeader) SetMessageNumber(messageNumber uint64)
func (*MsgBlockHeader) SetReceivedAt ¶
type MsgBlockLocator ¶
type MsgBlockLocator struct { BlockLocatorHashes []*externalapi.DomainHash // contains filtered or unexported fields }
MsgBlockLocator implements the Message interface and represents a ice locator message. It is used to find the blockLocator of a peer that is syncing with you.
func NewMsgBlockLocator ¶
func NewMsgBlockLocator(locatorHashes []*externalapi.DomainHash) *MsgBlockLocator
NewMsgBlockLocator returns a new ice locator message that conforms to the Message interface. See MsgBlockLocator for details.
func (*MsgBlockLocator) Command ¶
func (msg *MsgBlockLocator) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgBlockLocator) MessageNumber ¶
func (b *MsgBlockLocator) MessageNumber() uint64
func (*MsgBlockLocator) ReceivedAt ¶
func (*MsgBlockLocator) SetMessageNumber ¶
func (b *MsgBlockLocator) SetMessageNumber(messageNumber uint64)
func (*MsgBlockLocator) SetReceivedAt ¶
type MsgBlockWithTrustedData ¶
type MsgBlockWithTrustedData struct { Block *MsgBlock DAAScore uint64 DAAWindow []*TrustedDataDataDAABlock GHOSTDAGData []*BlockGHOSTDAGDataHashPair // contains filtered or unexported fields }
MsgBlockWithTrustedData represents a ice BlockWithTrustedData message
func DomainBlockWithTrustedDataToBlockWithTrustedData ¶
func DomainBlockWithTrustedDataToBlockWithTrustedData(block *externalapi.BlockWithTrustedData) *MsgBlockWithTrustedData
DomainBlockWithTrustedDataToBlockWithTrustedData converts *externalapi.BlockWithTrustedData to *MsgBlockWithTrustedData
func NewMsgBlockWithTrustedData ¶
func NewMsgBlockWithTrustedData() *MsgBlockWithTrustedData
NewMsgBlockWithTrustedData returns a new MsgBlockWithTrustedData.
func (*MsgBlockWithTrustedData) Command ¶
func (msg *MsgBlockWithTrustedData) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgBlockWithTrustedData) MessageNumber ¶
func (b *MsgBlockWithTrustedData) MessageNumber() uint64
func (*MsgBlockWithTrustedData) ReceivedAt ¶
func (*MsgBlockWithTrustedData) SetMessageNumber ¶
func (b *MsgBlockWithTrustedData) SetMessageNumber(messageNumber uint64)
func (*MsgBlockWithTrustedData) SetReceivedAt ¶
type MsgBlockWithTrustedDataV4 ¶
type MsgBlockWithTrustedDataV4 struct { Block *MsgBlock DAAWindowIndices []uint64 GHOSTDAGDataIndices []uint64 // contains filtered or unexported fields }
MsgBlockWithTrustedDataV4 represents a Ice BlockWithTrustedDataV4 message
func DomainBlockWithTrustedDataToBlockWithTrustedDataV4 ¶
func DomainBlockWithTrustedDataToBlockWithTrustedDataV4(block *externalapi.DomainBlock, daaWindowIndices, ghostdagDataIndices []uint64) *MsgBlockWithTrustedDataV4
DomainBlockWithTrustedDataToBlockWithTrustedDataV4 converts a set of *externalapi.DomainBlock, daa window indices and ghostdag data indices to *MsgBlockWithTrustedDataV4
func NewMsgBlockWithTrustedDataV4 ¶
func NewMsgBlockWithTrustedDataV4() *MsgBlockWithTrustedDataV4
NewMsgBlockWithTrustedDataV4 returns a new MsgBlockWithTrustedDataV4.
func (*MsgBlockWithTrustedDataV4) Command ¶
func (msg *MsgBlockWithTrustedDataV4) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgBlockWithTrustedDataV4) MessageNumber ¶
func (b *MsgBlockWithTrustedDataV4) MessageNumber() uint64
func (*MsgBlockWithTrustedDataV4) ReceivedAt ¶
func (*MsgBlockWithTrustedDataV4) SetMessageNumber ¶
func (b *MsgBlockWithTrustedDataV4) SetMessageNumber(messageNumber uint64)
func (*MsgBlockWithTrustedDataV4) SetReceivedAt ¶
type MsgDoneBlocksWithTrustedData ¶
type MsgDoneBlocksWithTrustedData struct {
// contains filtered or unexported fields
}
MsgDoneBlocksWithTrustedData implements the Message interface and represents a Ice DoneBlocksWithTrustedData message
This message has no payload.
func NewMsgDoneBlocksWithTrustedData ¶
func NewMsgDoneBlocksWithTrustedData() *MsgDoneBlocksWithTrustedData
NewMsgDoneBlocksWithTrustedData returns a new Ice DoneBlocksWithTrustedData message that conforms to the Message interface.
func (*MsgDoneBlocksWithTrustedData) Command ¶
func (msg *MsgDoneBlocksWithTrustedData) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgDoneBlocksWithTrustedData) MessageNumber ¶
func (b *MsgDoneBlocksWithTrustedData) MessageNumber() uint64
func (*MsgDoneBlocksWithTrustedData) ReceivedAt ¶
func (*MsgDoneBlocksWithTrustedData) SetMessageNumber ¶
func (b *MsgDoneBlocksWithTrustedData) SetMessageNumber(messageNumber uint64)
func (*MsgDoneBlocksWithTrustedData) SetReceivedAt ¶
type MsgDoneHeaders ¶
type MsgDoneHeaders struct {
// contains filtered or unexported fields
}
MsgDoneHeaders implements the Message interface and represents a ice DoneHeaders message. It is used to notify the IBD syncing peer that the syncer sent all the requested headers.
This message has no payload.
func NewMsgDoneHeaders ¶
func NewMsgDoneHeaders() *MsgDoneHeaders
NewMsgDoneHeaders returns a new ice DoneIBDBlocks message that conforms to the Message interface.
func (*MsgDoneHeaders) Command ¶
func (msg *MsgDoneHeaders) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgDoneHeaders) MessageNumber ¶
func (b *MsgDoneHeaders) MessageNumber() uint64
func (*MsgDoneHeaders) ReceivedAt ¶
func (*MsgDoneHeaders) SetMessageNumber ¶
func (b *MsgDoneHeaders) SetMessageNumber(messageNumber uint64)
func (*MsgDoneHeaders) SetReceivedAt ¶
type MsgDonePruningPointUTXOSetChunks ¶
type MsgDonePruningPointUTXOSetChunks struct {
// contains filtered or unexported fields
}
MsgDonePruningPointUTXOSetChunks represents a ice DonePruningPointUTXOSetChunks message
func NewMsgDonePruningPointUTXOSetChunks ¶
func NewMsgDonePruningPointUTXOSetChunks() *MsgDonePruningPointUTXOSetChunks
NewMsgDonePruningPointUTXOSetChunks returns a new MsgDonePruningPointUTXOSetChunks.
func (*MsgDonePruningPointUTXOSetChunks) Command ¶
func (msg *MsgDonePruningPointUTXOSetChunks) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgDonePruningPointUTXOSetChunks) MessageNumber ¶
func (b *MsgDonePruningPointUTXOSetChunks) MessageNumber() uint64
func (*MsgDonePruningPointUTXOSetChunks) ReceivedAt ¶
func (*MsgDonePruningPointUTXOSetChunks) SetMessageNumber ¶
func (b *MsgDonePruningPointUTXOSetChunks) SetMessageNumber(messageNumber uint64)
func (*MsgDonePruningPointUTXOSetChunks) SetReceivedAt ¶
type MsgIBDBlock ¶
type MsgIBDBlock struct { *MsgBlock // contains filtered or unexported fields }
MsgIBDBlock implements the Message interface and represents a ice ibdblock message. It is used to deliver block and transaction information in response to a RequestIBDBlocks message (MsgRequestIBDBlocks).
func NewMsgIBDBlock ¶
func NewMsgIBDBlock(msgBlock *MsgBlock) *MsgIBDBlock
NewMsgIBDBlock returns a new ice ibdblock message that conforms to the Message interface. See MsgIBDBlock for details.
func (*MsgIBDBlock) Command ¶
func (msg *MsgIBDBlock) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgIBDBlock) MaxPayloadLength ¶
func (msg *MsgIBDBlock) MaxPayloadLength(pver uint32) uint32
MaxPayloadLength returns the maximum length the payload can be for the receiver. This is part of the Message interface implementation.
func (*MsgIBDBlock) MessageNumber ¶
func (b *MsgIBDBlock) MessageNumber() uint64
func (*MsgIBDBlock) ReceivedAt ¶
func (*MsgIBDBlock) SetMessageNumber ¶
func (b *MsgIBDBlock) SetMessageNumber(messageNumber uint64)
func (*MsgIBDBlock) SetReceivedAt ¶
type MsgIBDBlockLocator ¶
type MsgIBDBlockLocator struct { TargetHash *externalapi.DomainHash BlockLocatorHashes []*externalapi.DomainHash // contains filtered or unexported fields }
MsgIBDBlockLocator represents a ice ibdBlockLocator message
func NewMsgIBDBlockLocator ¶
func NewMsgIBDBlockLocator(targetHash *externalapi.DomainHash, blockLocatorHashes []*externalapi.DomainHash) *MsgIBDBlockLocator
NewMsgIBDBlockLocator returns a new ice ibdBlockLocator message
func (*MsgIBDBlockLocator) Command ¶
func (msg *MsgIBDBlockLocator) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgIBDBlockLocator) MessageNumber ¶
func (b *MsgIBDBlockLocator) MessageNumber() uint64
func (*MsgIBDBlockLocator) ReceivedAt ¶
func (*MsgIBDBlockLocator) SetMessageNumber ¶
func (b *MsgIBDBlockLocator) SetMessageNumber(messageNumber uint64)
func (*MsgIBDBlockLocator) SetReceivedAt ¶
type MsgIBDBlockLocatorHighestHash ¶
type MsgIBDBlockLocatorHighestHash struct { HighestHash *externalapi.DomainHash // contains filtered or unexported fields }
MsgIBDBlockLocatorHighestHash represents a ice BlockLocatorHighestHash message
func NewMsgIBDBlockLocatorHighestHash ¶
func NewMsgIBDBlockLocatorHighestHash(highestHash *externalapi.DomainHash) *MsgIBDBlockLocatorHighestHash
NewMsgIBDBlockLocatorHighestHash returns a new BlockLocatorHighestHash message
func (*MsgIBDBlockLocatorHighestHash) Command ¶
func (msg *MsgIBDBlockLocatorHighestHash) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgIBDBlockLocatorHighestHash) MessageNumber ¶
func (b *MsgIBDBlockLocatorHighestHash) MessageNumber() uint64
func (*MsgIBDBlockLocatorHighestHash) ReceivedAt ¶
func (*MsgIBDBlockLocatorHighestHash) SetMessageNumber ¶
func (b *MsgIBDBlockLocatorHighestHash) SetMessageNumber(messageNumber uint64)
func (*MsgIBDBlockLocatorHighestHash) SetReceivedAt ¶
type MsgIBDBlockLocatorHighestHashNotFound ¶
type MsgIBDBlockLocatorHighestHashNotFound struct {
// contains filtered or unexported fields
}
MsgIBDBlockLocatorHighestHashNotFound represents a ice BlockLocatorHighestHashNotFound message
func NewMsgIBDBlockLocatorHighestHashNotFound ¶
func NewMsgIBDBlockLocatorHighestHashNotFound() *MsgIBDBlockLocatorHighestHashNotFound
NewMsgIBDBlockLocatorHighestHashNotFound returns a new IBDBlockLocatorHighestHashNotFound message
func (*MsgIBDBlockLocatorHighestHashNotFound) Command ¶
func (msg *MsgIBDBlockLocatorHighestHashNotFound) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgIBDBlockLocatorHighestHashNotFound) MessageNumber ¶
func (b *MsgIBDBlockLocatorHighestHashNotFound) MessageNumber() uint64
func (*MsgIBDBlockLocatorHighestHashNotFound) ReceivedAt ¶
func (*MsgIBDBlockLocatorHighestHashNotFound) SetMessageNumber ¶
func (b *MsgIBDBlockLocatorHighestHashNotFound) SetMessageNumber(messageNumber uint64)
func (*MsgIBDBlockLocatorHighestHashNotFound) SetReceivedAt ¶
type MsgIBDChainBlockLocator ¶
type MsgIBDChainBlockLocator struct { BlockLocatorHashes []*externalapi.DomainHash // contains filtered or unexported fields }
MsgIBDChainBlockLocator implements the Message interface and represents a ice locator message. It is used to find the blockLocator of a peer that is syncing with you.
func NewMsgIBDChainBlockLocator ¶
func NewMsgIBDChainBlockLocator(locatorHashes []*externalapi.DomainHash) *MsgIBDChainBlockLocator
NewMsgIBDChainBlockLocator returns a new ice locator message that conforms to the Message interface. See MsgBlockLocator for details.
func (*MsgIBDChainBlockLocator) Command ¶
func (msg *MsgIBDChainBlockLocator) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgIBDChainBlockLocator) MessageNumber ¶
func (b *MsgIBDChainBlockLocator) MessageNumber() uint64
func (*MsgIBDChainBlockLocator) ReceivedAt ¶
func (*MsgIBDChainBlockLocator) SetMessageNumber ¶
func (b *MsgIBDChainBlockLocator) SetMessageNumber(messageNumber uint64)
func (*MsgIBDChainBlockLocator) SetReceivedAt ¶
type MsgInvRelayBlock ¶
type MsgInvRelayBlock struct { Hash *externalapi.DomainHash // contains filtered or unexported fields }
MsgInvRelayBlock implements the Message interface and represents a ice block inventory message. It is used to notify the network about new block by sending their hash, and let the receiving node decide if it needs it.
func NewMsgInvBlock ¶
func NewMsgInvBlock(hash *externalapi.DomainHash) *MsgInvRelayBlock
NewMsgInvBlock returns a new ice invrelblk message that conforms to the Message interface. See MsgInvRelayBlock for details.
func (*MsgInvRelayBlock) Command ¶
func (msg *MsgInvRelayBlock) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgInvRelayBlock) MessageNumber ¶
func (b *MsgInvRelayBlock) MessageNumber() uint64
func (*MsgInvRelayBlock) ReceivedAt ¶
func (*MsgInvRelayBlock) SetMessageNumber ¶
func (b *MsgInvRelayBlock) SetMessageNumber(messageNumber uint64)
func (*MsgInvRelayBlock) SetReceivedAt ¶
type MsgInvTransaction ¶
type MsgInvTransaction struct { TxIDs []*externalapi.DomainTransactionID // contains filtered or unexported fields }
MsgInvTransaction implements the Message interface and represents a ice TxInv message. It is used to notify the network about new transactions by sending their ID, and let the receiving node decide if it needs it.
func NewMsgInvTransaction ¶
func NewMsgInvTransaction(ids []*externalapi.DomainTransactionID) *MsgInvTransaction
NewMsgInvTransaction returns a new ice TxInv message that conforms to the Message interface. See MsgInvTransaction for details.
func (*MsgInvTransaction) Command ¶
func (msg *MsgInvTransaction) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgInvTransaction) MessageNumber ¶
func (b *MsgInvTransaction) MessageNumber() uint64
func (*MsgInvTransaction) ReceivedAt ¶
func (*MsgInvTransaction) SetMessageNumber ¶
func (b *MsgInvTransaction) SetMessageNumber(messageNumber uint64)
func (*MsgInvTransaction) SetReceivedAt ¶
type MsgPing ¶
type MsgPing struct { // Unique value associated with message that is used to identify // specific ping message. Nonce uint64 // contains filtered or unexported fields }
MsgPing implements the Message interface and represents a ice ping message.
For versions BIP0031Version and earlier, it is used primarily to confirm that a connection is still valid. A transmission error is typically interpreted as a closed connection and that the peer should be removed. For versions AFTER BIP0031Version it contains an identifier which can be returned in the pong message to determine network timing.
The payload for this message just consists of a nonce used for identifying it later.
func NewMsgPing ¶
NewMsgPing returns a new ice ping message that conforms to the Message interface. See MsgPing for details.
func (*MsgPing) Command ¶
func (msg *MsgPing) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgPing) MessageNumber ¶
func (b *MsgPing) MessageNumber() uint64
func (*MsgPing) ReceivedAt ¶
func (*MsgPing) SetMessageNumber ¶
func (b *MsgPing) SetMessageNumber(messageNumber uint64)
func (*MsgPing) SetReceivedAt ¶
type MsgPong ¶
type MsgPong struct { // Unique value associated with message that is used to identify // specific ping message. Nonce uint64 // contains filtered or unexported fields }
MsgPong implements the Message interface and represents a ice pong message which is used primarily to confirm that a connection is still valid in response to a ice ping message (MsgPing).
This message was not added until protocol versions AFTER BIP0031Version.
func NewMsgPong ¶
NewMsgPong returns a new ice pong message that conforms to the Message interface. See MsgPong for details.
func (*MsgPong) Command ¶
func (msg *MsgPong) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgPong) MessageNumber ¶
func (b *MsgPong) MessageNumber() uint64
func (*MsgPong) ReceivedAt ¶
func (*MsgPong) SetMessageNumber ¶
func (b *MsgPong) SetMessageNumber(messageNumber uint64)
func (*MsgPong) SetReceivedAt ¶
type MsgPruningPointProof ¶
type MsgPruningPointProof struct { Headers [][]*MsgBlockHeader // contains filtered or unexported fields }
MsgPruningPointProof represents a ice PruningPointProof message
func DomainPruningPointProofToMsgPruningPointProof ¶
func DomainPruningPointProofToMsgPruningPointProof(pruningPointProof *externalapi.PruningPointProof) *MsgPruningPointProof
DomainPruningPointProofToMsgPruningPointProof converts *externalapi.PruningPointProof to *MsgPruningPointProof
func NewMsgPruningPointProof ¶
func NewMsgPruningPointProof(headers [][]*MsgBlockHeader) *MsgPruningPointProof
NewMsgPruningPointProof returns a new MsgPruningPointProof.
func (*MsgPruningPointProof) Command ¶
func (msg *MsgPruningPointProof) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgPruningPointProof) MessageNumber ¶
func (b *MsgPruningPointProof) MessageNumber() uint64
func (*MsgPruningPointProof) ReceivedAt ¶
func (*MsgPruningPointProof) SetMessageNumber ¶
func (b *MsgPruningPointProof) SetMessageNumber(messageNumber uint64)
func (*MsgPruningPointProof) SetReceivedAt ¶
type MsgPruningPointUTXOSetChunk ¶
type MsgPruningPointUTXOSetChunk struct { OutpointAndUTXOEntryPairs []*OutpointAndUTXOEntryPair // contains filtered or unexported fields }
MsgPruningPointUTXOSetChunk represents a ice PruningPointUTXOSetChunk message
func NewMsgPruningPointUTXOSetChunk ¶
func NewMsgPruningPointUTXOSetChunk(outpointAndUTXOEntryPairs []*OutpointAndUTXOEntryPair) *MsgPruningPointUTXOSetChunk
NewMsgPruningPointUTXOSetChunk returns a new MsgPruningPointUTXOSetChunk.
func (*MsgPruningPointUTXOSetChunk) Command ¶
func (msg *MsgPruningPointUTXOSetChunk) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgPruningPointUTXOSetChunk) MessageNumber ¶
func (b *MsgPruningPointUTXOSetChunk) MessageNumber() uint64
func (*MsgPruningPointUTXOSetChunk) ReceivedAt ¶
func (*MsgPruningPointUTXOSetChunk) SetMessageNumber ¶
func (b *MsgPruningPointUTXOSetChunk) SetMessageNumber(messageNumber uint64)
func (*MsgPruningPointUTXOSetChunk) SetReceivedAt ¶
type MsgPruningPoints ¶
type MsgPruningPoints struct { Headers []*MsgBlockHeader // contains filtered or unexported fields }
MsgPruningPoints represents a ice PruningPoints message
func NewMsgPruningPoints ¶
func NewMsgPruningPoints(headers []*MsgBlockHeader) *MsgPruningPoints
NewMsgPruningPoints returns a new MsgPruningPoints.
func (*MsgPruningPoints) Command ¶
func (msg *MsgPruningPoints) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgPruningPoints) MessageNumber ¶
func (b *MsgPruningPoints) MessageNumber() uint64
func (*MsgPruningPoints) ReceivedAt ¶
func (*MsgPruningPoints) SetMessageNumber ¶
func (b *MsgPruningPoints) SetMessageNumber(messageNumber uint64)
func (*MsgPruningPoints) SetReceivedAt ¶
type MsgReady ¶
type MsgReady struct {
// contains filtered or unexported fields
}
MsgReady implements the Message interface and represents a ice 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 kaspa 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 (*MsgReady) SetMessageNumber ¶
func (b *MsgReady) SetMessageNumber(messageNumber uint64)
func (*MsgReady) SetReceivedAt ¶
type MsgReject ¶
type MsgReject struct { Reason string // contains filtered or unexported fields }
MsgReject implements the Message interface and represents a kaspa Reject message. It is used to notify peers why they are banned.
func NewMsgReject ¶
NewMsgReject returns a new kaspa 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 (*MsgReject) SetMessageNumber ¶
func (b *MsgReject) SetMessageNumber(messageNumber uint64)
func (*MsgReject) SetReceivedAt ¶
type MsgRequestAddresses ¶
type MsgRequestAddresses struct { IncludeAllSubnetworks bool SubnetworkID *externalapi.DomainSubnetworkID // contains filtered or unexported fields }
MsgRequestAddresses implements the Message interface and represents a kaspa 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 *externalapi.DomainSubnetworkID) *MsgRequestAddresses
NewMsgRequestAddresses returns a new kaspa 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 (*MsgRequestAddresses) SetMessageNumber ¶
func (b *MsgRequestAddresses) SetMessageNumber(messageNumber uint64)
func (*MsgRequestAddresses) SetReceivedAt ¶
type MsgRequestAnticone ¶
type MsgRequestAnticone struct { BlockHash *externalapi.DomainHash ContextHash *externalapi.DomainHash // contains filtered or unexported fields }
MsgRequestAnticone implements the Message interface and represents a ice RequestHeaders message. It is used to request the set past(ContextHash) \cap anticone(BlockHash)
func NewMsgRequestAnticone ¶
func NewMsgRequestAnticone(blockHash, contextHash *externalapi.DomainHash) *MsgRequestAnticone
NewMsgRequestAnticone returns a new ice RequestPastDiff message that conforms to the Message interface using the passed parameters and defaults for the remaining fields.
func (*MsgRequestAnticone) Command ¶
func (msg *MsgRequestAnticone) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgRequestAnticone) MessageNumber ¶
func (b *MsgRequestAnticone) MessageNumber() uint64
func (*MsgRequestAnticone) ReceivedAt ¶
func (*MsgRequestAnticone) SetMessageNumber ¶
func (b *MsgRequestAnticone) SetMessageNumber(messageNumber uint64)
func (*MsgRequestAnticone) SetReceivedAt ¶
type MsgRequestIBDChainBlockLocator ¶
type MsgRequestIBDChainBlockLocator struct { HighHash *externalapi.DomainHash LowHash *externalapi.DomainHash // contains filtered or unexported fields }
MsgRequestIBDChainBlockLocator implements the Message interface and represents a ice IBDRequestChainBlockLocator message. It is used to request a block locator between low and high hash. The locator is returned via a locator message (MsgIBDChainBlockLocator).
func NewMsgIBDRequestChainBlockLocator ¶
func NewMsgIBDRequestChainBlockLocator(highHash, lowHash *externalapi.DomainHash) *MsgRequestIBDChainBlockLocator
NewMsgIBDRequestChainBlockLocator returns a new IBDRequestChainBlockLocator message that conforms to the Message interface using the passed parameters and defaults for the remaining fields.
func (*MsgRequestIBDChainBlockLocator) Command ¶
func (msg *MsgRequestIBDChainBlockLocator) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgRequestIBDChainBlockLocator) MessageNumber ¶
func (b *MsgRequestIBDChainBlockLocator) MessageNumber() uint64
func (*MsgRequestIBDChainBlockLocator) ReceivedAt ¶
func (*MsgRequestIBDChainBlockLocator) SetMessageNumber ¶
func (b *MsgRequestIBDChainBlockLocator) SetMessageNumber(messageNumber uint64)
func (*MsgRequestIBDChainBlockLocator) SetReceivedAt ¶
type MsgRequestNextHeaders ¶
type MsgRequestNextHeaders struct {
// contains filtered or unexported fields
}
MsgRequestNextHeaders implements the Message interface and represents a ice RequestNextHeaders message. It is used to notify the IBD syncer peer to send more headers.
This message has no payload.
func NewMsgRequestNextHeaders ¶
func NewMsgRequestNextHeaders() *MsgRequestNextHeaders
NewMsgRequestNextHeaders returns a new ice RequestNextHeaders message that conforms to the Message interface.
func (*MsgRequestNextHeaders) Command ¶
func (msg *MsgRequestNextHeaders) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgRequestNextHeaders) MessageNumber ¶
func (b *MsgRequestNextHeaders) MessageNumber() uint64
func (*MsgRequestNextHeaders) ReceivedAt ¶
func (*MsgRequestNextHeaders) SetMessageNumber ¶
func (b *MsgRequestNextHeaders) SetMessageNumber(messageNumber uint64)
func (*MsgRequestNextHeaders) SetReceivedAt ¶
type MsgRequestNextPruningPointAndItsAnticoneBlocks ¶
type MsgRequestNextPruningPointAndItsAnticoneBlocks struct {
// contains filtered or unexported fields
}
MsgRequestNextPruningPointAndItsAnticoneBlocks implements the Message interface and represents a ice RequestNextPruningPointAndItsAnticoneBlocks message. It is used to notify the IBD syncer peer to send more blocks from the pruning anticone.
This message has no payload.
func NewMsgRequestNextPruningPointAndItsAnticoneBlocks ¶
func NewMsgRequestNextPruningPointAndItsAnticoneBlocks() *MsgRequestNextPruningPointAndItsAnticoneBlocks
NewMsgRequestNextPruningPointAndItsAnticoneBlocks returns a new ice RequestNextPruningPointAndItsAnticoneBlocks message that conforms to the Message interface.
func (*MsgRequestNextPruningPointAndItsAnticoneBlocks) Command ¶
func (msg *MsgRequestNextPruningPointAndItsAnticoneBlocks) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgRequestNextPruningPointAndItsAnticoneBlocks) MessageNumber ¶
func (b *MsgRequestNextPruningPointAndItsAnticoneBlocks) MessageNumber() uint64
func (*MsgRequestNextPruningPointAndItsAnticoneBlocks) ReceivedAt ¶
func (*MsgRequestNextPruningPointAndItsAnticoneBlocks) SetMessageNumber ¶
func (b *MsgRequestNextPruningPointAndItsAnticoneBlocks) SetMessageNumber(messageNumber uint64)
func (*MsgRequestNextPruningPointAndItsAnticoneBlocks) SetReceivedAt ¶
type MsgRequestNextPruningPointUTXOSetChunk ¶
type MsgRequestNextPruningPointUTXOSetChunk struct {
// contains filtered or unexported fields
}
MsgRequestNextPruningPointUTXOSetChunk represents a ice RequestNextPruningPointUTXOSetChunk message
func NewMsgRequestNextPruningPointUTXOSetChunk ¶
func NewMsgRequestNextPruningPointUTXOSetChunk() *MsgRequestNextPruningPointUTXOSetChunk
NewMsgRequestNextPruningPointUTXOSetChunk returns a new MsgRequestNextPruningPointUTXOSetChunk.
func (*MsgRequestNextPruningPointUTXOSetChunk) Command ¶
func (msg *MsgRequestNextPruningPointUTXOSetChunk) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgRequestNextPruningPointUTXOSetChunk) MessageNumber ¶
func (b *MsgRequestNextPruningPointUTXOSetChunk) MessageNumber() uint64
func (*MsgRequestNextPruningPointUTXOSetChunk) ReceivedAt ¶
func (*MsgRequestNextPruningPointUTXOSetChunk) SetMessageNumber ¶
func (b *MsgRequestNextPruningPointUTXOSetChunk) SetMessageNumber(messageNumber uint64)
func (*MsgRequestNextPruningPointUTXOSetChunk) SetReceivedAt ¶
type MsgRequestPruningPointAndItsAnticone ¶
type MsgRequestPruningPointAndItsAnticone struct {
// contains filtered or unexported fields
}
MsgRequestPruningPointAndItsAnticone represents a ice RequestPruningPointAndItsAnticone message
func NewMsgRequestPruningPointAndItsAnticone ¶
func NewMsgRequestPruningPointAndItsAnticone() *MsgRequestPruningPointAndItsAnticone
NewMsgRequestPruningPointAndItsAnticone returns a new MsgRequestPruningPointAndItsAnticone.
func (*MsgRequestPruningPointAndItsAnticone) Command ¶
func (msg *MsgRequestPruningPointAndItsAnticone) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgRequestPruningPointAndItsAnticone) MessageNumber ¶
func (b *MsgRequestPruningPointAndItsAnticone) MessageNumber() uint64
func (*MsgRequestPruningPointAndItsAnticone) ReceivedAt ¶
func (*MsgRequestPruningPointAndItsAnticone) SetMessageNumber ¶
func (b *MsgRequestPruningPointAndItsAnticone) SetMessageNumber(messageNumber uint64)
func (*MsgRequestPruningPointAndItsAnticone) SetReceivedAt ¶
type MsgRequestPruningPointProof ¶
type MsgRequestPruningPointProof struct {
// contains filtered or unexported fields
}
MsgRequestPruningPointProof represents a ice RequestPruningPointProof message
func NewMsgRequestPruningPointProof ¶
func NewMsgRequestPruningPointProof() *MsgRequestPruningPointProof
NewMsgRequestPruningPointProof returns a new MsgRequestPruningPointProof.
func (*MsgRequestPruningPointProof) Command ¶
func (msg *MsgRequestPruningPointProof) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgRequestPruningPointProof) MessageNumber ¶
func (b *MsgRequestPruningPointProof) MessageNumber() uint64
func (*MsgRequestPruningPointProof) ReceivedAt ¶
func (*MsgRequestPruningPointProof) SetMessageNumber ¶
func (b *MsgRequestPruningPointProof) SetMessageNumber(messageNumber uint64)
func (*MsgRequestPruningPointProof) SetReceivedAt ¶
type MsgRequestPruningPointUTXOSet ¶
type MsgRequestPruningPointUTXOSet struct { PruningPointHash *externalapi.DomainHash // contains filtered or unexported fields }
MsgRequestPruningPointUTXOSet represents a ice RequestPruningPointUTXOSet message
func NewMsgRequestPruningPointUTXOSet ¶
func NewMsgRequestPruningPointUTXOSet(pruningPointHash *externalapi.DomainHash) *MsgRequestPruningPointUTXOSet
NewMsgRequestPruningPointUTXOSet returns a new MsgRequestPruningPointUTXOSet
func (*MsgRequestPruningPointUTXOSet) Command ¶
func (msg *MsgRequestPruningPointUTXOSet) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgRequestPruningPointUTXOSet) MessageNumber ¶
func (b *MsgRequestPruningPointUTXOSet) MessageNumber() uint64
func (*MsgRequestPruningPointUTXOSet) ReceivedAt ¶
func (*MsgRequestPruningPointUTXOSet) SetMessageNumber ¶
func (b *MsgRequestPruningPointUTXOSet) SetMessageNumber(messageNumber uint64)
func (*MsgRequestPruningPointUTXOSet) SetReceivedAt ¶
type MsgRequestRelayBlocks ¶
type MsgRequestRelayBlocks struct { Hashes []*externalapi.DomainHash // contains filtered or unexported fields }
MsgRequestRelayBlocks implements the Message interface and represents a ice RequestRelayBlocks message. It is used to request blocks as part of the block relay protocol.
func NewMsgRequestRelayBlocks ¶
func NewMsgRequestRelayBlocks(hashes []*externalapi.DomainHash) *MsgRequestRelayBlocks
NewMsgRequestRelayBlocks returns a new ice RequestRelayBlocks message that conforms to the Message interface. See MsgRequestRelayBlocks for details.
func (*MsgRequestRelayBlocks) Command ¶
func (msg *MsgRequestRelayBlocks) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgRequestRelayBlocks) MessageNumber ¶
func (b *MsgRequestRelayBlocks) MessageNumber() uint64
func (*MsgRequestRelayBlocks) ReceivedAt ¶
func (*MsgRequestRelayBlocks) SetMessageNumber ¶
func (b *MsgRequestRelayBlocks) SetMessageNumber(messageNumber uint64)
func (*MsgRequestRelayBlocks) SetReceivedAt ¶
type MsgRequestTransactions ¶
type MsgRequestTransactions struct { IDs []*externalapi.DomainTransactionID // contains filtered or unexported fields }
MsgRequestTransactions implements the Message interface and represents a ice RequestTransactions message. It is used to request transactions as part of the transactions relay protocol.
func NewMsgRequestTransactions ¶
func NewMsgRequestTransactions(ids []*externalapi.DomainTransactionID) *MsgRequestTransactions
NewMsgRequestTransactions returns a new ice RequestTransactions message that conforms to the Message interface. See MsgRequestTransactions for details.
func (*MsgRequestTransactions) Command ¶
func (msg *MsgRequestTransactions) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgRequestTransactions) MessageNumber ¶
func (b *MsgRequestTransactions) MessageNumber() uint64
func (*MsgRequestTransactions) ReceivedAt ¶
func (*MsgRequestTransactions) SetMessageNumber ¶
func (b *MsgRequestTransactions) SetMessageNumber(messageNumber uint64)
func (*MsgRequestTransactions) SetReceivedAt ¶
type MsgTransactionNotFound ¶
type MsgTransactionNotFound struct { ID *externalapi.DomainTransactionID // contains filtered or unexported fields }
MsgTransactionNotFound defines a ice TransactionNotFound message which is sent in response to a RequestTransactions message if any of the requested data in not available on the peer.
func NewMsgTransactionNotFound ¶
func NewMsgTransactionNotFound(id *externalapi.DomainTransactionID) *MsgTransactionNotFound
NewMsgTransactionNotFound returns a new ice transactionsnotfound message that conforms to the Message interface. See MsgTransactionNotFound for details.
func (*MsgTransactionNotFound) Command ¶
func (msg *MsgTransactionNotFound) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgTransactionNotFound) MessageNumber ¶
func (b *MsgTransactionNotFound) MessageNumber() uint64
func (*MsgTransactionNotFound) ReceivedAt ¶
func (*MsgTransactionNotFound) SetMessageNumber ¶
func (b *MsgTransactionNotFound) SetMessageNumber(messageNumber uint64)
func (*MsgTransactionNotFound) SetReceivedAt ¶
type MsgTrustedData ¶
type MsgTrustedData struct { DAAWindow []*TrustedDataDAAHeader GHOSTDAGData []*BlockGHOSTDAGDataHashPair // contains filtered or unexported fields }
MsgTrustedData represents a ice TrustedData message
func DomainTrustedDataToTrustedData ¶
func DomainTrustedDataToTrustedData(domainDAAWindow []*externalapi.TrustedDataDataDAAHeader, domainGHOSTDAGData []*externalapi.BlockGHOSTDAGDataHashPair) *MsgTrustedData
DomainTrustedDataToTrustedData converts *externalapi.BlockWithTrustedData to *MsgBlockWithTrustedData
func NewMsgTrustedData ¶
func NewMsgTrustedData() *MsgTrustedData
NewMsgTrustedData returns a new MsgTrustedData.
func (*MsgTrustedData) Command ¶
func (msg *MsgTrustedData) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgTrustedData) MessageNumber ¶
func (b *MsgTrustedData) MessageNumber() uint64
func (*MsgTrustedData) ReceivedAt ¶
func (*MsgTrustedData) SetMessageNumber ¶
func (b *MsgTrustedData) SetMessageNumber(messageNumber uint64)
func (*MsgTrustedData) SetReceivedAt ¶
type MsgTx ¶
type MsgTx struct { Version uint16 TxIn []*TxIn TxOut []*TxOut LockTime uint64 SubnetworkID externalapi.DomainSubnetworkID Gas uint64 Payload []byte // contains filtered or unexported fields }
MsgTx implements the Message interface and represents a kaspa tx message. It is used to deliver transaction information in response to a getdata message (MsgGetData) for a given transaction.
Use the AddTxIn and AddTxOut functions to build up the list of transaction inputs and outputs.
func DomainTransactionToMsgTx ¶
func DomainTransactionToMsgTx(domainTransaction *externalapi.DomainTransaction) *MsgTx
DomainTransactionToMsgTx converts an externalapi.DomainTransaction into an MsgTx
func NewNativeMsgTx ¶
NewNativeMsgTx returns a new tx message in the native subnetwork
func NewNativeMsgTxWithLocktime ¶
func NewNativeMsgTxWithLocktime(version uint16, txIn []*TxIn, txOut []*TxOut, locktime uint64) *MsgTx
NewNativeMsgTxWithLocktime returns a new tx message in the native subnetwork with a locktime.
See newMsgTx for further documntation of the parameters
func NewRegistryMsgTx ¶
NewRegistryMsgTx creates a new MsgTx that registers a new subnetwork
func NewSubnetworkMsgTx ¶
func NewSubnetworkMsgTx(version uint16, txIn []*TxIn, txOut []*TxOut, subnetworkID *externalapi.DomainSubnetworkID, gas uint64, payload []byte) *MsgTx
NewSubnetworkMsgTx returns a new tx message in the specified subnetwork with specified gas and payload
func (*MsgTx) Command ¶
func (msg *MsgTx) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgTx) Copy ¶
Copy creates a deep copy of a transaction so that the original does not get modified when the copy is manipulated.
func (*MsgTx) IsCoinBase ¶
IsCoinBase determines whether or not a transaction is a coinbase transaction. A coinbase transaction is a special transaction created by miners that distributes fees and block subsidy to the previous blocks' miners, and to specify the scriptPubKey that will be used to pay the current miner in future blocks. Each input of the coinbase transaction should set index to maximum value and reference the relevant block id, instead of previous transaction id.
func (*MsgTx) IsSubnetworkCompatible ¶
func (msg *MsgTx) IsSubnetworkCompatible(subnetworkID *externalapi.DomainSubnetworkID) bool
IsSubnetworkCompatible return true iff subnetworkID is one or more of the following: 1. The SupportsAll subnetwork (full node) 2. The native subnetwork 3. The transaction's subnetwork
func (*MsgTx) MaxPayloadLength ¶
MaxPayloadLength returns the maximum length the payload can be for the receiver. This is part of the Message interface implementation.
func (*MsgTx) MessageNumber ¶
func (b *MsgTx) MessageNumber() uint64
func (*MsgTx) ReceivedAt ¶
func (*MsgTx) SetMessageNumber ¶
func (b *MsgTx) SetMessageNumber(messageNumber uint64)
func (*MsgTx) SetReceivedAt ¶
func (*MsgTx) TxHash ¶
func (msg *MsgTx) TxHash() *externalapi.DomainHash
TxHash generates the Hash for the transaction.
func (*MsgTx) TxID ¶
func (msg *MsgTx) TxID() *externalapi.DomainTransactionID
TxID generates the Hash for the transaction without the signature script, gas and payload fields.
type MsgUnexpectedPruningPoint ¶
type MsgUnexpectedPruningPoint struct {
// contains filtered or unexported fields
}
MsgUnexpectedPruningPoint represents a kaspa UnexpectedPruningPoint message
func NewMsgUnexpectedPruningPoint ¶
func NewMsgUnexpectedPruningPoint() *MsgUnexpectedPruningPoint
NewMsgUnexpectedPruningPoint returns a new ice UnexpectedPruningPoint message
func (*MsgUnexpectedPruningPoint) Command ¶
func (msg *MsgUnexpectedPruningPoint) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgUnexpectedPruningPoint) MessageNumber ¶
func (b *MsgUnexpectedPruningPoint) MessageNumber() uint64
func (*MsgUnexpectedPruningPoint) ReceivedAt ¶
func (*MsgUnexpectedPruningPoint) SetMessageNumber ¶
func (b *MsgUnexpectedPruningPoint) SetMessageNumber(messageNumber uint64)
func (*MsgUnexpectedPruningPoint) SetReceivedAt ¶
type MsgVerAck ¶
type MsgVerAck struct {
// contains filtered or unexported fields
}
MsgVerAck defines a ice verack message which is used for a peer to acknowledge a version message (MsgVersion) after it has used the information to negotiate parameters. It implements the Message interface.
This message has no payload.
func NewMsgVerAck ¶
func NewMsgVerAck() *MsgVerAck
NewMsgVerAck returns a new ice verack message that conforms to the 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 (*MsgVerAck) SetMessageNumber ¶
func (b *MsgVerAck) SetMessageNumber(messageNumber uint64)
func (*MsgVerAck) SetReceivedAt ¶
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 *externalapi.DomainSubnetworkID // contains filtered or unexported fields }
MsgVersion implements the Message interface and represents a kaspa version message. It is used for a peer to advertise itself as soon as an outbound connection is made. The remote peer then uses this information along with its own to negotiate. The remote peer must then respond with a version message of its own containing the negotiated values followed by a verack message (MsgVerAck). This exchange must take place before any further communication is allowed to proceed.
func NewMsgVersion ¶
func NewMsgVersion(addr *NetAddress, id *id.ID, network string, subnetworkID *externalapi.DomainSubnetworkID, protocolVersion uint32) *MsgVersion
NewMsgVersion returns a new kaspa version message that conforms to the Message interface using the passed parameters and defaults for the remaining fields.
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)
AddUserAgent adds a user agent to the user agent string for the version message. The version string is not defined to any strict format, although it is recommended to use the form "major.minor.revision" e.g. "2.6.41".
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 (*MsgVersion) SetMessageNumber ¶
func (b *MsgVersion) SetMessageNumber(messageNumber uint64)
func (*MsgVersion) SetReceivedAt ¶
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 ¶
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 ¶
func (msg *NewBlockTemplateNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NewBlockTemplateNotificationMessage) MessageNumber ¶
func (b *NewBlockTemplateNotificationMessage) MessageNumber() uint64
func (*NewBlockTemplateNotificationMessage) ReceivedAt ¶
func (*NewBlockTemplateNotificationMessage) SetMessageNumber ¶
func (b *NewBlockTemplateNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*NewBlockTemplateNotificationMessage) SetReceivedAt ¶
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 ¶
func (msg *NotifyBlockAddedRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyBlockAddedRequestMessage) MessageNumber ¶
func (b *NotifyBlockAddedRequestMessage) MessageNumber() uint64
func (*NotifyBlockAddedRequestMessage) ReceivedAt ¶
func (*NotifyBlockAddedRequestMessage) SetMessageNumber ¶
func (b *NotifyBlockAddedRequestMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyBlockAddedRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *NotifyBlockAddedResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyBlockAddedResponseMessage) MessageNumber ¶
func (b *NotifyBlockAddedResponseMessage) MessageNumber() uint64
func (*NotifyBlockAddedResponseMessage) ReceivedAt ¶
func (*NotifyBlockAddedResponseMessage) SetMessageNumber ¶
func (b *NotifyBlockAddedResponseMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyBlockAddedResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *NotifyFinalityConflictsRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyFinalityConflictsRequestMessage) MessageNumber ¶
func (b *NotifyFinalityConflictsRequestMessage) MessageNumber() uint64
func (*NotifyFinalityConflictsRequestMessage) ReceivedAt ¶
func (*NotifyFinalityConflictsRequestMessage) SetMessageNumber ¶
func (b *NotifyFinalityConflictsRequestMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyFinalityConflictsRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *NotifyFinalityConflictsResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyFinalityConflictsResponseMessage) MessageNumber ¶
func (b *NotifyFinalityConflictsResponseMessage) MessageNumber() uint64
func (*NotifyFinalityConflictsResponseMessage) ReceivedAt ¶
func (*NotifyFinalityConflictsResponseMessage) SetMessageNumber ¶
func (b *NotifyFinalityConflictsResponseMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyFinalityConflictsResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *NotifyNewBlockTemplateRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyNewBlockTemplateRequestMessage) MessageNumber ¶
func (b *NotifyNewBlockTemplateRequestMessage) MessageNumber() uint64
func (*NotifyNewBlockTemplateRequestMessage) ReceivedAt ¶
func (*NotifyNewBlockTemplateRequestMessage) SetMessageNumber ¶
func (b *NotifyNewBlockTemplateRequestMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyNewBlockTemplateRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *NotifyNewBlockTemplateResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyNewBlockTemplateResponseMessage) MessageNumber ¶
func (b *NotifyNewBlockTemplateResponseMessage) MessageNumber() uint64
func (*NotifyNewBlockTemplateResponseMessage) ReceivedAt ¶
func (*NotifyNewBlockTemplateResponseMessage) SetMessageNumber ¶
func (b *NotifyNewBlockTemplateResponseMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyNewBlockTemplateResponseMessage) SetReceivedAt ¶
type NotifyPruningPointUTXOSetOverrideRequestMessage ¶
type NotifyPruningPointUTXOSetOverrideRequestMessage struct {
// contains filtered or unexported fields
}
NotifyPruningPointUTXOSetOverrideRequestMessage is an appmessage corresponding to its respective RPC message
func NewNotifyPruningPointUTXOSetOverrideRequestMessage ¶
func NewNotifyPruningPointUTXOSetOverrideRequestMessage() *NotifyPruningPointUTXOSetOverrideRequestMessage
NewNotifyPruningPointUTXOSetOverrideRequestMessage returns a instance of the message
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) Command ¶
func (msg *NotifyPruningPointUTXOSetOverrideRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) MessageNumber ¶
func (b *NotifyPruningPointUTXOSetOverrideRequestMessage) MessageNumber() uint64
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) ReceivedAt ¶
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) SetMessageNumber ¶
func (b *NotifyPruningPointUTXOSetOverrideRequestMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) SetReceivedAt ¶
type NotifyPruningPointUTXOSetOverrideResponseMessage ¶
type NotifyPruningPointUTXOSetOverrideResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
NotifyPruningPointUTXOSetOverrideResponseMessage is an appmessage corresponding to its respective RPC message
func NewNotifyPruningPointUTXOSetOverrideResponseMessage ¶
func NewNotifyPruningPointUTXOSetOverrideResponseMessage() *NotifyPruningPointUTXOSetOverrideResponseMessage
NewNotifyPruningPointUTXOSetOverrideResponseMessage returns a instance of the message
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) Command ¶
func (msg *NotifyPruningPointUTXOSetOverrideResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) MessageNumber ¶
func (b *NotifyPruningPointUTXOSetOverrideResponseMessage) MessageNumber() uint64
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) ReceivedAt ¶
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) SetMessageNumber ¶
func (b *NotifyPruningPointUTXOSetOverrideResponseMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) SetReceivedAt ¶
type NotifyUTXOsChangedRequestMessage ¶
type NotifyUTXOsChangedRequestMessage struct { Addresses []string // contains filtered or unexported fields }
NotifyUTXOsChangedRequestMessage is an appmessage corresponding to its respective RPC message
func NewNotifyUTXOsChangedRequestMessage ¶
func NewNotifyUTXOsChangedRequestMessage(addresses []string) *NotifyUTXOsChangedRequestMessage
NewNotifyUTXOsChangedRequestMessage returns a instance of the message
func (*NotifyUTXOsChangedRequestMessage) Command ¶
func (msg *NotifyUTXOsChangedRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyUTXOsChangedRequestMessage) MessageNumber ¶
func (b *NotifyUTXOsChangedRequestMessage) MessageNumber() uint64
func (*NotifyUTXOsChangedRequestMessage) ReceivedAt ¶
func (*NotifyUTXOsChangedRequestMessage) SetMessageNumber ¶
func (b *NotifyUTXOsChangedRequestMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyUTXOsChangedRequestMessage) SetReceivedAt ¶
type NotifyUTXOsChangedResponseMessage ¶
type NotifyUTXOsChangedResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
NotifyUTXOsChangedResponseMessage is an appmessage corresponding to its respective RPC message
func NewNotifyUTXOsChangedResponseMessage ¶
func NewNotifyUTXOsChangedResponseMessage() *NotifyUTXOsChangedResponseMessage
NewNotifyUTXOsChangedResponseMessage returns a instance of the message
func (*NotifyUTXOsChangedResponseMessage) Command ¶
func (msg *NotifyUTXOsChangedResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyUTXOsChangedResponseMessage) MessageNumber ¶
func (b *NotifyUTXOsChangedResponseMessage) MessageNumber() uint64
func (*NotifyUTXOsChangedResponseMessage) ReceivedAt ¶
func (*NotifyUTXOsChangedResponseMessage) SetMessageNumber ¶
func (b *NotifyUTXOsChangedResponseMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyUTXOsChangedResponseMessage) SetReceivedAt ¶
type NotifyVirtualDaaScoreChangedRequestMessage ¶
type NotifyVirtualDaaScoreChangedRequestMessage struct {
// contains filtered or unexported fields
}
NotifyVirtualDaaScoreChangedRequestMessage is an appmessage corresponding to its respective RPC message
func NewNotifyVirtualDaaScoreChangedRequestMessage ¶
func NewNotifyVirtualDaaScoreChangedRequestMessage() *NotifyVirtualDaaScoreChangedRequestMessage
NewNotifyVirtualDaaScoreChangedRequestMessage returns a instance of the message
func (*NotifyVirtualDaaScoreChangedRequestMessage) Command ¶
func (msg *NotifyVirtualDaaScoreChangedRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyVirtualDaaScoreChangedRequestMessage) MessageNumber ¶
func (b *NotifyVirtualDaaScoreChangedRequestMessage) MessageNumber() uint64
func (*NotifyVirtualDaaScoreChangedRequestMessage) ReceivedAt ¶
func (*NotifyVirtualDaaScoreChangedRequestMessage) SetMessageNumber ¶
func (b *NotifyVirtualDaaScoreChangedRequestMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyVirtualDaaScoreChangedRequestMessage) SetReceivedAt ¶
type NotifyVirtualDaaScoreChangedResponseMessage ¶
type NotifyVirtualDaaScoreChangedResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
NotifyVirtualDaaScoreChangedResponseMessage is an appmessage corresponding to its respective RPC message
func NewNotifyVirtualDaaScoreChangedResponseMessage ¶
func NewNotifyVirtualDaaScoreChangedResponseMessage() *NotifyVirtualDaaScoreChangedResponseMessage
NewNotifyVirtualDaaScoreChangedResponseMessage returns a instance of the message
func (*NotifyVirtualDaaScoreChangedResponseMessage) Command ¶
func (msg *NotifyVirtualDaaScoreChangedResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyVirtualDaaScoreChangedResponseMessage) MessageNumber ¶
func (b *NotifyVirtualDaaScoreChangedResponseMessage) MessageNumber() uint64
func (*NotifyVirtualDaaScoreChangedResponseMessage) ReceivedAt ¶
func (*NotifyVirtualDaaScoreChangedResponseMessage) SetMessageNumber ¶
func (b *NotifyVirtualDaaScoreChangedResponseMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyVirtualDaaScoreChangedResponseMessage) SetReceivedAt ¶
type NotifyVirtualSelectedParentBlueScoreChangedRequestMessage ¶
type NotifyVirtualSelectedParentBlueScoreChangedRequestMessage struct {
// contains filtered or unexported fields
}
NotifyVirtualSelectedParentBlueScoreChangedRequestMessage is an appmessage corresponding to its respective RPC message
func NewNotifyVirtualSelectedParentBlueScoreChangedRequestMessage ¶
func NewNotifyVirtualSelectedParentBlueScoreChangedRequestMessage() *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage
NewNotifyVirtualSelectedParentBlueScoreChangedRequestMessage returns a instance of the message
func (*NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) Command ¶
func (msg *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) MessageNumber ¶
func (b *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) MessageNumber() uint64
func (*NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) ReceivedAt ¶
func (*NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) SetMessageNumber ¶
func (b *NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) SetReceivedAt ¶
type NotifyVirtualSelectedParentBlueScoreChangedResponseMessage ¶
type NotifyVirtualSelectedParentBlueScoreChangedResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
NotifyVirtualSelectedParentBlueScoreChangedResponseMessage is an appmessage corresponding to its respective RPC message
func NewNotifyVirtualSelectedParentBlueScoreChangedResponseMessage ¶
func NewNotifyVirtualSelectedParentBlueScoreChangedResponseMessage() *NotifyVirtualSelectedParentBlueScoreChangedResponseMessage
NewNotifyVirtualSelectedParentBlueScoreChangedResponseMessage returns a instance of the message
func (*NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) Command ¶
func (msg *NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) MessageNumber ¶
func (b *NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) MessageNumber() uint64
func (*NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) ReceivedAt ¶
func (*NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) SetMessageNumber ¶
func (b *NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) SetReceivedAt ¶
type NotifyVirtualSelectedParentChainChangedRequestMessage ¶
type NotifyVirtualSelectedParentChainChangedRequestMessage struct { IncludeAcceptedTransactionIDs bool // contains filtered or unexported fields }
NotifyVirtualSelectedParentChainChangedRequestMessage is an appmessage corresponding to its respective RPC message
func NewNotifyVirtualSelectedParentChainChangedRequestMessage ¶
func NewNotifyVirtualSelectedParentChainChangedRequestMessage( includeAcceptedTransactionIDs bool) *NotifyVirtualSelectedParentChainChangedRequestMessage
NewNotifyVirtualSelectedParentChainChangedRequestMessage returns an instance of the message
func (*NotifyVirtualSelectedParentChainChangedRequestMessage) Command ¶
func (msg *NotifyVirtualSelectedParentChainChangedRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyVirtualSelectedParentChainChangedRequestMessage) MessageNumber ¶
func (b *NotifyVirtualSelectedParentChainChangedRequestMessage) MessageNumber() uint64
func (*NotifyVirtualSelectedParentChainChangedRequestMessage) ReceivedAt ¶
func (*NotifyVirtualSelectedParentChainChangedRequestMessage) SetMessageNumber ¶
func (b *NotifyVirtualSelectedParentChainChangedRequestMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyVirtualSelectedParentChainChangedRequestMessage) SetReceivedAt ¶
type NotifyVirtualSelectedParentChainChangedResponseMessage ¶
type NotifyVirtualSelectedParentChainChangedResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
NotifyVirtualSelectedParentChainChangedResponseMessage is an appmessage corresponding to its respective RPC message
func NewNotifyVirtualSelectedParentChainChangedResponseMessage ¶
func NewNotifyVirtualSelectedParentChainChangedResponseMessage() *NotifyVirtualSelectedParentChainChangedResponseMessage
NewNotifyVirtualSelectedParentChainChangedResponseMessage returns a instance of the message
func (*NotifyVirtualSelectedParentChainChangedResponseMessage) Command ¶
func (msg *NotifyVirtualSelectedParentChainChangedResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyVirtualSelectedParentChainChangedResponseMessage) MessageNumber ¶
func (b *NotifyVirtualSelectedParentChainChangedResponseMessage) MessageNumber() uint64
func (*NotifyVirtualSelectedParentChainChangedResponseMessage) ReceivedAt ¶
func (*NotifyVirtualSelectedParentChainChangedResponseMessage) SetMessageNumber ¶
func (b *NotifyVirtualSelectedParentChainChangedResponseMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyVirtualSelectedParentChainChangedResponseMessage) SetReceivedAt ¶
type Outpoint ¶
type Outpoint struct { TxID externalapi.DomainTransactionID Index uint32 }
Outpoint defines a kaspa data type that is used to track previous transaction outputs.
func NewOutpoint ¶
func NewOutpoint(txID *externalapi.DomainTransactionID, index uint32) *Outpoint
NewOutpoint returns a new kaspa transaction outpoint point with the provided hash and index.
type OutpointAndUTXOEntryPair ¶
OutpointAndUTXOEntryPair is an outpoint along with its respective UTXO entry
func DomainOutpointAndUTXOEntryPairsToOutpointAndUTXOEntryPairs ¶
func DomainOutpointAndUTXOEntryPairsToOutpointAndUTXOEntryPairs( outpointAndUTXOEntryPairs []*externalapi.OutpointAndUTXOEntryPair) []*OutpointAndUTXOEntryPair
DomainOutpointAndUTXOEntryPairsToOutpointAndUTXOEntryPairs converts domain OutpointAndUTXOEntryPairs to OutpointAndUTXOEntryPairs
type PruningPointUTXOSetOverrideNotificationMessage ¶
type PruningPointUTXOSetOverrideNotificationMessage struct {
// contains filtered or unexported fields
}
PruningPointUTXOSetOverrideNotificationMessage is an appmessage corresponding to its respective RPC message
func NewPruningPointUTXOSetOverrideNotificationMessage ¶
func NewPruningPointUTXOSetOverrideNotificationMessage() *PruningPointUTXOSetOverrideNotificationMessage
NewPruningPointUTXOSetOverrideNotificationMessage returns a instance of the message
func (*PruningPointUTXOSetOverrideNotificationMessage) Command ¶
func (msg *PruningPointUTXOSetOverrideNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*PruningPointUTXOSetOverrideNotificationMessage) MessageNumber ¶
func (b *PruningPointUTXOSetOverrideNotificationMessage) MessageNumber() uint64
func (*PruningPointUTXOSetOverrideNotificationMessage) ReceivedAt ¶
func (*PruningPointUTXOSetOverrideNotificationMessage) SetMessageNumber ¶
func (b *PruningPointUTXOSetOverrideNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*PruningPointUTXOSetOverrideNotificationMessage) SetReceivedAt ¶
type RPCBlock ¶
type RPCBlock struct { Header *RPCBlockHeader Transactions []*RPCTransaction VerboseData *RPCBlockVerboseData }
RPCBlock is a iced block representation meant to be used over RPC
func DomainBlockToRPCBlock ¶
func DomainBlockToRPCBlock(block *externalapi.DomainBlock) *RPCBlock
DomainBlockToRPCBlock converts DomainBlocks to RPCBlocks
type RPCBlockHeader ¶
type RPCBlockHeader struct { Version uint32 Parents []*RPCBlockLevelParents HashMerkleRoot string AcceptedIDMerkleRoot string UTXOCommitment string Timestamp int64 Bits uint32 Nonce uint64 DAAScore uint64 BlueScore uint64 BlueWork string PruningPoint string }
RPCBlockHeader is a iced 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
type RPCOutpoint ¶
RPCOutpoint is a iced outpoint representation meant to be used over RPC
type RPCScriptPublicKey ¶
RPCScriptPublicKey is a iced 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 iced transaction representation meant to be used over RPC
func DomainTransactionToRPCTransaction ¶
func DomainTransactionToRPCTransaction(transaction *externalapi.DomainTransaction) *RPCTransaction
DomainTransactionToRPCTransaction converts DomainTransactions to RPCTransactions
type RPCTransactionInput ¶
type RPCTransactionInput struct { PreviousOutpoint *RPCOutpoint SignatureScript string Sequence uint64 SigOpCount byte VerboseData *RPCTransactionInputVerboseData }
RPCTransactionInput is a iced 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 iced 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 iced 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 ResolveFinalityConflictRequestMessage ¶
type ResolveFinalityConflictRequestMessage struct { FinalityBlockHash string // contains filtered or unexported fields }
ResolveFinalityConflictRequestMessage is an appmessage corresponding to its respective RPC message
func NewResolveFinalityConflictRequestMessage ¶
func NewResolveFinalityConflictRequestMessage(finalityBlockHash string) *ResolveFinalityConflictRequestMessage
NewResolveFinalityConflictRequestMessage returns a instance of the message
func (*ResolveFinalityConflictRequestMessage) Command ¶
func (msg *ResolveFinalityConflictRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*ResolveFinalityConflictRequestMessage) MessageNumber ¶
func (b *ResolveFinalityConflictRequestMessage) MessageNumber() uint64
func (*ResolveFinalityConflictRequestMessage) ReceivedAt ¶
func (*ResolveFinalityConflictRequestMessage) SetMessageNumber ¶
func (b *ResolveFinalityConflictRequestMessage) SetMessageNumber(messageNumber uint64)
func (*ResolveFinalityConflictRequestMessage) SetReceivedAt ¶
type ResolveFinalityConflictResponseMessage ¶
type ResolveFinalityConflictResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
ResolveFinalityConflictResponseMessage is an appmessage corresponding to its respective RPC message
func NewResolveFinalityConflictResponseMessage ¶
func NewResolveFinalityConflictResponseMessage() *ResolveFinalityConflictResponseMessage
NewResolveFinalityConflictResponseMessage returns a instance of the message
func (*ResolveFinalityConflictResponseMessage) Command ¶
func (msg *ResolveFinalityConflictResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*ResolveFinalityConflictResponseMessage) MessageNumber ¶
func (b *ResolveFinalityConflictResponseMessage) MessageNumber() uint64
func (*ResolveFinalityConflictResponseMessage) ReceivedAt ¶
func (*ResolveFinalityConflictResponseMessage) SetMessageNumber ¶
func (b *ResolveFinalityConflictResponseMessage) SetMessageNumber(messageNumber uint64)
func (*ResolveFinalityConflictResponseMessage) SetReceivedAt ¶
type ServiceFlag ¶
type ServiceFlag uint64
ServiceFlag identifies services supported by a ice peer.
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 )
func (ServiceFlag) String ¶
func (f ServiceFlag) String() string
String returns the ServiceFlag in human-readable form.
type ShutDownRequestMessage ¶
type ShutDownRequestMessage struct {
// contains filtered or unexported fields
}
ShutDownRequestMessage is an appmessage corresponding to its respective RPC message
func NewShutDownRequestMessage ¶
func NewShutDownRequestMessage() *ShutDownRequestMessage
NewShutDownRequestMessage returns a instance of the message
func (*ShutDownRequestMessage) Command ¶
func (msg *ShutDownRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*ShutDownRequestMessage) MessageNumber ¶
func (b *ShutDownRequestMessage) MessageNumber() uint64
func (*ShutDownRequestMessage) ReceivedAt ¶
func (*ShutDownRequestMessage) SetMessageNumber ¶
func (b *ShutDownRequestMessage) SetMessageNumber(messageNumber uint64)
func (*ShutDownRequestMessage) SetReceivedAt ¶
type ShutDownResponseMessage ¶
type ShutDownResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
ShutDownResponseMessage is an appmessage corresponding to its respective RPC message
func NewShutDownResponseMessage ¶
func NewShutDownResponseMessage() *ShutDownResponseMessage
NewShutDownResponseMessage returns a instance of the message
func (*ShutDownResponseMessage) Command ¶
func (msg *ShutDownResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*ShutDownResponseMessage) MessageNumber ¶
func (b *ShutDownResponseMessage) MessageNumber() uint64
func (*ShutDownResponseMessage) ReceivedAt ¶
func (*ShutDownResponseMessage) SetMessageNumber ¶
func (b *ShutDownResponseMessage) SetMessageNumber(messageNumber uint64)
func (*ShutDownResponseMessage) SetReceivedAt ¶
type StopNotifyingPruningPointUTXOSetOverrideRequestMessage ¶
type StopNotifyingPruningPointUTXOSetOverrideRequestMessage struct {
// contains filtered or unexported fields
}
StopNotifyingPruningPointUTXOSetOverrideRequestMessage is an appmessage corresponding to its respective RPC message
func NewStopNotifyingPruningPointUTXOSetOverrideRequestMessage ¶
func NewStopNotifyingPruningPointUTXOSetOverrideRequestMessage() *StopNotifyingPruningPointUTXOSetOverrideRequestMessage
NewStopNotifyingPruningPointUTXOSetOverrideRequestMessage returns a instance of the message
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) Command ¶
func (msg *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) MessageNumber ¶
func (b *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) MessageNumber() uint64
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) ReceivedAt ¶
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) SetMessageNumber ¶
func (b *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) SetMessageNumber(messageNumber uint64)
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) SetReceivedAt ¶
type StopNotifyingPruningPointUTXOSetOverrideResponseMessage ¶
type StopNotifyingPruningPointUTXOSetOverrideResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
StopNotifyingPruningPointUTXOSetOverrideResponseMessage is an appmessage corresponding to its respective RPC message
func NewStopNotifyingPruningPointUTXOSetOverrideResponseMessage ¶
func NewStopNotifyingPruningPointUTXOSetOverrideResponseMessage() *StopNotifyingPruningPointUTXOSetOverrideResponseMessage
NewStopNotifyingPruningPointUTXOSetOverrideResponseMessage returns a instance of the message
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) Command ¶
func (msg *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) MessageNumber ¶
func (b *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) MessageNumber() uint64
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) ReceivedAt ¶
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) SetMessageNumber ¶
func (b *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) SetMessageNumber(messageNumber uint64)
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) SetReceivedAt ¶
type StopNotifyingUTXOsChangedRequestMessage ¶
type StopNotifyingUTXOsChangedRequestMessage struct { Addresses []string // contains filtered or unexported fields }
StopNotifyingUTXOsChangedRequestMessage is an appmessage corresponding to its respective RPC message
func NewStopNotifyingUTXOsChangedRequestMessage ¶
func NewStopNotifyingUTXOsChangedRequestMessage(addresses []string) *StopNotifyingUTXOsChangedRequestMessage
NewStopNotifyingUTXOsChangedRequestMessage returns a instance of the message
func (*StopNotifyingUTXOsChangedRequestMessage) Command ¶
func (msg *StopNotifyingUTXOsChangedRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*StopNotifyingUTXOsChangedRequestMessage) MessageNumber ¶
func (b *StopNotifyingUTXOsChangedRequestMessage) MessageNumber() uint64
func (*StopNotifyingUTXOsChangedRequestMessage) ReceivedAt ¶
func (*StopNotifyingUTXOsChangedRequestMessage) SetMessageNumber ¶
func (b *StopNotifyingUTXOsChangedRequestMessage) SetMessageNumber(messageNumber uint64)
func (*StopNotifyingUTXOsChangedRequestMessage) SetReceivedAt ¶
type StopNotifyingUTXOsChangedResponseMessage ¶
type StopNotifyingUTXOsChangedResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
StopNotifyingUTXOsChangedResponseMessage is an appmessage corresponding to its respective RPC message
func NewStopNotifyingUTXOsChangedResponseMessage ¶
func NewStopNotifyingUTXOsChangedResponseMessage() *StopNotifyingUTXOsChangedResponseMessage
NewStopNotifyingUTXOsChangedResponseMessage returns a instance of the message
func (*StopNotifyingUTXOsChangedResponseMessage) Command ¶
func (msg *StopNotifyingUTXOsChangedResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*StopNotifyingUTXOsChangedResponseMessage) MessageNumber ¶
func (b *StopNotifyingUTXOsChangedResponseMessage) MessageNumber() uint64
func (*StopNotifyingUTXOsChangedResponseMessage) ReceivedAt ¶
func (*StopNotifyingUTXOsChangedResponseMessage) SetMessageNumber ¶
func (b *StopNotifyingUTXOsChangedResponseMessage) SetMessageNumber(messageNumber uint64)
func (*StopNotifyingUTXOsChangedResponseMessage) SetReceivedAt ¶
type SubmitBlockRequestMessage ¶
type SubmitBlockRequestMessage struct { Block *RPCBlock AllowNonDAABlocks bool // contains filtered or unexported fields }
SubmitBlockRequestMessage is an appmessage corresponding to its respective RPC message
func NewSubmitBlockRequestMessage ¶
func NewSubmitBlockRequestMessage(block *RPCBlock, allowNonDAABlocks bool) *SubmitBlockRequestMessage
NewSubmitBlockRequestMessage returns a instance of the message
func (*SubmitBlockRequestMessage) Command ¶
func (msg *SubmitBlockRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*SubmitBlockRequestMessage) MessageNumber ¶
func (b *SubmitBlockRequestMessage) MessageNumber() uint64
func (*SubmitBlockRequestMessage) ReceivedAt ¶
func (*SubmitBlockRequestMessage) SetMessageNumber ¶
func (b *SubmitBlockRequestMessage) SetMessageNumber(messageNumber uint64)
func (*SubmitBlockRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *SubmitBlockResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*SubmitBlockResponseMessage) MessageNumber ¶
func (b *SubmitBlockResponseMessage) MessageNumber() uint64
func (*SubmitBlockResponseMessage) ReceivedAt ¶
func (*SubmitBlockResponseMessage) SetMessageNumber ¶
func (b *SubmitBlockResponseMessage) SetMessageNumber(messageNumber uint64)
func (*SubmitBlockResponseMessage) SetReceivedAt ¶
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 ¶
func (msg *SubmitTransactionRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*SubmitTransactionRequestMessage) MessageNumber ¶
func (b *SubmitTransactionRequestMessage) MessageNumber() uint64
func (*SubmitTransactionRequestMessage) ReceivedAt ¶
func (*SubmitTransactionRequestMessage) SetMessageNumber ¶
func (b *SubmitTransactionRequestMessage) SetMessageNumber(messageNumber uint64)
func (*SubmitTransactionRequestMessage) SetReceivedAt ¶
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 ¶
func (msg *SubmitTransactionResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*SubmitTransactionResponseMessage) MessageNumber ¶
func (b *SubmitTransactionResponseMessage) MessageNumber() uint64
func (*SubmitTransactionResponseMessage) ReceivedAt ¶
func (*SubmitTransactionResponseMessage) SetMessageNumber ¶
func (b *SubmitTransactionResponseMessage) SetMessageNumber(messageNumber uint64)
func (*SubmitTransactionResponseMessage) SetReceivedAt ¶
type TrustedDataDAAHeader ¶
type TrustedDataDAAHeader struct { Header *MsgBlockHeader GHOSTDAGData *BlockGHOSTDAGData }
TrustedDataDAAHeader is an appmessage representation of externalapi.TrustedDataDataDAAHeader
type TrustedDataDataDAABlock ¶
type TrustedDataDataDAABlock struct { Block *MsgBlock GHOSTDAGData *BlockGHOSTDAGData }
TrustedDataDataDAABlock is an appmessage representation of externalapi.TrustedDataDataDAABlock
type TxIn ¶
type TxIn struct { PreviousOutpoint Outpoint SignatureScript []byte Sequence uint64 SigOpCount byte }
TxIn defines a kaspa transaction input.
type TxLoc ¶
TxLoc holds locator data for the offset and length of where a transaction is located within a MsgBlock data buffer.
type TxOut ¶
type TxOut struct { Value uint64 ScriptPubKey *externalapi.ScriptPublicKey }
TxOut defines a kaspa transaction output.
func NewTxOut ¶
func NewTxOut(value uint64, scriptPubKey *externalapi.ScriptPublicKey) *TxOut
NewTxOut returns a new kaspa transaction output with the provided transaction value and public key script.
type UTXOEntry ¶
type UTXOEntry struct { Amount uint64 ScriptPublicKey *externalapi.ScriptPublicKey BlockDAAScore uint64 IsCoinbase bool }
UTXOEntry houses details about an individual transaction output in a UTXO
type UTXOsByAddressesEntry ¶
type UTXOsByAddressesEntry struct { Address string Outpoint *RPCOutpoint UTXOEntry *RPCUTXOEntry }
UTXOsByAddressesEntry represents a UTXO of some address
type UTXOsChangedNotificationMessage ¶
type UTXOsChangedNotificationMessage struct { Added []*UTXOsByAddressesEntry Removed []*UTXOsByAddressesEntry // contains filtered or unexported fields }
UTXOsChangedNotificationMessage is an appmessage corresponding to its respective RPC message
func NewUTXOsChangedNotificationMessage ¶
func NewUTXOsChangedNotificationMessage() *UTXOsChangedNotificationMessage
NewUTXOsChangedNotificationMessage returns a instance of the message
func (*UTXOsChangedNotificationMessage) Command ¶
func (msg *UTXOsChangedNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*UTXOsChangedNotificationMessage) MessageNumber ¶
func (b *UTXOsChangedNotificationMessage) MessageNumber() uint64
func (*UTXOsChangedNotificationMessage) ReceivedAt ¶
func (*UTXOsChangedNotificationMessage) SetMessageNumber ¶
func (b *UTXOsChangedNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*UTXOsChangedNotificationMessage) SetReceivedAt ¶
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 (*UnbanRequestMessage) SetMessageNumber ¶
func (b *UnbanRequestMessage) SetMessageNumber(messageNumber uint64)
func (*UnbanRequestMessage) SetReceivedAt ¶
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 (*UnbanResponseMessage) SetMessageNumber ¶
func (b *UnbanResponseMessage) SetMessageNumber(messageNumber uint64)
func (*UnbanResponseMessage) SetReceivedAt ¶
type VirtualDaaScoreChangedNotificationMessage ¶
type VirtualDaaScoreChangedNotificationMessage struct { VirtualDaaScore uint64 // contains filtered or unexported fields }
VirtualDaaScoreChangedNotificationMessage is an appmessage corresponding to its respective RPC message
func NewVirtualDaaScoreChangedNotificationMessage ¶
func NewVirtualDaaScoreChangedNotificationMessage( virtualDaaScore uint64) *VirtualDaaScoreChangedNotificationMessage
NewVirtualDaaScoreChangedNotificationMessage returns a instance of the message
func (*VirtualDaaScoreChangedNotificationMessage) Command ¶
func (msg *VirtualDaaScoreChangedNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*VirtualDaaScoreChangedNotificationMessage) MessageNumber ¶
func (b *VirtualDaaScoreChangedNotificationMessage) MessageNumber() uint64
func (*VirtualDaaScoreChangedNotificationMessage) ReceivedAt ¶
func (*VirtualDaaScoreChangedNotificationMessage) SetMessageNumber ¶
func (b *VirtualDaaScoreChangedNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*VirtualDaaScoreChangedNotificationMessage) SetReceivedAt ¶
type VirtualSelectedParentBlueScoreChangedNotificationMessage ¶
type VirtualSelectedParentBlueScoreChangedNotificationMessage struct { VirtualSelectedParentBlueScore uint64 // contains filtered or unexported fields }
VirtualSelectedParentBlueScoreChangedNotificationMessage is an appmessage corresponding to its respective RPC message
func NewVirtualSelectedParentBlueScoreChangedNotificationMessage ¶
func NewVirtualSelectedParentBlueScoreChangedNotificationMessage( virtualSelectedParentBlueScore uint64) *VirtualSelectedParentBlueScoreChangedNotificationMessage
NewVirtualSelectedParentBlueScoreChangedNotificationMessage returns a instance of the message
func (*VirtualSelectedParentBlueScoreChangedNotificationMessage) Command ¶
func (msg *VirtualSelectedParentBlueScoreChangedNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*VirtualSelectedParentBlueScoreChangedNotificationMessage) MessageNumber ¶
func (b *VirtualSelectedParentBlueScoreChangedNotificationMessage) MessageNumber() uint64
func (*VirtualSelectedParentBlueScoreChangedNotificationMessage) ReceivedAt ¶
func (*VirtualSelectedParentBlueScoreChangedNotificationMessage) SetMessageNumber ¶
func (b *VirtualSelectedParentBlueScoreChangedNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*VirtualSelectedParentBlueScoreChangedNotificationMessage) SetReceivedAt ¶
type VirtualSelectedParentChainChangedNotificationMessage ¶
type VirtualSelectedParentChainChangedNotificationMessage struct { RemovedChainBlockHashes []string AddedChainBlockHashes []string AcceptedTransactionIDs []*AcceptedTransactionIDs // contains filtered or unexported fields }
VirtualSelectedParentChainChangedNotificationMessage is an appmessage corresponding to its respective RPC message
func NewVirtualSelectedParentChainChangedNotificationMessage ¶
func NewVirtualSelectedParentChainChangedNotificationMessage(removedChainBlockHashes, addedChainBlocks []string, acceptedTransactionIDs []*AcceptedTransactionIDs) *VirtualSelectedParentChainChangedNotificationMessage
NewVirtualSelectedParentChainChangedNotificationMessage returns a instance of the message
func (*VirtualSelectedParentChainChangedNotificationMessage) Command ¶
func (msg *VirtualSelectedParentChainChangedNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*VirtualSelectedParentChainChangedNotificationMessage) MessageNumber ¶
func (b *VirtualSelectedParentChainChangedNotificationMessage) MessageNumber() uint64
func (*VirtualSelectedParentChainChangedNotificationMessage) ReceivedAt ¶
func (*VirtualSelectedParentChainChangedNotificationMessage) SetMessageNumber ¶
func (b *VirtualSelectedParentChainChangedNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*VirtualSelectedParentChainChangedNotificationMessage) SetReceivedAt ¶
Source Files ¶
- base_message.go
- common.go
- doc.go
- domainconverters.go
- error.go
- message.go
- p2p_blockheaders.go
- p2p_msgaddresses.go
- p2p_msgblock.go
- p2p_msgblockheader.go
- p2p_msgblocklocator.go
- p2p_msgblockwithtrusteddata.go
- p2p_msgblockwithtrusteddatav4.go
- p2p_msgdoneblockswithmetadata.go
- p2p_msgdoneheaders.go
- p2p_msgdonepruningpointutxosetchunks.go
- p2p_msgdrequestpruningpointanditsanticoneheaders.go
- p2p_msgibdblock.go
- p2p_msgibdblocklocator.go
- p2p_msgibdblocklocatorhighesthash.go
- p2p_msgibdblocklocatorhighesthashnotfound.go
- p2p_msgibdchainblocklocator.go
- p2p_msginvrelayblock.go
- p2p_msginvtransaction.go
- p2p_msgping.go
- p2p_msgpong.go
- p2p_msgpruningpointproof.go
- p2p_msgpruningpoints.go
- p2p_msgpruningpointutxosetchunk.go
- p2p_msgreject.go
- p2p_msgrequestaddresses.go
- p2p_msgrequestanticone.go
- p2p_msgrequestibdchainblocklocator.go
- p2p_msgrequestnextheaders.go
- p2p_msgrequestnextpruningpointanditsanticoneblocks.go
- p2p_msgrequestnextpruningpointutxosetchunk.go
- p2p_msgrequestpruningpointproof.go
- p2p_msgrequestpruningpointutxosetandblock.go
- p2p_msgrequestrelayblocks.go
- p2p_msgrequesttransactions.go
- p2p_msgtransactionnotfound.go
- p2p_msgtrusteddata.go
- p2p_msgtx.go
- p2p_msgverack.go
- p2p_msgversion.go
- p2p_netaddress.go
- p2p_ready.go
- p2p_unexpectedpruningpoint.go
- protocol.go
- rpc_add_peer.go
- rpc_ban.go
- rpc_estimate_network_hashes_per_second.go
- rpc_get_balance_by_address.go
- rpc_get_balances_by_addresses.go
- rpc_get_block.go
- rpc_get_block_count.go
- rpc_get_block_dag_info.go
- rpc_get_block_template.go
- rpc_get_blocks.go
- rpc_get_coin_supply.go
- rpc_get_connected_peer_info.go
- rpc_get_current_network.go
- rpc_get_headers.go
- rpc_get_info.go
- rpc_get_mempool_entries.go
- rpc_get_mempool_entries_by_addresses.go
- rpc_get_mempool_entry.go
- rpc_get_peer_addresses.go
- rpc_get_selected_tip_hash.go
- rpc_get_subnetwork.go
- rpc_get_utxos_by_addresses.go
- rpc_get_virtual_selected_parent_blue_score.go
- rpc_get_virtual_selected_parent_chain_from_block.go
- rpc_notify_block_added.go
- rpc_notify_finality_conflicts.go
- rpc_notify_new_block_template.go
- rpc_notify_pruning_point_utxo_set_override.go
- rpc_notify_utxos_changed.go
- rpc_notify_virtual_daa_score_changed.go
- rpc_notify_virtual_selected_parent_chain_blue_score_changed.go
- rpc_notify_virtual_selected_parent_chain_changed.go
- rpc_resolve_finality_conflict.go
- rpc_shut_down.go
- rpc_stop_notifying_utxos_changed.go
- rpc_submit_block.go
- rpc_submit_transaction.go
- rpc_unban.go