Skip to content

Commit d9de32b

Browse files
octoboctoAsh-L2L
authored andcommitted
mainchain/wallet: add sendtransaction rpc
1 parent 9d29ab8 commit d9de32b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

proto/cusf/mainchain/v1/wallet.proto

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ service WalletService {
4646
returns (GetBalanceResponse);
4747
rpc ListTransactions(ListTransactionsRequest)
4848
returns (ListTransactionsResponse);
49+
rpc SendTransaction(SendTransactionRequest)
50+
returns (SendTransactionResponse);
4951
// Regtest only
5052
rpc GenerateBlocks(GenerateBlocksRequest)
5153
returns (GenerateBlocksResponse);
@@ -135,3 +137,28 @@ message ListTransactionsResponse {
135137
repeated WalletTransaction transactions = 1;
136138
}
137139

140+
message SendTransactionRequest {
141+
message FeeRate {
142+
oneof fee {
143+
// Fee rate, measured in sat/vbyte.
144+
uint64 sat_per_vbyte = 1;
145+
146+
// Fee amount, measured in sats.
147+
uint64 sats = 2;
148+
}
149+
}
150+
151+
// Address -> satoshi amount
152+
map<string, uint64> destinations = 1;
153+
154+
// If not set, a reasonable rate is used by asking Core for an estimate.
155+
FeeRate fee_rate = 2;
156+
157+
// if set, the transaction will add a separate OP_RETURN output with this
158+
// message.
159+
optional cusf.common.v1.Hex op_return_message = 3;
160+
}
161+
message SendTransactionResponse {
162+
cusf.common.v1.ReverseHex txid = 1;
163+
}
164+

0 commit comments

Comments
 (0)