22 address ,
33 appendTransactionMessageInstructions ,
44 assertIsSendableTransaction ,
5+ assertIsTransactionWithBlockhashLifetime ,
56 createKeyPairSignerFromBytes ,
67 createNoopSigner ,
78 createSolanaRpc ,
@@ -80,6 +81,7 @@ async function main() {
8081 tx => signTransactionMessageWithSigners ( tx ) ,
8182 ) ;
8283 assertIsSendableTransaction ( createMintTx ) ;
84+ assertIsTransactionWithBlockhashLifetime ( createMintTx ) ;
8385 await sendAndConfirm ( createMintTx , { commitment : 'confirmed' } ) ;
8486 const createMintSignature = getSignatureFromTransaction ( createMintTx ) ;
8587
@@ -108,6 +110,7 @@ async function main() {
108110 tx => signTransactionMessageWithSigners ( tx ) ,
109111 ) ;
110112 assertIsSendableTransaction ( createEscrowTx ) ;
113+ assertIsTransactionWithBlockhashLifetime ( createEscrowTx ) ;
111114 await sendAndConfirm ( createEscrowTx , { commitment : 'confirmed' } ) ;
112115 const createEscrowSignature = getSignatureFromTransaction ( createEscrowTx ) ;
113116
@@ -138,6 +141,7 @@ async function main() {
138141 tx => signTransactionMessageWithSigners ( tx ) ,
139142 ) ;
140143 assertIsSendableTransaction ( recipientTokenAccountTx ) ;
144+ assertIsTransactionWithBlockhashLifetime ( recipientTokenAccountTx ) ;
141145 await sendAndConfirm ( recipientTokenAccountTx , { commitment : 'confirmed' } ) ;
142146
143147 const unwrappedTokenProgram = await getOwnerFromAccount ( rpc , UNWRAPPED_TOKEN_ACCOUNT ) ;
@@ -165,6 +169,7 @@ async function main() {
165169 blockhash : wrapBlockhash ,
166170 } ) ;
167171 const signedWrapTxA = await partiallySignTransactionMessageWithSigners ( wrapTxA ) ;
172+ assertIsTransactionWithBlockhashLifetime ( signedWrapTxA ) ;
168173
169174 const wrapTxB = await multisigOfflineSignWrap ( {
170175 payer : createNoopSigner ( payer . address ) ,
@@ -181,6 +186,7 @@ async function main() {
181186 blockhash : wrapBlockhash ,
182187 } ) ;
183188 const signedWrapTxB = await partiallySignTransactionMessageWithSigners ( wrapTxB ) ;
189+ assertIsTransactionWithBlockhashLifetime ( signedWrapTxB ) ;
184190
185191 const wrapTxC = await multisigOfflineSignWrap ( {
186192 payer,
@@ -197,6 +203,7 @@ async function main() {
197203 blockhash : wrapBlockhash ,
198204 } ) ;
199205 const signedWrapTxC = await partiallySignTransactionMessageWithSigners ( wrapTxC ) ;
206+ assertIsTransactionWithBlockhashLifetime ( signedWrapTxC ) ;
200207
201208 // Lastly, all signatures are combined together and broadcast
202209
@@ -235,6 +242,7 @@ async function main() {
235242 blockhash : unwrapBlockhash ,
236243 } ) ;
237244 const signedUnwrapTxA = await partiallySignTransactionMessageWithSigners ( unwrapTxA ) ;
245+ assertIsTransactionWithBlockhashLifetime ( signedUnwrapTxA ) ;
238246
239247 const unwrapTxB = await multisigOfflineSignUnwrap ( {
240248 payer : createNoopSigner ( payer . address ) ,
@@ -251,6 +259,7 @@ async function main() {
251259 blockhash : unwrapBlockhash ,
252260 } ) ;
253261 const signedUnwrapTxB = await partiallySignTransactionMessageWithSigners ( unwrapTxB ) ;
262+ assertIsTransactionWithBlockhashLifetime ( signedUnwrapTxB ) ;
254263
255264 const unwrapTxC = await multisigOfflineSignUnwrap ( {
256265 payer : payer ,
@@ -267,6 +276,7 @@ async function main() {
267276 blockhash : unwrapBlockhash ,
268277 } ) ;
269278 const signedUnwrapTxC = await partiallySignTransactionMessageWithSigners ( unwrapTxC ) ;
279+ assertIsTransactionWithBlockhashLifetime ( signedUnwrapTxC ) ;
270280
271281 const combinedUnwrapTx = combinedMultisigTx ( {
272282 signedTxs : [ signedUnwrapTxA , signedUnwrapTxB , signedUnwrapTxC ] ,
0 commit comments