The idkit
crate provides a simple Rust interface for prompting users for World ID proofs. For our Web and React Native SDKs, check out the IDKit JS library.
use idkit::{Session, session::{AppId, VerificationLevel, BridgeUrl, Status}};
let session = Session::new(AppId::from_str("app_GBkZ1KlVUdFTjeMXKlVUdFT")?, "vote_1", VerificationLevel::Orb, BridgeUrl::default(), (), None).await?;
// To establish a connection, show a QRCode to the user with the generated URL.
let connect_url = session.connect_url();
loop {
match session.poll_for_status().await {
Status::WaitingForConnection | Status::AwaitingConfirmation => {
tokio::time::sleep(Duration::from_secs(5)).await;
continue;
},
Status::Failed(error) => {
// ...
},
Status::Confirmed(proof) => {
/// ...
},
}
}
Refer to the documentation on docs.rs for detailed usage instructions.
World ID is the privacy-first identity protocol that brings global proof of personhood to the internet. More on World ID in the announcement blog post.
World ID lets you seamlessly integrate authentication into your app that verifies accounts belong to real persons through Sign in with Worldcoin. For additional flexibility and cases where you need extreme privacy, Anonymous Actions lets you verify users in a way that cannot be tracked across verifications.
Follow the Quick Start guide for the easiest way to get started.
All the technical docs for the Wordcoin SDK, World ID Protocol, examples, guides can be found at https://docs.worldcoin.org/