World ID Protocol and SDK Documentation

repository·main·Indexed 41 days ago

https://github.com/worldcoin/world-id-docs

Technical documentation for the World ID privacy-first identity protocol, World SDK, World Chain, and Mini Apps. Includes guides on integrating 'Sign in with World ID', implementing Incognito Actions, and building native-like applications within the World App using the @worldcoin/minikit-js SDK. Covers proof-of-personhood verification via @worldcoin/idkit, wallet authentication, and the User object schema.

Tokens
81.8K
Snippets
195
Records
378
Agent score
2%

What's inside World ID

  1. What is World ID?

    main

    World ID is a digital identity protocol designed to provide privacy-preserving, global proof of personhood. It allows users to prove they are unique humans anonymously using zero-knowledge proofs and advanced cryptography.

    Key characteristics:

    • Privacy-Preserving: Users prove uniqueness without revealing personal information (no government IDs, emails, or names required).
    • Anonymity: Even Worldcoin's core contributors cannot link the proof to a specific identity.
    • Integration: It can be integrated into both cloud-based and on-chain applications.
    • User Experience: Users verify their humanity in seconds using compatible wallets like World App.
  2. Overview of World Chain primitives

    main

    World Chain is a blockchain built on the Superchain designed for human-centric applications. It provides several key primitives for developers:

    • Free gas fees: Available for all verified humans.
    • Native mobile distribution: Reach all World App users via mini-apps.
    • Simplified crypto transactions: Enabled through mini-app commands.
    • Sybil resistance: Developers can leverage World ID to ensure users are unique humans.
    • WLD token airdrops: Available to all verified humans.
  3. Overview of World ID and Mini Apps

    main

    World ID is a privacy-first identity protocol used to verify that accounts belong to real persons. It offers two primary integration methods:

    1. Sign in with World ID: Seamlessly integrate authentication into your app.
    2. Incognito Actions: Provides extreme privacy by allowing verification that cannot be tracked across different verifications.

    Mini Apps allow developers to build native-like applications within the World App. They currently support:

    • World ID
    • Payments
    • Sign in with Ethereum

    Mini Apps interact with the World App by sending Commands via the MiniKit SDK and listening for Responses.

  4. Overview of World Chain bridging options

    main

    World Chain uses the Superchain bridge (native to the OP Stack) to allow users to transfer assets between Ethereum mainnet and World Chain. Bridging options are categorized into the native Superchain bridge and various third-party providers.

    Native Superchain Bridge

    These interfaces use the native OP Stack smart contracts:

    • Superbridge Core: A platform for transferring ETH and ERC20 tokens between OP Stack Layer 2 rollups, including World Chain.
    • Alchemy Bridge: Provided by Alchemy (the RaaS provider for World Chain). It offers both a mainnet bridge and a testnet bridge for World Chain Sepolia.

    Third-party Bridges

    Third-party protocols provide alternative routes for cross-chain transfers:

    • Across: Recommended provider for bridging WLD between World Chain and other networks.
    • Brid.gg: Connects Ethereum Mainnet to OP Chains like World Chain.
    • Superbridge fast: A service that integrates third-party bridges (Synapse, Across, Hyperlane) to provide the fastest possible bridging experience.
    • Other providers: Synapse, Hyperlane, LayerZero, Chainlink CCIP, and Thirdweb Universal Bridge.
  5. Overview of World App Mini Apps

    main

    Mini apps are web applications that run within a webview inside the World App. They allow third-party developers to build native-like experiences that integrate directly with the World ecosystem.

    Key features include:

    • Access to the World App user network.
    • Monetization opportunities using WLD and USDC.
    • Native smart contract support within the World App environment.
  6. Integrate Ramp Network for fiat-to-crypto onramping

    main
    Ramp Network provides a non-custodial fiat-to-crypto and crypto-to-fiat onramp solution. It is designed for decentralized applications, wallets, and platforms to allow users to buy, sell, and trade cryptocurrencies directly within an app. Ramp handles regulatory compliance, identity verification (KYC), and liquidity provisioning via their API.
  7. Webview capabilities and restrictions for Mini Apps

    main

    Mini Apps in World App run within a WebView. Developers should account for the following platform-specific behaviors when building solutions:

    Capabilities

    • WebView Engines: Android uses the native WebView implementation, while iOS uses WKWebView.
    • Hardware Access: Camera and file system access (e.g., file uploads) are available, provided the user grants permission.
    • Storage: Cookies and DOM Storage are supported. Android requires explicit activation, while iOS uses default behavior.
    • Location: Geolocation is supported on both platforms.

    Restrictions

    • Navigation: Opening new browser windows is prohibited; all navigation must occur within the current WebView instance.
    • Zooming: Zooming is disabled on iOS but not restricted by default on Android.
    • Alerts: Standard alert() dialogs are not supported on iOS.
  8. Use cases for World ID in voting and governance

    main

    World ID's global proof of personhood enables several privacy-preserving voting models:

    • Novel DAOs (Decentralized Autonomous Organizations): Implement governance where individual human voices are prioritized over token holdings.
    • Anonymous Online Polls: Facilitate city council elections, referendums, or plebiscites where voters remain anonymous.
    • Government Elections: Enable public elections that prevent duplicate votes while allowing anyone to verify the election results publicly.
    • Quadratic Voting: Implement systems where votes are counted quadratically to mitigate the influence of large groups while maintaining one-person-one-vote integrity.
    • Conviction Voting: Support continuous decision-making models, such as public goods funding, where votes are accumulated over time.
  9. Choose a World integration path

    main

    Developers can integrate with the World ecosystem through three primary paths depending on their use case:

    1. Mini Apps: Build native-like applications that run inside the World App. This path provides the highest distribution by leveraging World ID and the integrated wallet.
    2. External Integrations: Add World ID's proof-of-personhood verification to an existing platform or website.
    3. World Chain: Build directly on World's blockchain infrastructure, which is designed specifically for real humans.
  10. Understand the purpose and features of World Chain

    main

    World Chain is a blockchain specifically designed for humans, optimized for the World App and the World ID ecosystem. Unlike general-purpose L2s, World Chain provides unique benefits for World ID verified unique humans:

    • Priority Blockspace for Humans: Transactions from unique humans are given priority.
    • Free Gas Allowance: Verified unique humans receive a free allowance for transactions, leveraging proof of personhood.
    • Scalability: It is built to scale throughput, increase gas limits, and improve data availability by leveraging improvements in the OP Stack (such as better execution clients and higher Ethereum blob counts).

    World Chain allows the World App and World ID ecosystem to scale as the network grows toward its goal of supporting over a billion unique humans.