@@ -13,27 +13,27 @@ import "types/transaction.proto";
1313// ================================================================================================
1414
1515service Api {
16- // Returns the status info.
17- rpc Status (google.protobuf.Empty ) returns (rpc.BlockProducerStatus ) {}
16+ // Returns the status info.
17+ rpc Status (google.protobuf.Empty ) returns (rpc.BlockProducerStatus ) {}
1818
19- // Submits proven transaction to the Miden network. Returns the node's current block height.
20- rpc SubmitProvenTransaction (transaction.ProvenTransaction ) returns (blockchain.BlockNumber ) {}
19+ // Submits proven transaction to the Miden network. Returns the node's current block height.
20+ rpc SubmitProvenTransaction (transaction.ProvenTransaction ) returns (blockchain.BlockNumber ) {}
2121
22- // Submits a batch of transactions to the Miden network.
23- //
24- // All transactions in this batch will be considered atomic, and be committed together or not all.
25- //
26- // Returns the node's current block height.
27- rpc SubmitBatch (transaction.TransactionBatch ) returns (blockchain.BlockNumber ) {}
22+ // Submits a batch of transactions to the Miden network.
23+ //
24+ // All transactions in this batch will be considered atomic, and be committed together or not all.
25+ //
26+ // Returns the node's current block height.
27+ rpc SubmitBatch (transaction.TransactionBatch ) returns (blockchain.BlockNumber ) {}
2828
29- // Subscribe to mempool events.
30- //
31- // The event stream will contain all events after the current chain tip. This includes all
32- // currently inflight events that have not yet been committed to the chain.
33- //
34- // Currently only a single active subscription is supported. Subscription requests will cancel
35- // the active subscription, if any.
36- rpc MempoolSubscription (google.protobuf.Empty ) returns (stream MempoolEvent ) {}
29+ // Subscribe to mempool events.
30+ //
31+ // The event stream will contain all events after the current chain tip. This includes all
32+ // currently inflight events that have not yet been committed to the chain.
33+ //
34+ // Currently only a single active subscription is supported. Subscription requests will cancel
35+ // the active subscription, if any.
36+ rpc MempoolSubscription (google.protobuf.Empty ) returns (stream MempoolEvent ) {}
3737}
3838
3939// MEMPOOL SUBSCRIPTION
@@ -44,41 +44,41 @@ message MempoolSubscriptionRequest {}
4444
4545// Event from the mempool.
4646message MempoolEvent {
47- // A block was committed.
48- //
49- // This event is sent when a block is committed to the chain.
50- message BlockCommitted {
51- blockchain.BlockHeader block_header = 1 ;
52- repeated transaction.TransactionId transactions = 2 ;
53- }
47+ // A block was committed.
48+ //
49+ // This event is sent when a block is committed to the chain.
50+ message BlockCommitted {
51+ blockchain.BlockHeader block_header = 1 ;
52+ repeated transaction.TransactionId transactions = 2 ;
53+ }
5454
55- // A transaction was added to the mempool.
56- //
57- // This event is sent when a transaction is added to the mempool.
58- message TransactionAdded {
59- // The ID of the transaction.
60- transaction.TransactionId id = 1 ;
61- // Nullifiers consumed by the transaction.
62- repeated primitives.Digest nullifiers = 2 ;
63- // Network notes created by the transaction.
64- repeated note.NetworkNote network_notes = 3 ;
65- // Changes to a network account, if any. This includes creation of new network accounts.
55+ // A transaction was added to the mempool.
6656 //
67- // The account delta is encoded using [winter_utils::Serializable] implementation
68- // for [miden_protocol::account::delta::AccountDelta].
69- optional bytes network_account_delta = 4 ;
70- }
57+ // This event is sent when a transaction is added to the mempool.
58+ message TransactionAdded {
59+ // The ID of the transaction.
60+ transaction.TransactionId id = 1 ;
61+ // Nullifiers consumed by the transaction.
62+ repeated primitives.Digest nullifiers = 2 ;
63+ // Network notes created by the transaction.
64+ repeated note.NetworkNote network_notes = 3 ;
65+ // Changes to a network account, if any. This includes creation of new network accounts.
66+ //
67+ // The account delta is encoded using [winter_utils::Serializable] implementation
68+ // for [miden_protocol::account::delta::AccountDelta].
69+ optional bytes network_account_delta = 4 ;
70+ }
7171
72- // A set of transactions was reverted and dropped from the mempool.
73- //
74- // This event is sent when a set of transactions are reverted and dropped from the mempool.
75- message TransactionsReverted {
76- repeated transaction.TransactionId reverted = 1 ;
77- }
72+ // A set of transactions was reverted and dropped from the mempool.
73+ //
74+ // This event is sent when a set of transactions are reverted and dropped from the mempool.
75+ message TransactionsReverted {
76+ repeated transaction.TransactionId reverted = 1 ;
77+ }
7878
79- oneof event {
80- TransactionAdded transaction_added = 1 ;
81- BlockCommitted block_committed = 2 ;
82- TransactionsReverted transactions_reverted = 3 ;
83- }
79+ oneof event {
80+ TransactionAdded transaction_added = 1 ;
81+ BlockCommitted block_committed = 2 ;
82+ TransactionsReverted transactions_reverted = 3 ;
83+ }
8484}
0 commit comments