mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-01 11:46:43 +00:00

* Added option to choose from address in kaspawallet + fixed a bug with 0 change * Checking if From is missing * Fixed after merge to kaspad0.12 * Applying changes also to send command * Better help description * Fixed bug where we take all utxos except the one we wanted * Swallow the parsing error only when we want to filter * checking for wallet address directly * go fmt * Changing to `--from-address` Co-authored-by: Ori Newman <orinewman1@gmail.com>
125 lines
2.9 KiB
Protocol Buffer
125 lines
2.9 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;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
message SendResponse{
|
|
repeated string txIDs = 1;
|
|
}
|
|
|
|
// 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;
|
|
}
|