sendBundle

Installation

npm install @quickscope/sdk

Usage

Initialization

First, initialize the Quickscope class with your location ("frankfurt" or "nyc") and your API key:

import Quickscope from '@quickscope/sdk';
// OR
const Quickscope = require('@quickscope/sdk');

const quickscope = new Quickscope("frankfurt", "your-api-key");

Method: sendBundle

Description

The sendBundle method submits a pre-signed bundle of base64-encoded transactions to the Jito relayer, enabling advanced use cases like MEV protection, atomic arbitrage, or high-priority execution. All transactions must be signed and correctly ordered before submission.

Use this method when you want to batch multiple related transactions into a single bundle and push them via Jito infrastructure.


Parameters

jitoBundle: Array<string>
  • jitoBundle: (string[]) – An array of base64-encoded, signed Solana transactions that should be included together in the bundle.

Transactions must be fully signed prior to calling this method. The relayer does not modify or sign the bundle.


Returns

Promise<string>: A promise that resolves to the Jito bundle ID or transaction signature, which can be used to monitor execution or track inclusion.


Example

async function submitJitoBundle() {
    try {
        const bundle = [
            "BASE64_SIGNED_TX_1",
            "BASE64_SIGNED_TX_2"
        ];

        const bundleId = await quickscope.v1.utils.sendBundle(bundle);

        console.log("🧃 Bundle submitted with ID:", bundleId);

        // Example output:
        // Bundle submitted with ID: "5oXPXkX5zoEz3hztrGRykknHVZoq2XMEpKHcXbHxFmqb"
    } catch (error) {
        console.error("Failed to submit bundle:", error);
    }
}

submitJitoBundle();

Error Handling

This method throws or returns an error if:

  • The relayer returns a non-200 HTTP status code
  • The JSON response contains an error
  • The bundle contains malformed base64 strings or unsigned transactions

Always wrap the method in a try/catch block and log errors to debug any failed submissions.