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 3128f9a commit 2597222
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;

Check failure on line 159 in proto/cusf/mainchain/v1/wallet.proto

View workflow job for this annotation

GitHub Actions / Lint

field cusf.mainchain.v1.SendTransactionRequest.op_return_message: unknown type cusf.common.v1.Hex
}
message SendTransactionResponse {
cusf.common.v1.ReverseHex txid = 1;
}

0 comments on commit 2597222

Please sign in to comment.