@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.
@@ -668,11 +668,6 @@ function createTransactionMessage({
668
668
  }
669
669
  var RECENT_BLOCKHASHES_SYSVAR_ADDRESS = "SysvarRecentB1ockHashes11111111111111111111";
670
670
  var SYSTEM_PROGRAM_ADDRESS = "11111111111111111111111111111111";
671
- function assertIsTransactionMessageWithDurableNonceLifetime(transactionMessage) {
672
- if (!isTransactionMessageWithDurableNonceLifetime(transactionMessage)) {
673
- throw new SolanaError(SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME);
674
- }
675
- }
676
671
  function createAdvanceNonceAccountInstruction(nonceAccountAddress, nonceAuthorityAddress) {
677
672
  return {
678
673
  accounts: [
@@ -698,9 +693,16 @@ function isAdvanceNonceAccountInstruction(instruction) {
698
693
  function isAdvanceNonceAccountInstructionData(data) {
699
694
  return data.byteLength === 4 && data[0] === 4 && data[1] === 0 && data[2] === 0 && data[3] === 0;
700
695
  }
696
+
697
+ // src/durable-nonce.ts
701
698
  function isTransactionMessageWithDurableNonceLifetime(transactionMessage) {
702
699
  return "lifetimeConstraint" in transactionMessage && typeof transactionMessage.lifetimeConstraint.nonce === "string" && transactionMessage.instructions[0] != null && isAdvanceNonceAccountInstruction(transactionMessage.instructions[0]);
703
700
  }
701
+ function assertIsTransactionMessageWithDurableNonceLifetime(transactionMessage) {
702
+ if (!isTransactionMessageWithDurableNonceLifetime(transactionMessage)) {
703
+ throw new SolanaError(SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME);
704
+ }
705
+ }
704
706
  function isAdvanceNonceAccountInstructionForNonce(instruction, nonceAccountAddress, nonceAuthorityAddress) {
705
707
  return instruction.accounts[0].address === nonceAccountAddress && instruction.accounts[2].address === nonceAuthorityAddress;
706
708
  }