### Running Local Development Server with PNPM - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/README.md Starts the local development server for the documentation site using the command defined in package.json (likely 'pnpm dev'). This allows developers to preview changes locally before committing. Requires dependencies to be installed. ```Bash pnpm dev ``` -------------------------------- ### Building Production Bundle with PNPM - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/README.md Builds the static production-ready version of the documentation site using the command defined in package.json (likely 'pnpm build'). This creates optimized assets for deployment. Requires dependencies to be installed. ```Bash pnpm build ``` -------------------------------- ### Starting World ID Template Bash App Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/world-id/quick-start/templates.mdx Executes the necessary commands to set up and run the World ID template application. First, it installs project dependencies using `pnpm i`, and then it launches the development server with `pnpm dev`. This command is used to get the template running locally after cloning and configuration. ```bash pnpm i && pnpm dev ``` -------------------------------- ### Setting up World ID Cloud Template Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This command sequence is used to initialize and run the World ID Cloud template repository. It first installs project dependencies using pnpm (`pnpm i`) and then starts the development server (`pnpm dev`). This should be executed after cloning the template and configuring the `.env` file with your World ID `app_id` and `action`. ```bash pnpm i && pnpm dev ``` -------------------------------- ### Installing Dependencies with PNPM - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/README.md Installs all project dependencies listed in the package.json file using the pnpm package manager. pnpm is used for efficient dependency management. Requires pnpm to be installed globally or accessible. ```Bash pnpm install ``` -------------------------------- ### Cloning Repository and Initializing Env File (Bash) Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This command sequence downloads the simple-worldchain-node repository from GitHub, navigates into the newly created directory, and copies the example environment file (.env.example) to .env. The .env file is essential for configuring the node's network, execution client, and other settings before starting it. ```bash git clone https://github.com/worldcoin-foundation/simple-worldchain-node.git cd simple-worldchain-node cp .env.example .env ``` -------------------------------- ### Setting up Sign In World ID Template Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Use this command to set up and run the 'Sign In with World ID Template' which uses NextAuth. It installs the necessary dependencies via pnpm (`pnpm i`) and then starts the local development server (`pnpm dev`). This command should be run after cloning the repository and configuring the required `.env` variables (`NEXTAUTH_URL`, `WLD_CLIENT_ID`, `WLD_CLIENT_SECRET`). ```bash pnpm i && pnpm dev ``` -------------------------------- ### Starting Local Web Server with PNPM (Bash) Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This command uses pnpm to execute the 'dev' script defined in the project's package.json file. It starts the local development web server for the World ID template application. This typically includes processes like automatic contract ABI regeneration. Requires pnpm to be installed and executed from the project's root directory. ```Bash pnpm dev ``` -------------------------------- ### Manual Installation of MiniKit-JS Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/quick-start/installing.mdx Use this command with pnpm to install the core MiniKit-JS library. This package is framework-agnostic and provides the fundamental SDK functionality. ```bash pnpm install @worldcoin/minikit-js ``` -------------------------------- ### Activating Node.js Version - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/README.md Uses Node Version Manager (nvm) to switch to the project's required Node.js version, typically defined in a .nvmrc file. This ensures compatibility with the project's build tools and dependencies. Requires nvm installation. ```Bash nvm use ``` -------------------------------- ### Starting World Chain Node - Docker Compose/Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/world-chain/reference/node-setup.mdx This command starts the World Chain node containers defined in the `docker-compose.yml` file. The `-d` flag runs the containers in detached mode (background), and `--build` rebuilds images if needed before starting. Requires Docker and Docker Compose installed and the `.env` file configured. The output is the node running in the background. ```bash docker compose up -d --build ``` -------------------------------- ### Installing Worldcoin Mini Apps UI Kit React - bash Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/design/ui-kit.mdx Installs the Worldcoin Mini Apps UI Kit React package using the npm package manager. Requires Node.js and npm to be installed. This command fetches the package from the npm registry and installs it in the current project's `node_modules` directory. ```bash npm install @worldcoin/mini-apps-ui-kit-react ``` -------------------------------- ### Manual Installation of MiniKit-React Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/quick-start/installing.mdx Use this command with pnpm to install the MiniKit-React package. This package provides React hooks that simplify interaction with the MiniKit SDK within a React application. ```bash pnpm install @worldcoin/minikit-react ``` -------------------------------- ### Install Foundry CLI (Bash) Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This Bash command downloads and executes the official installation script for the Foundry command-line toolkit. Foundry is a suite of tools for Ethereum application development in Solidity. ```bash curl -L https://foundry.paradigm.xyz | bash ``` -------------------------------- ### Quick Start with Mini App Template Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/quick-start/installing.mdx This command uses npx to run the create-mini-app script, which bootstraps a new mini app project based on a template. It's the fastest way to begin developing a mini app for World App. ```bash npx @worldcoin/create-mini-app@latest my-first-mini-app ``` -------------------------------- ### Installing Worldcoin IDKit Library Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/world-id/quick-start/installation.mdx These snippets show how to install the Worldcoin IDKit library using different Node.js package managers. The library is required to integrate World ID verification into a web application. It needs Node.js and one of the specified package managers (npm, yarn, or pnpm) installed. ```bash npm install @worldcoin/idkit ``` ```bash yarn add @worldcoin/idkit ``` ```bash pnpm add @worldcoin/idkit ``` -------------------------------- ### Installing Sage Support Package - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/sharing/sage-qa.mdx This command installs the necessary npm package for integrating the Sage Support React component into your project. It adds the `sage-support` library to your project's dependencies. ```bash npm install sage-support ``` -------------------------------- ### Installing Project Dependencies - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This command uses the pnpm package manager to install all the required dependencies for the World ID template application. This step must be performed after cloning the repository to prepare the project for building and running. ```bash pnpm install ``` -------------------------------- ### Installing Worldcoin IDKit Package Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Provides commands to install the `@worldcoin/idkit` package using common Node.js package managers (npm, yarn, pnpm). This package is required to integrate the World ID verification widget into your frontend application. Requires Node.js and one of the package managers installed. ```bash npm install @worldcoin/idkit ``` ```bash yarn add @worldcoin/idkit ``` ```bash pnpm add @worldcoin/idkit ``` -------------------------------- ### Example Get Permissions Success Payload - JSON Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/commands/get-permissions.mdx Provides a sample JSON structure representing a successful response payload from the getPermissions command, illustrating the format of the returned permissions (e.g., notifications status), the 'success' status, timestamp, and version. ```json { "permissions": { "notifications": false }, "status": "success", "timestamp": "2025-03-11T18:21:49.741-07:00", "version": 1 } ``` -------------------------------- ### Install Foundry CLI toolkit Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/world-chain/developers/deploy.mdx This command downloads and installs the Foundry CLI toolkit, which is essential for building, testing, and interacting with Solidity smart contracts. ```bash curl -L https://foundry.paradigm.xyz | bash ``` -------------------------------- ### Starting World Chain Node with Docker Compose (Bash) Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Use this command to start the World Chain node services defined in the docker-compose.yml file. The -d flag runs the containers in detached mode (in the background), and --build ensures images are built or rebuilt as needed before starting. ```bash docker compose up -d --build ``` -------------------------------- ### Installing Worldcoin Mini Apps UI Kit (npm) - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This command installs the Worldcoin Mini Apps UI Kit React package using npm. This UI kit provides pre-built React components following World's design guidelines to accelerate mini app development. It is a required dependency for utilizing the provided UI components. ```bash npm install @worldcoin/mini-apps-ui-kit-react ``` -------------------------------- ### Install Project Dependencies - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/world-chain/developers/template.mdx Installs the required project dependencies using the pnpm package manager. Ensure pnpm (or an equivalent like npm/yarn) is installed beforehand. ```bash pnpm install ``` -------------------------------- ### Installing MiniKit-JS via npm (Bash) Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Uses the npm package manager to install the `@worldcoin/minikit-js` package. This is the core SDK dependency required for integrating Mini Apps with World App. It's typically used in Node.js or frontend projects using a bundler. ```bash npm install @worldcoin/minikit-js ``` -------------------------------- ### Installing MiniKit-React via npm (Bash) Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Uses the npm package manager to install the `@worldcoin/minikit-react` package. This package provides React-specific hooks and components to simplify integration with the MiniKit-JS SDK in React applications. It's an optional dependency for React developers. ```bash npm install @worldcoin/minikit-react ``` -------------------------------- ### Start Local Web Server - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/world-chain/developers/template.mdx Starts the local development server for the World ID template web application using pnpm. Ensure necessary environment variables (`.env` file) like app ID, action ID, WalletConnect ID, and the deployed contract address are set. ```bash pnpm dev ``` -------------------------------- ### Example World Chat Deeplink URLs (Output) Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/sharing/world-chat-qa.mdx Shows examples of the final URLs generated by the helper function for different quick action types (message draft, payment draft with amount, request draft with amount). These URLs are intended to be opened by the World App. ```plaintext // Message draft https://worldcoin.org/mini-app?app_id=app_e293fcd0565f45ca296aa317212d8741&path=%2Fjohndoe%2Fdraft%3Fmessage%3DHello // Payment draft with amount https://worldcoin.org/mini-app?app_id=app_e293fcd0565f45ca296aa317212d8741&path=%2Fjohndoe%2Fdraft%3Fpay%3D5.25 // Request draft with amount https://worldcoin.org/mini-app?app_id=app_e293fcd0565f45ca296aa317212d8741&path=%2Fjohndoe%2Fdraft%3Frequest%3D10 ``` -------------------------------- ### Installing React Hooks Package Worldcoin MiniKit bash Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Provides the pnpm command necessary to install the `@worldcoin/minikit-react` package. This package is a prerequisite for using React hooks like `useWaitForTransactionReceipt` to monitor the status of transactions sent via the Worldcoin MiniKit SDK in a React environment. ```bash pnpm i @worldcoin/minikit-react ``` -------------------------------- ### Get Cryptocurrency Prices Request cURL Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Demonstrates how to make a GET request using cURL to retrieve the latest prices of specified cryptocurrencies against specified fiat currencies using query parameters. ```bash curl -X GET "https://app-backend.worldcoin.dev/public/v1/prices?cryptoCurrencies=WLD&fiatCurrencies=USD" ``` -------------------------------- ### Checking MiniKit Installation Status React/Next.js Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This snippet shows how to use the `MiniKit.isInstalled()` method to check if the MiniKit SDK has been successfully installed and initialized, typically indicating that the application is running inside the World App. This is useful for implementing conditional logic or UI elements based on the execution environment. ```tsx // ... console.log(MiniKit.isInstalled()) ``` -------------------------------- ### Get Cryptocurrency Prices Request JavaScript Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Shows a basic structure for making a GET request using JavaScript's fetch API to query cryptocurrency prices. ```js fetch(apiUrl, { method: 'GET', }) ``` -------------------------------- ### Install IDKit Package Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/world-id/id/cloud.mdx Install the `@worldcoin/idkit` package into your project using a package manager like npm, yarn, or pnpm. This library is required for integrating the World ID verification flow into your frontend application. ```bash npm install @worldcoin/idkit ``` ```bash yarn add @worldcoin/idkit ``` ```bash pnpm add @worldcoin/idkit ``` -------------------------------- ### Installing IDKit Library - World ID - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt These snippets provide the commands to install the World ID IDKit library using different Node.js package managers: npm, yarn, and pnpm. You should choose the command corresponding to the package manager used in your project. ```bash npm install @worldcoin/idkit ``` ```bash yarn add @worldcoin/idkit ``` ```bash pnpm add @worldcoin/idkit ``` -------------------------------- ### Verify Proof - 200 OK JSON Response Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Example of a successful JSON response from the `/api/v2/verify/{app_id}` endpoint upon successful proof verification. ```json { "success": true, "action": "my_action", "nullifier_hash": "0x2bf8406809dcefb1486dadc96c0a897db9bab002053054cf64272db512c6fbd8", "created_at": "2023-02-18T11:20:39.530041+00:00" } ``` -------------------------------- ### Verify Proof - 400 User Already Verified JSON Response Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Example of a JSON response indicating the user has already successfully verified for the action previously. ```json { "code": "already_verified", "detail": "This person has already verified for this action.", "attribute": null } ``` -------------------------------- ### Example Generated DNA Deeplink URL (Bash) Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This is an example of the final deeplink URL generated by the `getDNADeeplinkUrl` function. It targets the World App mini app host with the DNA app ID and a URL-encoded path containing parameters for a specific quick action. ```bash https://worldcoin.org/mini-app?app_id=app_8e407cfbae7ae51c19b07faff837aeeb&path=%2Fwallet%3Ftab%3Dsend%26fromToken%3D0x79A02482A880bCE3F13e09Da970dC34db4CD24d1%26amount%3D1234500%26toToken%3D0x4200000000000000000000000000000000000006%26recipientAddress%3D0xRecipientAddressHere%26sourceAppId%3Dapp_a4f7f3e62c1de0b9490a5260cb390b56%26sourceDeeplinkPath%3D%252Fsome%252Fpath ``` -------------------------------- ### Running Contract Tests - bash Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This command executes the tests defined in the test directory using the Foundry test runner. It compiles the test contracts and runs the functions starting with 'test', reporting the results. ```bash forge test ``` -------------------------------- ### Send Event Listener Sign Message Command (app/page.tsx) Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Shows how to send a message signing command using MiniKit's commands property, which is part of the event listener pattern. It first checks if MiniKit is installed. ```tsx import { MiniKit, SignMessageInput } from '@worldcoin/minikit-js' const onSignMessage = () => { if (!MiniKit.isInstalled()) { return } const signMessagePayload: SignMessageInput = { message: "Hello world", }; MiniKit.commands.signMessage(signMessagePayload); }; ``` -------------------------------- ### Invoking Earn WLD Quick Action - URL Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/sharing/earn-wld-qa.mdx This code snippet provides an example of the URL scheme used to invoke the Earn WLD Quick Action. The `app_id` parameter is mandatory and specifies the unique identifier for the Earn WLD mini-app. ```URL http://worldcoin.org/mini-app?app_id=app_b0d01dd8f2bdfbff06c9e123de487eb8 ``` -------------------------------- ### Verifying Proof Request (API) Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/world-id/reference/api.mdx Provides examples for sending a POST request to the /api/v2/verify/{app_id} endpoint using cURL and JavaScript's fetch. This request is used to verify a World ID proof for a specific cloud action, requiring parameters like nullifier_hash, merkle_root, proof, verification_level, action, and signal_hash in the JSON body. Both examples include the necessary Content-Type: application/json header. ```bash curl -X POST "/api/v2/verify/{app_id}" \ -H "Content-Type: application/json" \ -d '{ "nullifier_hash": "0x2bf8406809dcefb1486dadc96c0a897db9bab002053054cf64272db512c6fbd8", "merkle_root": "0x2264a66d162d7893e12ea8e3c072c51e785bc085ad655f64c10c1a61e00f0bc2", "proof": "0x1aa8b8f3b2d2de5ff452c0e1a83e29d6bf46fb83ef35dc5957121ff3d3698a1119090fb...", "verification_level": "orb", "action": "my_action", "signal_hash": "0x00c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4" }' ``` ```js fetch(apiUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ nullifier_hash: '0x2bf8406809dcefb1486dadc96c0a897db9bab002053054cf64272db512c6fbd8', merkle_root: '0x2264a66d162d7893e12ea8e3c072c51e785bc085ad655f64c10c1a61e00f0bc2', proof: '0x1aa8b8f3b2d2de5ff452c0e1a83e29d6bf46fb83ef35dc5957121ff3d3698a1119090fb...', verification_level: 'orb', action: 'my_action', signal_hash: '0x00c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4', }), }) ``` -------------------------------- ### GraphQL Query: List World ID Apps Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Provides an example GraphQL query (`MyApps`) that fetches the `id` and `name` for all available `app` objects configured in the Developer Portal. This is a basic query demonstrating how to retrieve a list of resources. ```graphql query MyApps { app { id name } } ``` -------------------------------- ### Example Service Status API Response JSON Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This JSON object illustrates the expected structure of a response from a service status endpoint. It includes details about individual services, their status logs, uptime ratios, and overall category and system status. ```json { "services": [ { "name": "Crypto Transactions", "id": "crypto-transactions", "description": "", "categoryId": "mini-apps", "status": "ok", "logs": [ { "datetime": 1739546233, "status": "ok", "name": "Running again", "description": "Service outage" } ], "uptimeRatio": { "1": 99.7, "7": 100, "30": 100, "90": 100 } } ], "categories": [ { "id": "mini-apps", "name": "Mini Apps", "status": "ok" } ], "uptimeRatio": { "1": 98, "7": 98.7, "30": 99.6, "90": 99.9 }, "status": "ok" } ``` -------------------------------- ### Handling Notification Permission Response Event - MiniKit (tsx) Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/commands/send-notifications.mdx Provides an example of subscribing to the `ResponseEvent.MiniAppRequestPermission` event to handle the outcome of a synchronous permission request. It uses `useEffect` to manage the subscription lifecycle, checking if MiniKit is installed before subscribing. Requires `@worldcoin/minikit-js`. ```tsx import { MiniKit, tokenToDecimals, Tokens, PayCommandInput, ResponseEvent } from '@worldcoin/minikit-js' // ... useEffect(() => { if (!MiniKit.isInstalled()) { console.error("MiniKit is not installed"); return; } MiniKit.subscribe( ResponseEvent.MiniAppRequestPermission, async (response: MiniAppRequestPermissionPayload) => { if (response.status == "success") { const response = await res.json(); // Handle the response } } ); return () => { MiniKit.unsubscribe(ResponseEvent.MiniAppRequestPermission); }; }, []); ``` -------------------------------- ### Create New Foundry Project (Bash) Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt This Bash command initializes a new Foundry project named 'hello-world-chain' in the current directory and then navigates into the newly created project directory. This sets up the standard Foundry project structure. ```bash forge init hello-world-chain && cd hello-world-chain ``` -------------------------------- ### Implement Backend Proof Verification Route - TypeScript Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/commands/verify.mdx Provides an example of a backend route (using Next.js API routes) for securely verifying the proof received from the mini app. It uses `verifyCloudProof` from `@worldcoin/minikit-js` and handles both verification success and failure. ```ts import { NextRequest, NextResponse } from 'next/server'; import { verifyCloudProof, IVerifyResponse, ISuccessResult } from '@worldcoin/minikit-js'; interface IRequestPayload { payload: ISuccessResult; action: string; signal: string | undefined; } export async function POST(req: NextRequest) { const { payload, action, signal } = (await req.json()) as IRequestPayload; const app_id = process.env.APP_ID as `app_${string}`; const verifyRes = (await verifyCloudProof(payload, app_id, action, signal)) as IVerifyResponse; // Wrapper on this if (verifyRes.success) { // This is where you should perform backend actions if the verification succeeds // Such as, setting a user as "verified" in a database return NextResponse.json({ verifyRes, status: 200 }); } else { // This is where you should handle errors from the World ID /verify endpoint. // Usually these errors are due to a user having already verified. return NextResponse.json({ verifyRes, status: 400 }); } } ``` -------------------------------- ### Accessing VUNI Mini-App via Worldcoin Quick Actions Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/sharing/vuni-qa.mdx These examples demonstrate how to construct URLs to launch the VUNI mini-app using Worldcoin Quick Actions. The base URL is `https://worldcoin.org/mini-app`, and parameters like `app_id` and `path` are used to navigate to specific sections or pass configuration. ```text # Access pools with trades tab https://worldcoin.org/mini-app?app_id=app_10ca32093aa9ad0e52bc812d63daf818&path=%2Fpool%3Ftab%3Dtrades ``` ```text # View investor info with referrals tab https://worldcoin.org/mini-app?app_id=app_10ca32093aa9ad0e52bc812d63daf818&path=%2Finvestor%2F0x6917A2418aBDc514E1745207200bFbA75E1dfd6E%3Ftab%3Dreferrals ``` ```text # Access with referral code https://worldcoin.org/mini-app?app_id=app_10ca32093aa9ad0e52bc812d63daf818&path=%3Fref%3DGD9WWI ``` ```text # Access pools with stats tab (localized) https://worldcoin.org/mini-app?app_id=app_10ca32093aa9ad0e52bc812d63daf818&path=%2Fen%2Fpool%3Ftab%3Dstats ``` -------------------------------- ### Querying Worldcoin Status API with cURL Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/reference/status-page.mdx This snippet shows how to make a GET request to the Worldcoin status API using the cURL command-line tool. It includes the `logs=true` query parameter to request historical status information for each service. This requires cURL installed on the system. ```bash curl -X GET "https://status.worldcoin.org/api/services?logs=true" ``` -------------------------------- ### Get Cryptocurrency Prices Response JSON Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt An abridged example of the JSON response object for the price query endpoint. It shows the structure containing prices for different crypto assets (WLD, USDCE) against fiat currencies (USD), including amount and decimal values. ```json { "result": { "prices": { "WLD": { "USD": { "asset": "USD", "amount": "1510763", "decimals": 6, "symbol": "USD" } }, "USDCE": { "USD": { "asset": "USD", "amount": "1000058", "decimals": 6, "symbol": "USD" } } } } } ``` -------------------------------- ### Cloning World Chain Node Repository - Bash Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/world-chain/reference/node-setup.mdx This snippet clones the `simple-worldchain-node` repository from GitHub, navigates into the created directory, and copies the example environment file to `.env`. Required dependencies are Git. The outcome is a local copy of the repository with a configuration file ready for editing. ```bash git clone https://github.com/worldcoin-foundation/simple-worldchain-node.git cd simple-worldchain-node cp .env.example .env ``` -------------------------------- ### Constructing World Companies Finder Quick Action URL - Plaintext Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/mini-apps/sharing/world-companies-finder-qa.mdx This snippet provides an example URL demonstrating how to use the World Companies Finder Quick Action. It shows the base URL, the required application ID (`app_id`), and the `path=new` parameter to link directly to the page for adding a new business. ```Plaintext https://worldcoin.org/mini-app?app_id=app_a11be267c4baa35bca6d18b3cdd6a23c&path=new ``` -------------------------------- ### OIDC Authorization Request URL (HTTP) Source: https://github.com/worldcoin/world-id-docs/blob/main/public/llms-full.txt Provides an example URL for initiating the OpenID Connect authorization flow via the /authorize endpoint. This GET request includes required query parameters like redirect_uri, response_type, scope, and client_id, directing the user to the World ID sign-in page. ```http https://id.worldcoin.org/authorize?redirect_uri=https%3A%2F%2Fdocs.worldcoin.org%2Fworld-id%2Ftry-callback&response_type=code&scope=openid+profile+email&client_id=app_ce4cb73cb75fc3b73b71ffb4de178410 ``` -------------------------------- ### Programmatically Opening IDKit Widget using React Hook Source: https://github.com/worldcoin/world-id-docs/blob/main/src/pages/world-id/reference/idkit.mdx This snippet demonstrates how to use the useIDKit hook to programmatically control the IDKit widget's visibility from within a React component. It shows how to get the `open` and `setOpen` functions from the hook and trigger the widget, for example, within a useEffect hook, while still requiring the IDKitWidget component to be mounted somewhere in the application. ```JSX import { IDKitWidget, useIDKit } from '@worldcoin/idkit' const { open, setOpen } = useIDKit() useEffect(() => { setOpen(true) }, []) return (