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 .({ }); import { , } from 'cive'
import { } from 'cive/chains'
export const = ({
: ,
: (.!),
})
// export const [account] = await walletClient.getAddresses();
↑ JSON-RPC Accountexport const = ("0x...", { : . });↑ Local AccountReturns
The Transaction hash.
Parameters
serializedTransaction
- Type:
Hex
The signed serialized transaction.
const signature = await walletClient.sendRawTransaction({
serializedTransaction: "0x...........",
});