Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfq: fleshing out the wallet RPCs #9

Closed
torkelrogstad opened this issue Oct 11, 2024 · 1 comment
Closed

rfq: fleshing out the wallet RPCs #9

torkelrogstad opened this issue Oct 11, 2024 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@torkelrogstad
Copy link
Contributor

For the new L1 GUI we need certain functionality exposed as gRPC endpoints. This is a proposal for those RPCs. More is needed, but this is a start.

  // Fetches balance for the L1 wallet
  rpc GetBalance(google.protobuf.Empty) returns (GetBalanceResponse);
  
  // Lists all transactions for the L1 wallet, analogous to the `listtransactions`
  // RPC in Bitcoin Core
   rpc ListTransactions(ListTransactionsRequest) returns (ListTransactionsResponse);

message GetBalanceResponse {
  uint64 confirmed_satoshi = 1;

  uint64 pending_satoshi = 2;
}

// Eventually this should probably include support for filtering/pagination for large wallets. 
// Not something we need to deal with right now. 
message ListTransactionsRequest {
}

message ListTransactionsResponse {
  repeated Transaction transactions = 1;
}

message Confirmation {
  uint32 block_height = 1;
  google.protobuf.Timestamp timestamp = 2;
}

message Transaction {
  // Aren't TXIDs displayed in reverse? Saw we already had usage of `ConensusHex` for TXIDs...
  ConsensusHex txid = 1;
  uint32 vout = 2;

  uint64 fee_satoshi = 3;
  // Negative if sending /from/ the wallet, positive if receiving /to/ the wallet
  int64 satoshi  = 4;
  
  // Address sending/receiving to.
  string address = 5;

  Confirmation confirmation_time = 6;
}
@nchashch nchashch added the enhancement New feature or request label Oct 17, 2024
@nchashch nchashch added the question Further information is requested label Oct 25, 2024
@octobocto
Copy link
Contributor

Implemented in #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants