WalletKit enables mobile applications to use World ID.
Part of the World ID SDK.
WalletKit can be used as a Rust crate, or directly as a Swift or Android package. WalletKit includes foreign bindings for direct usage in Swift/Kotlin through UniFFI.
Installation
To use WalletKit in another Rust project:
To use WalletKit in an iOS app:
WalletKit is distributed through a separate repo specifically for Swift bindings. This repo contains all the binaries required and is a mirror of @worldcoin/walletkit
.
- Navigate to File > Swift Packages > Add Package Dependency in Xcode.
- Enter the WalletKit repo URL (note this is not the same repo):
https://github.com/worldcoin/walletkit-swift
To use WalletKit in an Android app:
WalletKit's bindings for Kotlin are distributed through GitHub packages.
- Update
build.gradle
(App Level)
dependencies {
/// ...
implementation "org.world:walletkit:VERSION"
}
Replace VERSION
with the desired WalletKit version.
- Sync Gradle.
Overview
WalletKit is broken down into separate crates, offering the following functionality.
walletkit-core
- Enables basic usage of a World ID to generate ZKPs using different credentials.
World ID Secret
- Each World ID requires a secret. The secret is used in ZKPs to prove ownership over a World ID.
- Each host app is responsible for generating, storing and backing up a World ID secret.
- A World ID secret is a 32-byte secret generated with a cryptographically secure random function.
- The World ID secret must never be exposed to third-parties and must not leave the holder's device. //TODO: Additional guidelines for secret generation and storage.
Getting Started
WalletKit is generally centered around a World ID. The most basic usage requires initializing a WorldId
.
A World ID can then be used to generate Zero-Knowledge Proofs.
A ZKP is analogous to presenting a credential.
use ;
async