@@ -23,43 +23,43 @@ import {
2323 setTransactionMessageFeePayerSigner ,
2424 setTransactionMessageLifetimeUsingBlockhash ,
2525 signTransactionMessageWithSigners ,
26- } from " @solana/kit" ;
26+ } from ' @solana/kit' ;
2727
2828export type Client = {
2929 rpc : Rpc < SolanaRpcApi > ;
3030 rpcSubscriptions : RpcSubscriptions < SolanaRpcSubscriptionsApi > ;
3131} ;
3232
3333export const createDefaultSolanaClient = ( ) : Client => {
34- const rpc = createSolanaRpc ( " http://127.0.0.1:8899" ) ;
35- const rpcSubscriptions = createSolanaRpcSubscriptions ( " ws://127.0.0.1:8900" ) ;
34+ const rpc = createSolanaRpc ( ' http://127.0.0.1:8899' ) ;
35+ const rpcSubscriptions = createSolanaRpcSubscriptions ( ' ws://127.0.0.1:8900' ) ;
3636 return { rpc, rpcSubscriptions } ;
3737} ;
3838
3939export const generateKeyPairSignerWithSol = async (
4040 client : Client ,
41- putativeLamports : bigint = 1_000_000_000n ,
41+ putativeLamports : bigint = 1_000_000_000n
4242) => {
4343 const signer = await generateKeyPairSigner ( ) ;
4444 await airdropFactory ( client ) ( {
4545 recipientAddress : signer . address ,
4646 lamports : lamports ( putativeLamports ) ,
47- commitment : " confirmed" ,
47+ commitment : ' confirmed' ,
4848 } ) ;
4949 return signer ;
5050} ;
5151
5252export const createDefaultTransaction = async (
5353 client : Client ,
54- feePayer : TransactionSigner ,
54+ feePayer : TransactionSigner
5555) => {
5656 const { value : latestBlockhash } = await client . rpc
5757 . getLatestBlockhash ( )
5858 . send ( ) ;
5959 return pipe (
6060 createTransactionMessage ( { version : 0 } ) ,
6161 ( tx ) => setTransactionMessageFeePayerSigner ( feePayer , tx ) ,
62- ( tx ) => setTransactionMessageLifetimeUsingBlockhash ( latestBlockhash , tx ) ,
62+ ( tx ) => setTransactionMessageLifetimeUsingBlockhash ( latestBlockhash , tx )
6363 ) ;
6464} ;
6565
@@ -68,7 +68,7 @@ export const signAndSendTransaction = async (
6868 transactionMessage : BaseTransactionMessage &
6969 TransactionMessageWithFeePayer &
7070 TransactionMessageWithBlockhashLifetime ,
71- commitment : Commitment = " confirmed" ,
71+ commitment : Commitment = ' confirmed'
7272) => {
7373 const signedTransaction =
7474 await signTransactionMessageWithSigners ( transactionMessage ) ;
@@ -83,12 +83,12 @@ export const signAndSendTransaction = async (
8383export const sendAndConfirmInstructions = async (
8484 client : Client ,
8585 payer : TransactionSigner ,
86- instructions : Instruction [ ] ,
86+ instructions : Instruction [ ]
8787) => {
8888 const signature = await pipe (
8989 await createDefaultTransaction ( client , payer ) ,
9090 ( tx ) => appendTransactionMessageInstructions ( instructions , tx ) ,
91- ( tx ) => signAndSendTransaction ( client , tx ) ,
91+ ( tx ) => signAndSendTransaction ( client , tx )
9292 ) ;
9393 return signature ;
9494} ;
0 commit comments