Skip to content

Kotlin toolkit to interact with the World ID protocol.

Notifications You must be signed in to change notification settings

worldcoin/idkit-kotlin

Repository files navigation

IDKit (Kotlin)

The IDKit library provides a simple Kotlin interface for prompting users for World ID proofs. For our Web and React Native SDKs, check out the IDKit JS library.

Usage

package com.worldcoin.idkit_kotlin
class IDKitTest {

    val session = Session.create(
                appID = AppID("app_ce4cb73cb75fc3b73b71ffb4de178410"),
                action = "test-action"
            )

    // Generate the connect URL (you would typically display this as a QR code)
    val connectUrl = session.connectUrl
    println("Scan this URL with the World App: $connectUrl")

    // Monitor the session status
    session.status().collect { status ->
        when (status) {
            is Status.WaitingForConnection -> {
                println("Waiting for the user to scan the QR Code")
            }
            is Status.AwaitingConfirmation -> {
                println("Awaiting user confirmation")
            }
            is Status.Confirmed -> {
                println("Got proof: ${status.proof}")
            }
            is Status.Failed -> {
                println("Got error: ${status.error.message}")
            }
        }
    }
}

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/

About

Kotlin toolkit to interact with the World ID protocol.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages