atlantic_client

Crates.ioatlantic_client
lib.rsatlantic_client
version0.1.2
sourcesrc
created_at2024-11-29 12:52:05.888152
updated_at2024-12-12 16:58:19.385499
descriptionAtlantic client for generating proofs with Atlantic Prover
homepage
repositoryhttps://github.com/chudkowsky/atlantic_client
max_upload_size
id1465619
size95,538
Mateusz Chudkowski (chudkowsky)

documentation

README

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.

Commit count: 21

cargo fmt