Crates.io | atlantic_client |
lib.rs | atlantic_client |
version | 0.1.2 |
source | src |
created_at | 2024-11-29 12:52:05.888152 |
updated_at | 2024-12-12 16:58:19.385499 |
description | Atlantic client for generating proofs with Atlantic Prover |
homepage | |
repository | https://github.com/chudkowsky/atlantic_client |
max_upload_size | |
id | 1465619 |
size | 95,538 |
This is a client library for interacting with the Atlantic service. The project aims to provide an easy-to-use interface for connecting and communicating with Atlantic's API, enabling you to integrate it seamlessly into your applications.
To include this client in your project, add the following to your Cargo.toml
:
[dependencies]
atlantic_client = "0.1.0"
Here's a basic example of how to use the Atlantic client in your project:
use std::{path::PathBuf, str::FromStr};
use clap::Parser;
use url::Url;
use atlantic_client::{error::AtlanticSdkError, models::{AtlanticSdk, Layout}};
#[derive(Parser, Debug, Clone)]
#[clap(author, version, about, long_about = None)]
pub struct Args {
#[arg(long, env)]
pub prover_url: Url,
#[arg(long, short, env)]
pub layout: String,
#[arg(long, env)]
pub pie_path: PathBuf,
#[arg(long, env)]
pub prover_api_key: String,
}
#[tokio::main]
pub async fn main() -> Result<(), AtlanticSdkError> {
let args = Args::parse();
let sharp_sdk = AtlanticSdk::new(args.prover_api_key, args.prover_url)?;
let pie_file = std::fs::read(args.pie_path)?;
let layout = Layout::from_str(args.layout.as_str())?;
let atlantic_query = sharp_sdk.proof_generation(pie_file, layout, atlantic_client::models::ProverVersion::Starkware).await?;
println!("{:?}", atlantic_query);
Ok(())
}
Atlantic client comes with example pie, and cairo0 program which can be used for testing ablities of library
If you find any issues, bugs, or have suggestions for improvements, please feel free to open an issue or submit a pull request. I'm open to collaboration and would appreciate any feedback to improve the project.
This project is licensed under the MIT License - see the LICENSE file for details.