/evm/send-transaction
⚠️ Warning: This endpoint sends real transactions to the blockchain.
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Chain identifier |
signedTransactions | object[] | Yes | Signed transactions to send. Min: 1 (see below) |
simulateBeforeSend | boolean | No | Simulate before sending (default: true) |
signedTransactions:
| Field | Type | Required | Description |
|---|---|---|---|
rawTransaction | string | Yes | Hex-encoded raw transaction |
signature | string | Yes | Hex-encoded signature of the transaction |
routes | object[] | Conditional | Send routes as { id, maxBlock }, taken from the routes of the built transaction. maxBlock is optional. Required unless routesIds is given |
routesIds | string[] | Conditional | Send route ids. Required unless routes is given |
- Socket.IO
- HTTP
socket.emit(
"/evm/send-transaction",
{
chain: "eth",
signedTransactions: [
{
rawTransaction: "0xYourRawTransactionHex",
signature: "0xYourSignatureHex",
routes: [{ id: "Public" }],
},
],
},
(response) => {
console.log(response);
}
);
await fetch("https://api.chainworks.co/evm/send-transaction", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: CHAINWORKS_API_AUTH_TOKEN,
},
body: JSON.stringify({
chain: "eth",
signedTransactions: [
{
rawTransaction: "0xYourRawTransactionHex",
signature: "0xYourSignatureHex",
routes: [{ id: "Public" }],
},
],
}),
});

