Send in Binary
Key Improvements Include:
No Base64 Encoding/Decoding Overhead
No Packet Splitting due to reduced data size
Reduced Transmission time
Key points
Create Transaction in raw binary format
Header is optional
Mandatory to add
api-keyandmethodin URI paramsSend request on endpoint
/irisb
URI Params
api-key
String
Mandatory, To set api key for authentication
method
String
Mandatory, To set method
mev-protect
Boolean
Optional, To set mev protect, default is false
swqos-only
Boolean
Optional, if set true, txn will be only send via swqos, default is false
Methods
sendTransaction
POST
To send binary transaction
sendBatch
POST
To send batch of up to 25 txns in binary
getHealth
POST
To keep connection alive
Send Transaction
Example Request
Code Example :
Expected Response
200
Request is successful
400
Request might have some issues
Send Batch
Request Body Format
The body is a raw binary stream (Content-Type: application/octet-stream). Each transaction is framed as:
Transactions are concatenated back-to-back with no separators or envelope:
Headers required:
Content-Type: application/octet-stream
Example
Response
The server returns JSON. The result field is an array of signatures, one per transaction in the order they were sent:
Array length matches the number of transactions sent.
Signatures are in the same order as the transactions in the request body.
Last updated