API Reference
Javelin takes one JSON-RPC method, sendTransaction, in the same format as a Solana RPC node.
Endpoint
POST https://<region>.javelin.blinklabs.xyzSend each transaction to at least the two regions closest to your servers. See Endpoints for the list. The examples below use Frankfurt.
sendTransaction
Sends a signed transaction. The transaction must tip one of our tip accounts.
Parameters
1
string
The signed transaction, encoded as base64 or base58.
2
object
Optional. encoding: "base64" or "base58". Defaults to "base58". Other options, such as skipPreflight, are accepted and ignored.
Example request
curl https://fra.javelin.blinklabs.xyz \
-H 'Content-Type: application/json' \
-H 'X-Api-Key: <your-api-key>' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "sendTransaction",
"params": [
"<base64 signed transaction>",
{ "encoding": "base64" }
]
}'Example response
The result is the transaction's first signature, in base58.
A success means Javelin accepted the transaction and is sending it. It does not mean it has landed. Check that with getSignatureStatuses on your own RPC node.
API Keys
Every request needs an API key. Send it in the X-Api-Key header:
If your client can only set a URL, use the api-key query parameter instead: https://fra.javelin.blinklabs.xyz/?api-key=<your-api-key>.
MEV Protection
Send the header X-Mev-Protect: true, or add the query parameter ?mev-protect=true, to keep your transaction away from validators that sandwich their users. See MEV Protection for what it does.
Rate Limits
Each API key can send 10 requests a second from each IP address (or IPv6 /64), with bursts of up to 20, unless your key has a different limit. A request over the limit gets HTTP 429 and error code -32429. For higher limits, contact us at contact@blinklabs.xyz.
Health Check
A GET or HEAD request with no body returns 200 and ok. Use it to keep your connection open between sends.
CORS
Every response allows any origin, so you can call Javelin straight from a browser. OPTIONS preflight requests are answered.
Errors
Errors use the standard JSON-RPC format. All of them return HTTP 200, except rate limiting, which returns 429.
-32700
Parse error
The body is not valid JSON.
-32601
Method not found
The method is not sendTransaction.
-32602
Invalid params
The parameters are missing or have the wrong shape.
-32602
Invalid api key: not a UUIDv4
The API key is not in the right format.
-32602
invalid transaction: undecodable base58 or base64
The transaction does not decode with the given encoding.
-32602
invalid transaction: base58 over 1683 characters, send base64
The transaction is too long for base58. Send it as base64.
-32602
invalid transaction: too short
The decoded transaction is too short to be valid.
-32602
invalid transaction: failed to sanitize
The transaction is malformed.
-32602
invalid transaction: tip too low
The transaction tips our tip accounts less than 5,000 lamports.
-32003
Transaction signature verification failure
A signature does not match its signer.
-32005
Node is unhealthy
This node cannot send transactions right now. Retry.
The id in an error is null when the request failed before its body was read: a rate limit or a bad API key.
Last updated