@solana/transaction-messages 2.2.0-canary-20250514101928 → 2.2.0-canary-20250514102324

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -670,11 +670,6 @@ function createTransactionMessage({
670
670
  }
671
671
  var RECENT_BLOCKHASHES_SYSVAR_ADDRESS = "SysvarRecentB1ockHashes11111111111111111111";
672
672
  var SYSTEM_PROGRAM_ADDRESS = "11111111111111111111111111111111";
673
- function assertIsTransactionMessageWithDurableNonceLifetime(transactionMessage) {
674
- if (!isTransactionMessageWithDurableNonceLifetime(transactionMessage)) {
675
- throw new errors.SolanaError(errors.SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME);
676
- }
677
- }
678
673
  function createAdvanceNonceAccountInstruction(nonceAccountAddress, nonceAuthorityAddress) {
679
674
  return {
680
675
  accounts: [
@@ -700,9 +695,16 @@ function isAdvanceNonceAccountInstruction(instruction) {
700
695
  function isAdvanceNonceAccountInstructionData(data) {
701
696
  return data.byteLength === 4 && data[0] === 4 && data[1] === 0 && data[2] === 0 && data[3] === 0;
702
697
  }
698
+
699
+ // src/durable-nonce.ts
703
700
  function isTransactionMessageWithDurableNonceLifetime(transactionMessage) {
704
701
  return "lifetimeConstraint" in transactionMessage && typeof transactionMessage.lifetimeConstraint.nonce === "string" && transactionMessage.instructions[0] != null && isAdvanceNonceAccountInstruction(transactionMessage.instructions[0]);
705
702
  }
703
+ function assertIsTransactionMessageWithDurableNonceLifetime(transactionMessage) {
704
+ if (!isTransactionMessageWithDurableNonceLifetime(transactionMessage)) {
705
+ throw new errors.SolanaError(errors.SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME);
706
+ }
707
+ }
706
708
  function isAdvanceNonceAccountInstructionForNonce(instruction, nonceAccountAddress, nonceAuthorityAddress) {
707
709
  return instruction.accounts[0].address === nonceAccountAddress && instruction.accounts[2].address === nonceAuthorityAddress;
708
710
  }