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 6, 2024
1 parent 67f1607 commit d6ae1be
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 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,28 @@ message ListTransactionsResponse {
repeated WalletTransaction transactions = 1;
}

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

// Fee amount, measured in sats.
uint64 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 cusf.common.v1.Hex op_return_message = 3;
}
message SendTransactionResponse {
cusf.common.v1.ReverseHex txid = 1;
}

0 comments on commit d6ae1be

Please sign in to comment.