⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

eth_sendRawTransaction

Overview

Broadcasts a raw, signed transaction. Returns the transaction hash.

Movement-Specific Considerations

  • Fast finality: confirms typically within ~1–3 seconds.
  • Ensure correct EVM chain ID (3073 or 30732) when signing (EIP-155).

Parameters

NameTypeRequiredDescription
rawTx0x-prefixed hexYesSigned tx bytes (RLP or EIP-2718/1559 format)

Returns

Transaction hash as 0x-hex string.

Code Examples

cURL

curl -X POST https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x<SIGNED_TX>"],"id":1}'

Ethers.js v6

import { Wallet, JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider('https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1');
const wallet = new Wallet(process.env.PRIV_KEY!, provider);

const tx = await wallet.sendTransaction({
to: '0x0000000000000000000000000000000000000000',
value: 0n,
});
console.log(tx.hash);

Web3.js

import Web3 from 'web3';
const web3 = new Web3('https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1');
const signed = await web3.eth.accounts.signTransaction({
to: '0x0000000000000000000000000000000000000000',
value: '0',
gas: 21000,
chainId: 3073
}, process.env.PRIV_KEY);
const hash = await web3.eth.sendSignedTransaction(signed.rawTransaction);
console.log(hash.transactionHash);

viem

import { createPublicClient, http } from 'viem';

const movement = {
id: 3073,
name: 'Movement',
nativeCurrency: { name: 'MOVE', symbol: 'MOVE', decimals: 18 },
rpcUrls: { default: { http: ['https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1'] } },
} as const;

const client = createPublicClient({
chain: movement,
transport: http('https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1'),
});

const txHash = await client.sendRawTransaction({ serializedTransaction: '0x<SIGNED_TX>' });
console.log(txHash);

Move Equivalent

Use POST /v1/transactions to submit signed Move transactions (BCS-encoded payloads).

Common Errors

  • nonce too low / replacement underpriced: handle pending/nonces properly.
  • insufficient funds: ensure enough MOVE for gas on the EVM side.