mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-13 04:50:11 +00:00

* Add fee estimation to wallet * Add fee rate to kaspawallet parse * Update go version * Get rid of golint * Add RBF support to wallet * Fix bump_fee UTXO lookup and fix wrong change address * impl storage mass as per KIP9 * Use CalculateTransactionOverallMass where needed * Some fixes * Minor typos * Fix test * update version * BroadcastRBF -> BroadcastReplacement * rc3 * align proto files to only use camel case (fixed on RK as well) * Rename to FeePolicy and add MaxFee option + todo * apply max fee constrains * increase minChangeTarget to 10kas * fmt * Some fixes * fix description: maximum -> minimum * put min feerate check in the correct location * Fix calculateFeeLimits nil handling * Add validations to CLI flags * Change to rc6 * Add checkTransactionFeeRate * Add failed broadcast transactions on send error` * Fix estimateFee change value * Estimate fee correctly for --send-all * On estimateFee always assume that the recipient has ECDSA address * remove patch version --------- Co-authored-by: Michael Sutton <msutton@cs.huji.ac.il>
152 lines
3.9 KiB
Protocol Buffer
152 lines
3.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) {}
|
|
// BroadcastReplacement assumes that all transactions depend on the first one
|
|
rpc BroadcastReplacement(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) {}
|
|
rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) {}
|
|
rpc BumpFee(BumpFeeRequest) returns (BumpFeeResponse) {}
|
|
}
|
|
|
|
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 FeePolicy {
|
|
oneof feePolicy {
|
|
double maxFeeRate = 6;
|
|
double exactFeeRate = 7;
|
|
uint64 maxFee = 8;
|
|
}
|
|
}
|
|
|
|
message CreateUnsignedTransactionsRequest {
|
|
string address = 1;
|
|
uint64 amount = 2;
|
|
repeated string from = 3;
|
|
bool useExistingChangeAddress = 4;
|
|
bool isSendAll = 5;
|
|
FeePolicy feePolicy = 6;
|
|
}
|
|
|
|
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;
|
|
FeePolicy feePolicy = 7;
|
|
}
|
|
|
|
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; }
|
|
|
|
message GetVersionRequest {}
|
|
|
|
message GetVersionResponse { string version = 1; }
|
|
|
|
message BumpFeeRequest {
|
|
string password = 1;
|
|
repeated string from = 2;
|
|
bool useExistingChangeAddress = 3;
|
|
FeePolicy feePolicy = 4;
|
|
string txID = 5;
|
|
}
|
|
|
|
message BumpFeeResponse {
|
|
repeated bytes transactions = 1;
|
|
repeated string txIDs = 2;
|
|
}
|