sendTransaction
https://api.triport.ioSubmits a fully-signed transaction to the Solana cluster for processing and returns its signature.
sendTransaction broadcasts an already-signed, fully-serialized transaction to
the cluster for execution. The transaction must be signed by all required
signers and contain a recent blockhash before you call this method — Triport
does not sign on your behalf.
By default the node runs a preflight check (a simulation against the
preflightCommitment bank) before forwarding the transaction. If preflight
fails, the call returns an error and the transaction is never submitted. The
method returns the transaction's first signature (base-58) as soon as it is
accepted into the processing pipeline — this is not a confirmation. Use
getSignatureStatuses or
getTransaction to poll for confirmation.
This method is available on all tiers but is throttled separately under the
sol_send_tx category, so send throughput is independent of your read-RPC
budget. To validate a transaction without submitting it, use
simulateTransaction instead.
Parameters
Positional params array: [transaction, config?].
transactionstringrequiredconfig.encoding.configobjectoptionalencoding"base58" | "base64"optionaltransaction string. base64 is recommended; base58 is slower and is supported for compatibility.skipPreflightbooleanoptionaltrue, skip the preflight simulation/checks and forward the transaction immediately. Default false.preflightCommitment"processed" | "confirmed" | "finalized"optional"finalized".minContextSlotintegeroptionalmaxRetriesintegeroptional0 disables automatic retries.Response
Response fields
| Field | Type | Description |
|---|---|---|
result | string | The transaction's first signature, base-58 encoded. Use it to track confirmation status. |
Errors
Errors are returned in the standard JSON-RPC envelope — see errors.md for the full shape.
| Code | Meaning | When it happens |
|---|---|---|
-32602 | Invalid params | transaction is malformed, unsigned, or its encoding does not match config.encoding. |
-32002 | Transaction simulation failed | Preflight rejected the transaction (e.g. expired blockhash, insufficient funds, failing instruction). Only returned when skipPreflight is false. |
401 | Unauthorized | Missing or invalid Authorization: Bearer API key. |
429 | Rate limited | Request rate exceeded your tier's sol_send_tx RPS limit (free 5 · basic 10 · pro 50 · business 150). Back off and retry. |
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "sendTransaction",
params: [
signedTxBase64,
{ encoding: "base64", skipPreflight: false, preflightCommitment: "processed", maxRetries: 0 },
],
}),
});
const { result: signature } = await res.json();
console.log("submitted:", signature);TypeScript SDK (@triport/sdk)
import { TriportClient } from "@triport/sdk";
const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY! });
const signature = await client.solana.sendTransaction(signedTxBase64, {
encoding: "base64",
skipPreflight: false,
preflightCommitment: "processed",
maxRetries: 0,
});
console.log("submitted:", signature);Python (triport-sdk)
import os
from triport import TriportClient
client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])
signature = client.solana.send_transaction(
signed_tx_base64,
encoding="base64",
skip_preflight=False,
preflight_commitment="processed",
max_retries=0,
)
print("submitted:", signature)Notes
- The returned signature confirms acceptance, not finality. Poll
getSignatureStatusesor fetch the transaction withgetTransactionto confirm it landed. - Set the transaction's blockhash from a recent
getLatestBlockhashresult; an expired blockhash causes preflight (or eventual processing) to fail. - Prefer
encoding: "base64"— it is more compact and faster to decode thanbase58. - To dry-run a transaction without broadcasting it, use
simulateTransaction. sendTransactionandrequestAirdropshare thesol_send_txrate-limit category, separate from read-RPC limits.