syntax = "proto3"; package responses; import "account.proto"; import "block.proto"; import "digest.proto"; import "merkle.proto"; import "mmr.proto"; import "note.proto"; import "smt.proto"; import "transaction.proto"; message ApplyBlockResponse {} message CheckNullifiersResponse { // Each requested nullifier has its corresponding nullifier proof at the same position. repeated smt.SmtOpening proofs = 1; } message CheckNullifiersByPrefixResponse { // List of nullifiers matching the prefixes specified in the request. repeated NullifierUpdate nullifiers = 1; } message GetBlockHeaderByNumberResponse { // The requested block header block.BlockHeader block_header = 1; // Merkle path to verify the block's inclusion in the MMR at the returned `chain_length` optional merkle.MerklePath mmr_path = 2; // Current chain length optional fixed32 chain_length = 3; } message NullifierUpdate { digest.Digest nullifier = 1; fixed32 block_num = 2; } message SyncStateResponse { // Number of the latest block in the chain fixed32 chain_tip = 1; // Block header of the block with the first note matching the specified criteria block.BlockHeader block_header = 2; // Data needed to update the partial MMR from `request.block_num + 1` to `response.block_header.block_num` mmr.MmrDelta mmr_delta = 3; // List of account hashes updated after `request.block_num + 1` but not after `response.block_header.block_num` repeated account.AccountSummary accounts = 5; // List of transactions executed against requested accounts between `request.block_num + 1` and // `response.block_header.block_num` repeated transaction.TransactionSummary transactions = 6; // List of all notes together with the Merkle paths from `response.block_header.note_root` repeated note.NoteSyncRecord notes = 7; // List of nullifiers created between `request.block_num + 1` and `response.block_header.block_num` repeated NullifierUpdate nullifiers = 8; } message SyncNoteResponse { // Number of the latest block in the chain fixed32 chain_tip = 1; // Block header of the block with the first note matching the specified criteria block.BlockHeader block_header = 2; // Merkle path to verify the block's inclusion in the MMR at the returned `chain_tip`. // // An MMR proof can be constructed for the leaf of index `block_header.block_num` of // an MMR of forest `chain_tip` with this path. merkle.MerklePath mmr_path = 3; // List of all notes together with the Merkle paths from `response.block_header.note_root` repeated note.NoteSyncRecord notes = 4; } // An account returned as a response to the GetBlockInputs message AccountBlockInputRecord { account.AccountId account_id = 1; digest.Digest account_hash = 2; merkle.MerklePath proof = 3; } // A nullifier returned as a response to the GetBlockInputs message NullifierBlockInputRecord { digest.Digest nullifier = 1; smt.SmtOpening opening = 2; } message GetBlockInputsResponse { // The latest block header block.BlockHeader block_header = 1; // Peaks of the above block's mmr, The `forest` value is equal to the block number repeated digest.Digest mmr_peaks = 2; // The hashes of the requested accounts and their authentication paths repeated AccountBlockInputRecord account_states = 3; // The requested nullifiers and their authentication paths repeated NullifierBlockInputRecord nullifiers = 4; // The list of requested notes which were found in the database note.NoteAuthenticationInfo found_unauthenticated_notes = 5; } // An account returned as a response to the GetTransactionInputs message AccountTransactionInputRecord { account.AccountId account_id = 1; // The latest account hash, zero hash if the account doesn't exist. digest.Digest account_hash = 2; } // A nullifier returned as a response to the GetTransactionInputs message NullifierTransactionInputRecord { digest.Digest nullifier = 1; // The block at which the nullifier has been consumed, zero if not consumed. fixed32 block_num = 2; } message GetTransactionInputsResponse { AccountTransactionInputRecord account_state = 1; repeated NullifierTransactionInputRecord nullifiers = 2; repeated digest.Digest missing_unauthenticated_notes = 3; fixed32 block_height = 4; } message SubmitProvenTransactionResponse { // The node's current block height fixed32 block_height = 1; } message GetNotesByIdResponse { // Lists Note's returned by the database repeated note.Note notes = 1; } message GetNoteAuthenticationInfoResponse { note.NoteAuthenticationInfo proofs = 1; } message ListNullifiersResponse { // Lists all nullifiers of the current chain repeated smt.SmtLeafEntry nullifiers = 1; } message ListAccountsResponse { // Lists all accounts of the current chain repeated account.AccountInfo accounts = 1; } message ListNotesResponse { // Lists all notes of the current chain repeated note.Note notes = 1; } message GetAccountDetailsResponse { // Account info (with details for public accounts) account.AccountInfo details = 1; } message GetBlockByNumberResponse { // The requested `Block` data encoded using miden native format optional bytes block = 1; } message GetAccountStateDeltaResponse { // The calculated `AccountStateDelta` encoded using miden native format optional bytes delta = 1; } message GetAccountProofsResponse { // Block number at which the state of the account was returned. fixed32 block_num = 1; // List of account state infos for the requested account keys. repeated AccountProofsResponse account_proofs = 2; } message AccountProofsResponse { // Account ID. account.AccountId account_id = 1; // Account hash. digest.Digest account_hash = 2; // Authentication path from the `account_root` of the block header to the account. merkle.MerklePath account_proof = 3; // State header for public accounts. Filled only if `include_headers` flag is set to `true`. optional AccountStateHeader state_header = 4; } message AccountStateHeader { // Account header. account.AccountHeader header = 1; // Values of all account storage slots (max 255). bytes storage_header = 2; // Account code, returned only when none of the request's code commitments match with the // current one. optional bytes account_code = 3; }