Add RPC documentation (#1379)

* Split messages.proto to p2p and rpc.

* Split messages.proto to p2p and rpc.

* Write a short intro to the RPC docs.

* Start documenting RPC calls.

* Use a custom protoc-gen-doc.

* Continue writing RPC documentation.

* Finish writing RPC documentation.

* Fix a formatting error.

* Fix merge errors.

* Fix formatting into protowire/README.md.

* Rerun go generate ..

Co-authored-by: Ori Newman <orinewman1@gmail.com>
This commit is contained in:
stasatdaglabs 2021-01-07 16:55:47 +02:00 committed by GitHub
parent 256b7f25f1
commit 541205904e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 11469 additions and 10046 deletions

View File

@ -1,7 +1,15 @@
protowire
=========
1. Download and place in your PATH: https://github.com/protocolbuffers/protobuf/releases/download/v3.12.3/protoc-3.12.3-linux-x86_64.zip
1. Download and place in your PATH:
https://github.com/protocolbuffers/protobuf/releases/download/v3.12.3/protoc-3.12.3-linux-x86_64.zip
2. `go get github.com/golang/protobuf/protoc-gen-go`
3. `go get google.golang.org/grpc/cmd/protoc-gen-go-grpc`
4. In the protowire directory: `go generate .`
Documentation
-------------
To generate `rpc.md`:
1. `go get -u github.com/kaspanet/protoc-gen-doc/cmd/protoc-gen-doc`
2. In the protowire directory: `protoc --doc_out=. --doc_opt=markdown,rpc.md rpc.proto`

View File

@ -1,3 +1,3 @@
//go:generate protoc --go_out=. --go-grpc_out=. --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative messages.proto
//go:generate protoc --go_out=. --go-grpc_out=. --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative p2p.proto rpc.proto messages.proto
package protowire

View File

@ -3,6 +3,9 @@ package protowire;
option go_package = "github.com/kaspanet/kaspad/protowire";
import "p2p.proto";
import "rpc.proto";
message KaspadMessage {
oneof payload {
AddressesMessage addresses = 1;
@ -96,660 +99,10 @@ message KaspadMessage {
}
}
/////////////////////////////////////////////////////////////////////////////
// P2P //
/////////////////////////////////////////////////////////////////////////////
// RequestAddressesMessage start
message RequestAddressesMessage{
bool includeAllSubnetworks = 1;
SubnetworkId subnetworkId = 2;
}
// RequestAddressesMessage end
// AddressesMessage start
message AddressesMessage{
repeated NetAddress addressList = 1;
}
message NetAddress{
int64 timestamp = 1;
uint64 services = 2;
bytes ip = 3;
uint32 port = 4;
}
message SubnetworkId{
bytes bytes = 1;
}
// AddressesMessage end
// TransactionMessage start
message TransactionMessage{
uint32 version = 1;
repeated TransactionInput inputs = 2;
repeated TransactionOutput outputs = 3;
uint64 lockTime = 4;
SubnetworkId subnetworkId = 5;
uint64 gas = 6;
Hash payloadHash = 7;
bytes payload = 8;
}
message TransactionInput{
Outpoint previousOutpoint = 1;
bytes signatureScript = 2;
uint64 sequence = 3;
}
message Outpoint{
TransactionId transactionId = 1;
uint32 index = 2;
}
message TransactionId{
bytes bytes = 1;
}
message ScriptPublicKey {
bytes script = 1;
uint32 version = 2;
}
message TransactionOutput{
uint64 value = 1;
ScriptPublicKey scriptPublicKey = 2;
}
// TransactionMessage end
// BlockMessage start
message BlockMessage{
BlockHeaderMessage header = 1;
repeated TransactionMessage transactions = 2;
}
message BlockHeaderMessage{
uint32 version = 1;
repeated Hash parentHashes = 2;
Hash hashMerkleRoot = 3;
Hash acceptedIdMerkleRoot = 4;
Hash utxoCommitment = 5;
int64 timestamp = 6;
uint32 bits = 7;
uint64 nonce = 8;
}
message Hash{
bytes bytes = 1;
}
// BlockMessage end
// GetBlockLocatorMessage start
message RequestBlockLocatorMessage{
Hash lowHash = 1;
Hash highHash = 2;
uint32 limit = 3;
}
// GetBlockLocatorMessage end
// BlockLocatorMessage start
message BlockLocatorMessage{
repeated Hash hashes = 1;
}
// BlockLocatorMessage end
// GetBlocksMessage start
message RequestHeadersMessage{
Hash lowHash = 1;
Hash highHash = 2;
}
// GetBlocksMessage end
// RequestNextIBDBlocksMessage start
message RequestNextHeadersMessage{
}
// RequestNextIBDBlocksMessage end
// DoneIBDBlocksMessage start
message DoneHeadersMessage{
}
// DoneIBDBlocksMessage end
// RequestRelayBlocksMessage start
message RequestRelayBlocksMessage{
repeated Hash hashes = 1;
}
// RequestRelayBlocksMessage end
// RequestTransactionsMessage start
message RequestTransactionsMessage {
repeated TransactionId ids = 1;
}
// GetTransactionsMessage end
// TransactionNotFoundMessage start
message TransactionNotFoundMessage{
TransactionId id = 1;
}
// TransactionsNotFoundMessage end
// InvRelayBlockMessage start
message InvRelayBlockMessage{
Hash hash = 1;
}
// InvRelayBlockMessage end
// InvTransactionMessage start
message InvTransactionsMessage{
repeated TransactionId ids = 1;
}
// InvTransactionMessage end
// PingMessage start
message PingMessage{
uint64 nonce = 1;
}
// PingMessage end
// PongMessage start
message PongMessage{
uint64 nonce = 1;
}
// PongMessage end
// VerackMessage start
message VerackMessage{
}
// VerackMessage end
// VersionMessage start
message VersionMessage{
uint32 protocolVersion = 1;
uint64 services = 2;
int64 timestamp = 3;
NetAddress address = 4;
bytes id = 5;
string userAgent = 6;
bool disableRelayTx = 8;
SubnetworkId subnetworkId = 9;
string network = 10;
}
// VersionMessage end
// RejectMessage start
message RejectMessage{
string reason = 1;
}
// RejectMessage end
// RequestIBDRootUTXOSetAndBlockMessage start
message RequestIBDRootUTXOSetAndBlockMessage{
Hash ibdRoot = 1;
}
// RequestIBDRootUTXOSetAndBlockMessage end
// IBDRootUTXOSetAndBlockMessage start
message IBDRootUTXOSetAndBlockMessage{
bytes utxoSet = 1;
BlockMessage block = 2;
}
// IBDRootUTXOSetAndBlockMessage end
// RequestIBDBlocksMessage start
message RequestIBDBlocksMessage{
repeated Hash hashes = 1;
}
// RequestIBDBlocksMessage end
// IBDRootNotFoundMessage start
message IBDRootNotFoundMessage{
}
// IBDRootNotFoundMessage end
// RequestIBDRootHashMessage start
message RequestIBDRootHashMessage{
}
// RequestIBDRootHashMessage end
// IBDRootHashMessage start
message IBDRootHashMessage{
Hash hash = 1;
}
// IBDRootHashMessage end
// IbdBlockLocatorMessage start
message IbdBlockLocatorMessage {
Hash targetHash = 1;
repeated Hash blockLocatorHashes = 2;
}
// IbdBlockLocatorMessage end
// IbdBlockLocatorHighestHashMessage start
message IbdBlockLocatorHighestHashMessage {
Hash highestHash = 1;
}
// IbdBlockLocatorHighestHashMessage end
message BlockHeadersMessage {
repeated BlockHeaderMessage blockHeaders = 1;
}
service P2P {
rpc MessageStream (stream KaspadMessage) returns (stream KaspadMessage) {}
}
/////////////////////////////////////////////////////////////////////////////
// RPC //
/////////////////////////////////////////////////////////////////////////////
message RPCError{
string message = 1;
}
message GetCurrentNetworkRequestMessage{
}
message GetCurrentNetworkResponseMessage{
string currentNetwork = 1;
RPCError error = 1000;
}
message SubmitBlockRequestMessage{
BlockMessage block = 1;
}
message SubmitBlockResponseMessage{
RPCError error = 1000;
}
message GetBlockTemplateRequestMessage{
string payAddress = 1;
}
message GetBlockTemplateResponseMessage{
BlockMessage blockMessage = 1;
bool isSynced = 2;
RPCError error = 1000;
}
message NotifyBlockAddedRequestMessage{
}
message NotifyBlockAddedResponseMessage{
RPCError error = 1000;
}
message BlockAddedNotificationMessage{
BlockMessage block = 1;
}
message GetPeerAddressesRequestMessage{
}
message GetPeerAddressesResponseMessage{
repeated GetPeerAddressesKnownAddressMessage addresses = 1;
repeated GetPeerAddressesKnownAddressMessage bannedAddresses = 2;
RPCError error = 1000;
}
message GetPeerAddressesKnownAddressMessage {
string Addr = 1;
}
message GetSelectedTipHashRequestMessage{
}
message GetSelectedTipHashResponseMessage{
string selectedTipHash = 1;
RPCError error = 1000;
}
// mempool entries start
message MempoolEntry{
uint64 fee = 1;
TransactionVerboseData transactionVerboseData = 2;
}
message GetMempoolEntryRequestMessage{
string txId = 1;
}
message GetMempoolEntryResponseMessage{
MempoolEntry entry = 1;
RPCError error = 1000;
}
message GetMempoolEntriesRequestMessage{
}
message GetMempoolEntriesResponseMessage{
repeated MempoolEntry entries = 1;
RPCError error = 1000;
}
// mempool entries end
message GetConnectedPeerInfoRequestMessage{
}
message GetConnectedPeerInfoResponseMessage{
repeated GetConnectedPeerInfoMessage infos = 1;
RPCError error = 1000;
}
message GetConnectedPeerInfoMessage{
string id = 1;
string address = 2;
int64 lastPingDuration = 3;
bool isOutbound = 6;
int64 timeOffset = 7;
string userAgent = 8;
uint32 advertisedProtocolVersion = 9;
int64 timeConnected = 10;
bool isIbdPeer = 11;
}
message AddPeerRequestMessage{
string address = 1;
bool isPermanent = 2;
}
message AddPeerResponseMessage{
RPCError error = 1000;
}
message SubmitTransactionRequestMessage{
RpcTransaction transaction = 1;
}
message SubmitTransactionResponseMessage{
string transactionId = 1;
RPCError error = 1000;
}
message NotifyVirtualSelectedParentChainChangedRequestMessage{
}
message NotifyVirtualSelectedParentChainChangedResponseMessage{
RPCError error = 1000;
}
message VirtualSelectedParentChainChangedNotificationMessage{
repeated string removedChainBlockHashes = 1;
repeated ChainBlock addedChainBlocks = 2;
}
message ChainBlock{
string hash = 1;
repeated AcceptedBlock acceptedBlocks = 2;
}
message AcceptedBlock{
string hash = 1;
repeated string acceptedTransactionIds = 2;
}
message GetBlockRequestMessage{
string hash = 1;
string subnetworkId = 2;
bool includeTransactionVerboseData = 3;
}
message GetBlockResponseMessage{
string blockHash = 1;
BlockVerboseData blockVerboseData = 2;
RPCError error = 1000;
}
message BlockVerboseData{
string hash = 1;
uint32 version = 2;
string versionHex = 3;
string hashMerkleRoot = 4;
string acceptedIDMerkleRoot = 5;
string utxoCommitment = 6;
repeated TransactionVerboseData transactionVerboseData = 7;
int64 time = 8;
uint64 nonce = 9;
string bits = 10;
double difficulty = 11;
repeated string parentHashes = 12;
string selectedParentHash = 13;
repeated string transactionIDs = 14;
bool isHeaderOnly = 15;
uint64 blueScore = 16;
}
message TransactionVerboseData{
string txId = 1;
string hash = 2;
uint64 size = 3;
uint32 version = 4;
uint64 lockTime = 5;
string subnetworkId = 6;
uint64 gas = 7;
string payloadHash = 8;
string payload = 9;
repeated TransactionVerboseInput transactionVerboseInputs = 10;
repeated TransactionVerboseOutput transactionVerboseOutputs = 11;
string blockHash = 12;
uint64 time = 13;
uint64 blockTime = 14;
}
message TransactionVerboseInput{
string txId = 1;
uint32 outputIndex = 2;
ScriptSig scriptSig = 3;
uint64 sequence = 4;
}
message ScriptSig{
string asm = 1;
string hex = 2;
}
message TransactionVerboseOutput{
uint64 value = 1;
uint32 index = 2;
ScriptPublicKeyResult scriptPublicKey = 3;
}
message ScriptPublicKeyResult{
string asm = 1;
string hex = 2;
string type = 3;
string address = 4;
}
message GetSubnetworkRequestMessage{
string subnetworkId = 1;
}
message GetSubnetworkResponseMessage{
uint64 gasLimit = 1;
RPCError error = 1000;
}
message GetVirtualSelectedParentChainFromBlockRequestMessage{
string startHash = 1;
}
message GetVirtualSelectedParentChainFromBlockResponseMessage{
repeated string removedChainBlockHashes = 1;
repeated ChainBlock addedChainBlocks = 2;
RPCError error = 1000;
}
message GetBlocksRequestMessage{
string lowHash = 1;
bool includeBlockHexes = 2;
bool includeBlockVerboseData = 3;
bool includeTransactionVerboseData = 4;
}
message GetBlocksResponseMessage{
repeated string blockHashes = 1;
repeated string blockHexes = 2;
repeated BlockVerboseData blockVerboseData = 3;
RPCError error = 1000;
}
message GetBlockCountRequestMessage{
}
message GetBlockCountResponseMessage{
uint64 blockCount = 1;
uint64 headerCount = 2;
RPCError error = 1000;
}
message GetBlockDagInfoRequestMessage{
}
message GetBlockDagInfoResponseMessage{
string networkName = 1;
uint64 blockCount = 2;
uint64 headerCount = 3;
repeated string tipHashes = 4;
double difficulty = 5;
int64 pastMedianTime = 6;
repeated string virtualParentHashes = 7;
RPCError error = 1000;
}
message ResolveFinalityConflictRequestMessage{
string finalityBlockHash = 1;
}
message ResolveFinalityConflictResponseMessage{
RPCError error = 1000;
}
message NotifyFinalityConflictsRequestMessage{
}
message NotifyFinalityConflictsResponseMessage{
RPCError error = 1000;
}
message FinalityConflictNotificationMessage{
string violatingBlockHash = 1;
}
message FinalityConflictResolvedNotificationMessage{
string finalityBlockHash = 1;
}
message ShutDownRequestMessage{
}
message ShutDownResponseMessage{
RPCError error = 1000;
}
message GetHeadersRequestMessage{
string startHash = 1;
uint64 limit = 2;
bool isAscending = 3;
}
message GetHeadersResponseMessage{
repeated string headers = 1;
RPCError error = 1000;
}
message NotifyUtxosChangedRequestMessage {
repeated string addresses = 1;
}
message NotifyUtxosChangedResponseMessage {
RPCError error = 1000;
}
message UtxosChangedNotificationMessage {
repeated UtxosByAddressesEntry added = 1;
repeated UtxosByAddressesEntry removed = 2;
}
message UtxosByAddressesEntry {
string address = 1;
RpcOutpoint outpoint = 2;
RpcUtxoEntry utxoEntry = 3;
}
message RpcTransaction {
uint32 version = 1;
repeated RpcTransactionInput inputs = 2;
repeated RpcTransactionOutput outputs = 3;
uint64 lockTime = 4;
string subnetworkId = 5;
uint64 gas = 6;
string payloadHash = 7;
string payload = 8;
}
message RpcTransactionInput {
RpcOutpoint previousOutpoint = 1;
string signatureScript = 2;
uint64 sequence = 3;
}
message RpcScriptPublicKey {
uint32 version = 1;
string scriptPublicKey = 2;
}
message RpcTransactionOutput {
uint64 amount = 1;
RpcScriptPublicKey scriptPublicKey = 2;
}
message RpcOutpoint {
string transactionId = 1;
uint32 index = 2;
}
message RpcUtxoEntry {
uint64 amount = 1;
RpcScriptPublicKey scriptPublicKey = 2;
uint64 blockBlueScore = 3;
bool isCoinbase = 4;
}
message GetUtxosByAddressesRequestMessage {
repeated string addresses = 1;
}
message GetUtxosByAddressesResponseMessage {
repeated UtxosByAddressesEntry entries = 1;
RPCError error = 1000;
}
message GetVirtualSelectedParentBlueScoreRequestMessage {
}
message GetVirtualSelectedParentBlueScoreResponseMessage {
uint64 blueScore = 1;
RPCError error = 1000;
}
message NotifyVirtualSelectedParentBlueScoreChangedRequestMessage {
}
message NotifyVirtualSelectedParentBlueScoreChangedResponseMessage {
RPCError error = 1000;
}
message VirtualSelectedParentBlueScoreChangedNotificationMessage {
uint64 virtualSelectedParentBlueScore = 1;
}
service RPC {
rpc MessageStream (stream KaspadMessage) returns (stream KaspadMessage) {}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,237 @@
syntax = "proto3";
package protowire;
option go_package = "github.com/kaspanet/kaspad/protowire";
// RequestAddressesMessage start
message RequestAddressesMessage{
bool includeAllSubnetworks = 1;
SubnetworkId subnetworkId = 2;
}
// RequestAddressesMessage end
// AddressesMessage start
message AddressesMessage{
repeated NetAddress addressList = 1;
}
message NetAddress{
int64 timestamp = 1;
uint64 services = 2;
bytes ip = 3;
uint32 port = 4;
}
message SubnetworkId{
bytes bytes = 1;
}
// AddressesMessage end
// TransactionMessage start
message TransactionMessage{
uint32 version = 1;
repeated TransactionInput inputs = 2;
repeated TransactionOutput outputs = 3;
uint64 lockTime = 4;
SubnetworkId subnetworkId = 5;
uint64 gas = 6;
Hash payloadHash = 7;
bytes payload = 8;
}
message TransactionInput{
Outpoint previousOutpoint = 1;
bytes signatureScript = 2;
uint64 sequence = 3;
}
message Outpoint{
TransactionId transactionId = 1;
uint32 index = 2;
}
message TransactionId{
bytes bytes = 1;
}
message ScriptPublicKey {
bytes script = 1;
uint32 version = 2;
}
message TransactionOutput{
uint64 value = 1;
ScriptPublicKey scriptPublicKey = 2;
}
// TransactionMessage end
// BlockMessage start
message BlockMessage{
BlockHeaderMessage header = 1;
repeated TransactionMessage transactions = 2;
}
message BlockHeaderMessage{
uint32 version = 1;
repeated Hash parentHashes = 2;
Hash hashMerkleRoot = 3;
Hash acceptedIdMerkleRoot = 4;
Hash utxoCommitment = 5;
int64 timestamp = 6;
uint32 bits = 7;
uint64 nonce = 8;
}
message Hash{
bytes bytes = 1;
}
// BlockMessage end
// GetBlockLocatorMessage start
message RequestBlockLocatorMessage{
Hash lowHash = 1;
Hash highHash = 2;
uint32 limit = 3;
}
// GetBlockLocatorMessage end
// BlockLocatorMessage start
message BlockLocatorMessage{
repeated Hash hashes = 1;
}
// BlockLocatorMessage end
// GetBlocksMessage start
message RequestHeadersMessage{
Hash lowHash = 1;
Hash highHash = 2;
}
// GetBlocksMessage end
// RequestNextIBDBlocksMessage start
message RequestNextHeadersMessage{
}
// RequestNextIBDBlocksMessage end
// DoneIBDBlocksMessage start
message DoneHeadersMessage{
}
// DoneIBDBlocksMessage end
// RequestRelayBlocksMessage start
message RequestRelayBlocksMessage{
repeated Hash hashes = 1;
}
// RequestRelayBlocksMessage end
// RequestTransactionsMessage start
message RequestTransactionsMessage {
repeated TransactionId ids = 1;
}
// GetTransactionsMessage end
// TransactionNotFoundMessage start
message TransactionNotFoundMessage{
TransactionId id = 1;
}
// TransactionsNotFoundMessage end
// InvRelayBlockMessage start
message InvRelayBlockMessage{
Hash hash = 1;
}
// InvRelayBlockMessage end
// InvTransactionMessage start
message InvTransactionsMessage{
repeated TransactionId ids = 1;
}
// InvTransactionMessage end
// PingMessage start
message PingMessage{
uint64 nonce = 1;
}
// PingMessage end
// PongMessage start
message PongMessage{
uint64 nonce = 1;
}
// PongMessage end
// VerackMessage start
message VerackMessage{
}
// VerackMessage end
// VersionMessage start
message VersionMessage{
uint32 protocolVersion = 1;
uint64 services = 2;
int64 timestamp = 3;
NetAddress address = 4;
bytes id = 5;
string userAgent = 6;
bool disableRelayTx = 8;
SubnetworkId subnetworkId = 9;
string network = 10;
}
// VersionMessage end
// RejectMessage start
message RejectMessage{
string reason = 1;
}
// RejectMessage end
// RequestIBDRootUTXOSetAndBlockMessage start
message RequestIBDRootUTXOSetAndBlockMessage{
Hash ibdRoot = 1;
}
// RequestIBDRootUTXOSetAndBlockMessage end
// IBDRootUTXOSetAndBlockMessage start
message IBDRootUTXOSetAndBlockMessage{
bytes utxoSet = 1;
BlockMessage block = 2;
}
// IBDRootUTXOSetAndBlockMessage end
// RequestIBDBlocksMessage start
message RequestIBDBlocksMessage{
repeated Hash hashes = 1;
}
// RequestIBDBlocksMessage end
// IBDRootNotFoundMessage start
message IBDRootNotFoundMessage{
}
// IBDRootNotFoundMessage end
// RequestIBDRootHashMessage start
message RequestIBDRootHashMessage{
}
// RequestIBDRootHashMessage end
// IBDRootHashMessage start
message IBDRootHashMessage{
Hash hash = 1;
}
// IBDRootHashMessage end
// IbdBlockLocatorMessage start
message IbdBlockLocatorMessage {
Hash targetHash = 1;
repeated Hash blockLocatorHashes = 2;
}
// IbdBlockLocatorMessage end
// IbdBlockLocatorHighestHashMessage start
message IbdBlockLocatorHighestHashMessage {
Hash highestHash = 1;
}
// IbdBlockLocatorHighestHashMessage end
message BlockHeadersMessage {
repeated BlockHeaderMessage blockHeaders = 1;
}

View File

@ -0,0 +1,927 @@
# Protocol Documentation
<a name="top"></a>
## Table of Contents
- [rpc.proto](#rpc.proto)
- [RPCError](#protowire.RPCError)
- [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)
- [ChainBlock](#protowire.ChainBlock)
- [AcceptedBlock](#protowire.AcceptedBlock)
- [GetBlockRequestMessage](#protowire.GetBlockRequestMessage)
- [GetBlockResponseMessage](#protowire.GetBlockResponseMessage)
- [BlockVerboseData](#protowire.BlockVerboseData)
- [TransactionVerboseData](#protowire.TransactionVerboseData)
- [TransactionVerboseInput](#protowire.TransactionVerboseInput)
- [ScriptSig](#protowire.ScriptSig)
- [TransactionVerboseOutput](#protowire.TransactionVerboseOutput)
- [ScriptPublicKeyResult](#protowire.ScriptPublicKeyResult)
- [GetSubnetworkRequestMessage](#protowire.GetSubnetworkRequestMessage)
- [GetSubnetworkResponseMessage](#protowire.GetSubnetworkResponseMessage)
- [GetVirtualSelectedParentChainFromBlockRequestMessage](#protowire.GetVirtualSelectedParentChainFromBlockRequestMessage)
- [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)
- [RpcTransaction](#protowire.RpcTransaction)
- [RpcTransactionInput](#protowire.RpcTransactionInput)
- [RpcScriptPublicKey](#protowire.RpcScriptPublicKey)
- [RpcTransactionOutput](#protowire.RpcTransactionOutput)
- [RpcOutpoint](#protowire.RpcOutpoint)
- [RpcUtxoEntry](#protowire.RpcUtxoEntry)
- [GetUtxosByAddressesRequestMessage](#protowire.GetUtxosByAddressesRequestMessage)
- [GetUtxosByAddressesResponseMessage](#protowire.GetUtxosByAddressesResponseMessage)
- [GetVirtualSelectedParentBlueScoreRequestMessage](#protowire.GetVirtualSelectedParentBlueScoreRequestMessage)
- [GetVirtualSelectedParentBlueScoreResponseMessage](#protowire.GetVirtualSelectedParentBlueScoreResponseMessage)
- [NotifyVirtualSelectedParentBlueScoreChangedRequestMessage](#protowire.NotifyVirtualSelectedParentBlueScoreChangedRequestMessage)
- [NotifyVirtualSelectedParentBlueScoreChangedResponseMessage](#protowire.NotifyVirtualSelectedParentBlueScoreChangedResponseMessage)
- [VirtualSelectedParentBlueScoreChangedNotificationMessage](#protowire.VirtualSelectedParentBlueScoreChangedNotificationMessage)
- [Scalar Value Types](#scalar-value-types)
<a name="rpc.proto"></a>
<p align="right"><a href="#top">Top</a></p>
## 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.
<a name="protowire.RPCError"></a>
### 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) | | |
<a name="protowire.GetCurrentNetworkRequestMessage"></a>
### GetCurrentNetworkRequestMessage
GetCurrentNetworkRequestMessage requests the network kaspad is currently running against.
Possible networks are: Mainnet, Testnet, Simnet, Devnet
<a name="protowire.GetCurrentNetworkResponseMessage"></a>
### GetCurrentNetworkResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| currentNetwork | [string](#string) | | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.SubmitBlockRequestMessage"></a>
### 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 | [BlockMessage](#protowire.BlockMessage) | | |
<a name="protowire.SubmitBlockResponseMessage"></a>
### SubmitBlockResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetBlockTemplateRequestMessage"></a>
### 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 |
<a name="protowire.GetBlockTemplateResponseMessage"></a>
### GetBlockTemplateResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| blockMessage | [BlockMessage](#protowire.BlockMessage) | | |
| isSynced | [bool](#bool) | | Whether kaspad thinks that it&#39;s synced. Callers are discouraged (but not forbidden) from solving blocks when kaspad is not synced. That is because when kaspad isn&#39;t in sync with the rest of the network there&#39;s a high chance the block will never be accepted, thus the solving effort would have been wasted. |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.NotifyBlockAddedRequestMessage"></a>
### NotifyBlockAddedRequestMessage
NotifyBlockAddedRequestMessage registers this connection for blockAdded notifications.
See: BlockAddedNotificationMessage
<a name="protowire.NotifyBlockAddedResponseMessage"></a>
### NotifyBlockAddedResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.BlockAddedNotificationMessage"></a>
### BlockAddedNotificationMessage
BlockAddedNotificationMessage is sent whenever a blocks has been added (NOT accepted)
into the DAG.
See: NotifyBlockAddedRequestMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| block | [BlockMessage](#protowire.BlockMessage) | | |
<a name="protowire.GetPeerAddressesRequestMessage"></a>
### GetPeerAddressesRequestMessage
GetPeerAddressesRequestMessage requests the list of known kaspad addresses in the current network. (mainnet, testnet,
etc.)
<a name="protowire.GetPeerAddressesResponseMessage"></a>
### GetPeerAddressesResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| addresses | [GetPeerAddressesKnownAddressMessage](#protowire.GetPeerAddressesKnownAddressMessage) | repeated | |
| bannedAddresses | [GetPeerAddressesKnownAddressMessage](#protowire.GetPeerAddressesKnownAddressMessage) | repeated | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetPeerAddressesKnownAddressMessage"></a>
### GetPeerAddressesKnownAddressMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| Addr | [string](#string) | | |
<a name="protowire.GetSelectedTipHashRequestMessage"></a>
### GetSelectedTipHashRequestMessage
GetSelectedTipHashRequestMessage requests the hash of the current virtual&#39;s selected parent.
<a name="protowire.GetSelectedTipHashResponseMessage"></a>
### GetSelectedTipHashResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| selectedTipHash | [string](#string) | | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetMempoolEntryRequestMessage"></a>
### GetMempoolEntryRequestMessage
GetMempoolEntryRequestMessage requests information about a specific transaction in the mempool.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| txId | [string](#string) | | The transaction&#39;s TransactionID. |
<a name="protowire.GetMempoolEntryResponseMessage"></a>
### GetMempoolEntryResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entry | [MempoolEntry](#protowire.MempoolEntry) | | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetMempoolEntriesRequestMessage"></a>
### GetMempoolEntriesRequestMessage
GetMempoolEntriesRequestMessage requests information about all the transactions currently in the mempool.
<a name="protowire.GetMempoolEntriesResponseMessage"></a>
### GetMempoolEntriesResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entries | [MempoolEntry](#protowire.MempoolEntry) | repeated | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.MempoolEntry"></a>
### MempoolEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| fee | [uint64](#uint64) | | |
| transactionVerboseData | [TransactionVerboseData](#protowire.TransactionVerboseData) | | |
<a name="protowire.GetConnectedPeerInfoRequestMessage"></a>
### GetConnectedPeerInfoRequestMessage
GetConnectedPeerInfoRequestMessage requests information about all the p2p peers currently connected to this kaspad.
<a name="protowire.GetConnectedPeerInfoResponseMessage"></a>
### GetConnectedPeerInfoResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| infos | [GetConnectedPeerInfoMessage](#protowire.GetConnectedPeerInfoMessage) | repeated | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetConnectedPeerInfoMessage"></a>
### 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) |
<a name="protowire.AddPeerRequestMessage"></a>
### AddPeerRequestMessage
AddPeerRequestMessage adds a peer to kaspad&#39;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 |
<a name="protowire.AddPeerResponseMessage"></a>
### AddPeerResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.SubmitTransactionRequestMessage"></a>
### SubmitTransactionRequestMessage
SubmitTransactionRequestMessage submits a transaction to the mempool
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| transaction | [RpcTransaction](#protowire.RpcTransaction) | | |
<a name="protowire.SubmitTransactionResponseMessage"></a>
### SubmitTransactionResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| transactionId | [string](#string) | | The transaction ID of the submitted transaction |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.NotifyVirtualSelectedParentChainChangedRequestMessage"></a>
### NotifyVirtualSelectedParentChainChangedRequestMessage
NotifyVirtualSelectedParentChainChangedRequestMessage registers this connection for virtualSelectedParentChainChanged
notifications.
See: VirtualSelectedParentChainChangedNotificationMessage
<a name="protowire.NotifyVirtualSelectedParentChainChangedResponseMessage"></a>
### NotifyVirtualSelectedParentChainChangedResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.VirtualSelectedParentChainChangedNotificationMessage"></a>
### VirtualSelectedParentChainChangedNotificationMessage
VirtualSelectedParentChainChangedNotificationMessage is sent whenever the DAG&#39;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 |
| addedChainBlocks | [ChainBlock](#protowire.ChainBlock) | repeated | The chain blocks that were added, in low-to-high order |
<a name="protowire.ChainBlock"></a>
### ChainBlock
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [string](#string) | | |
| acceptedBlocks | [AcceptedBlock](#protowire.AcceptedBlock) | repeated | |
<a name="protowire.AcceptedBlock"></a>
### AcceptedBlock
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [string](#string) | | |
| acceptedTransactionIds | [string](#string) | repeated | |
<a name="protowire.GetBlockRequestMessage"></a>
### GetBlockRequestMessage
GetBlockRequestMessage requests information about a specific block
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [string](#string) | | The hash of the requested block |
| subnetworkId | [string](#string) | | |
| includeTransactionVerboseData | [bool](#bool) | | Whether to include transaction data in the response |
<a name="protowire.GetBlockResponseMessage"></a>
### GetBlockResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| blockHash | [string](#string) | | |
| blockVerboseData | [BlockVerboseData](#protowire.BlockVerboseData) | | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.BlockVerboseData"></a>
### BlockVerboseData
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| hash | [string](#string) | | |
| version | [uint32](#uint32) | | |
| versionHex | [string](#string) | | |
| hashMerkleRoot | [string](#string) | | |
| acceptedIDMerkleRoot | [string](#string) | | |
| utxoCommitment | [string](#string) | | |
| transactionVerboseData | [TransactionVerboseData](#protowire.TransactionVerboseData) | repeated | |
| time | [int64](#int64) | | |
| nonce | [uint64](#uint64) | | |
| bits | [string](#string) | | |
| difficulty | [double](#double) | | |
| parentHashes | [string](#string) | repeated | |
| selectedParentHash | [string](#string) | | |
| transactionIDs | [string](#string) | repeated | |
| isHeaderOnly | [bool](#bool) | | |
| blueScore | [uint64](#uint64) | | |
<a name="protowire.TransactionVerboseData"></a>
### TransactionVerboseData
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| txId | [string](#string) | | |
| hash | [string](#string) | | |
| size | [uint64](#uint64) | | |
| version | [uint32](#uint32) | | |
| lockTime | [uint64](#uint64) | | |
| subnetworkId | [string](#string) | | |
| gas | [uint64](#uint64) | | |
| payloadHash | [string](#string) | | |
| payload | [string](#string) | | |
| transactionVerboseInputs | [TransactionVerboseInput](#protowire.TransactionVerboseInput) | repeated | |
| transactionVerboseOutputs | [TransactionVerboseOutput](#protowire.TransactionVerboseOutput) | repeated | |
| blockHash | [string](#string) | | |
| time | [uint64](#uint64) | | |
| blockTime | [uint64](#uint64) | | |
<a name="protowire.TransactionVerboseInput"></a>
### TransactionVerboseInput
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| txId | [string](#string) | | |
| outputIndex | [uint32](#uint32) | | |
| scriptSig | [ScriptSig](#protowire.ScriptSig) | | |
| sequence | [uint64](#uint64) | | |
<a name="protowire.ScriptSig"></a>
### ScriptSig
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| asm | [string](#string) | | |
| hex | [string](#string) | | |
<a name="protowire.TransactionVerboseOutput"></a>
### TransactionVerboseOutput
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [uint64](#uint64) | | |
| index | [uint32](#uint32) | | |
| scriptPublicKey | [ScriptPublicKeyResult](#protowire.ScriptPublicKeyResult) | | |
<a name="protowire.ScriptPublicKeyResult"></a>
### ScriptPublicKeyResult
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| asm | [string](#string) | | |
| hex | [string](#string) | | |
| type | [string](#string) | | |
| address | [string](#string) | | |
<a name="protowire.GetSubnetworkRequestMessage"></a>
### GetSubnetworkRequestMessage
GetSubnetworkRequestMessage requests information about a specific subnetwork
Currently unimplemented
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| subnetworkId | [string](#string) | | |
<a name="protowire.GetSubnetworkResponseMessage"></a>
### GetSubnetworkResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| gasLimit | [uint64](#uint64) | | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetVirtualSelectedParentChainFromBlockRequestMessage"></a>
### GetVirtualSelectedParentChainFromBlockRequestMessage
GetVirtualSelectedParentChainFromBlockRequestMessage requests the virtual selected parent chain from some startHash to
this kaspad&#39;s current virtual
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| startHash | [string](#string) | | |
<a name="protowire.GetVirtualSelectedParentChainFromBlockResponseMessage"></a>
### GetVirtualSelectedParentChainFromBlockResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| removedChainBlockHashes | [string](#string) | repeated | The chain blocks that were removed, in high-to-low order |
| addedChainBlocks | [ChainBlock](#protowire.ChainBlock) | repeated | The chain blocks that were added, in low-to-high order |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetBlocksRequestMessage"></a>
### GetBlocksRequestMessage
GetBlocksRequestMessage requests blocks between a certain block lowHash up to this kaspad&#39;s current virtual.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| lowHash | [string](#string) | | |
| includeBlockHexes | [bool](#bool) | | |
| includeBlockVerboseData | [bool](#bool) | | |
| includeTransactionVerboseData | [bool](#bool) | | |
<a name="protowire.GetBlocksResponseMessage"></a>
### GetBlocksResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| blockHashes | [string](#string) | repeated | |
| blockHexes | [string](#string) | repeated | |
| blockVerboseData | [BlockVerboseData](#protowire.BlockVerboseData) | repeated | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetBlockCountRequestMessage"></a>
### GetBlockCountRequestMessage
GetBlockCountRequestMessage requests the current number of blocks in this kaspad. Note that this number may decrease as
pruning occurs.
<a name="protowire.GetBlockCountResponseMessage"></a>
### GetBlockCountResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| blockCount | [uint64](#uint64) | | |
| headerCount | [uint64](#uint64) | | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetBlockDagInfoRequestMessage"></a>
### GetBlockDagInfoRequestMessage
GetBlockDagInfoRequestMessage requests general information about the current state of this kaspad&#39;s DAG.
<a name="protowire.GetBlockDagInfoResponseMessage"></a>
### 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 | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.ResolveFinalityConflictRequestMessage"></a>
### ResolveFinalityConflictRequestMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| finalityBlockHash | [string](#string) | | |
<a name="protowire.ResolveFinalityConflictResponseMessage"></a>
### ResolveFinalityConflictResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.NotifyFinalityConflictsRequestMessage"></a>
### NotifyFinalityConflictsRequestMessage
<a name="protowire.NotifyFinalityConflictsResponseMessage"></a>
### NotifyFinalityConflictsResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.FinalityConflictNotificationMessage"></a>
### FinalityConflictNotificationMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| violatingBlockHash | [string](#string) | | |
<a name="protowire.FinalityConflictResolvedNotificationMessage"></a>
### FinalityConflictResolvedNotificationMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| finalityBlockHash | [string](#string) | | |
<a name="protowire.ShutDownRequestMessage"></a>
### ShutDownRequestMessage
ShutDownRequestMessage shuts down this kaspad.
<a name="protowire.ShutDownResponseMessage"></a>
### ShutDownResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetHeadersRequestMessage"></a>
### 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) | | |
<a name="protowire.GetHeadersResponseMessage"></a>
### GetHeadersResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| headers | [string](#string) | repeated | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.NotifyUtxosChangedRequestMessage"></a>
### 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 | |
<a name="protowire.NotifyUtxosChangedResponseMessage"></a>
### NotifyUtxosChangedResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.UtxosChangedNotificationMessage"></a>
### 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 | |
<a name="protowire.UtxosByAddressesEntry"></a>
### UtxosByAddressesEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| address | [string](#string) | | |
| outpoint | [RpcOutpoint](#protowire.RpcOutpoint) | | |
| utxoEntry | [RpcUtxoEntry](#protowire.RpcUtxoEntry) | | |
<a name="protowire.RpcTransaction"></a>
### 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) | | |
| payloadHash | [string](#string) | | |
| payload | [string](#string) | | |
<a name="protowire.RpcTransactionInput"></a>
### RpcTransactionInput
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| previousOutpoint | [RpcOutpoint](#protowire.RpcOutpoint) | | |
| signatureScript | [string](#string) | | |
| sequence | [uint64](#uint64) | | |
<a name="protowire.RpcScriptPublicKey"></a>
### RpcScriptPublicKey
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| version | [uint32](#uint32) | | |
| scriptPublicKey | [string](#string) | | |
<a name="protowire.RpcTransactionOutput"></a>
### RpcTransactionOutput
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| amount | [uint64](#uint64) | | |
| scriptPublicKey | [RpcScriptPublicKey](#protowire.RpcScriptPublicKey) | | |
<a name="protowire.RpcOutpoint"></a>
### RpcOutpoint
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| transactionId | [string](#string) | | |
| index | [uint32](#uint32) | | |
<a name="protowire.RpcUtxoEntry"></a>
### RpcUtxoEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| amount | [uint64](#uint64) | | |
| scriptPublicKey | [RpcScriptPublicKey](#protowire.RpcScriptPublicKey) | | |
| blockBlueScore | [uint64](#uint64) | | |
| isCoinbase | [bool](#bool) | | |
<a name="protowire.GetUtxosByAddressesRequestMessage"></a>
### 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 | |
<a name="protowire.GetUtxosByAddressesResponseMessage"></a>
### GetUtxosByAddressesResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entries | [UtxosByAddressesEntry](#protowire.UtxosByAddressesEntry) | repeated | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.GetVirtualSelectedParentBlueScoreRequestMessage"></a>
### GetVirtualSelectedParentBlueScoreRequestMessage
GetVirtualSelectedParentBlueScoreRequestMessage requests the blue score of the current selected parent of the virtual
block.
<a name="protowire.GetVirtualSelectedParentBlueScoreResponseMessage"></a>
### GetVirtualSelectedParentBlueScoreResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| blueScore | [uint64](#uint64) | | |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.NotifyVirtualSelectedParentBlueScoreChangedRequestMessage"></a>
### NotifyVirtualSelectedParentBlueScoreChangedRequestMessage
NotifyVirtualSelectedParentBlueScoreChangedRequestMessage registers this connection for
virtualSelectedParentBlueScoreChanged notifications.
See: VirtualSelectedParentBlueScoreChangedNotificationMessage
<a name="protowire.NotifyVirtualSelectedParentBlueScoreChangedResponseMessage"></a>
### NotifyVirtualSelectedParentBlueScoreChangedResponseMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| error | [RPCError](#protowire.RPCError) | | |
<a name="protowire.VirtualSelectedParentBlueScoreChangedNotificationMessage"></a>
### VirtualSelectedParentBlueScoreChangedNotificationMessage
VirtualSelectedParentBlueScoreChangedNotificationMessage is sent whenever the blue score of the virtual&#39;s selected
parent changes.
See NotifyVirtualSelectedParentBlueScoreChangedRequestMessage
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| virtualSelectedParentBlueScore | [uint64](#uint64) | | |
## Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
| <a name="double" /> double | | double | double | float | float64 | double | float | Float |
| <a name="float" /> float | | float | float | float | float32 | float | float | Float |
| <a name="int32" /> 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) |
| <a name="int64" /> 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 |
| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| <a name="sint32" /> 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) |
| <a name="sint64" /> 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 |
| <a name="fixed32" /> 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) |
| <a name="fixed64" /> 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 |
| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,529 @@
// 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.
//
syntax = "proto3";
package protowire;
option go_package = "github.com/kaspanet/kaspad/protowire";
import "p2p.proto";
// RPCError represents a generic non-internal error.
//
// Receivers of any ResponseMessage are expected to check whether its error field is not null.
message RPCError{
string message = 1;
}
// GetCurrentNetworkRequestMessage requests the network kaspad is currently running against.
//
// Possible networks are: Mainnet, Testnet, Simnet, Devnet
message GetCurrentNetworkRequestMessage{
}
message GetCurrentNetworkResponseMessage{
string currentNetwork = 1;
RPCError error = 1000;
}
// SubmitBlockRequestMessage requests to submit a block into the DAG.
// Blocks are generally expected to have been generated using the getBlockTemplate call.
//
// See: GetBlockTemplateRequestMessage
message SubmitBlockRequestMessage{
BlockMessage block = 1;
}
message SubmitBlockResponseMessage{
RPCError error = 1000;
}
// GetBlockTemplateRequestMessage requests a current block template.
// Callers are expected to solve the block template and submit it using the submitBlock call
//
// See: SubmitBlockRequestMessage
message GetBlockTemplateRequestMessage{
// Which kaspa address should the coinbase block reward transaction pay into
string payAddress = 1;
}
message GetBlockTemplateResponseMessage{
BlockMessage blockMessage = 1;
// 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.
bool isSynced = 2;
RPCError error = 1000;
}
// NotifyBlockAddedRequestMessage registers this connection for blockAdded notifications.
//
// See: BlockAddedNotificationMessage
message NotifyBlockAddedRequestMessage{
}
message NotifyBlockAddedResponseMessage{
RPCError error = 1000;
}
// BlockAddedNotificationMessage is sent whenever a blocks has been added (NOT accepted)
// into the DAG.
//
// See: NotifyBlockAddedRequestMessage
message BlockAddedNotificationMessage{
BlockMessage block = 1;
}
// GetPeerAddressesRequestMessage requests the list of known kaspad addresses in the
// current network. (mainnet, testnet, etc.)
message GetPeerAddressesRequestMessage{
}
message GetPeerAddressesResponseMessage{
repeated GetPeerAddressesKnownAddressMessage addresses = 1;
repeated GetPeerAddressesKnownAddressMessage bannedAddresses = 2;
RPCError error = 1000;
}
message GetPeerAddressesKnownAddressMessage {
string Addr = 1;
}
// GetSelectedTipHashRequestMessage requests the hash of the current virtual's
// selected parent.
message GetSelectedTipHashRequestMessage{
}
message GetSelectedTipHashResponseMessage{
string selectedTipHash = 1;
RPCError error = 1000;
}
// GetMempoolEntryRequestMessage requests information about a specific transaction
// in the mempool.
message GetMempoolEntryRequestMessage{
// The transaction's TransactionID.
string txId = 1;
}
message GetMempoolEntryResponseMessage{
MempoolEntry entry = 1;
RPCError error = 1000;
}
// GetMempoolEntriesRequestMessage requests information about all the transactions
// currently in the mempool.
message GetMempoolEntriesRequestMessage{
}
message GetMempoolEntriesResponseMessage{
repeated MempoolEntry entries = 1;
RPCError error = 1000;
}
message MempoolEntry{
uint64 fee = 1;
TransactionVerboseData transactionVerboseData = 2;
}
// GetConnectedPeerInfoRequestMessage requests information about all the p2p peers
// currently connected to this kaspad.
message GetConnectedPeerInfoRequestMessage{
}
message GetConnectedPeerInfoResponseMessage{
repeated GetConnectedPeerInfoMessage infos = 1;
RPCError error = 1000;
}
message GetConnectedPeerInfoMessage{
string id = 1;
string address = 2;
// How long did the last ping/pong exchange take
int64 lastPingDuration = 3;
// Whether this kaspad initiated the connection
bool isOutbound = 6;
int64 timeOffset = 7;
string userAgent = 8;
// The protocol version that this peer claims to support
uint32 advertisedProtocolVersion = 9;
// The timestamp of when this peer connected to this kaspad
int64 timeConnected = 10;
// Whether this peer is the IBD peer (if IBD is running)
bool isIbdPeer = 11;
}
// AddPeerRequestMessage adds a peer to kaspad's outgoing connection list.
// This will, in most cases, result in kaspad connecting to said peer.
message AddPeerRequestMessage{
string address = 1;
// Whether to keep attempting to connect to this peer after disconnection
bool isPermanent = 2;
}
message AddPeerResponseMessage{
RPCError error = 1000;
}
// SubmitTransactionRequestMessage submits a transaction to the mempool
message SubmitTransactionRequestMessage{
RpcTransaction transaction = 1;
}
message SubmitTransactionResponseMessage{
// The transaction ID of the submitted transaction
string transactionId = 1;
RPCError error = 1000;
}
// NotifyVirtualSelectedParentChainChangedRequestMessage registers this connection for virtualSelectedParentChainChanged notifications.
//
// See: VirtualSelectedParentChainChangedNotificationMessage
message NotifyVirtualSelectedParentChainChangedRequestMessage{
}
message NotifyVirtualSelectedParentChainChangedResponseMessage{
RPCError error = 1000;
}
// VirtualSelectedParentChainChangedNotificationMessage is sent whenever the DAG's selected parent
// chain had changed.
//
// See: NotifyVirtualSelectedParentChainChangedRequestMessage
message VirtualSelectedParentChainChangedNotificationMessage{
// The chain blocks that were removed, in high-to-low order
repeated string removedChainBlockHashes = 1;
// The chain blocks that were added, in low-to-high order
repeated ChainBlock addedChainBlocks = 2;
}
message ChainBlock{
string hash = 1;
repeated AcceptedBlock acceptedBlocks = 2;
}
message AcceptedBlock{
string hash = 1;
repeated string acceptedTransactionIds = 2;
}
// GetBlockRequestMessage requests information about a specific block
message GetBlockRequestMessage{
// The hash of the requested block
string hash = 1;
string subnetworkId = 2;
// Whether to include transaction data in the response
bool includeTransactionVerboseData = 3;
}
message GetBlockResponseMessage{
string blockHash = 1;
BlockVerboseData blockVerboseData = 2;
RPCError error = 1000;
}
message BlockVerboseData{
string hash = 1;
uint32 version = 2;
string versionHex = 3;
string hashMerkleRoot = 4;
string acceptedIDMerkleRoot = 5;
string utxoCommitment = 6;
repeated TransactionVerboseData transactionVerboseData = 7;
int64 time = 8;
uint64 nonce = 9;
string bits = 10;
double difficulty = 11;
repeated string parentHashes = 12;
string selectedParentHash = 13;
repeated string transactionIDs = 14;
bool isHeaderOnly = 15;
uint64 blueScore = 16;
}
message TransactionVerboseData{
string txId = 1;
string hash = 2;
uint64 size = 3;
uint32 version = 4;
uint64 lockTime = 5;
string subnetworkId = 6;
uint64 gas = 7;
string payloadHash = 8;
string payload = 9;
repeated TransactionVerboseInput transactionVerboseInputs = 10;
repeated TransactionVerboseOutput transactionVerboseOutputs = 11;
string blockHash = 12;
uint64 time = 13;
uint64 blockTime = 14;
}
message TransactionVerboseInput{
string txId = 1;
uint32 outputIndex = 2;
ScriptSig scriptSig = 3;
uint64 sequence = 4;
}
message ScriptSig{
string asm = 1;
string hex = 2;
}
message TransactionVerboseOutput{
uint64 value = 1;
uint32 index = 2;
ScriptPublicKeyResult scriptPublicKey = 3;
}
message ScriptPublicKeyResult{
string asm = 1;
string hex = 2;
string type = 3;
string address = 4;
}
// GetSubnetworkRequestMessage requests information about a specific subnetwork
//
// Currently unimplemented
message GetSubnetworkRequestMessage{
string subnetworkId = 1;
}
message GetSubnetworkResponseMessage{
uint64 gasLimit = 1;
RPCError error = 1000;
}
// GetVirtualSelectedParentChainFromBlockRequestMessage requests the virtual selected
// parent chain from some startHash to this kaspad's current virtual
message GetVirtualSelectedParentChainFromBlockRequestMessage{
string startHash = 1;
}
message GetVirtualSelectedParentChainFromBlockResponseMessage{
// The chain blocks that were removed, in high-to-low order
repeated string removedChainBlockHashes = 1;
// The chain blocks that were added, in low-to-high order
repeated ChainBlock addedChainBlocks = 2;
RPCError error = 1000;
}
// GetBlocksRequestMessage requests blocks between a certain block lowHash up to this
// kaspad's current virtual.
message GetBlocksRequestMessage{
string lowHash = 1;
bool includeBlockHexes = 2;
bool includeBlockVerboseData = 3;
bool includeTransactionVerboseData = 4;
}
message GetBlocksResponseMessage{
repeated string blockHashes = 1;
repeated string blockHexes = 2;
repeated BlockVerboseData blockVerboseData = 3;
RPCError error = 1000;
}
// GetBlockCountRequestMessage requests the current number of blocks in this kaspad.
// Note that this number may decrease as pruning occurs.
message GetBlockCountRequestMessage{
}
message GetBlockCountResponseMessage{
uint64 blockCount = 1;
uint64 headerCount = 2;
RPCError error = 1000;
}
// GetBlockDagInfoRequestMessage requests general information about the current state
// of this kaspad's DAG.
message GetBlockDagInfoRequestMessage{
}
message GetBlockDagInfoResponseMessage{
string networkName = 1;
uint64 blockCount = 2;
uint64 headerCount = 3;
repeated string tipHashes = 4;
double difficulty = 5;
int64 pastMedianTime = 6;
repeated string virtualParentHashes = 7;
RPCError error = 1000;
}
message ResolveFinalityConflictRequestMessage{
string finalityBlockHash = 1;
}
message ResolveFinalityConflictResponseMessage{
RPCError error = 1000;
}
message NotifyFinalityConflictsRequestMessage{
}
message NotifyFinalityConflictsResponseMessage{
RPCError error = 1000;
}
message FinalityConflictNotificationMessage{
string violatingBlockHash = 1;
}
message FinalityConflictResolvedNotificationMessage{
string finalityBlockHash = 1;
}
// ShutDownRequestMessage shuts down this kaspad.
message ShutDownRequestMessage{
}
message ShutDownResponseMessage{
RPCError error = 1000;
}
// GetHeadersRequestMessage requests headers between the given startHash and the
// current virtual, up to the given limit.
message GetHeadersRequestMessage{
string startHash = 1;
uint64 limit = 2;
bool isAscending = 3;
}
message GetHeadersResponseMessage{
repeated string headers = 1;
RPCError error = 1000;
}
// 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
message NotifyUtxosChangedRequestMessage {
repeated string addresses = 1;
}
message NotifyUtxosChangedResponseMessage {
RPCError error = 1000;
}
// UtxosChangedNotificationMessage is sent whenever the UTXO index had been updated.
//
// See: NotifyUtxosChangedRequestMessage
message UtxosChangedNotificationMessage {
repeated UtxosByAddressesEntry added = 1;
repeated UtxosByAddressesEntry removed = 2;
}
message UtxosByAddressesEntry {
string address = 1;
RpcOutpoint outpoint = 2;
RpcUtxoEntry utxoEntry = 3;
}
message RpcTransaction {
uint32 version = 1;
repeated RpcTransactionInput inputs = 2;
repeated RpcTransactionOutput outputs = 3;
uint64 lockTime = 4;
string subnetworkId = 5;
uint64 gas = 6;
string payloadHash = 7;
string payload = 8;
}
message RpcTransactionInput {
RpcOutpoint previousOutpoint = 1;
string signatureScript = 2;
uint64 sequence = 3;
}
message RpcScriptPublicKey {
uint32 version = 1;
string scriptPublicKey = 2;
}
message RpcTransactionOutput {
uint64 amount = 1;
RpcScriptPublicKey scriptPublicKey = 2;
}
message RpcOutpoint {
string transactionId = 1;
uint32 index = 2;
}
message RpcUtxoEntry {
uint64 amount = 1;
RpcScriptPublicKey scriptPublicKey = 2;
uint64 blockBlueScore = 3;
bool isCoinbase = 4;
}
// GetUtxosByAddressesRequestMessage requests all current UTXOs for the given kaspad addresses
//
// This call is only available when this kaspad was started with `--utxoindex`
message GetUtxosByAddressesRequestMessage {
repeated string addresses = 1;
}
message GetUtxosByAddressesResponseMessage {
repeated UtxosByAddressesEntry entries = 1;
RPCError error = 1000;
}
// GetVirtualSelectedParentBlueScoreRequestMessage requests the blue score of the current selected parent
// of the virtual block.
message GetVirtualSelectedParentBlueScoreRequestMessage {
}
message GetVirtualSelectedParentBlueScoreResponseMessage {
uint64 blueScore = 1;
RPCError error = 1000;
}
// NotifyVirtualSelectedParentBlueScoreChangedRequestMessage registers this connection for
// virtualSelectedParentBlueScoreChanged notifications.
//
// See: VirtualSelectedParentBlueScoreChangedNotificationMessage
message NotifyVirtualSelectedParentBlueScoreChangedRequestMessage {
}
message NotifyVirtualSelectedParentBlueScoreChangedResponseMessage {
RPCError error = 1000;
}
// VirtualSelectedParentBlueScoreChangedNotificationMessage is sent whenever the blue score
// of the virtual's selected parent changes.
//
// See NotifyVirtualSelectedParentBlueScoreChangedRequestMessage
message VirtualSelectedParentBlueScoreChangedNotificationMessage {
uint64 virtualSelectedParentBlueScore = 1;
}