@solana/transaction-messages 2.4.0-canary-20250709085047 → 2.4.0-canary-20250709085504
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.
- package/dist/index.browser.cjs +6 -1
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.mjs +6 -1
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.native.mjs +6 -1
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.node.cjs +6 -1
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.mjs +6 -1
- package/dist/index.node.mjs.map +1 -1
- package/dist/types/compile/message.d.ts +5 -4
- package/dist/types/compile/message.d.ts.map +1 -1
- package/dist/types/decompile-message.d.ts +4 -2
- package/dist/types/decompile-message.d.ts.map +1 -1
- package/package.json +10 -10
package/dist/index.browser.mjs
CHANGED
|
@@ -585,17 +585,22 @@ function getCompiledStaticAccounts(orderedAccounts) {
|
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
// src/compile/message.ts
|
|
588
|
+
var EMPTY_BLOCKHASH_LIFETIME_CONSTRAINT = {
|
|
589
|
+
blockhash: "11111111111111111111111111111111",
|
|
590
|
+
lastValidBlockHeight: 0n
|
|
591
|
+
};
|
|
588
592
|
function compileTransactionMessage(transactionMessage) {
|
|
589
593
|
const addressMap = getAddressMapFromInstructions(
|
|
590
594
|
transactionMessage.feePayer.address,
|
|
591
595
|
transactionMessage.instructions
|
|
592
596
|
);
|
|
593
597
|
const orderedAccounts = getOrderedAccountsFromAddressMap(addressMap);
|
|
598
|
+
const lifetimeConstraint = transactionMessage.lifetimeConstraint ?? EMPTY_BLOCKHASH_LIFETIME_CONSTRAINT;
|
|
594
599
|
return {
|
|
595
600
|
...transactionMessage.version !== "legacy" ? { addressTableLookups: getCompiledAddressTableLookups(orderedAccounts) } : null,
|
|
596
601
|
header: getCompiledMessageHeader(orderedAccounts),
|
|
597
602
|
instructions: getCompiledInstructions(transactionMessage.instructions, orderedAccounts),
|
|
598
|
-
lifetimeToken: getCompiledLifetimeToken(
|
|
603
|
+
lifetimeToken: getCompiledLifetimeToken(lifetimeConstraint),
|
|
599
604
|
staticAccounts: getCompiledStaticAccounts(orderedAccounts),
|
|
600
605
|
version: transactionMessage.version
|
|
601
606
|
};
|