# Protocol Documentation ## Table of Contents - [rpc.proto](#rpc.proto) - [RPCError](#protowire.RPCError) - [RpcBlock](#protowire.RpcBlock) - [RpcBlockHeader](#protowire.RpcBlockHeader) - [RpcBlockLevelParents](#protowire.RpcBlockLevelParents) - [RpcBlockVerboseData](#protowire.RpcBlockVerboseData) - [RpcTransaction](#protowire.RpcTransaction) - [RpcTransactionInput](#protowire.RpcTransactionInput) - [RpcScriptPublicKey](#protowire.RpcScriptPublicKey) - [RpcTransactionOutput](#protowire.RpcTransactionOutput) - [RpcOutpoint](#protowire.RpcOutpoint) - [RpcUtxoEntry](#protowire.RpcUtxoEntry) - [RpcTransactionVerboseData](#protowire.RpcTransactionVerboseData) - [RpcTransactionInputVerboseData](#protowire.RpcTransactionInputVerboseData) - [RpcTransactionOutputVerboseData](#protowire.RpcTransactionOutputVerboseData) - [GetCurrentNetworkRequestMessage](#protowire.GetCurrentNetworkRequestMessage) - [GetCurrentNetworkResponseMessage](#protowire.GetCurrentNetworkResponseMessage) - [SubmitBlockRequestMessage](#protowire.SubmitBlockRequestMessage) - [SubmitBlockResponseMessage](#protowire.SubmitBlockResponseMessage) - [GetBlockTemplateRequestMessage](#protowire.GetBlockTemplateRequestMessage) - [GetBlockTemplateResponseMessage](#protowire.GetBlockTemplateResponseMessage) - [NotifyBlockAddedRequestMessage](#protowire.NotifyBlockAddedRequestMessage) - [NotifyBlockAddedResponseMessage](#protowire.NotifyBlockAddedResponseMessage) - [BlockAddedNotificationMessage](#protowire.BlockAddedNotificationMessage) - [GetPeerAddressesRequestMessage](#protowire.GetPeerAddressesRequestMessage) - [GetPeerAddressesResponseMessage](#protowire.GetPeerAddressesResponseMessage) - [GetPeerAddressesKnownAddressMessage](#protowire.GetPeerAddressesKnownAddressMessage) - [GetSelectedTipHashRequestMessage](#protowire.GetSelectedTipHashRequestMessage) - [GetSelectedTipHashResponseMessage](#protowire.GetSelectedTipHashResponseMessage) - [GetMempoolEntryRequestMessage](#protowire.GetMempoolEntryRequestMessage) - [GetMempoolEntryResponseMessage](#protowire.GetMempoolEntryResponseMessage) - [GetMempoolEntriesRequestMessage](#protowire.GetMempoolEntriesRequestMessage) - [GetMempoolEntriesResponseMessage](#protowire.GetMempoolEntriesResponseMessage) - [MempoolEntry](#protowire.MempoolEntry) - [GetConnectedPeerInfoRequestMessage](#protowire.GetConnectedPeerInfoRequestMessage) - [GetConnectedPeerInfoResponseMessage](#protowire.GetConnectedPeerInfoResponseMessage) - [GetConnectedPeerInfoMessage](#protowire.GetConnectedPeerInfoMessage) - [AddPeerRequestMessage](#protowire.AddPeerRequestMessage) - [AddPeerResponseMessage](#protowire.AddPeerResponseMessage) - [SubmitTransactionRequestMessage](#protowire.SubmitTransactionRequestMessage) - [SubmitTransactionResponseMessage](#protowire.SubmitTransactionResponseMessage) - [NotifyVirtualSelectedParentChainChangedRequestMessage](#protowire.NotifyVirtualSelectedParentChainChangedRequestMessage) - [NotifyVirtualSelectedParentChainChangedResponseMessage](#protowire.NotifyVirtualSelectedParentChainChangedResponseMessage) - [VirtualSelectedParentChainChangedNotificationMessage](#protowire.VirtualSelectedParentChainChangedNotificationMessage) - [GetBlockRequestMessage](#protowire.GetBlockRequestMessage) - [GetBlockResponseMessage](#protowire.GetBlockResponseMessage) - [GetSubnetworkRequestMessage](#protowire.GetSubnetworkRequestMessage) - [GetSubnetworkResponseMessage](#protowire.GetSubnetworkResponseMessage) - [GetVirtualSelectedParentChainFromBlockRequestMessage](#protowire.GetVirtualSelectedParentChainFromBlockRequestMessage) - [AcceptedTransactionIds](#protowire.AcceptedTransactionIds) - [GetVirtualSelectedParentChainFromBlockResponseMessage](#protowire.GetVirtualSelectedParentChainFromBlockResponseMessage) - [GetBlocksRequestMessage](#protowire.GetBlocksRequestMessage) - [GetBlocksResponseMessage](#protowire.GetBlocksResponseMessage) - [GetBlockCountRequestMessage](#protowire.GetBlockCountRequestMessage) - [GetBlockCountResponseMessage](#protowire.GetBlockCountResponseMessage) - [GetBlockDagInfoRequestMessage](#protowire.GetBlockDagInfoRequestMessage) - [GetBlockDagInfoResponseMessage](#protowire.GetBlockDagInfoResponseMessage) - [ResolveFinalityConflictRequestMessage](#protowire.ResolveFinalityConflictRequestMessage) - [ResolveFinalityConflictResponseMessage](#protowire.ResolveFinalityConflictResponseMessage) - [NotifyFinalityConflictsRequestMessage](#protowire.NotifyFinalityConflictsRequestMessage) - [NotifyFinalityConflictsResponseMessage](#protowire.NotifyFinalityConflictsResponseMessage) - [FinalityConflictNotificationMessage](#protowire.FinalityConflictNotificationMessage) - [FinalityConflictResolvedNotificationMessage](#protowire.FinalityConflictResolvedNotificationMessage) - [ShutDownRequestMessage](#protowire.ShutDownRequestMessage) - [ShutDownResponseMessage](#protowire.ShutDownResponseMessage) - [GetHeadersRequestMessage](#protowire.GetHeadersRequestMessage) - [GetHeadersResponseMessage](#protowire.GetHeadersResponseMessage) - [NotifyUtxosChangedRequestMessage](#protowire.NotifyUtxosChangedRequestMessage) - [NotifyUtxosChangedResponseMessage](#protowire.NotifyUtxosChangedResponseMessage) - [UtxosChangedNotificationMessage](#protowire.UtxosChangedNotificationMessage) - [UtxosByAddressesEntry](#protowire.UtxosByAddressesEntry) - [StopNotifyingUtxosChangedRequestMessage](#protowire.StopNotifyingUtxosChangedRequestMessage) - [StopNotifyingUtxosChangedResponseMessage](#protowire.StopNotifyingUtxosChangedResponseMessage) - [GetUtxosByAddressesRequestMessage](#protowire.GetUtxosByAddressesRequestMessage) - [GetUtxosByAddressesResponseMessage](#protowire.GetUtxosByAddressesResponseMessage) - [GetBalanceByAddressRequestMessage](#protowire.GetBalanceByAddressRequestMessage) - [GetBalanceByAddressResponseMessage](#protowire.GetBalanceByAddressResponseMessage) - [GetBalancesByAddressesRequestMessage](#protowire.GetBalancesByAddressesRequestMessage) - [BalancesByAddressEntry](#protowire.BalancesByAddressEntry) - [GetBalancesByAddressesResponseMessage](#protowire.GetBalancesByAddressesResponseMessage) - [GetVirtualSelectedParentBlueScoreRequestMessage](#protowire.GetVirtualSelectedParentBlueScoreRequestMessage) - [GetVirtualSelectedParentBlueScoreResponseMessage](#protowire.GetVirtualSelectedParentBlueScoreResponseMessage) - [NotifyVirtualSelectedParentBlueScoreChangedRequestMessage](#protowire.NotifyVirtualSelectedParentBlueScoreChangedRequestMessage) - [NotifyVirtualSelectedParentBlueScoreChangedResponseMessage](#protowire.NotifyVirtualSelectedParentBlueScoreChangedResponseMessage) - [VirtualSelectedParentBlueScoreChangedNotificationMessage](#protowire.VirtualSelectedParentBlueScoreChangedNotificationMessage) - [NotifyVirtualDaaScoreChangedRequestMessage](#protowire.NotifyVirtualDaaScoreChangedRequestMessage) - [NotifyVirtualDaaScoreChangedResponseMessage](#protowire.NotifyVirtualDaaScoreChangedResponseMessage) - [VirtualDaaScoreChangedNotificationMessage](#protowire.VirtualDaaScoreChangedNotificationMessage) - [NotifyPruningPointUTXOSetOverrideRequestMessage](#protowire.NotifyPruningPointUTXOSetOverrideRequestMessage) - [NotifyPruningPointUTXOSetOverrideResponseMessage](#protowire.NotifyPruningPointUTXOSetOverrideResponseMessage) - [PruningPointUTXOSetOverrideNotificationMessage](#protowire.PruningPointUTXOSetOverrideNotificationMessage) - [StopNotifyingPruningPointUTXOSetOverrideRequestMessage](#protowire.StopNotifyingPruningPointUTXOSetOverrideRequestMessage) - [StopNotifyingPruningPointUTXOSetOverrideResponseMessage](#protowire.StopNotifyingPruningPointUTXOSetOverrideResponseMessage) - [BanRequestMessage](#protowire.BanRequestMessage) - [BanResponseMessage](#protowire.BanResponseMessage) - [UnbanRequestMessage](#protowire.UnbanRequestMessage) - [UnbanResponseMessage](#protowire.UnbanResponseMessage) - [GetInfoRequestMessage](#protowire.GetInfoRequestMessage) - [GetInfoResponseMessage](#protowire.GetInfoResponseMessage) - [EstimateNetworkHashesPerSecondRequestMessage](#protowire.EstimateNetworkHashesPerSecondRequestMessage) - [EstimateNetworkHashesPerSecondResponseMessage](#protowire.EstimateNetworkHashesPerSecondResponseMessage) - [NotifyNewBlockTemplateRequestMessage](#protowire.NotifyNewBlockTemplateRequestMessage) - [NotifyNewBlockTemplateResponseMessage](#protowire.NotifyNewBlockTemplateResponseMessage) - [NewBlockTemplateNotificationMessage](#protowire.NewBlockTemplateNotificationMessage) - [MempoolEntryByAddress](#protowire.MempoolEntryByAddress) - [GetMempoolEntriesByAddressesRequestMessage](#protowire.GetMempoolEntriesByAddressesRequestMessage) - [GetMempoolEntriesByAddressesResponseMessage](#protowire.GetMempoolEntriesByAddressesResponseMessage) - [GetCoinSupplyRequestMessage](#protowire.GetCoinSupplyRequestMessage) - [GetCoinSupplyResponseMessage](#protowire.GetCoinSupplyResponseMessage) - [SubmitBlockResponseMessage.RejectReason](#protowire.SubmitBlockResponseMessage.RejectReason) - [Scalar Value Types](#scalar-value-types)
## rpc.proto RPC-related types. Request messages, response messages, and dependant types. Clients are expected to build RequestMessages and wrap them in KaspadMessage. (see messages.proto) Having received a RequestMessage, (wrapped in a KaspadMessage) the RPC server will respond with a ResponseMessage (likewise wrapped in a KaspadMessage) respective to the original RequestMessage. **IMPORTANT:** This API is a work in progress and is subject to break between versions. ### RPCError RPCError represents a generic non-internal error. Receivers of any ResponseMessage are expected to check whether its error field is not null. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | message | [string](#string) | | | ### RpcBlock | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | header | [RpcBlockHeader](#protowire.RpcBlockHeader) | | | | transactions | [RpcTransaction](#protowire.RpcTransaction) | repeated | | | verboseData | [RpcBlockVerboseData](#protowire.RpcBlockVerboseData) | | | ### RpcBlockHeader | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | version | [uint32](#uint32) | | | | parents | [RpcBlockLevelParents](#protowire.RpcBlockLevelParents) | repeated | | | hashMerkleRoot | [string](#string) | | | | acceptedIdMerkleRoot | [string](#string) | | | | utxoCommitment | [string](#string) | | | | timestamp | [int64](#int64) | | | | bits | [uint32](#uint32) | | | | nonce | [uint64](#uint64) | | | | daaScore | [uint64](#uint64) | | | | blueWork | [string](#string) | | | | pruningPoint | [string](#string) | | | | blueScore | [uint64](#uint64) | | | ### RpcBlockLevelParents | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | parentHashes | [string](#string) | repeated | | ### RpcBlockVerboseData | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | hash | [string](#string) | | | | difficulty | [double](#double) | | | | selectedParentHash | [string](#string) | | | | transactionIds | [string](#string) | repeated | | | isHeaderOnly | [bool](#bool) | | | | blueScore | [uint64](#uint64) | | | | childrenHashes | [string](#string) | repeated | | | mergeSetBluesHashes | [string](#string) | repeated | | | mergeSetRedsHashes | [string](#string) | repeated | | | isChainBlock | [bool](#bool) | | | ### RpcTransaction | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | version | [uint32](#uint32) | | | | inputs | [RpcTransactionInput](#protowire.RpcTransactionInput) | repeated | | | outputs | [RpcTransactionOutput](#protowire.RpcTransactionOutput) | repeated | | | lockTime | [uint64](#uint64) | | | | subnetworkId | [string](#string) | | | | gas | [uint64](#uint64) | | | | payload | [string](#string) | | | | verboseData | [RpcTransactionVerboseData](#protowire.RpcTransactionVerboseData) | | | ### RpcTransactionInput | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | previousOutpoint | [RpcOutpoint](#protowire.RpcOutpoint) | | | | signatureScript | [string](#string) | | | | sequence | [uint64](#uint64) | | | | sigOpCount | [uint32](#uint32) | | | | verboseData | [RpcTransactionInputVerboseData](#protowire.RpcTransactionInputVerboseData) | | | ### RpcScriptPublicKey | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | version | [uint32](#uint32) | | | | scriptPublicKey | [string](#string) | | | ### RpcTransactionOutput | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | amount | [uint64](#uint64) | | | | scriptPublicKey | [RpcScriptPublicKey](#protowire.RpcScriptPublicKey) | | | | verboseData | [RpcTransactionOutputVerboseData](#protowire.RpcTransactionOutputVerboseData) | | | ### RpcOutpoint | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | transactionId | [string](#string) | | | | index | [uint32](#uint32) | | | ### RpcUtxoEntry | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | amount | [uint64](#uint64) | | | | scriptPublicKey | [RpcScriptPublicKey](#protowire.RpcScriptPublicKey) | | | | blockDaaScore | [uint64](#uint64) | | | | isCoinbase | [bool](#bool) | | | ### RpcTransactionVerboseData | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | transactionId | [string](#string) | | | | hash | [string](#string) | | | | mass | [uint64](#uint64) | | | | blockHash | [string](#string) | | | | blockTime | [uint64](#uint64) | | | ### RpcTransactionInputVerboseData ### RpcTransactionOutputVerboseData | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | scriptPublicKeyType | [string](#string) | | | | scriptPublicKeyAddress | [string](#string) | | | ### GetCurrentNetworkRequestMessage GetCurrentNetworkRequestMessage requests the network kaspad is currently running against. Possible networks are: Mainnet, Testnet, Simnet, Devnet ### GetCurrentNetworkResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | currentNetwork | [string](#string) | | | | error | [RPCError](#protowire.RPCError) | | | ### SubmitBlockRequestMessage SubmitBlockRequestMessage requests to submit a block into the DAG. Blocks are generally expected to have been generated using the getBlockTemplate call. See: GetBlockTemplateRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | block | [RpcBlock](#protowire.RpcBlock) | | | | allowNonDAABlocks | [bool](#bool) | | | ### SubmitBlockResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | rejectReason | [SubmitBlockResponseMessage.RejectReason](#protowire.SubmitBlockResponseMessage.RejectReason) | | | | error | [RPCError](#protowire.RPCError) | | | ### GetBlockTemplateRequestMessage GetBlockTemplateRequestMessage requests a current block template. Callers are expected to solve the block template and submit it using the submitBlock call See: SubmitBlockRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | payAddress | [string](#string) | | Which kaspa address should the coinbase block reward transaction pay into | | extraData | [string](#string) | | | ### GetBlockTemplateResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | block | [RpcBlock](#protowire.RpcBlock) | | | | isSynced | [bool](#bool) | | Whether kaspad thinks that it's synced. Callers are discouraged (but not forbidden) from solving blocks when kaspad is not synced. That is because when kaspad isn't in sync with the rest of the network there's a high chance the block will never be accepted, thus the solving effort would have been wasted. | | error | [RPCError](#protowire.RPCError) | | | ### NotifyBlockAddedRequestMessage NotifyBlockAddedRequestMessage registers this connection for blockAdded notifications. See: BlockAddedNotificationMessage ### NotifyBlockAddedResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### BlockAddedNotificationMessage BlockAddedNotificationMessage is sent whenever a blocks has been added (NOT accepted) into the DAG. See: NotifyBlockAddedRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | block | [RpcBlock](#protowire.RpcBlock) | | | ### GetPeerAddressesRequestMessage GetPeerAddressesRequestMessage requests the list of known kaspad addresses in the current network. (mainnet, testnet, etc.) ### GetPeerAddressesResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | addresses | [GetPeerAddressesKnownAddressMessage](#protowire.GetPeerAddressesKnownAddressMessage) | repeated | | | bannedAddresses | [GetPeerAddressesKnownAddressMessage](#protowire.GetPeerAddressesKnownAddressMessage) | repeated | | | error | [RPCError](#protowire.RPCError) | | | ### GetPeerAddressesKnownAddressMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | Addr | [string](#string) | | | ### GetSelectedTipHashRequestMessage GetSelectedTipHashRequestMessage requests the hash of the current virtual's selected parent. ### GetSelectedTipHashResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | selectedTipHash | [string](#string) | | | | error | [RPCError](#protowire.RPCError) | | | ### GetMempoolEntryRequestMessage GetMempoolEntryRequestMessage requests information about a specific transaction in the mempool. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | txId | [string](#string) | | The transaction's TransactionID. | | includeOrphanPool | [bool](#bool) | | | | filterTransactionPool | [bool](#bool) | | | ### GetMempoolEntryResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | entry | [MempoolEntry](#protowire.MempoolEntry) | | | | error | [RPCError](#protowire.RPCError) | | | ### GetMempoolEntriesRequestMessage GetMempoolEntriesRequestMessage requests information about all the transactions currently in the mempool. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | includeOrphanPool | [bool](#bool) | | | | filterTransactionPool | [bool](#bool) | | | ### GetMempoolEntriesResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | entries | [MempoolEntry](#protowire.MempoolEntry) | repeated | | | error | [RPCError](#protowire.RPCError) | | | ### MempoolEntry | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | fee | [uint64](#uint64) | | | | transaction | [RpcTransaction](#protowire.RpcTransaction) | | | | isOrphan | [bool](#bool) | | | ### GetConnectedPeerInfoRequestMessage GetConnectedPeerInfoRequestMessage requests information about all the p2p peers currently connected to this kaspad. ### GetConnectedPeerInfoResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | infos | [GetConnectedPeerInfoMessage](#protowire.GetConnectedPeerInfoMessage) | repeated | | | error | [RPCError](#protowire.RPCError) | | | ### GetConnectedPeerInfoMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | id | [string](#string) | | | | address | [string](#string) | | | | lastPingDuration | [int64](#int64) | | How long did the last ping/pong exchange take | | isOutbound | [bool](#bool) | | Whether this kaspad initiated the connection | | timeOffset | [int64](#int64) | | | | userAgent | [string](#string) | | | | advertisedProtocolVersion | [uint32](#uint32) | | The protocol version that this peer claims to support | | timeConnected | [int64](#int64) | | The timestamp of when this peer connected to this kaspad | | isIbdPeer | [bool](#bool) | | Whether this peer is the IBD peer (if IBD is running) | ### AddPeerRequestMessage AddPeerRequestMessage adds a peer to kaspad's outgoing connection list. This will, in most cases, result in kaspad connecting to said peer. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | address | [string](#string) | | | | isPermanent | [bool](#bool) | | Whether to keep attempting to connect to this peer after disconnection | ### AddPeerResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### SubmitTransactionRequestMessage SubmitTransactionRequestMessage submits a transaction to the mempool | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | transaction | [RpcTransaction](#protowire.RpcTransaction) | | | | allowOrphan | [bool](#bool) | | | ### SubmitTransactionResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | transactionId | [string](#string) | | The transaction ID of the submitted transaction | | error | [RPCError](#protowire.RPCError) | | | ### NotifyVirtualSelectedParentChainChangedRequestMessage NotifyVirtualSelectedParentChainChangedRequestMessage registers this connection for virtualSelectedParentChainChanged notifications. See: VirtualSelectedParentChainChangedNotificationMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | includeAcceptedTransactionIds | [bool](#bool) | | | ### NotifyVirtualSelectedParentChainChangedResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### VirtualSelectedParentChainChangedNotificationMessage VirtualSelectedParentChainChangedNotificationMessage is sent whenever the DAG's selected parent chain had changed. See: NotifyVirtualSelectedParentChainChangedRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | removedChainBlockHashes | [string](#string) | repeated | The chain blocks that were removed, in high-to-low order | | addedChainBlockHashes | [string](#string) | repeated | The chain blocks that were added, in low-to-high order | | acceptedTransactionIds | [AcceptedTransactionIds](#protowire.AcceptedTransactionIds) | repeated | Will be filled only if `includeAcceptedTransactionIds = true` in the notify request. | ### GetBlockRequestMessage GetBlockRequestMessage requests information about a specific block | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | hash | [string](#string) | | The hash of the requested block | | includeTransactions | [bool](#bool) | | Whether to include transaction data in the response | ### GetBlockResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | block | [RpcBlock](#protowire.RpcBlock) | | | | error | [RPCError](#protowire.RPCError) | | | ### GetSubnetworkRequestMessage GetSubnetworkRequestMessage requests information about a specific subnetwork Currently unimplemented | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | subnetworkId | [string](#string) | | | ### GetSubnetworkResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | gasLimit | [uint64](#uint64) | | | | error | [RPCError](#protowire.RPCError) | | | ### GetVirtualSelectedParentChainFromBlockRequestMessage GetVirtualSelectedParentChainFromBlockRequestMessage requests the virtual selected parent chain from some startHash to this kaspad's current virtual | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | startHash | [string](#string) | | | | includeAcceptedTransactionIds | [bool](#bool) | | | ### AcceptedTransactionIds | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | acceptingBlockHash | [string](#string) | | | | acceptedTransactionIds | [string](#string) | repeated | | ### GetVirtualSelectedParentChainFromBlockResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | removedChainBlockHashes | [string](#string) | repeated | The chain blocks that were removed, in high-to-low order | | addedChainBlockHashes | [string](#string) | repeated | The chain blocks that were added, in low-to-high order | | acceptedTransactionIds | [AcceptedTransactionIds](#protowire.AcceptedTransactionIds) | repeated | The transactions accepted by each block in addedChainBlockHashes. Will be filled only if `includeAcceptedTransactionIds = true` in the request. | | error | [RPCError](#protowire.RPCError) | | | ### GetBlocksRequestMessage GetBlocksRequestMessage requests blocks between a certain block lowHash up to this kaspad's current virtual. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | lowHash | [string](#string) | | | | includeBlocks | [bool](#bool) | | | | includeTransactions | [bool](#bool) | | | ### GetBlocksResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | blockHashes | [string](#string) | repeated | | | blocks | [RpcBlock](#protowire.RpcBlock) | repeated | | | error | [RPCError](#protowire.RPCError) | | | ### GetBlockCountRequestMessage GetBlockCountRequestMessage requests the current number of blocks in this kaspad. Note that this number may decrease as pruning occurs. ### GetBlockCountResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | blockCount | [uint64](#uint64) | | | | headerCount | [uint64](#uint64) | | | | error | [RPCError](#protowire.RPCError) | | | ### GetBlockDagInfoRequestMessage GetBlockDagInfoRequestMessage requests general information about the current state of this kaspad's DAG. ### GetBlockDagInfoResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | networkName | [string](#string) | | | | blockCount | [uint64](#uint64) | | | | headerCount | [uint64](#uint64) | | | | tipHashes | [string](#string) | repeated | | | difficulty | [double](#double) | | | | pastMedianTime | [int64](#int64) | | | | virtualParentHashes | [string](#string) | repeated | | | pruningPointHash | [string](#string) | | | | virtualDaaScore | [uint64](#uint64) | | | | error | [RPCError](#protowire.RPCError) | | | ### ResolveFinalityConflictRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | finalityBlockHash | [string](#string) | | | ### ResolveFinalityConflictResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### NotifyFinalityConflictsRequestMessage ### NotifyFinalityConflictsResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### FinalityConflictNotificationMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | violatingBlockHash | [string](#string) | | | ### FinalityConflictResolvedNotificationMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | finalityBlockHash | [string](#string) | | | ### ShutDownRequestMessage ShutDownRequestMessage shuts down this kaspad. ### ShutDownResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### GetHeadersRequestMessage GetHeadersRequestMessage requests headers between the given startHash and the current virtual, up to the given limit. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | startHash | [string](#string) | | | | limit | [uint64](#uint64) | | | | isAscending | [bool](#bool) | | | ### GetHeadersResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | headers | [string](#string) | repeated | | | error | [RPCError](#protowire.RPCError) | | | ### NotifyUtxosChangedRequestMessage NotifyUtxosChangedRequestMessage registers this connection for utxoChanged notifications for the given addresses. This call is only available when this kaspad was started with `--utxoindex` See: UtxosChangedNotificationMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | addresses | [string](#string) | repeated | Leave empty to get all updates | ### NotifyUtxosChangedResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### UtxosChangedNotificationMessage UtxosChangedNotificationMessage is sent whenever the UTXO index had been updated. See: NotifyUtxosChangedRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | added | [UtxosByAddressesEntry](#protowire.UtxosByAddressesEntry) | repeated | | | removed | [UtxosByAddressesEntry](#protowire.UtxosByAddressesEntry) | repeated | | ### UtxosByAddressesEntry | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | address | [string](#string) | | | | outpoint | [RpcOutpoint](#protowire.RpcOutpoint) | | | | utxoEntry | [RpcUtxoEntry](#protowire.RpcUtxoEntry) | | | ### StopNotifyingUtxosChangedRequestMessage StopNotifyingUtxosChangedRequestMessage unregisters this connection for utxoChanged notifications for the given addresses. This call is only available when this kaspad was started with `--utxoindex` See: UtxosChangedNotificationMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | addresses | [string](#string) | repeated | | ### StopNotifyingUtxosChangedResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### GetUtxosByAddressesRequestMessage GetUtxosByAddressesRequestMessage requests all current UTXOs for the given kaspad addresses This call is only available when this kaspad was started with `--utxoindex` | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | addresses | [string](#string) | repeated | | ### GetUtxosByAddressesResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | entries | [UtxosByAddressesEntry](#protowire.UtxosByAddressesEntry) | repeated | | | error | [RPCError](#protowire.RPCError) | | | ### GetBalanceByAddressRequestMessage GetBalanceByAddressRequest returns the total balance in unspent transactions towards a given address This call is only available when this kaspad was started with `--utxoindex` | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | address | [string](#string) | | | ### GetBalanceByAddressResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | balance | [uint64](#uint64) | | | | error | [RPCError](#protowire.RPCError) | | | ### GetBalancesByAddressesRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | addresses | [string](#string) | repeated | | ### BalancesByAddressEntry | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | address | [string](#string) | | | | balance | [uint64](#uint64) | | | | error | [RPCError](#protowire.RPCError) | | | ### GetBalancesByAddressesResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | entries | [BalancesByAddressEntry](#protowire.BalancesByAddressEntry) | repeated | | | error | [RPCError](#protowire.RPCError) | | | ### GetVirtualSelectedParentBlueScoreRequestMessage GetVirtualSelectedParentBlueScoreRequestMessage requests the blue score of the current selected parent of the virtual block. ### GetVirtualSelectedParentBlueScoreResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | blueScore | [uint64](#uint64) | | | | error | [RPCError](#protowire.RPCError) | | | ### NotifyVirtualSelectedParentBlueScoreChangedRequestMessage NotifyVirtualSelectedParentBlueScoreChangedRequestMessage registers this connection for virtualSelectedParentBlueScoreChanged notifications. See: VirtualSelectedParentBlueScoreChangedNotificationMessage ### NotifyVirtualSelectedParentBlueScoreChangedResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### VirtualSelectedParentBlueScoreChangedNotificationMessage VirtualSelectedParentBlueScoreChangedNotificationMessage is sent whenever the blue score of the virtual's selected parent changes. See NotifyVirtualSelectedParentBlueScoreChangedRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | virtualSelectedParentBlueScore | [uint64](#uint64) | | | ### NotifyVirtualDaaScoreChangedRequestMessage NotifyVirtualDaaScoreChangedRequestMessage registers this connection for virtualDaaScoreChanged notifications. See: VirtualDaaScoreChangedNotificationMessage ### NotifyVirtualDaaScoreChangedResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### VirtualDaaScoreChangedNotificationMessage VirtualDaaScoreChangedNotificationMessage is sent whenever the DAA score of the virtual changes. See NotifyVirtualDaaScoreChangedRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | virtualDaaScore | [uint64](#uint64) | | | ### NotifyPruningPointUTXOSetOverrideRequestMessage NotifyPruningPointUTXOSetOverrideRequestMessage registers this connection for pruning point UTXO set override notifications. This call is only available when this kaspad was started with `--utxoindex` See: NotifyPruningPointUTXOSetOverrideResponseMessage ### NotifyPruningPointUTXOSetOverrideResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### PruningPointUTXOSetOverrideNotificationMessage PruningPointUTXOSetOverrideNotificationMessage is sent whenever the UTXO index resets due to pruning point change via IBD. See NotifyPruningPointUTXOSetOverrideRequestMessage ### StopNotifyingPruningPointUTXOSetOverrideRequestMessage StopNotifyingPruningPointUTXOSetOverrideRequestMessage unregisters this connection for pruning point UTXO set override notifications. This call is only available when this kaspad was started with `--utxoindex` See: PruningPointUTXOSetOverrideNotificationMessage ### StopNotifyingPruningPointUTXOSetOverrideResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### BanRequestMessage BanRequestMessage bans the given ip. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | ip | [string](#string) | | | ### BanResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### UnbanRequestMessage UnbanRequestMessage unbans the given ip. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | ip | [string](#string) | | | ### UnbanResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### GetInfoRequestMessage GetInfoRequestMessage returns info about the node. ### GetInfoResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | p2pId | [string](#string) | | | | mempoolSize | [uint64](#uint64) | | | | serverVersion | [string](#string) | | | | isUtxoIndexed | [bool](#bool) | | | | isSynced | [bool](#bool) | | | | error | [RPCError](#protowire.RPCError) | | | ### EstimateNetworkHashesPerSecondRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | windowSize | [uint32](#uint32) | | | | startHash | [string](#string) | | | ### EstimateNetworkHashesPerSecondResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | networkHashesPerSecond | [uint64](#uint64) | | | | error | [RPCError](#protowire.RPCError) | | | ### NotifyNewBlockTemplateRequestMessage NotifyNewBlockTemplateRequestMessage registers this connection for NewBlockTemplate notifications. See: NewBlockTemplateNotificationMessage ### NotifyNewBlockTemplateResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | error | [RPCError](#protowire.RPCError) | | | ### NewBlockTemplateNotificationMessage NewBlockTemplateNotificationMessage is sent whenever a new updated block template is available for miners. See NotifyNewBlockTemplateRequestMessage ### MempoolEntryByAddress | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | address | [string](#string) | | | | sending | [MempoolEntry](#protowire.MempoolEntry) | repeated | | | receiving | [MempoolEntry](#protowire.MempoolEntry) | repeated | | ### GetMempoolEntriesByAddressesRequestMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | addresses | [string](#string) | repeated | | | includeOrphanPool | [bool](#bool) | | | | filterTransactionPool | [bool](#bool) | | | ### GetMempoolEntriesByAddressesResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | entries | [MempoolEntryByAddress](#protowire.MempoolEntryByAddress) | repeated | | | error | [RPCError](#protowire.RPCError) | | | ### GetCoinSupplyRequestMessage ### GetCoinSupplyResponseMessage | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | maxSompi | [uint64](#uint64) | | note: this is a hard coded maxSupply, actual maxSupply is expected to deviate by upto -5%, but cannot be measured exactly. | | circulatingSompi | [uint64](#uint64) | | | | error | [RPCError](#protowire.RPCError) | | | ### SubmitBlockResponseMessage.RejectReason | Name | Number | Description | | ---- | ------ | ----------- | | NONE | 0 | | | BLOCK_INVALID | 1 | | | IS_IN_IBD | 2 | | ## Scalar Value Types | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | | ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | | double | | double | double | float | float64 | double | float | Float | | float | | float | float | float | float32 | float | float | Float | | int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | | int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | | uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | | uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | | sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | | sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | | fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | | fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | | sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | | sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | | bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | | string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | | bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |