enigma_apis

Crates.ioenigma_apis
lib.rsenigma_apis
version0.1.1
created_at2025-10-21 10:44:37.58323+00
updated_at2025-10-21 10:55:45.772286+00
descriptionThis is a library used to call APIs published on Enigma API
homepage
repository
max_upload_size
id1893630
size237,774
Shubham (shubhexists)

documentation

README

Quick Start

use enigma_apis::{X402Client, X402Config};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Configure the client
    let config = X402Config::builder()
        .user_id("user-id-of-publisher")
        .api_id("api-id-you-want-to-call")
        .build()?;

    // Create client
    let client = X402Client::from_base58("your-private-key", config)?;

    // Make requests
    let response = client.get("/posts").await?;
    println!("Response: {}", response.body);

    Ok(())
}
Commit count: 0

cargo fmt