Core Features

The SWquery SDK is designed to empower developers with intuitive tools to query and visualize blockchain transactions. Here are the key features of the SDK and how they can enhance your applicantions

1. Natural Language Queries

Description

Query wallet transactions using simple, human-readable prompts. No need for complex SQL queries or technical blockchain jargon.

Example

let query = "Show all transactions greater than 5 SOL from the last month";
let result = client.query_wallet("YourWalletAddressHere", query);

Use Cases

  • Analyze wallet activity.

  • Search for specific transactions by amount, date, or type.

  • Provide intuitive search experiences in DeFi apps.

2. Multi-Wallet Support

Description

Easily query multiple wallets simultaneously and consolidate results for advanced use cases.

Example

let wallets = vec!["WalletAddress1", "WalletAddress2"];
let query = "Find all transactions from December 2024";

let results = client.query_multiple_wallets(wallets, query);

Use Cases

  • Portfolio management across multiple wallets.

  • Aggregated analysis for businesses or power users.

JSON-Formatted Results

Description

Receive all query results in a structured JSON format, ready to be used in front-end visualizations or backend processing.

Example Output

{
  "transactions": [
    {
      "date": "2024-12-10",
      "amount": "12.5 SOL",
      "type": "Sent",
      "recipient": "RecipientWalletAddress"
    },
    {
      "date": "2024-12-08",
      "amount": "15 SOL",
      "type": "Received",
      "sender": "SenderWalletAddress"
    }
  ]
}

Use Cases

  • Build interactive dashboards.

  • Export transaction data for reporting.

4. Customizable Prompts

Description

Tailor the SDK’s responses with prompts specific to your application’s needs, enabling greater flexibility and integration.

Example

let custom_prompt = "Summarize my largest transactions this year";
let result = client.query_wallet_with_prompt("YourWalletAddressHere", custom_prompt);

Use Cases

  • Personalized wallet insights for end-users.

  • Domain-specific queries (e.g., DeFi-specific transactions).

5. Modular and Scalable Architecture

Description

The SDK is built with a modular architecture, making it easy to integrate individual components into your existing projects.

Key Modules

  • Query Engine: Handles natural language processing and blockchain interaction.

  • Transformer Models: Leverages LLMs for prompt interpretation.

  • Data Parsers: Converts raw blockchain data into human-readable formats.

6. Enhanced Error Handling

Description

The SDK provides robust error handling to help developers debug and recover from issues seamlessly.

Example

match client.query_wallet("YourWalletAddressHere", "Invalid Query") {
    Ok(response) => println!("Query Result: {:?}", response),
    Err(error) => eprintln!("An error occurred: {:?}", error),
}

Why Use SWquery SDK?

  • Simplifies complex blockchain queries.

  • Offers seamless integration with both front-end and back-end systems.

  • Provides robust tools to enhance user experience and developer productivity.

Last updated