kaspad/cmd/kaspawallet/daemon/pb/kaspawalletd.proto
D-Stacks 57c6118be8
Adds a "sweep" command to kaspawallet (#2018)
* Add "sweep" command to kaspawallet

* minor linting & layout improvements.

* contain code in "sweep"

* update to sweep.go

* formatting and bugs

* clean up renaming of ExtractTransaction functions

* Nicer formating of display

* address reveiw.

* one more sweeped -> swept

* missed one reveiw comment. (extra mass).

* remove redundant code from split function.

Co-authored-by: Ori Newman <orinewman1@gmail.com>
2022-04-14 02:16:16 +03:00

123 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;
}
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;
}
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;
}