Skip to content

Commit

Permalink
flat api
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam committed Dec 7, 2024
1 parent e2b3a3a commit 65eb4c0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::env;
#[cfg(feature = "network")]
pub use crate::network::prover::NetworkProver as NetworkProverV1;
#[cfg(feature = "network-v2")]
pub use crate::network_v2::prover::NetworkProver as NetworkProverV2;
pub use crate::network_v2::NetworkProver as NetworkProverV2;
#[cfg(feature = "cuda")]
pub use crate::provers::CudaProver;

Expand Down
16 changes: 10 additions & 6 deletions crates/sdk/src/network-v2/mod.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
pub mod client;
mod client;
mod error;
mod json;
pub mod prover;
mod prover;
mod sign_message;
pub mod types;
mod types;
#[rustfmt::skip]
pub mod proto;
mod proto;

use alloy_signer::{Signature, SignerSync};
pub use client::*;
pub use error::*;
pub use proto::network::*;
pub use prover::*;
pub use types::*;

use alloy_signer::{Signature, SignerSync};
use prost::Message;
pub use serde::{Deserialize, Serialize};

pub trait Signable: Message {
fn sign<S: SignerSync>(&self, signer: &S) -> Signature;
Expand Down
7 changes: 3 additions & 4 deletions examples/fibonacci/script/bin/network.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use sp1_sdk::{
include_elf,
network_v2::{
prover::NetworkProver,
proto::network::FulfillmentStrategy,
NetworkProver,
FulfillmentStrategy,
Error,
},
utils,
Expand Down Expand Up @@ -31,8 +31,7 @@ async fn main() {
// Setup proving key and verifying key.
let (pk, vk) = prover.setup(ELF);

// The input stream that the program will read from using `sp1_zkvm::io::read`. Note that the
// types of the elements in the input stream must match the types being read in the program.
// Write the input to the stdin.
let mut stdin = SP1Stdin::new();
stdin.write(&1000u32);

Expand Down

0 comments on commit 65eb4c0

Please sign in to comment.