Documentation ¶
Overview ¶
Package appmessage implements the kaspa appmessage protocol.
At a high level, this package provides support for marshalling and unmarshalling supported kaspa 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.
Kaspa Message Overview ¶
The kaspa protocol consists of exchanging messages between peers. Each message is preceded by a header which identifies information about it such as which kaspa 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 kaspa 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 kaspa messages are provided. For these supported messages, all of the details of marshalling and unmarshalling to and from the appmessage using kaspa 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 kaspa 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 kaspa 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.
Kaspa Network ¶
The kaspa network is a magic number which is used to identify the start of a message and which kaspa 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 kaspa message overview section, this package reads and writes kaspa 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 kaspa 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 kaspa peer. Example syntax is:
// Reads and validates the next kaspa message from conn using the // protocol version pver and the kaspa network kaspaNet. 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, kaspaNet) if err != nil { // Log and handle the error }
Writing Messages ¶
In order to marshall kaspa 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 kaspa peer. Example syntax to request addresses from a remote peer is:
// Create a new getaddr kaspa message. msg := appmessage.NewMsgRequestAddresses() // Writes a kaspa message msg to conn using the protocol version // pver, and the kaspa network kaspaNet. The return is a possible // error. err := appmessage.WriteMessage(conn, msg, pver, kaspaNet) 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 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 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 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 KaspaNet
- type MempoolEntry
- 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 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 MsgRequestBlockLocator
- func (msg *MsgRequestBlockLocator) Command() MessageCommand
- func (b *MsgRequestBlockLocator) MessageNumber() uint64
- func (b *MsgRequestBlockLocator) ReceivedAt() time.Time
- func (b *MsgRequestBlockLocator) SetMessageNumber(messageNumber uint64)
- func (b *MsgRequestBlockLocator) SetReceivedAt(receivedAt time.Time)
- type MsgRequestHeaders
- type MsgRequestIBDBlocks
- 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 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 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 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 kaspa 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 kaspa 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", }
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", }
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 ¶ added in v0.11.0
func BlockWithTrustedDataToDomainBlockWithTrustedData(block *MsgBlockWithTrustedData) *externalapi.BlockWithTrustedData
BlockWithTrustedDataToDomainBlockWithTrustedData converts *MsgBlockWithTrustedData to *externalapi.BlockWithTrustedData
func GHOSTDAGHashPairToDomainGHOSTDAGHashPair ¶ added in v0.11.10
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 ¶ added in v0.11.0
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 ¶ added in v0.10.0
func RPCBlockToDomainBlock(block *RPCBlock) (*externalapi.DomainBlock, error)
RPCBlockToDomainBlock converts `block` into a DomainBlock
func RPCOutpointToDomainOutpoint ¶ added in v0.11.0
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 ¶ added in v0.11.0
func RPCUTXOEntryToUTXOEntry(entry *RPCUTXOEntry) (externalapi.UTXOEntry, error)
RPCUTXOEntryToUTXOEntry converts RPCUTXOEntry to UTXOEntry
func TrustedDataDataDAABlockV4ToTrustedDataDataDAAHeader ¶ added in v0.11.10
func TrustedDataDataDAABlockV4ToTrustedDataDataDAAHeader(daaBlock *TrustedDataDAAHeader) *externalapi.TrustedDataDataDAAHeader
TrustedDataDataDAABlockV4ToTrustedDataDataDAAHeader converts *TrustedDataDAAHeader to *externalapi.TrustedDataDataDAAHeader
func ValidateUserAgent ¶
ValidateUserAgent checks userAgent length against MaxUserAgentLen
Types ¶
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 ¶ added in v0.11.13
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 ¶ added in v0.11.0
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 ¶ added in v0.11.0
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 kaspa BlockHeaders message
func NewBlockHeadersMessage ¶
func NewBlockHeadersMessage(blockHeaders []*MsgBlockHeader) *BlockHeadersMessage
NewBlockHeadersMessage returns a new kaspa 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 ¶ added in v0.11.0
type BluesAnticoneSizes struct { BlueHash *externalapi.DomainHash AnticoneSize externalapi.KType }
BluesAnticoneSizes is an appmessage representation of the BluesAnticoneSizes part of GHOSTDAG data.
type EstimateNetworkHashesPerSecondRequestMessage ¶ added in v0.11.0
type EstimateNetworkHashesPerSecondRequestMessage struct { StartHash string WindowSize uint32 // contains filtered or unexported fields }
EstimateNetworkHashesPerSecondRequestMessage is an appmessage corresponding to its respective RPC message
func NewEstimateNetworkHashesPerSecondRequestMessage ¶ added in v0.11.0
func NewEstimateNetworkHashesPerSecondRequestMessage(startHash string, windowSize uint32) *EstimateNetworkHashesPerSecondRequestMessage
NewEstimateNetworkHashesPerSecondRequestMessage returns a instance of the message
func (*EstimateNetworkHashesPerSecondRequestMessage) Command ¶ added in v0.11.0
func (msg *EstimateNetworkHashesPerSecondRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*EstimateNetworkHashesPerSecondRequestMessage) MessageNumber ¶ added in v0.11.0
func (b *EstimateNetworkHashesPerSecondRequestMessage) MessageNumber() uint64
func (*EstimateNetworkHashesPerSecondRequestMessage) ReceivedAt ¶ added in v0.11.0
func (*EstimateNetworkHashesPerSecondRequestMessage) SetMessageNumber ¶ added in v0.11.0
func (b *EstimateNetworkHashesPerSecondRequestMessage) SetMessageNumber(messageNumber uint64)
func (*EstimateNetworkHashesPerSecondRequestMessage) SetReceivedAt ¶ added in v0.11.0
type EstimateNetworkHashesPerSecondResponseMessage ¶ added in v0.11.0
type EstimateNetworkHashesPerSecondResponseMessage struct { NetworkHashesPerSecond uint64 Error *RPCError // contains filtered or unexported fields }
EstimateNetworkHashesPerSecondResponseMessage is an appmessage corresponding to its respective RPC message
func NewEstimateNetworkHashesPerSecondResponseMessage ¶ added in v0.11.0
func NewEstimateNetworkHashesPerSecondResponseMessage(networkHashesPerSecond uint64) *EstimateNetworkHashesPerSecondResponseMessage
NewEstimateNetworkHashesPerSecondResponseMessage returns a instance of the message
func (*EstimateNetworkHashesPerSecondResponseMessage) Command ¶ added in v0.11.0
func (msg *EstimateNetworkHashesPerSecondResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*EstimateNetworkHashesPerSecondResponseMessage) MessageNumber ¶ added in v0.11.0
func (b *EstimateNetworkHashesPerSecondResponseMessage) MessageNumber() uint64
func (*EstimateNetworkHashesPerSecondResponseMessage) ReceivedAt ¶ added in v0.11.0
func (*EstimateNetworkHashesPerSecondResponseMessage) SetMessageNumber ¶ added in v0.11.0
func (b *EstimateNetworkHashesPerSecondResponseMessage) SetMessageNumber(messageNumber uint64)
func (*EstimateNetworkHashesPerSecondResponseMessage) SetReceivedAt ¶ added in v0.11.0
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 ¶ added in v0.11.9
type GetBalanceByAddressRequestMessage struct { Address string // contains filtered or unexported fields }
GetBalanceByAddressRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetBalanceByAddressRequest ¶ added in v0.11.9
func NewGetBalanceByAddressRequest(address string) *GetBalanceByAddressRequestMessage
NewGetBalanceByAddressRequest returns a instance of the message
func (*GetBalanceByAddressRequestMessage) Command ¶ added in v0.11.9
func (msg *GetBalanceByAddressRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBalanceByAddressRequestMessage) MessageNumber ¶ added in v0.11.9
func (b *GetBalanceByAddressRequestMessage) MessageNumber() uint64
func (*GetBalanceByAddressRequestMessage) ReceivedAt ¶ added in v0.11.9
func (*GetBalanceByAddressRequestMessage) SetMessageNumber ¶ added in v0.11.9
func (b *GetBalanceByAddressRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetBalanceByAddressRequestMessage) SetReceivedAt ¶ added in v0.11.9
type GetBalanceByAddressResponseMessage ¶ added in v0.11.9
type GetBalanceByAddressResponseMessage struct { Balance uint64 Error *RPCError // contains filtered or unexported fields }
GetBalanceByAddressResponseMessage is an appmessage corresponding to its respective RPC message
func NewGetBalanceByAddressResponse ¶ added in v0.11.9
func NewGetBalanceByAddressResponse(Balance uint64) *GetBalanceByAddressResponseMessage
NewGetBalanceByAddressResponse returns an instance of the message
func (*GetBalanceByAddressResponseMessage) Command ¶ added in v0.11.9
func (msg *GetBalanceByAddressResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBalanceByAddressResponseMessage) MessageNumber ¶ added in v0.11.9
func (b *GetBalanceByAddressResponseMessage) MessageNumber() uint64
func (*GetBalanceByAddressResponseMessage) ReceivedAt ¶ added in v0.11.9
func (*GetBalanceByAddressResponseMessage) SetMessageNumber ¶ added in v0.11.9
func (b *GetBalanceByAddressResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetBalanceByAddressResponseMessage) SetReceivedAt ¶ added in v0.11.9
type GetBalancesByAddressesRequestMessage ¶ added in v0.11.13
type GetBalancesByAddressesRequestMessage struct { Addresses []string // contains filtered or unexported fields }
GetBalancesByAddressesRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetBalancesByAddressesRequest ¶ added in v0.11.13
func NewGetBalancesByAddressesRequest(addresses []string) *GetBalancesByAddressesRequestMessage
NewGetBalancesByAddressesRequest returns a instance of the message
func (*GetBalancesByAddressesRequestMessage) Command ¶ added in v0.11.13
func (msg *GetBalancesByAddressesRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBalancesByAddressesRequestMessage) MessageNumber ¶ added in v0.11.13
func (b *GetBalancesByAddressesRequestMessage) MessageNumber() uint64
func (*GetBalancesByAddressesRequestMessage) ReceivedAt ¶ added in v0.11.13
func (*GetBalancesByAddressesRequestMessage) SetMessageNumber ¶ added in v0.11.13
func (b *GetBalancesByAddressesRequestMessage) SetMessageNumber(messageNumber uint64)
func (*GetBalancesByAddressesRequestMessage) SetReceivedAt ¶ added in v0.11.13
type GetBalancesByAddressesResponseMessage ¶ added in v0.11.13
type GetBalancesByAddressesResponseMessage struct { Entries []*BalancesByAddressesEntry Error *RPCError // contains filtered or unexported fields }
GetBalancesByAddressesResponseMessage is an appmessage corresponding to its respective RPC message
func NewGetBalancesByAddressesResponse ¶ added in v0.11.13
func NewGetBalancesByAddressesResponse(entries []*BalancesByAddressesEntry) *GetBalancesByAddressesResponseMessage
NewGetBalancesByAddressesResponse returns an instance of the message
func (*GetBalancesByAddressesResponseMessage) Command ¶ added in v0.11.13
func (msg *GetBalancesByAddressesResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*GetBalancesByAddressesResponseMessage) MessageNumber ¶ added in v0.11.13
func (b *GetBalancesByAddressesResponseMessage) MessageNumber() uint64
func (*GetBalancesByAddressesResponseMessage) ReceivedAt ¶ added in v0.11.13
func (*GetBalancesByAddressesResponseMessage) SetMessageNumber ¶ added in v0.11.13
func (b *GetBalancesByAddressesResponseMessage) SetMessageNumber(messageNumber uint64)
func (*GetBalancesByAddressesResponseMessage) SetReceivedAt ¶ added in v0.11.13
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 // contains filtered or unexported fields }
GetBlockTemplateRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetBlockTemplateRequestMessage ¶
func NewGetBlockTemplateRequestMessage(payAddress 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 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 ¶ added in v0.10.0
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 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) *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 GetMempoolEntriesRequestMessage ¶
type GetMempoolEntriesRequestMessage struct {
// contains filtered or unexported fields
}
GetMempoolEntriesRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetMempoolEntriesRequestMessage ¶
func NewGetMempoolEntriesRequestMessage() *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 // contains filtered or unexported fields }
GetMempoolEntryRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetMempoolEntryRequestMessage ¶
func NewGetMempoolEntryRequestMessage(txID string) *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) *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 // contains filtered or unexported fields }
GetVirtualSelectedParentChainFromBlockRequestMessage is an appmessage corresponding to its respective RPC message
func NewGetVirtualSelectedParentChainFromBlockRequestMessage ¶
func NewGetVirtualSelectedParentChainFromBlockRequestMessage(startHash string) *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 Error *RPCError // contains filtered or unexported fields }
GetVirtualSelectedParentChainFromBlockResponseMessage is an appmessage corresponding to its respective RPC message
func NewGetVirtualSelectedParentChainFromBlockResponseMessage ¶
func NewGetVirtualSelectedParentChainFromBlockResponseMessage(removedChainBlockHashes, addedChainBlockHashes []string) *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 KaspaNet ¶
type KaspaNet uint32
KaspaNet represents which kaspa network a message belongs to.
const ( // Mainnet represents the main kaspa network. Mainnet KaspaNet = 0x3ddcf71d // Testnet represents the test network. Testnet KaspaNet = 0xddb8af8f // Simnet represents the simulation test network. Simnet KaspaNet = 0x374dcf1c // Devnet represents the development test network. Devnet KaspaNet = 0x732d87e1 )
Constants used to indicate the message kaspa 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 }
MempoolEntry represents a transaction in the mempool.
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 kaspa 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 // 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 )
Commands used in kaspa 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 kaspa 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 kaspa Addresses message.
func NewMsgAddresses ¶
func NewMsgAddresses(addressList []*NetAddress) *MsgAddresses
NewMsgAddresses returns a new kaspa 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 kaspa 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 kaspa 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 kaspa 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 kaspa 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 kaspa 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 ¶ added in v0.11.0
type MsgBlockWithTrustedData struct { Block *MsgBlock DAAScore uint64 DAAWindow []*TrustedDataDataDAABlock GHOSTDAGData []*BlockGHOSTDAGDataHashPair // contains filtered or unexported fields }
MsgBlockWithTrustedData represents a kaspa BlockWithTrustedData message
func DomainBlockWithTrustedDataToBlockWithTrustedData ¶ added in v0.11.0
func DomainBlockWithTrustedDataToBlockWithTrustedData(block *externalapi.BlockWithTrustedData) *MsgBlockWithTrustedData
DomainBlockWithTrustedDataToBlockWithTrustedData converts *externalapi.BlockWithTrustedData to *MsgBlockWithTrustedData
func NewMsgBlockWithTrustedData ¶ added in v0.11.0
func NewMsgBlockWithTrustedData() *MsgBlockWithTrustedData
NewMsgBlockWithTrustedData returns a new MsgBlockWithTrustedData.
func (*MsgBlockWithTrustedData) Command ¶ added in v0.11.0
func (msg *MsgBlockWithTrustedData) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgBlockWithTrustedData) MessageNumber ¶ added in v0.11.0
func (b *MsgBlockWithTrustedData) MessageNumber() uint64
func (*MsgBlockWithTrustedData) ReceivedAt ¶ added in v0.11.0
func (*MsgBlockWithTrustedData) SetMessageNumber ¶ added in v0.11.0
func (b *MsgBlockWithTrustedData) SetMessageNumber(messageNumber uint64)
func (*MsgBlockWithTrustedData) SetReceivedAt ¶ added in v0.11.0
type MsgBlockWithTrustedDataV4 ¶ added in v0.11.10
type MsgBlockWithTrustedDataV4 struct { Block *MsgBlock DAAWindowIndices []uint64 GHOSTDAGDataIndices []uint64 // contains filtered or unexported fields }
MsgBlockWithTrustedDataV4 represents a kaspa BlockWithTrustedDataV4 message
func DomainBlockWithTrustedDataToBlockWithTrustedDataV4 ¶ added in v0.11.10
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 ¶ added in v0.11.10
func NewMsgBlockWithTrustedDataV4() *MsgBlockWithTrustedDataV4
NewMsgBlockWithTrustedDataV4 returns a new MsgBlockWithTrustedDataV4.
func (*MsgBlockWithTrustedDataV4) Command ¶ added in v0.11.10
func (msg *MsgBlockWithTrustedDataV4) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgBlockWithTrustedDataV4) MessageNumber ¶ added in v0.11.10
func (b *MsgBlockWithTrustedDataV4) MessageNumber() uint64
func (*MsgBlockWithTrustedDataV4) ReceivedAt ¶ added in v0.11.10
func (*MsgBlockWithTrustedDataV4) SetMessageNumber ¶ added in v0.11.10
func (b *MsgBlockWithTrustedDataV4) SetMessageNumber(messageNumber uint64)
func (*MsgBlockWithTrustedDataV4) SetReceivedAt ¶ added in v0.11.10
type MsgDoneBlocksWithTrustedData ¶ added in v0.11.0
type MsgDoneBlocksWithTrustedData struct {
// contains filtered or unexported fields
}
MsgDoneBlocksWithTrustedData implements the Message interface and represents a kaspa DoneBlocksWithTrustedData message
This message has no payload.
func NewMsgDoneBlocksWithTrustedData ¶ added in v0.11.0
func NewMsgDoneBlocksWithTrustedData() *MsgDoneBlocksWithTrustedData
NewMsgDoneBlocksWithTrustedData returns a new kaspa DoneBlocksWithTrustedData message that conforms to the Message interface.
func (*MsgDoneBlocksWithTrustedData) Command ¶ added in v0.11.0
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 ¶ added in v0.11.0
func (b *MsgDoneBlocksWithTrustedData) MessageNumber() uint64
func (*MsgDoneBlocksWithTrustedData) ReceivedAt ¶ added in v0.11.0
func (*MsgDoneBlocksWithTrustedData) SetMessageNumber ¶ added in v0.11.0
func (b *MsgDoneBlocksWithTrustedData) SetMessageNumber(messageNumber uint64)
func (*MsgDoneBlocksWithTrustedData) SetReceivedAt ¶ added in v0.11.0
type MsgDoneHeaders ¶
type MsgDoneHeaders struct {
// contains filtered or unexported fields
}
MsgDoneHeaders implements the Message interface and represents a kaspa 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 kaspa 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 kaspa 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 kaspa 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 kaspa 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 kaspa ibdBlockLocator message
func NewMsgIBDBlockLocator ¶
func NewMsgIBDBlockLocator(targetHash *externalapi.DomainHash, blockLocatorHashes []*externalapi.DomainHash) *MsgIBDBlockLocator
NewMsgIBDBlockLocator returns a new kaspa 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 kaspa 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 kaspa 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 MsgInvRelayBlock ¶
type MsgInvRelayBlock struct { Hash *externalapi.DomainHash // contains filtered or unexported fields }
MsgInvRelayBlock implements the Message interface and represents a kaspa 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 kaspa 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 kaspa 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 kaspa 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 kaspa 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 kaspa 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 kaspa pong message which is used primarily to confirm that a connection is still valid in response to a kaspa ping message (MsgPing).
This message was not added until protocol versions AFTER BIP0031Version.
func NewMsgPong ¶
NewMsgPong returns a new kaspa 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 ¶ added in v0.11.0
type MsgPruningPointProof struct { Headers [][]*MsgBlockHeader // contains filtered or unexported fields }
MsgPruningPointProof represents a kaspa PruningPointProof message
func DomainPruningPointProofToMsgPruningPointProof ¶ added in v0.11.0
func DomainPruningPointProofToMsgPruningPointProof(pruningPointProof *externalapi.PruningPointProof) *MsgPruningPointProof
DomainPruningPointProofToMsgPruningPointProof converts *externalapi.PruningPointProof to *MsgPruningPointProof
func NewMsgPruningPointProof ¶ added in v0.11.0
func NewMsgPruningPointProof(headers [][]*MsgBlockHeader) *MsgPruningPointProof
NewMsgPruningPointProof returns a new MsgPruningPointProof.
func (*MsgPruningPointProof) Command ¶ added in v0.11.0
func (msg *MsgPruningPointProof) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgPruningPointProof) MessageNumber ¶ added in v0.11.0
func (b *MsgPruningPointProof) MessageNumber() uint64
func (*MsgPruningPointProof) ReceivedAt ¶ added in v0.11.0
func (*MsgPruningPointProof) SetMessageNumber ¶ added in v0.11.0
func (b *MsgPruningPointProof) SetMessageNumber(messageNumber uint64)
func (*MsgPruningPointProof) SetReceivedAt ¶ added in v0.11.0
type MsgPruningPointUTXOSetChunk ¶
type MsgPruningPointUTXOSetChunk struct { OutpointAndUTXOEntryPairs []*OutpointAndUTXOEntryPair // contains filtered or unexported fields }
MsgPruningPointUTXOSetChunk represents a kaspa 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 ¶ added in v0.11.0
type MsgPruningPoints struct { Headers []*MsgBlockHeader // contains filtered or unexported fields }
MsgPruningPoints represents a kaspa PruningPoints message
func NewMsgPruningPoints ¶ added in v0.11.0
func NewMsgPruningPoints(headers []*MsgBlockHeader) *MsgPruningPoints
NewMsgPruningPoints returns a new MsgPruningPoints.
func (*MsgPruningPoints) Command ¶ added in v0.11.0
func (msg *MsgPruningPoints) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgPruningPoints) MessageNumber ¶ added in v0.11.0
func (b *MsgPruningPoints) MessageNumber() uint64
func (*MsgPruningPoints) ReceivedAt ¶ added in v0.11.0
func (*MsgPruningPoints) SetMessageNumber ¶ added in v0.11.0
func (b *MsgPruningPoints) SetMessageNumber(messageNumber uint64)
func (*MsgPruningPoints) SetReceivedAt ¶ added in v0.11.0
type MsgReady ¶ added in v0.11.10
type MsgReady struct {
// contains filtered or unexported fields
}
MsgReady implements the Message interface and represents a kaspa Ready message. It is used to notify that the peer is ready to receive messages.
This message has no payload.
func NewMsgReady ¶ added in v0.11.10
func NewMsgReady() *MsgReady
NewMsgReady returns a new kaspa Ready message that conforms to the Message interface.
func (*MsgReady) Command ¶ added in v0.11.10
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 ¶ added in v0.11.10
func (b *MsgReady) MessageNumber() uint64
func (*MsgReady) ReceivedAt ¶ added in v0.11.10
func (*MsgReady) SetMessageNumber ¶ added in v0.11.10
func (b *MsgReady) SetMessageNumber(messageNumber uint64)
func (*MsgReady) SetReceivedAt ¶ added in v0.11.10
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 MsgRequestBlockLocator ¶
type MsgRequestBlockLocator struct { HighHash *externalapi.DomainHash Limit uint32 // contains filtered or unexported fields }
MsgRequestBlockLocator implements the Message interface and represents a kaspa RequestBlockLocator message. It is used to request a block locator between low and high hash. The locator is returned via a locator message (MsgBlockLocator).
func NewMsgRequestBlockLocator ¶
func NewMsgRequestBlockLocator(highHash *externalapi.DomainHash, limit uint32) *MsgRequestBlockLocator
NewMsgRequestBlockLocator returns a new RequestBlockLocator message that conforms to the Message interface using the passed parameters and defaults for the remaining fields.
func (*MsgRequestBlockLocator) Command ¶
func (msg *MsgRequestBlockLocator) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgRequestBlockLocator) MessageNumber ¶
func (b *MsgRequestBlockLocator) MessageNumber() uint64
func (*MsgRequestBlockLocator) ReceivedAt ¶
func (*MsgRequestBlockLocator) SetMessageNumber ¶
func (b *MsgRequestBlockLocator) SetMessageNumber(messageNumber uint64)
func (*MsgRequestBlockLocator) SetReceivedAt ¶
type MsgRequestHeaders ¶
type MsgRequestHeaders struct { LowHash *externalapi.DomainHash HighHash *externalapi.DomainHash // contains filtered or unexported fields }
MsgRequestHeaders implements the Message interface and represents a kaspa RequestHeaders message. It is used to request a list of blocks starting after the low hash and until the high hash.
func NewMsgRequstHeaders ¶
func NewMsgRequstHeaders(lowHash, highHash *externalapi.DomainHash) *MsgRequestHeaders
NewMsgRequstHeaders returns a new kaspa RequestHeaders message that conforms to the Message interface using the passed parameters and defaults for the remaining fields.
func (*MsgRequestHeaders) Command ¶
func (msg *MsgRequestHeaders) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgRequestHeaders) MessageNumber ¶
func (b *MsgRequestHeaders) MessageNumber() uint64
func (*MsgRequestHeaders) ReceivedAt ¶
func (*MsgRequestHeaders) SetMessageNumber ¶
func (b *MsgRequestHeaders) SetMessageNumber(messageNumber uint64)
func (*MsgRequestHeaders) SetReceivedAt ¶
type MsgRequestIBDBlocks ¶
type MsgRequestIBDBlocks struct { Hashes []*externalapi.DomainHash // contains filtered or unexported fields }
MsgRequestIBDBlocks implements the Message interface and represents a kaspa RequestIBDBlocks message. It is used to request blocks as part of the IBD protocol.
func NewMsgRequestIBDBlocks ¶
func NewMsgRequestIBDBlocks(hashes []*externalapi.DomainHash) *MsgRequestIBDBlocks
NewMsgRequestIBDBlocks returns a new MsgRequestIBDBlocks.
func (*MsgRequestIBDBlocks) Command ¶
func (msg *MsgRequestIBDBlocks) Command() MessageCommand
Command returns the protocol command string for the message. This is part of the Message interface implementation.
func (*MsgRequestIBDBlocks) MessageNumber ¶
func (b *MsgRequestIBDBlocks) MessageNumber() uint64
func (*MsgRequestIBDBlocks) ReceivedAt ¶
func (*MsgRequestIBDBlocks) SetMessageNumber ¶
func (b *MsgRequestIBDBlocks) SetMessageNumber(messageNumber uint64)
func (*MsgRequestIBDBlocks) SetReceivedAt ¶
type MsgRequestNextHeaders ¶
type MsgRequestNextHeaders struct {
// contains filtered or unexported fields
}
MsgRequestNextHeaders implements the Message interface and represents a kaspa 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 kaspa 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 MsgRequestNextPruningPointUTXOSetChunk ¶
type MsgRequestNextPruningPointUTXOSetChunk struct {
// contains filtered or unexported fields
}
MsgRequestNextPruningPointUTXOSetChunk represents a kaspa 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 ¶ added in v0.11.0
type MsgRequestPruningPointAndItsAnticone struct {
// contains filtered or unexported fields
}
MsgRequestPruningPointAndItsAnticone represents a kaspa RequestPruningPointAndItsAnticone message
func NewMsgRequestPruningPointAndItsAnticone ¶ added in v0.11.0
func NewMsgRequestPruningPointAndItsAnticone() *MsgRequestPruningPointAndItsAnticone
NewMsgRequestPruningPointAndItsAnticone returns a new MsgRequestPruningPointAndItsAnticone.
func (*MsgRequestPruningPointAndItsAnticone) Command ¶ added in v0.11.0
func (msg *MsgRequestPruningPointAndItsAnticone) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgRequestPruningPointAndItsAnticone) MessageNumber ¶ added in v0.11.0
func (b *MsgRequestPruningPointAndItsAnticone) MessageNumber() uint64
func (*MsgRequestPruningPointAndItsAnticone) ReceivedAt ¶ added in v0.11.0
func (*MsgRequestPruningPointAndItsAnticone) SetMessageNumber ¶ added in v0.11.0
func (b *MsgRequestPruningPointAndItsAnticone) SetMessageNumber(messageNumber uint64)
func (*MsgRequestPruningPointAndItsAnticone) SetReceivedAt ¶ added in v0.11.0
type MsgRequestPruningPointProof ¶ added in v0.11.0
type MsgRequestPruningPointProof struct {
// contains filtered or unexported fields
}
MsgRequestPruningPointProof represents a kaspa RequestPruningPointProof message
func NewMsgRequestPruningPointProof ¶ added in v0.11.0
func NewMsgRequestPruningPointProof() *MsgRequestPruningPointProof
NewMsgRequestPruningPointProof returns a new MsgRequestPruningPointProof.
func (*MsgRequestPruningPointProof) Command ¶ added in v0.11.0
func (msg *MsgRequestPruningPointProof) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgRequestPruningPointProof) MessageNumber ¶ added in v0.11.0
func (b *MsgRequestPruningPointProof) MessageNumber() uint64
func (*MsgRequestPruningPointProof) ReceivedAt ¶ added in v0.11.0
func (*MsgRequestPruningPointProof) SetMessageNumber ¶ added in v0.11.0
func (b *MsgRequestPruningPointProof) SetMessageNumber(messageNumber uint64)
func (*MsgRequestPruningPointProof) SetReceivedAt ¶ added in v0.11.0
type MsgRequestPruningPointUTXOSet ¶ added in v0.11.0
type MsgRequestPruningPointUTXOSet struct { PruningPointHash *externalapi.DomainHash // contains filtered or unexported fields }
MsgRequestPruningPointUTXOSet represents a kaspa RequestPruningPointUTXOSet message
func NewMsgRequestPruningPointUTXOSet ¶ added in v0.11.0
func NewMsgRequestPruningPointUTXOSet(pruningPointHash *externalapi.DomainHash) *MsgRequestPruningPointUTXOSet
NewMsgRequestPruningPointUTXOSet returns a new MsgRequestPruningPointUTXOSet
func (*MsgRequestPruningPointUTXOSet) Command ¶ added in v0.11.0
func (msg *MsgRequestPruningPointUTXOSet) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgRequestPruningPointUTXOSet) MessageNumber ¶ added in v0.11.0
func (b *MsgRequestPruningPointUTXOSet) MessageNumber() uint64
func (*MsgRequestPruningPointUTXOSet) ReceivedAt ¶ added in v0.11.0
func (*MsgRequestPruningPointUTXOSet) SetMessageNumber ¶ added in v0.11.0
func (b *MsgRequestPruningPointUTXOSet) SetMessageNumber(messageNumber uint64)
func (*MsgRequestPruningPointUTXOSet) SetReceivedAt ¶ added in v0.11.0
type MsgRequestRelayBlocks ¶
type MsgRequestRelayBlocks struct { Hashes []*externalapi.DomainHash // contains filtered or unexported fields }
MsgRequestRelayBlocks implements the Message interface and represents a kaspa 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 kaspa 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 kaspa 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 kaspa 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 kaspa 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 kaspa 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 ¶ added in v0.11.10
type MsgTrustedData struct { DAAWindow []*TrustedDataDAAHeader GHOSTDAGData []*BlockGHOSTDAGDataHashPair // contains filtered or unexported fields }
MsgTrustedData represents a kaspa TrustedData message
func DomainTrustedDataToTrustedData ¶ added in v0.11.10
func DomainTrustedDataToTrustedData(domainDAAWindow []*externalapi.TrustedDataDataDAAHeader, domainGHOSTDAGData []*externalapi.BlockGHOSTDAGDataHashPair) *MsgTrustedData
DomainTrustedDataToTrustedData converts *externalapi.BlockWithTrustedData to *MsgBlockWithTrustedData
func NewMsgTrustedData ¶ added in v0.11.10
func NewMsgTrustedData() *MsgTrustedData
NewMsgTrustedData returns a new MsgTrustedData.
func (*MsgTrustedData) Command ¶ added in v0.11.10
func (msg *MsgTrustedData) Command() MessageCommand
Command returns the protocol command string for the message
func (*MsgTrustedData) MessageNumber ¶ added in v0.11.10
func (b *MsgTrustedData) MessageNumber() uint64
func (*MsgTrustedData) ReceivedAt ¶ added in v0.11.10
func (*MsgTrustedData) SetMessageNumber ¶ added in v0.11.10
func (b *MsgTrustedData) SetMessageNumber(messageNumber uint64)
func (*MsgTrustedData) SetReceivedAt ¶ added in v0.11.10
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 kaspa 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 kaspa 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 kaspa 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 ¶ added in v0.11.9
func (na NetAddress) String() string
func (*NetAddress) TCPAddress ¶
func (na *NetAddress) TCPAddress() *net.TCPAddr
TCPAddress converts the NetAddress to *net.TCPAddr
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 NotifyPruningPointUTXOSetOverrideRequestMessage ¶ added in v0.8.10
type NotifyPruningPointUTXOSetOverrideRequestMessage struct {
// contains filtered or unexported fields
}
NotifyPruningPointUTXOSetOverrideRequestMessage is an appmessage corresponding to its respective RPC message
func NewNotifyPruningPointUTXOSetOverrideRequestMessage ¶ added in v0.8.10
func NewNotifyPruningPointUTXOSetOverrideRequestMessage() *NotifyPruningPointUTXOSetOverrideRequestMessage
NewNotifyPruningPointUTXOSetOverrideRequestMessage returns a instance of the message
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) Command ¶ added in v0.8.10
func (msg *NotifyPruningPointUTXOSetOverrideRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) MessageNumber ¶ added in v0.8.10
func (b *NotifyPruningPointUTXOSetOverrideRequestMessage) MessageNumber() uint64
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) ReceivedAt ¶ added in v0.8.10
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) SetMessageNumber ¶ added in v0.8.10
func (b *NotifyPruningPointUTXOSetOverrideRequestMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyPruningPointUTXOSetOverrideRequestMessage) SetReceivedAt ¶ added in v0.8.10
type NotifyPruningPointUTXOSetOverrideResponseMessage ¶ added in v0.8.10
type NotifyPruningPointUTXOSetOverrideResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
NotifyPruningPointUTXOSetOverrideResponseMessage is an appmessage corresponding to its respective RPC message
func NewNotifyPruningPointUTXOSetOverrideResponseMessage ¶ added in v0.8.10
func NewNotifyPruningPointUTXOSetOverrideResponseMessage() *NotifyPruningPointUTXOSetOverrideResponseMessage
NewNotifyPruningPointUTXOSetOverrideResponseMessage returns a instance of the message
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) Command ¶ added in v0.8.10
func (msg *NotifyPruningPointUTXOSetOverrideResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) MessageNumber ¶ added in v0.8.10
func (b *NotifyPruningPointUTXOSetOverrideResponseMessage) MessageNumber() uint64
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) ReceivedAt ¶ added in v0.8.10
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) SetMessageNumber ¶ added in v0.8.10
func (b *NotifyPruningPointUTXOSetOverrideResponseMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyPruningPointUTXOSetOverrideResponseMessage) SetReceivedAt ¶ added in v0.8.10
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 ¶ added in v0.10.3
type NotifyVirtualDaaScoreChangedRequestMessage struct {
// contains filtered or unexported fields
}
NotifyVirtualDaaScoreChangedRequestMessage is an appmessage corresponding to its respective RPC message
func NewNotifyVirtualDaaScoreChangedRequestMessage ¶ added in v0.10.3
func NewNotifyVirtualDaaScoreChangedRequestMessage() *NotifyVirtualDaaScoreChangedRequestMessage
NewNotifyVirtualDaaScoreChangedRequestMessage returns a instance of the message
func (*NotifyVirtualDaaScoreChangedRequestMessage) Command ¶ added in v0.10.3
func (msg *NotifyVirtualDaaScoreChangedRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyVirtualDaaScoreChangedRequestMessage) MessageNumber ¶ added in v0.10.3
func (b *NotifyVirtualDaaScoreChangedRequestMessage) MessageNumber() uint64
func (*NotifyVirtualDaaScoreChangedRequestMessage) ReceivedAt ¶ added in v0.10.3
func (*NotifyVirtualDaaScoreChangedRequestMessage) SetMessageNumber ¶ added in v0.10.3
func (b *NotifyVirtualDaaScoreChangedRequestMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyVirtualDaaScoreChangedRequestMessage) SetReceivedAt ¶ added in v0.10.3
type NotifyVirtualDaaScoreChangedResponseMessage ¶ added in v0.10.3
type NotifyVirtualDaaScoreChangedResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
NotifyVirtualDaaScoreChangedResponseMessage is an appmessage corresponding to its respective RPC message
func NewNotifyVirtualDaaScoreChangedResponseMessage ¶ added in v0.10.3
func NewNotifyVirtualDaaScoreChangedResponseMessage() *NotifyVirtualDaaScoreChangedResponseMessage
NewNotifyVirtualDaaScoreChangedResponseMessage returns a instance of the message
func (*NotifyVirtualDaaScoreChangedResponseMessage) Command ¶ added in v0.10.3
func (msg *NotifyVirtualDaaScoreChangedResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*NotifyVirtualDaaScoreChangedResponseMessage) MessageNumber ¶ added in v0.10.3
func (b *NotifyVirtualDaaScoreChangedResponseMessage) MessageNumber() uint64
func (*NotifyVirtualDaaScoreChangedResponseMessage) ReceivedAt ¶ added in v0.10.3
func (*NotifyVirtualDaaScoreChangedResponseMessage) SetMessageNumber ¶ added in v0.10.3
func (b *NotifyVirtualDaaScoreChangedResponseMessage) SetMessageNumber(messageNumber uint64)
func (*NotifyVirtualDaaScoreChangedResponseMessage) SetReceivedAt ¶ added in v0.10.3
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 {
// contains filtered or unexported fields
}
NotifyVirtualSelectedParentChainChangedRequestMessage is an appmessage corresponding to its respective RPC message
func NewNotifyVirtualSelectedParentChainChangedRequestMessage ¶
func NewNotifyVirtualSelectedParentChainChangedRequestMessage() *NotifyVirtualSelectedParentChainChangedRequestMessage
NewNotifyVirtualSelectedParentChainChangedRequestMessage returns a 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 ¶ added in v0.8.10
type PruningPointUTXOSetOverrideNotificationMessage struct {
// contains filtered or unexported fields
}
PruningPointUTXOSetOverrideNotificationMessage is an appmessage corresponding to its respective RPC message
func NewPruningPointUTXOSetOverrideNotificationMessage ¶ added in v0.8.10
func NewPruningPointUTXOSetOverrideNotificationMessage() *PruningPointUTXOSetOverrideNotificationMessage
NewPruningPointUTXOSetOverrideNotificationMessage returns a instance of the message
func (*PruningPointUTXOSetOverrideNotificationMessage) Command ¶ added in v0.8.10
func (msg *PruningPointUTXOSetOverrideNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*PruningPointUTXOSetOverrideNotificationMessage) MessageNumber ¶ added in v0.8.10
func (b *PruningPointUTXOSetOverrideNotificationMessage) MessageNumber() uint64
func (*PruningPointUTXOSetOverrideNotificationMessage) ReceivedAt ¶ added in v0.8.10
func (*PruningPointUTXOSetOverrideNotificationMessage) SetMessageNumber ¶ added in v0.8.10
func (b *PruningPointUTXOSetOverrideNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*PruningPointUTXOSetOverrideNotificationMessage) SetReceivedAt ¶ added in v0.8.10
type RPCBlock ¶ added in v0.10.0
type RPCBlock struct { Header *RPCBlockHeader Transactions []*RPCTransaction VerboseData *RPCBlockVerboseData }
RPCBlock is a kaspad block representation meant to be used over RPC
func DomainBlockToRPCBlock ¶ added in v0.10.0
func DomainBlockToRPCBlock(block *externalapi.DomainBlock) *RPCBlock
DomainBlockToRPCBlock converts DomainBlocks to RPCBlocks
type RPCBlockHeader ¶ added in v0.10.0
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 kaspad block header representation meant to be used over RPC
type RPCBlockLevelParents ¶ added in v0.11.0
type RPCBlockLevelParents struct {
ParentHashes []string
}
RPCBlockLevelParents holds parent hashes for one block level
type RPCBlockVerboseData ¶ added in v0.10.0
type RPCBlockVerboseData struct { Hash string Difficulty float64 SelectedParentHash string TransactionIDs []string IsHeaderOnly bool BlueScore uint64 ChildrenHashes []string }
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 kaspad outpoint representation meant to be used over RPC
type RPCScriptPublicKey ¶
RPCScriptPublicKey is a kaspad 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 kaspad 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 kaspad transaction input representation meant to be used over RPC
type RPCTransactionInputVerboseData ¶ added in v0.10.0
type RPCTransactionInputVerboseData struct { }
RPCTransactionInputVerboseData holds data about a transaction input
type RPCTransactionOutput ¶
type RPCTransactionOutput struct { Amount uint64 ScriptPublicKey *RPCScriptPublicKey VerboseData *RPCTransactionOutputVerboseData }
RPCTransactionOutput is a kaspad transaction output representation meant to be used over RPC
type RPCTransactionOutputVerboseData ¶ added in v0.10.0
type RPCTransactionOutputVerboseData struct { ScriptPublicKeyType string ScriptPublicKeyAddress string }
RPCTransactionOutputVerboseData holds data about a transaction output
type RPCTransactionVerboseData ¶ added in v0.10.0
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 kaspad 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 kaspa 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 ¶ added in v0.8.10
type StopNotifyingPruningPointUTXOSetOverrideRequestMessage struct {
// contains filtered or unexported fields
}
StopNotifyingPruningPointUTXOSetOverrideRequestMessage is an appmessage corresponding to its respective RPC message
func NewStopNotifyingPruningPointUTXOSetOverrideRequestMessage ¶ added in v0.8.10
func NewStopNotifyingPruningPointUTXOSetOverrideRequestMessage() *StopNotifyingPruningPointUTXOSetOverrideRequestMessage
NewStopNotifyingPruningPointUTXOSetOverrideRequestMessage returns a instance of the message
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) Command ¶ added in v0.8.10
func (msg *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) MessageNumber ¶ added in v0.8.10
func (b *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) MessageNumber() uint64
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) ReceivedAt ¶ added in v0.8.10
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) SetMessageNumber ¶ added in v0.8.10
func (b *StopNotifyingPruningPointUTXOSetOverrideRequestMessage) SetMessageNumber(messageNumber uint64)
func (*StopNotifyingPruningPointUTXOSetOverrideRequestMessage) SetReceivedAt ¶ added in v0.8.10
type StopNotifyingPruningPointUTXOSetOverrideResponseMessage ¶ added in v0.8.10
type StopNotifyingPruningPointUTXOSetOverrideResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
StopNotifyingPruningPointUTXOSetOverrideResponseMessage is an appmessage corresponding to its respective RPC message
func NewStopNotifyingPruningPointUTXOSetOverrideResponseMessage ¶ added in v0.8.10
func NewStopNotifyingPruningPointUTXOSetOverrideResponseMessage() *StopNotifyingPruningPointUTXOSetOverrideResponseMessage
NewStopNotifyingPruningPointUTXOSetOverrideResponseMessage returns a instance of the message
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) Command ¶ added in v0.8.10
func (msg *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) MessageNumber ¶ added in v0.8.10
func (b *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) MessageNumber() uint64
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) ReceivedAt ¶ added in v0.8.10
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) SetMessageNumber ¶ added in v0.8.10
func (b *StopNotifyingPruningPointUTXOSetOverrideResponseMessage) SetMessageNumber(messageNumber uint64)
func (*StopNotifyingPruningPointUTXOSetOverrideResponseMessage) SetReceivedAt ¶ added in v0.8.10
type StopNotifyingUTXOsChangedRequestMessage ¶ added in v0.8.9
type StopNotifyingUTXOsChangedRequestMessage struct { Addresses []string // contains filtered or unexported fields }
StopNotifyingUTXOsChangedRequestMessage is an appmessage corresponding to its respective RPC message
func NewStopNotifyingUTXOsChangedRequestMessage ¶ added in v0.8.9
func NewStopNotifyingUTXOsChangedRequestMessage(addresses []string) *StopNotifyingUTXOsChangedRequestMessage
NewStopNotifyingUTXOsChangedRequestMessage returns a instance of the message
func (*StopNotifyingUTXOsChangedRequestMessage) Command ¶ added in v0.8.9
func (msg *StopNotifyingUTXOsChangedRequestMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*StopNotifyingUTXOsChangedRequestMessage) MessageNumber ¶ added in v0.8.9
func (b *StopNotifyingUTXOsChangedRequestMessage) MessageNumber() uint64
func (*StopNotifyingUTXOsChangedRequestMessage) ReceivedAt ¶ added in v0.8.9
func (*StopNotifyingUTXOsChangedRequestMessage) SetMessageNumber ¶ added in v0.8.9
func (b *StopNotifyingUTXOsChangedRequestMessage) SetMessageNumber(messageNumber uint64)
func (*StopNotifyingUTXOsChangedRequestMessage) SetReceivedAt ¶ added in v0.8.9
type StopNotifyingUTXOsChangedResponseMessage ¶ added in v0.8.9
type StopNotifyingUTXOsChangedResponseMessage struct { Error *RPCError // contains filtered or unexported fields }
StopNotifyingUTXOsChangedResponseMessage is an appmessage corresponding to its respective RPC message
func NewStopNotifyingUTXOsChangedResponseMessage ¶ added in v0.8.9
func NewStopNotifyingUTXOsChangedResponseMessage() *StopNotifyingUTXOsChangedResponseMessage
NewStopNotifyingUTXOsChangedResponseMessage returns a instance of the message
func (*StopNotifyingUTXOsChangedResponseMessage) Command ¶ added in v0.8.9
func (msg *StopNotifyingUTXOsChangedResponseMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*StopNotifyingUTXOsChangedResponseMessage) MessageNumber ¶ added in v0.8.9
func (b *StopNotifyingUTXOsChangedResponseMessage) MessageNumber() uint64
func (*StopNotifyingUTXOsChangedResponseMessage) ReceivedAt ¶ added in v0.8.9
func (*StopNotifyingUTXOsChangedResponseMessage) SetMessageNumber ¶ added in v0.8.9
func (b *StopNotifyingUTXOsChangedResponseMessage) SetMessageNumber(messageNumber uint64)
func (*StopNotifyingUTXOsChangedResponseMessage) SetReceivedAt ¶ added in v0.8.9
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 ¶ added in v0.11.10
type TrustedDataDAAHeader struct { Header *MsgBlockHeader GHOSTDAGData *BlockGHOSTDAGData }
TrustedDataDAAHeader is an appmessage representation of externalapi.TrustedDataDataDAAHeader
type TrustedDataDataDAABlock ¶ added in v0.11.0
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 ¶ added in v0.10.3
type VirtualDaaScoreChangedNotificationMessage struct { VirtualDaaScore uint64 // contains filtered or unexported fields }
VirtualDaaScoreChangedNotificationMessage is an appmessage corresponding to its respective RPC message
func NewVirtualDaaScoreChangedNotificationMessage ¶ added in v0.10.3
func NewVirtualDaaScoreChangedNotificationMessage( virtualDaaScore uint64) *VirtualDaaScoreChangedNotificationMessage
NewVirtualDaaScoreChangedNotificationMessage returns a instance of the message
func (*VirtualDaaScoreChangedNotificationMessage) Command ¶ added in v0.10.3
func (msg *VirtualDaaScoreChangedNotificationMessage) Command() MessageCommand
Command returns the protocol command string for the message
func (*VirtualDaaScoreChangedNotificationMessage) MessageNumber ¶ added in v0.10.3
func (b *VirtualDaaScoreChangedNotificationMessage) MessageNumber() uint64
func (*VirtualDaaScoreChangedNotificationMessage) ReceivedAt ¶ added in v0.10.3
func (*VirtualDaaScoreChangedNotificationMessage) SetMessageNumber ¶ added in v0.10.3
func (b *VirtualDaaScoreChangedNotificationMessage) SetMessageNumber(messageNumber uint64)
func (*VirtualDaaScoreChangedNotificationMessage) SetReceivedAt ¶ added in v0.10.3
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 // contains filtered or unexported fields }
VirtualSelectedParentChainChangedNotificationMessage is an appmessage corresponding to its respective RPC message
func NewVirtualSelectedParentChainChangedNotificationMessage ¶
func NewVirtualSelectedParentChainChangedNotificationMessage(removedChainBlockHashes, addedChainBlocks []string) *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_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_msgrequestblocklocator.go
- p2p_msgrequestheaders.go
- p2p_msgrequestibdblocks.go
- p2p_msgrequestnextheaders.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_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_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_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