syntax = "proto3";
package proto;
option java_package = "com.hederahashgraph.api.proto.java";
option java_multiple_files = true;
/* When the node receives a transaction from a client, it performs a precheck, to see if if the transaction is correctly formed, and if the account has sufficient cryptocurrency to pay the transaction fee. If it passes the precheck, then the node will send it to the network for processing. The node will always reply to a transaction with the TransactionResponse, which indicates whether it passed the precheck, or why it failed. */
enum NodeTransactionPrecheckCode {
OK = 0; // the transaction passed the precheck
INVALID_TRANSACTION = 1; // the transaction had incorrect syntax or other errors
INVALID_ACCOUNT = 2; // the payer account or node account isn't a valid account number
INSUFFICIENT_FEE = 3; // the transaction fee is insufficient for this type of transaction
INSUFFICIENT_BALANCE = 4; // the payer account has insufficient cryptocurrency to pay the transaction fee
DUPLICATE = 5; // this transaction ID is a duplicate of one that was submitted to this node or reached consensus in the last 180 seconds (receipt period)
BUSY = 6; //If API is throttled out
NOT_SUPPORTED = 7; //not supported API
}
/* When the client sends the node a transaction of any kind, the node replies with this, which simply says that the transaction passed the precheck (so the node will submit it to the network) or it failed (so it won't). To learn the consensus result, the client should later obtain a receipt (free), or can buy a more detailed record (not free). */
message TransactionResponse {
NodeTransactionPrecheckCode nodeTransactionPrecheckCode = 1; // whether the transaction passed the precheck, or why it failed
}