mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-28 17:56:50 +00:00

* Allow to send --all * Fix a typo --------- Co-authored-by: Ori Newman <orinewman1@gmail.com>
130 lines
3.1 KiB
Protocol Buffer
130 lines
3.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
option go_package = "github.com/kaspanet/kaspad/cmd/kaspawallet/daemon/pb";
|
|
package kaspawalletd;
|
|
|
|
service kaspawalletd {
|
|
rpc GetBalance (GetBalanceRequest) returns (GetBalanceResponse) {}
|
|
rpc GetExternalSpendableUTXOs (GetExternalSpendableUTXOsRequest) returns (GetExternalSpendableUTXOsResponse) {}
|
|
rpc CreateUnsignedTransactions (CreateUnsignedTransactionsRequest) returns (CreateUnsignedTransactionsResponse) {}
|
|
rpc ShowAddresses (ShowAddressesRequest) returns (ShowAddressesResponse) {}
|
|
rpc NewAddress (NewAddressRequest) returns (NewAddressResponse) {}
|
|
rpc Shutdown (ShutdownRequest) returns (ShutdownResponse) {}
|
|
rpc Broadcast (BroadcastRequest) returns (BroadcastResponse) {}
|
|
// Since SendRequest contains a password - this command should only be used on a trusted or secure connection
|
|
rpc Send(SendRequest) returns (SendResponse) {}
|
|
// Since SignRequest contains a password - this command should only be used on a trusted or secure connection
|
|
rpc Sign(SignRequest) returns (SignResponse) {}
|
|
}
|
|
|
|
message GetBalanceRequest {
|
|
}
|
|
|
|
message GetBalanceResponse {
|
|
uint64 available = 1;
|
|
uint64 pending = 2;
|
|
repeated AddressBalances addressBalances = 3;
|
|
}
|
|
|
|
message AddressBalances {
|
|
string address = 1;
|
|
uint64 available = 2;
|
|
uint64 pending = 3;
|
|
}
|
|
|
|
message CreateUnsignedTransactionsRequest {
|
|
string address = 1;
|
|
uint64 amount = 2;
|
|
repeated string from = 3;
|
|
bool useExistingChangeAddress = 4;
|
|
bool isSendAll = 5;
|
|
}
|
|
|
|
message CreateUnsignedTransactionsResponse {
|
|
repeated bytes unsignedTransactions = 1;
|
|
}
|
|
|
|
message ShowAddressesRequest {
|
|
}
|
|
|
|
message ShowAddressesResponse {
|
|
repeated string address = 1;
|
|
}
|
|
|
|
message NewAddressRequest {
|
|
}
|
|
|
|
message NewAddressResponse {
|
|
string address = 1;
|
|
}
|
|
|
|
message BroadcastRequest {
|
|
bool isDomain = 1;
|
|
repeated bytes transactions = 2;
|
|
}
|
|
|
|
message BroadcastResponse {
|
|
repeated string txIDs = 1;
|
|
}
|
|
|
|
message ShutdownRequest {
|
|
}
|
|
|
|
message ShutdownResponse {
|
|
}
|
|
|
|
message Outpoint {
|
|
string transactionId = 1;
|
|
uint32 index = 2;
|
|
}
|
|
|
|
message UtxosByAddressesEntry {
|
|
string address = 1;
|
|
Outpoint outpoint = 2;
|
|
UtxoEntry utxoEntry = 3;
|
|
}
|
|
|
|
message ScriptPublicKey {
|
|
uint32 version = 1;
|
|
string scriptPublicKey = 2;
|
|
}
|
|
|
|
message UtxoEntry {
|
|
uint64 amount = 1;
|
|
ScriptPublicKey scriptPublicKey = 2;
|
|
uint64 blockDaaScore = 3;
|
|
bool isCoinbase = 4;
|
|
}
|
|
|
|
message GetExternalSpendableUTXOsRequest{
|
|
string address = 1;
|
|
}
|
|
|
|
message GetExternalSpendableUTXOsResponse{
|
|
repeated UtxosByAddressesEntry Entries = 1;
|
|
}
|
|
// Since SendRequest contains a password - this command should only be used on a trusted or secure connection
|
|
message SendRequest{
|
|
string toAddress = 1;
|
|
uint64 amount = 2;
|
|
string password = 3;
|
|
repeated string from = 4;
|
|
bool useExistingChangeAddress = 5;
|
|
bool isSendAll = 6;
|
|
}
|
|
|
|
message SendResponse{
|
|
repeated string txIDs = 1;
|
|
repeated bytes signedTransactions = 2;
|
|
}
|
|
|
|
// Since SignRequest contains a password - this command should only be used on a trusted or secure connection
|
|
message SignRequest{
|
|
repeated bytes unsignedTransactions = 1;
|
|
string password = 2;
|
|
}
|
|
|
|
message SignResponse{
|
|
repeated bytes signedTransactions = 1;
|
|
}
|