Skip to content

Commit

Permalink
mainchain/wallet: add sendtransaction rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
octobocto committed Nov 5, 2024
1 parent 06d362a commit 2a43575
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions proto/cusf/mainchain/v1/wallet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ service WalletService {
returns (GetBalanceResponse);
rpc ListTransactions(ListTransactionsRequest)
returns (ListTransactionsResponse);
rpc SendTransaction(SendTransactionRequest)
returns (SendTransactionResponse);
// Regtest only
rpc GenerateBlocks(GenerateBlocksRequest)
returns (GenerateBlocksResponse);
Expand Down Expand Up @@ -135,3 +137,26 @@ message ListTransactionsResponse {
repeated WalletTransaction transactions = 1;
}

message SendTransactionRequest {
message FeeRate {
// Fee rate, measured in sat/vbyte.
uint64 fee_rate_sat_per_vbyte = 1;

// Fee amount, measured in sats.
uint64 fee_sats = 2;
}

// Address -> satoshi amount
map<string, uint64> destinations = 1;

// If not set, a reasonable rate is used by asking Core for an estimate.
FeeRate fee_rate = 2;

// if set, the transaction will add a separate OP_RETURN output with this
// message.
optional bytes op_return_message = 3;
}
message SendTransactionResponse {
cusf.common.v1.ReverseHex txid = 1;
}

0 comments on commit 2a43575

Please sign in to comment.