Judging from https://github.com/ethereum/wiki/wiki/JSON-RPC the api client can synchronize on events such as:
- Transaction is received/pending:
eth_gettransactionbyhash
returns non-null
with block numbernull
- Transaction is included in a block -
eth_gettransactionbyhash
returns non-null
with block number non-null
- Transaction has been executed as a part of accepted block:
eth_gettransactionreceipt
returns non-null
But if I sent a transaction that turned out to be invalid - how do I know it's failed, is there anything to wait for/react on?
UPD: There are kinds of errors that prevent transactions from even being included e.g. Insufficient balance for transfer (for the first transfer, not the nested ones issued by contracts), nonce too low/high. By "invalid" I mean transactions that produce this kind of error.
Insufficient balance for transfer
(for the first transfer, not the nested ones issued by contracts),nonce too low/high
.