Skip to content

jito-labs/jito-js-rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jito-js-rpc

Discord JavaScript npm

The Jito JSON-RPC JavaScript SDK provides an interface for interacting with Jito's enhanced Solana infrastructure. This SDK supports methods for managing bundles and transactions, offering improved performance and additional features while interacting with the Block Engine.

Features

Bundles

  • getInflightBundleStatuses: Retrieve the status of in-flight bundles.
  • getBundleStatuses: Fetch the statuses of submitted bundles.
  • getTipAccounts: Get accounts eligible for tips.
  • sendBundle: Submit bundles to the Jito Block Engine.

Transactions

  • sendTransaction: Submit transactions with enhanced priority and speed.

Installation

Prerequisites

This project requires Node.js and npm (Node Package Manager) for development. If you haven't installed Node.js yet, you can download it from nodejs.org.

Adding jito-js-rpc to Your Project

You can install the package using npm:

npm install

Or if you prefer using yarn:

yarn add jito-js-rpc

Usage Examples

Basic Transaction Example

To run the basic transaction example:

  1. Ensure your environment is set up in examples/basic-transaction.js:

    // Load the sender's keypair
    const sender = loadKeypair("/path/to/wallet.json");
    
    // Set up receiver pubkey
    const receiver = new PublicKey("YOUR_RECEIVER_PUBKEY");
  2. Run the example:

    node examples/basic_txn.js

Basic Bundle Example

To run the basic bundle example:

  1. Set up your environment in examples/basic-bundle.js:

    // Load the sender's keypair
    const sender = loadKeypair("/path/to/wallet.json");
    
    // Set up receiver pubkey
    const receiver = new PublicKey("YOUR_RECEIVER_PUBKEY");
  2. Run the example:

    node examples/basic_bundle.js

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For support, please join our Discord community.