@@ -62,6 +62,11 @@ import {
6262 type SendRawTransactionReturnType ,
6363 sendRawTransaction ,
6464} from '../../actions/wallet/sendRawTransaction.js'
65+ import {
66+ type SendRawTransactionSyncParameters ,
67+ type SendRawTransactionSyncReturnType ,
68+ sendRawTransactionSync ,
69+ } from '../../actions/wallet/sendRawTransactionSync.js'
6570import {
6671 type SendTransactionParameters ,
6772 type SendTransactionRequest ,
@@ -498,6 +503,34 @@ export type WalletActions<
498503 sendRawTransaction : (
499504 args : SendRawTransactionParameters ,
500505 ) => Promise < SendRawTransactionReturnType >
506+ /**
507+ * Sends a **signed** transaction to the network synchronously,
508+ * and waits for the transaction to be included in a block.
509+ *
510+ * - Docs: https://viem.sh/docs/actions/wallet/sendRawTransactionSync
511+ * - JSON-RPC Method: [`eth_sendRawTransactionSync`](https://eips.ethereum.org/EIPS/eip-7966)
512+ *
513+ * @param client - Client to use
514+ * @param parameters - {@link SendRawTransactionSyncParameters}
515+ * @returns The transaction receipt. {@link SendRawTransactionSyncReturnType}
516+ *
517+ * @example
518+ * import { createWalletClient, custom } from 'viem'
519+ * import { mainnet } from 'viem/chains'
520+ * import { sendRawTransactionSync } from 'viem/wallet'
521+ *
522+ * const client = createWalletClient({
523+ * chain: mainnet,
524+ * transport: custom(window.ethereum),
525+ * })
526+ *
527+ * const receipt = await client.sendRawTransactionSync({
528+ * serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'
529+ * })
530+ */
531+ sendRawTransactionSync : (
532+ args : SendRawTransactionSyncParameters ,
533+ ) => Promise < SendRawTransactionSyncReturnType < chain > >
501534 /**
502535 * Creates, signs, and sends a new transaction to the network.
503536 *
@@ -973,6 +1006,7 @@ export function walletActions<
9731006 requestPermissions : ( args ) => requestPermissions ( client , args ) ,
9741007 sendCalls : ( args ) => sendCalls ( client , args ) ,
9751008 sendRawTransaction : ( args ) => sendRawTransaction ( client , args ) ,
1009+ sendRawTransactionSync : ( args ) => sendRawTransactionSync ( client , args ) ,
9761010 sendTransaction : ( args ) => sendTransaction ( client , args ) ,
9771011 showCallsStatus : ( args ) => showCallsStatus ( client , args ) ,
9781012 signAuthorization : ( args ) => signAuthorization ( client , args ) ,
0 commit comments