Skip to content

Shyft-to/ultrasearch-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

UltraSearch Examples πŸš€

TypeScript Solana License: MIT

Code examples for integrating UltraSearch RPC API into your Solana applications

πŸ“– Table of Contents

🎯 About

UltraSearch Examples is a comprehensive collection of code examples demonstrating how to use the UltraSearch RPC API for searching and filtering Solana blockchain transactions. Whether you're building a DeFi dashboard, analyzing on-chain data, or tracking specific wallet activities, these examples will help you get started quickly.

What is UltraSearch?

UltraSearch is a high-performance Solana RPC API that enables developers to search and filter blockchain transactions with precision. Unlike traditional RPC methods, UltraSearch provides:

  • Flexible Filtering: Search by accounts, block ranges, transaction status
  • High Performance: Optimized queries for fast data retrieval
  • Developer-Friendly: Simple JSON-RPC interface with TypeScript support

✨ Features

  • πŸ” Transaction Search: Find transactions by account addresses, block ranges, and more
  • πŸ“Š Flexible Filtering: Include, exclude, or require specific accounts in search results
  • 🎯 Sorting & Pagination: Control result order and efficiently paginate through large datasets
  • πŸ“¦ TypeScript Support: Fully typed interfaces and enums for type-safe development
  • πŸš€ Real-World Examples: Production-ready code snippets for common use cases
  • πŸ“š Comprehensive Documentation: Detailed guides and API references

πŸš€ Quick Start

Prerequisites

  • Node.js 16+ and npm/yarn
  • Basic knowledge of TypeScript and Solana blockchain
  • UltraSearch API key (Get yours here)

Installation

# Clone the repository
git clone https://github.com/Shyft-to/ultrasearch-examples.git
cd ultrasearch-examples

# Navigate to TypeScript examples
cd examples/typescript

# Install dependencies
npm install

# Run examples
npm run start

Your First Query

import axios from "axios";
import { SearchTransactionsRpcRequest } from "./types";

const RPC_URL = "https://rpc.shyft.to?api_key=YOUR_API_KEY";

async function fetchLatestTransactions() {
  const request: SearchTransactionsRpcRequest = {
    jsonrpc: "2.0",
    id: 1,
    method: "searchTransactions",
    params: {
      transactionDetails: "full",
      limit: 10
    }
  };
  
  const response = await axios.post(RPC_URL, request);
  console.log(response.data.result);
}

πŸ“š Examples

Our example collection covers common use cases for blockchain data retrieval:

Available Examples

Example Description Use Case
Basic Search Fetch latest transaction signatures Getting started, recent activity
Full Transactions Retrieve complete transaction data Detailed analysis, audit logs
Pagination Handle large result sets efficiently Data exports, batch processing

πŸ—οΈ Project can be build using this API call

  • Token Transfer Tracker
  • DeFi Transaction Dashboard
  • Monitoring Pump.fun Trading Activity

πŸ”§ API Reference

Search Parameters

The searchTransactions method accepts the following parameters:

Parameter Type Description Default
accountInclude string[] Include transactions involving any of these accounts undefined
accountExclude string[] Exclude transactions involving these accounts undefined
accountRequired string[] Only include transactions with ALL these accounts undefined
fromBlock number Starting block number (inclusive). Must be paired with toBlock β€” providing only one is an error. When both are omitted a default 5000-block window is used. See note
toBlock number Ending block number (inclusive). Must be paired with fromBlock β€” providing only one is an error. When both are omitted a default 5000-block window is used. See note
vote boolean Include/exclude vote transactions undefined
failed boolean Include/exclude failed transactions undefined
sort "ASC" | "DESC" Sort order by slot number "DESC"
limit number Maximum results per request 1000 (signatures), 100 (full)
paginationToken string Token for fetching next page undefined
transactionDetails "signatures" | "full" Level of detail in response "signatures"

Response Format

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "data": [...],
    "paginationToken": "394941095:1232" // null if no more pages
  }
}

Block range default behavior (when fromBlock/toBlock are both omitted):

Condition sort: "DESC" (default) sort: "ASC"
No paginationToken Last 5000 blocks First indexed block β†’ +5000
With paginationToken paginationToken slot βˆ’ 5000 β†’ slot paginationToken slot β†’ slot + 5000

View Full API Documentation β†’

🀝 Contributing

We welcome contributions! Whether it's:

  • πŸ› Bug fixes
  • ✨ New examples
  • πŸ“– Documentation improvements
  • πŸ’‘ Feature suggestions

Please read our Contributing Guide to get started.

Quick Contribution Steps

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-example)
  3. Commit your changes (git commit -m 'Add amazing example')
  4. Push to the branch (git push origin feature/amazing-example)
  5. Open a Pull Request

πŸ’¬ Support

Frequently Asked Questions

Q: How do I get an API key? A: Visit shyft.to and sign up for a trial/paid plan.

Q: What are the rate limits? A: Rate limits depend on your subscription tier. Check your dashboard for details.

Q: Can I use this in production? A: Yes! These examples are production-ready. Just ensure you follow security best practices.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Acknowledgments

  • Built with TypeScript
  • Powered by Shyft
  • Inspired by the Solana developer community

Made with ❀️ by the Solana community

⬆ Back to Top

About

Search Solana transactions -- Fetch exactly the transactions you need, not thousands you don't.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors