idkit

Crates.ioidkit
lib.rsidkit
version0.1.2
sourcesrc
created_at2024-01-22 00:35:14.819047
updated_at2024-08-27 13:22:58.348934
descriptionRust toolkit to interact with the World ID protocol.
homepage
repositoryhttps://github.com/worldcoin/idkit-rs
max_upload_size
id1108083
size96,390
Miguel Piedrafita (m1guelpf)

documentation

README

IDKit (Rust)

crates.io download count badge docs.rs

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/

Commit count: 0

cargo fmt