| Crates.io | enigma_apis |
| lib.rs | enigma_apis |
| version | 0.1.1 |
| created_at | 2025-10-21 10:44:37.58323+00 |
| updated_at | 2025-10-21 10:55:45.772286+00 |
| description | This is a library used to call APIs published on Enigma API |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1893630 |
| size | 237,774 |
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(())
}