/svm/send-transaction
⚠️ Warning: This endpoint sends real transactions to the blockchain.
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Always sol |
signedTransactions | object[] | Yes | Signed transactions to send. Min: 1 (see below) |
simulateBeforeSend | boolean | No | Simulate before sending (default: true) |
minContextSlot | number | No | The minContextSlot returned when the transaction was built. The pre-send simulation runs at or after this slot |
signedTransactions:
| Field | Type | Required | Description |
|---|---|---|---|
rawTransactionMessage | object | Yes | Transaction message as { encoded, encoding }, where encoding is base64 or hex |
signature | object | Yes | Signature of the message as { encoded, encoding }, where encoding is base64 or hex |
routes | object[] | Conditional | Send routes as { id }, taken from the routes of the built transaction. Required unless routesIds is given |
routesIds | string[] | Conditional | Send route ids. Required unless routes is given |
- Socket.IO
- HTTP
socket.emit(
"/svm/send-transaction",
{
chain: "sol",
signedTransactions: [
{
rawTransactionMessage: {
encoded: "gAEAAgQN1e8xet/Iym45ebDddH1pVjSfF1C7OiY+qZ1S7f5fFsFPDdgzjeTNFWPvA3KD5jgCXSQFsTHlpFKmlgKFOxGlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAMxJDpKM0uOHO7ND/JXaMxecpg9Nv0bCw26RKZ1V1Oa5AwMABQLCAQAAAwAJA47XPg0AAAAAAgIAAQwCAAAAAOH1BQAAAAAA",
encoding: "base64",
},
signature: {
encoded: "YourBase64Signature",
encoding: "base64",
},
routes: [{ id: "Public" }],
},
],
minContextSlot: 318472901,
},
(response) => {
console.log(response);
}
);
await fetch("https://api.chainworks.co/svm/send-transaction", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: CHAINWORKS_API_AUTH_TOKEN,
},
body: JSON.stringify({
chain: "sol",
signedTransactions: [
{
rawTransactionMessage: {
encoded: "gAEAAgQN1e8xet/Iym45ebDddH1pVjSfF1C7OiY+qZ1S7f5fFsFPDdgzjeTNFWPvA3KD5jgCXSQFsTHlpFKmlgKFOxGlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAMxJDpKM0uOHO7ND/JXaMxecpg9Nv0bCw26RKZ1V1Oa5AwMABQLCAQAAAwAJA47XPg0AAAAAAgIAAQwCAAAAAOH1BQAAAAAA",
encoding: "base64",
},
signature: {
encoded: "YourBase64Signature",
encoding: "base64",
},
routes: [{ id: "Public" }],
},
],
minContextSlot: 318472901,
}),
});

