Expand description
walletkit-core
contains the basic primitives for using a World ID.
It enables basic usage of a World ID to generate ZKPs using different credentials.
§Examples
use walletkit_core::{proof::ProofContext, CredentialType, Environment, world_id::WorldId};
async fn example() {
let world_id = WorldId::new(b"not_a_real_secret", &Environment::Staging);
let context = ProofContext::new("app_ce4cb73cb75fc3b73b71ffb4de178410", Some("my_action".to_string()), None, CredentialType::Orb);
let proof = world_id.generate_proof(&context).await.unwrap();
println!("{}", proof.to_json().unwrap()); // the JSON output can be passed to the Developer Portal, World ID contracts, etc. for verification
}
Modules§
- error
- Contains error outputs from
WalletKit
- logger
- Contains logging functionality that can be integrated with foreign language bindings.
- proof
- This module handles World ID proof generation
- world_
id - Contains all components to interact and use a World ID
Structs§
- U256
Wrapper - A wrapper around
U256
to represent a field element in the protocol. Wrapper enables FFI interoperability.
Enums§
- Credential
Type - A
CredentialType
represents a specific credential which can be presented by a World ID holder. - Environment
- Represents the environment in which a World ID is being presented and used.