5 releases

new 0.2.1 Dec 17, 2024
0.2.0 Dec 17, 2024
0.1.2 Dec 12, 2024
0.1.1 Dec 12, 2024
0.1.0 Nov 29, 2024

#1541 in Web programming

Download history 117/week @ 2024-11-25 12/week @ 2024-12-02 233/week @ 2024-12-09

362 downloads per month

MIT license

43KB
1K SLoC

Atlantic Client

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.

Features

  • Connect to the Atlantic service
  • Send and receive data from the service
  • Handle responses and errors efficiently

Installation

To include this client in your project, add the following to your Cargo.toml:

[dependencies]
atlantic_client = "0.1.0"

Usage

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(())
}

Example

Atlantic client comes with example pie, and cairo0 program which can be used for testing ablities of library

Contributing

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.

License

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

Dependencies

~9–21MB
~278K SLoC