try { awaitsendAndConfirmNonceTransaction(transaction, { commitment:'confirmed' }); } catch (e) { if (isSolanaError(e, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND)) { console.error( 'The lifetime specified by this transaction refers to a nonce account ' + `\`${e.context.nonceAccountAddress}\` that does not exist`, ); } elseif (isSolanaError(e, SOLANA_ERROR__INVALID_NONCE)) { console.error('This transaction depends on a nonce that is no longer valid'); } else { throwe; } }
Returns a function that you can call to send a nonce-based transaction to the network and to wait until it has been confirmed.