Send-and-Confirm Pattern
Programming Model · Deep
A client-side transaction lifecycle pattern that combines sendTransaction (with skipPreflight: true for freshest state) with polling via getSignatureStatuses or a WebSocket signatureSubscribe until the desired commitment level is reached or the blockhash expires. The canonical implementation: fetch a recent blockhash with its lastValidBlockHeight, sign and send the transaction, then poll in a loop checking both the signature status and whether the current blockHeight exceeds lastValidBlockHeight. If the blockhash expires without confirmation, the transaction is guaranteed to never land and can be safely retried with a fresh blockhash.