3 releases
0.1.2 | Aug 27, 2024 |
---|---|
0.1.1 | Jul 22, 2024 |
0.1.0 | Jan 22, 2024 |
#873 in Network programming
28KB
520 lines
IDKit (Rust)
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.
Usage
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.
About World ID
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.
📄 Documentation
All the technical docs for the Wordcoin SDK, World ID Protocol, examples, guides can be found at https://docs.worldcoin.org/
Dependencies
~15–27MB
~502K SLoC