Advertisement
jkbgm

proto btc main

May 16th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. syntax = "proto3";
  2.  
  3. package btc;
  4.  
  5. service NodeCommuunications {
  6.  
  7. rpc EventInitialAdd (UsersData) returns (ReplyInfo){
  8. }
  9.  
  10. rpc EventAddNewAddress (WatchAddress) returns (ReplyInfo){
  11. }
  12.  
  13. rpc EventGetBlockHeight (Empty) returns (BlockHeight){
  14. }
  15.  
  16. rpc EventGetAllMempool (Empty) returns (stream MempoolRecord){
  17. }
  18.  
  19. rpc EventAddMempoolRecord (Empty) returns (stream MempoolRecord){
  20. }
  21.  
  22. rpc EventDeleteMempool (Empty) returns (stream MempoolToDelete){
  23. }
  24.  
  25. rpc EventResyncAddress (AddressToResync) returns (ReplyInfo){
  26. }
  27.  
  28. rpc EventSendRawTx (RawTx) returns (ReplyInfo){
  29. }
  30.  
  31. rpc EventDeleteSpendableOut (Empty) returns (stream ReqDeleteSpOut){
  32. }
  33.  
  34. rpc EventAddSpendableOut (Empty) returns (stream AddSpOut){
  35. }
  36.  
  37. rpc NewTx (Empty) returns (stream BTCTransaction){
  38. }
  39.  
  40. }
  41.  
  42. message BTCTransaction {
  43. string userID = 1;
  44. string txID = 2;
  45. string txHash = 3;
  46. string txOutScript = 4;
  47. repeated string txAddress = 5;
  48. int32 txStatus = 6;
  49. int64 txOutAmount = 7;
  50. int64 blockTime = 8;
  51. int64 blockHeight = 9;
  52. int32 confirmations = 10;
  53. int64 txFee = 11;
  54. int64 mempoolTime = 12;
  55.  
  56. message AddresAmount {
  57. string address = 1;
  58. int64 amount = 2;
  59. }
  60.  
  61. repeated AddresAmount txInputs = 13;
  62. repeated AddresAmount TxOutputs = 14;
  63.  
  64. message WalletForTx {
  65. string userid = 1;
  66. string address = 2;
  67. int32 txOutIndex = 3;
  68. int64 amount = 4;
  69. }
  70.  
  71. repeated WalletForTx WalletsInput = 15;
  72. repeated WalletForTx WalletsOutput = 16;
  73. bool resync = 17;
  74. }
  75.  
  76. message AddSpOut {
  77. string txID = 1;
  78. int32 txOutID = 2;
  79. int64 txOutAmount = 3;
  80. string txOutScript = 4;
  81. string address = 5;
  82. string userID = 6;
  83. int32 txStatus = 7;
  84. int32 walletIndex = 8;
  85. int32 addressIndex = 9;
  86. }
  87.  
  88. message BlockHeight{
  89. int64 height = 1 ;
  90. }
  91.  
  92. message ReqDeleteSpOut {
  93. string userID = 1;
  94. string txID = 2;
  95. string address = 3;
  96. }
  97.  
  98. message MempoolToDelete {
  99. string hash = 1;
  100. }
  101.  
  102. message WatchAddress {
  103. string address = 1;
  104. string userID = 2;
  105. int32 WalletIndex = 3;
  106. int32 AddressIndex = 4;
  107. }
  108.  
  109. message MempoolRecord {
  110. int32 category = 1;
  111. string hashTX = 2;
  112. }
  113.  
  114.  
  115. message Empty {
  116.  
  117. }
  118.  
  119. message RawTx {
  120. string transaction = 1;
  121. }
  122.  
  123. message AddressToResync {
  124. string address = 1;
  125. }
  126.  
  127.  
  128. message UsersData {
  129. map<string, AddressExtended> map = 1;
  130. }
  131.  
  132. message AddressExtended {
  133. string UserID = 1;
  134. int32 WalletIndex = 2;
  135. int32 AddressIndex = 3;
  136. }
  137.  
  138.  
  139. message ReplyInfo {
  140. string message = 1;
  141. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement