Skip to content
Cive

sendRawTransaction

Sends a signed transaction to the network. Can be used with both Public Clients and Wallet Clients.

Usage

import { ,  } from "./config";
 
const  = await .({
  ,
  : "cfx:...",
  : 1000000000000000000n,
});
 
const  = await .();
 
const  = await .({  }); 

Returns

Hash

The Transaction hash.

Parameters

serializedTransaction

  • Type: Hex

The signed serialized transaction.

const signature = await walletClient.sendRawTransaction({
  serializedTransaction: "0x...........", 
});

JSON-RPC Method

cfx_sendRawTransaction