@solana/transaction-messages 2.1.2-canary-20250514101103 → 2.2.0-canary-20250514101928

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,8 +670,8 @@ function createTransactionMessage({
670
670
  }
671
671
  var RECENT_BLOCKHASHES_SYSVAR_ADDRESS = "SysvarRecentB1ockHashes11111111111111111111";
672
672
  var SYSTEM_PROGRAM_ADDRESS = "11111111111111111111111111111111";
673
- function assertIsDurableNonceTransactionMessage(transactionMessage) {
674
- if (!isDurableNonceTransaction(transactionMessage)) {
673
+ function assertIsTransactionMessageWithDurableNonceLifetime(transactionMessage) {
674
+ if (!isTransactionMessageWithDurableNonceLifetime(transactionMessage)) {
675
675
  throw new errors.SolanaError(errors.SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME);
676
676
  }
677
677
  }
@@ -700,7 +700,7 @@ function isAdvanceNonceAccountInstruction(instruction) {
700
700
  function isAdvanceNonceAccountInstructionData(data) {
701
701
  return data.byteLength === 4 && data[0] === 4 && data[1] === 0 && data[2] === 0 && data[3] === 0;
702
702
  }
703
- function isDurableNonceTransaction(transactionMessage) {
703
+ function isTransactionMessageWithDurableNonceLifetime(transactionMessage) {
704
704
  return "lifetimeConstraint" in transactionMessage && typeof transactionMessage.lifetimeConstraint.nonce === "string" && transactionMessage.instructions[0] != null && isAdvanceNonceAccountInstruction(transactionMessage.instructions[0]);
705
705
  }
706
706
  function isAdvanceNonceAccountInstructionForNonce(instruction, nonceAccountAddress, nonceAuthorityAddress) {
@@ -715,7 +715,7 @@ function setTransactionMessageLifetimeUsingDurableNonce({
715
715
  const firstInstruction = transactionMessage.instructions[0];
716
716
  if (firstInstruction && isAdvanceNonceAccountInstruction(firstInstruction)) {
717
717
  if (isAdvanceNonceAccountInstructionForNonce(firstInstruction, nonceAccountAddress, nonceAuthorityAddress)) {
718
- if (isDurableNonceTransaction(transactionMessage) && transactionMessage.lifetimeConstraint.nonce === nonce) {
718
+ if (isTransactionMessageWithDurableNonceLifetime(transactionMessage) && transactionMessage.lifetimeConstraint.nonce === nonce) {
719
719
  return transactionMessage;
720
720
  } else {
721
721
  newInstructions = [firstInstruction, ...transactionMessage.instructions.slice(1)];
@@ -922,10 +922,15 @@ function decompileTransactionMessage(compiledTransactionMessage, config) {
922
922
  );
923
923
  }
924
924
 
925
+ // src/deprecated.ts
926
+ var assertIsDurableNonceTransactionMessage = assertIsTransactionMessageWithDurableNonceLifetime;
927
+ var isDurableNonceTransaction = isTransactionMessageWithDurableNonceLifetime;
928
+
925
929
  exports.appendTransactionMessageInstruction = appendTransactionMessageInstruction;
926
930
  exports.appendTransactionMessageInstructions = appendTransactionMessageInstructions;
927
931
  exports.assertIsDurableNonceTransactionMessage = assertIsDurableNonceTransactionMessage;
928
932
  exports.assertIsTransactionMessageWithBlockhashLifetime = assertIsTransactionMessageWithBlockhashLifetime;
933
+ exports.assertIsTransactionMessageWithDurableNonceLifetime = assertIsTransactionMessageWithDurableNonceLifetime;
929
934
  exports.compileTransactionMessage = compileTransactionMessage;
930
935
  exports.compressTransactionMessageUsingAddressLookupTables = compressTransactionMessageUsingAddressLookupTables;
931
936
  exports.createTransactionMessage = createTransactionMessage;
@@ -939,6 +944,7 @@ exports.getTransactionVersionEncoder = getTransactionVersionEncoder;
939
944
  exports.isAdvanceNonceAccountInstruction = isAdvanceNonceAccountInstruction;
940
945
  exports.isDurableNonceTransaction = isDurableNonceTransaction;
941
946
  exports.isTransactionMessageWithBlockhashLifetime = isTransactionMessageWithBlockhashLifetime;
947
+ exports.isTransactionMessageWithDurableNonceLifetime = isTransactionMessageWithDurableNonceLifetime;
942
948
  exports.prependTransactionMessageInstruction = prependTransactionMessageInstruction;
943
949
  exports.prependTransactionMessageInstructions = prependTransactionMessageInstructions;
944
950
  exports.setTransactionMessageFeePayer = setTransactionMessageFeePayer;