diff --git a/.cursor/rules/Metal_documentation.mdc b/.cursor/rules/Metal_documentation.mdc
new file mode 100644
index 0000000..13cf7c8
--- /dev/null
+++ b/.cursor/rules/Metal_documentation.mdc
@@ -0,0 +1,204 @@
+---
+description: Referring to the documentation
+globs:
+alwaysApply: false
+---
+# Metal Token Cloud API Documentation
+
+## Overview
+Metal is the simplest way to tokenize your app. Create and distribute tokens to your users in a few lines of code. We manage all the crypto complexity behind a set of simple APIs, so you can focus on building amazing user experiences.
+
+## Why Tokenize?
+
+### Benefits
+- **Increase Engagement**: Use tokens to incentivize active user engagement
+- **Distribute Tokens**: Encourage higher quality user-generated content
+- **Increase Retention**: Users that earn while using your app are more likely to return
+- **Earn Fees**: Earn a 0.5% fee every time tokens are bought and sold
+
+## API Endpoints
+
+### Merchant API
+
+#### Create Token
+**Endpoint**: `POST api.metal.build/merchant/create-token`
+
+##### Required Attributes
+| Name | Type | Description |
+|------|------|-------------|
+| `name` | string | The name for your token (e.g., "Test Token") |
+| `symbol` | string | The ticker symbol for your token (e.g., "TEST") |
+
+##### Optional Attributes
+| Name | Type | Description |
+|------|------|-------------|
+| `canDistribute` | boolean | Enable distribution functionality for this token |
+| `canLP` | boolean | Enable liquidity pool creation for this token |
+| `merchantAddress` | string | Address to receive merchant token allocation (fixed at 5% of total supply) |
+
+##### Example Request
+```javascript
+const response = await fetch('https://api.metal.build/merchant/create-token', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': 'YOUR-API-KEY',
+ },
+ body: JSON.stringify({
+ name: 'Test Token',
+ symbol: 'TEST',
+ merchantAddress: '0x1234567890abcdef1234567890abcdef12345678',
+ canDistribute: true,
+ canLP: true
+ }),
+})
+
+const token = await response.json()
+```
+
+##### Check Token Creation Status
+**Endpoint**: `GET api.metal.build/merchant/create-token/status/:jobId`
+
+### Token API
+
+#### Get Token with Holders
+**Endpoint**: `GET api.metal.build/token/:address`
+
+##### Response Attributes
+| Name | Type | Description |
+|------|------|-------------|
+| `id` | string | Token ID |
+| `address` | string | Contract address |
+| `name` | string | Token name |
+| `symbol` | string | Ticker symbol |
+| `totalSupply` | number | Total token supply |
+| `price` | number | Current token price in USD |
+| `holders` | array | List of token holders |
+
+#### Distribute Tokens
+Distribute tokens to your users on Base. This endpoint allows you to distribute tokens from your app balance to specified addresses.
+**Endpoint**: `POST api.metal.build/token/:address/distribute`
+
+##### Required Attributes
+| Name | Type | Description |
+|------|------|-------------|
+| `sendTo` | string | Recipient address |
+| `amount` | number | Number of tokens to distribute |
+
+##### Example Request
+```javascript
+const response = await fetch(
+ 'https://api.metal.build/token/0x1234567890abcdef1234567890abcdef12345678/distribute',
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': 'YOUR-API-KEY',
+ },
+ body: JSON.stringify({
+ sendTo: '0xabcdef1234567890abcdef1234567890abcdef12',
+ amount: 100
+ }),
+ }
+)
+
+const distribute = await response.json()
+```
+
+### Holder API
+
+#### Get Holder
+This endpoint returns all token balances and related information for a specific holder.
+**Endpoint**: `GET api.metal.build/holder/:id?publicKey=:publicKey`
+
+##### Response Attributes
+| Name | Type | Description |
+|------|------|-------------|
+| `id` | string | Holder ID |
+| `address` | string | Holder's address |
+| `totalValue` | number | Total value of token holdings in USD |
+| `tokens` | array | List of token holdings |
+
+#### Get or Create Holder
+Get Or Create a holder for your organization. Holder wallets can be created for your customers with an external id of your choice.
+**Endpoint**: `PUT api.metal.build/holder/:userId`
+##### Example Request
+```javascript
+const response = await fetch(`https://api.metal.build/holder/${userId}`, {
+method: 'PUT',
+headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': 'YOUR-API-KEY',
+ },
+})
+
+const holder = await response.json()
+```
+
+#### Withdraw Tokens
+This endpoint allows you to withdraw tokens from a holders account to a specified address.
+**Endpoint**: `POST api.metal.build/holder/:userId/withdraw`
+
+##### Required Attributes
+| Name | Type | Description |
+|------|------|-------------|
+| `tokenAddress` | string | Token contract address |
+| `amount` | number | Amount to withdraw |
+| `toAddress` | string | Destination address |
+
+##### Example Request
+```javascript
+const response = await fetch(
+ `https://api.metal.build/holder/${userId}/withdraw`,
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': 'YOUR-API-KEY',
+ },
+ body: JSON.stringify({
+ tokenAddress: '0x191d25c061C081583E616d8978eA670f45A803E5',
+ amount: 123,
+ toAddress: '0x191d25c061C081583E616d8978eA670f45A12345',
+ }),
+ }
+)
+
+const withdraw = await response.json()
+```
+
+#### Spend Tokens
+This endpoint allows you to spend tokens from a holders account.
+**Endpoint**: `POST api.metal.build/holder/:userId/spend`
+
+##### Required Attributes
+| Name | Type | Description |
+|------|------|-------------|
+| `tokenAddress` | string | Token contract address |
+| `amount` | number | Amount to spend |
+##### Example Request
+```javascript
+const response = await fetch(
+ `https://api.metal.build/holder/${userId}/spend`,
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': 'YOUR-API-KEY',
+ },
+ body: JSON.stringify({
+ tokenAddress: '0x191d25c061C081583E616d8978eA670f45A803E5',
+ amount: 123,
+ }),
+ }
+)
+
+const spend = await response.json()
+```
+## Authentication
+- Use the `x-api-key` header with your API key for all requests
+- API keys can be obtained from Metal
+
+## Notes
+- All examples use placeholder addresses and should be replaced with actual values
+- Ensure you have the necessary permissions and API key before making requests
\ No newline at end of file
diff --git a/.cursor/rules/coding-preferences.mdc b/.cursor/rules/coding-preferences.mdc
new file mode 100644
index 0000000..4731021
--- /dev/null
+++ b/.cursor/rules/coding-preferences.mdc
@@ -0,0 +1,18 @@
+---
+description:
+globs:
+alwaysApply: true
+---
+# Coding pattern preferences
+
+– Always prefer simple solutions
+– Avoid duplication of code whenever possible, which means checking for other areas of the codebase that might already have similar code and functionality
+– Write code that takes into account the different environments: dev, test, and prod
+– You are careful to only make changes that are requested or you are confident are well understood and related to the change being requested
+– When fixing an issue or bug, do not introduce a new pattern or technology without first exhausting all options for the existing implementation. And if you finally do this, make sure to remove the old implementation afterwards so we don’t have duplicate logic.
+– Keep the codebase very clean and organized
+– Avoid writing scripts in files if possible, especially if the script is likely only to be run once
+– Avoid having files over 200–300 lines of code. Refactor at that point.
+– Mocking data is only needed for tests, never mock data for dev or prod
+– Never add stubbing or fake data patterns to code that affects the dev or prod environments
+– Never overwrite my .env file without first asking and confirming
\ No newline at end of file
diff --git a/.cursor/rules/description.mdc b/.cursor/rules/description.mdc
new file mode 100644
index 0000000..8491012
--- /dev/null
+++ b/.cursor/rules/description.mdc
@@ -0,0 +1,30 @@
+---
+description: Project Overview
+globs:
+alwaysApply: false
+---
+# AdNet Protocol
+
+AdNet Protocol is a decentralized, IoT-enabled Web3 advertising platform bridging Advertising Companies (AC) and Ad Service Providers (ASP), leveraging blockchain technology and verifiable ad analytics.
+
+## Overview
+
+The platform provides IoT-based **Proof-of-View (PoV)** via ESP32-CAM modules and **Proof-of-Tap (PoT)** via NFC-enabled (PN532) IoT devices. It ensures transparent, accountable, and performance-based distribution of advertising funds (ADC tokens) using **Metal APIs**, secure identity verification via **Self Protocol**, and real-time blockchain event handling via **Nodit** integrations.
+
+## Key Features
+
+- **ASP & AC Portals:** Separate web dashboards with seamless wallet management via Privy and Metal API.
+- **IoT Modules (ESP32-CAM & PN532 NFC):** Real-time ad analytics capturing viewer impressions (PoV) and direct user engagements (PoT).
+- **Automated Token Distribution:** Nodit Webhooks trigger automatic payouts through Metal API, ensuring timely and accurate payments based on verified metrics.
+- **Privacy-Preserving Verification:** Self Protocol enables zero-knowledge identity verification, ensuring regulatory compliance without compromising user privacy.
+
+## Technologies Integrated
+
+- **Metal:** Dynamic wallet creation, token management, automated reward distribution.
+- **Self Protocol:** Regulatory-compliant, zero-knowledge-based identity verification.
+- **Nodit:** Real-time frontend updates via blockchain event webhooks and automated backend payment triggers.
+- **Privy Wallet:** Smooth user onboarding, wallet management, and secure transactions.
+
+## Objective
+
+AdNet Protocol optimizes ad spend, increases transparency, reduces fraud, and enhances consumer engagement—transforming traditional advertising through verifiable, blockchain-based interactions.
diff --git a/.cursor/rules/project-flow.mdc b/.cursor/rules/project-flow.mdc
new file mode 100644
index 0000000..63ec865
--- /dev/null
+++ b/.cursor/rules/project-flow.mdc
@@ -0,0 +1,93 @@
+---
+description: Project flow
+globs:
+alwaysApply: false
+---
+# ✅ **AdNet Protocol User Flows
+
+## **1. Ad Service Provider (ASP) Flow**
+
+**Step 1: Registration & Verification**
+- **Action:** Signs in via **Privy Wallet**.
+- **Backend:** Privy creates user session → **Metal API** dynamically creates custodial wallet → **Self Protocol** for verification (age/country/OFAC).
+
+**Step 2: Adding Ad Locations**
+- **Action:** ASP submits new location details.
+- **Backend:** Unique ASP Location ID assigned → IoT module registered → IoT device keys securely stored for oracle verification.
+
+**Step 3: IoT Module Activation**
+- **Action:** ASP sets up ESP32-CAM & ESP32+PN532 at location.
+- **Backend:** Modules connect via MQTT → begin sending Proof-of-View (PoV) and Proof-of-Tap (PoT) data.
+
+**Step 4: Earnings Accumulation**
+- **Action:** ASP monitors earnings dashboard.
+- **Backend:** Oracle receives IoT events, writes verified data on-chain → **Nodit** listens for these on-chain events, triggers backend webhook instantly → backend calculates earnings → uses **Metal API** to credit ASP wallets automatically.
+
+**Step 5: Withdraw Earnings**
+- **Action:** ASP initiates withdrawal.
+- **Backend:** **Metal API** securely transfers ADC from custodial wallet to ASP’s external wallet.
+
+---
+
+## **2. Advertising Company (AC) Flow**
+
+**Step 1: Registration & Verification**
+- **Action:** AC signs in via **Privy Wallet**.
+- **Backend:** Privy session created → **Metal API** dynamically creates wallet → **Self Protocol** verifies AC identity.
+
+**Step 2: Fund Wallet (USDC → ADC)**
+- **Action:** AC funds wallet with USDC.
+- **Backend:** Funds deposited → backend uses **Metal API** to auto-exchange USDC into ADC tokens.
+
+**Step 3: Create Ad Campaign**
+- **Action:** AC defines campaign parameters, selects ASP locations, uploads custom URLs for airdrop/rewards.
+- **Backend:** Smart contract via **Metal API** escrow-locks ADC tokens → backend assigns IoT modules, schedules URL pushes via MQTT to PN532 NFC writer.
+
+**Step 4: Campaign Monitoring**
+- **Action:** AC views real-time analytics dashboard.
+- **Backend:** IoT events verified by oracle, written on-chain → **Nodit Webhooks** instantly notify backend → dashboard state updates in real-time.
+
+**Step 5: Campaign Completion & Settlement**
+- **Action:** Campaign ends or budget exhausted.
+- **Backend:** Final analytics via **Nodit** aggregated → backend auto-calculates payouts → triggers **Metal API** to release ADC to ASP wallets based on verified data.
+
+---
+
+## **3. Customer Flow**
+
+**Step 1: Ad Interaction**
+- **Action:** Customer views ad, taps NFC module.
+- **Backend:** PN532 module (ESP32) reveals URL → URL directs to customer engagement page.
+
+**Step 2: Identity Verification (Optional Reward Claim)**
+- **Action:** Customer performs quick verification via **Self Protocol**.
+- **Backend:** Self Protocol returns verification status (ZKP).
+
+**Step 3: Reward Distribution**
+- **Action:** Customer claims reward (ADC tokens or incentives).
+- **Backend:** Reward claim verified → **Metal API** dynamically credits tokens from AC escrow directly to customer wallet.
+
+**Step 4: Engagement & Analytics**
+- **Action:** Customer optionally continues engaging via app.
+- **Backend:** Engagement metrics anonymized, recorded → future reward offers dynamically personalized (off-chain).
+
+---
+
+## ⚙️ **Concise Backend Integration Recap**
+
+- **Privy:** User onboarding, wallet/session management.
+- **Metal:** Token creation, wallet management, escrow, automated reward distribution.
+- **Self Protocol:** Identity verification (age/country/OFAC).
+- **Nodit:**
+ - **Trigger Payments:** Instantly triggers backend webhooks upon oracle recording new Proof-of-View/Tap on-chain events → backend calls Metal API to initiate payouts.
+ - **Real-time Dashboard:** Webhook events from Nodit immediately update frontend dashboards with latest PoV & PoT analytics.
+- **ESP32-CAM + PN532 NFC:** IoT modules capture and verify ad interactions (PoV & PoT).
+- **ThingSpeak/MQTT/Oracle:** IoT data relay & verification pipeline.
+
+---
+
+This clearly emphasizes Nodit’s critical role:
+- **Real-time payment triggers** (Metal API).
+- **Instant frontend dashboard updates** (webhook-driven UI state management).
+
+Your implementation now accurately reflects the important Web3 integrations and IoT interactions in a practical, scalable, and robust manner.
\ No newline at end of file
diff --git a/package.json b/package.json
index 32405f8..30eee5a 100644
--- a/package.json
+++ b/package.json
@@ -27,14 +27,15 @@
"@radix-ui/react-switch": "^1.1.3",
"@radix-ui/react-tabs": "^1.1.3",
"@radix-ui/react-tooltip": "^1.1.8",
- "@selfxyz/core": "^0.0.19",
- "@selfxyz/qrcode": "^0.0.17",
+ "@selfxyz/core": "^0.0.24",
+ "@selfxyz/qrcode": "^0.0.19",
"@types/nprogress": "^0.2.3",
"@wagmi/core": "^2.16.7",
"abitype": "^1.0.8",
"axios": "^1.6.8",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
+ "core@latest": "link:selfxyz/core@latest",
"dotenv": "^16.4.5",
"leaflet": "^1.9.4",
"lucide-react": "^0.483.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4457734..c731dd8 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -10,10 +10,10 @@ importers:
dependencies:
'@prisma/client':
specifier: ^6.5.0
- version: 6.5.0(prisma@6.5.0(typescript@5.8.2))(typescript@5.8.2)
+ version: 6.5.0(prisma@6.5.0(typescript@5.8.3))(typescript@5.8.3)
'@privy-io/react-auth':
specifier: ^2.7.0
- version: 2.8.2(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(@types/react@19.1.0)(bs58@6.0.0)(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(use-sync-external-store@1.2.0(react@19.1.0))(utf-8-validate@5.0.10)(zod@3.24.2)
+ version: 2.8.2(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(@types/react@19.1.0)(bs58@6.0.0)(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(use-sync-external-store@1.2.0(react@19.1.0))(utf-8-validate@5.0.10)(zod@3.24.2)
'@radix-ui/react-alert-dialog':
specifier: ^1.1.6
version: 1.1.6(@types/react-dom@19.1.1(@types/react@19.1.0))(@types/react@19.1.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
@@ -63,20 +63,20 @@ importers:
specifier: ^1.1.8
version: 1.1.8(@types/react-dom@19.1.1(@types/react@19.1.0))(@types/react@19.1.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
'@selfxyz/core':
- specifier: ^0.0.19
- version: 0.0.19(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)
+ specifier: ^0.0.24
+ version: 0.0.24(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)
'@selfxyz/qrcode':
- specifier: ^0.0.17
- version: 0.0.17(bufferutil@4.0.9)(lottie-react@2.4.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)
+ specifier: ^0.0.19
+ version: 0.0.19(bufferutil@4.0.9)(lottie-react@2.4.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)
'@types/nprogress':
specifier: ^0.2.3
version: 0.2.3
'@wagmi/core':
specifier: ^2.16.7
- version: 2.16.7(@types/react@19.1.0)(react@19.1.0)(typescript@5.8.2)(use-sync-external-store@1.2.0(react@19.1.0))(viem@2.25.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2))
+ version: 2.16.7(@types/react@19.1.0)(react@19.1.0)(typescript@5.8.3)(use-sync-external-store@1.2.0(react@19.1.0))(viem@2.25.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2))
abitype:
specifier: ^1.0.8
- version: 1.0.8(typescript@5.8.2)(zod@3.24.2)
+ version: 1.0.8(typescript@5.8.3)(zod@3.24.2)
axios:
specifier: ^1.6.8
version: 1.8.4
@@ -86,6 +86,9 @@ importers:
clsx:
specifier: ^2.1.1
version: 2.1.1
+ core@latest:
+ specifier: link:selfxyz/core@latest
+ version: link:selfxyz/core@latest
dotenv:
specifier: ^16.4.5
version: 16.4.7
@@ -124,7 +127,7 @@ importers:
version: 3.1.0
ts-node:
specifier: ^10.9.2
- version: 10.9.2(@types/node@20.17.30)(typescript@5.8.2)
+ version: 10.9.2(@types/node@20.17.30)(typescript@5.8.3)
tw-animate-css:
specifier: ^1.2.4
version: 1.2.5
@@ -133,7 +136,7 @@ importers:
version: 11.1.0
viem:
specifier: ^2.23.15
- version: 2.25.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ version: 2.25.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
zustand:
specifier: ^5.0.3
version: 5.0.3(@types/react@19.1.0)(react@19.1.0)(use-sync-external-store@1.2.0(react@19.1.0))
@@ -143,7 +146,7 @@ importers:
version: 3.3.1
'@tailwindcss/postcss':
specifier: ^4
- version: 4.1.2
+ version: 4.1.3
'@types/leaflet':
specifier: ^1.9.17
version: 1.9.17
@@ -161,22 +164,22 @@ importers:
version: 3.6.0
eslint:
specifier: ^9
- version: 9.23.0(jiti@2.4.2)
+ version: 9.24.0(jiti@2.4.2)
eslint-config-next:
specifier: 15.2.3
- version: 15.2.3(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
+ version: 15.2.3(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)
prisma:
specifier: ^6.5.0
- version: 6.5.0(typescript@5.8.2)
+ version: 6.5.0(typescript@5.8.3)
react-day-picker:
specifier: ^8.10.1
version: 8.10.1(date-fns@3.6.0)(react@19.1.0)
tailwindcss:
specifier: ^4
- version: 4.1.2
+ version: 4.1.3
typescript:
specifier: ^5
- version: 5.8.2
+ version: 5.8.3
packages:
@@ -379,8 +382,8 @@ packages:
resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
- '@eslint/config-array@0.19.2':
- resolution: {integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==}
+ '@eslint/config-array@0.20.0':
+ resolution: {integrity: sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/config-helpers@0.2.1':
@@ -399,8 +402,8 @@ packages:
resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- '@eslint/js@9.23.0':
- resolution: {integrity: sha512-35MJ8vCPU0ZMxo7zfev2pypqTwWTofFZO6m4KAtdoFhRpLJUpHTZZ+KB3C7Hb1d7bULYwO4lJXGCi5Se+8OMbw==}
+ '@eslint/js@9.24.0':
+ resolution: {integrity: sha512-uIY/y3z0uvOGX8cp1C2fiC4+ZmBhp6yZWkojtHL1YEMnRt1Y63HB9TM17proGEmeG7HeUY+UP36F0aknKYTpYA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/object-schema@2.1.6':
@@ -1490,14 +1493,13 @@ packages:
'@scure/bip39@1.5.4':
resolution: {integrity: sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==}
- '@selfxyz/core@0.0.19':
- resolution: {integrity: sha512-jr1AAqSxF+RHDlzLDdoESnoQtNLzkZmtQVmQ6KtlvRBCUIAHQuF3EA41DVdirb1iz4CJDJWQuAW42OjmGj+ThQ==}
+ '@selfxyz/core@0.0.24':
+ resolution: {integrity: sha512-ijYsaGPdvq9/r31JVS7dETyeBCC0phuUn1GpkI1P2mBRS/qfcq/ZhlGUDw5Zuo4Wbfg0ov49Oxq8Nw6U/p7rRw==}
peerDependencies:
- react: ^18.0.0
- react-dom: ^18.0.0
+ react: '>=16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0'
- '@selfxyz/qrcode@0.0.17':
- resolution: {integrity: sha512-+cTocwGVIMFeDaNabxZrcx+1GfqnD96gFPRuE+fC7dtH02TniAVf5eGPWgLzMHLoBrFsvcy57es/8jZlwuhw/g==}
+ '@selfxyz/qrcode@0.0.19':
+ resolution: {integrity: sha512-blqfkG6iu5olofT4wrshgYDj5H2Zp/45mWVlwj697oVAl+VOQkYwoYioJABVm/85pRnvdpeAULB3UJ39/+Gaig==}
peerDependencies:
lottie-react: ^2.4.0
react: ^18.0.0
@@ -1560,81 +1562,81 @@ packages:
'@swc/helpers@0.5.5':
resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==}
- '@tailwindcss/node@4.1.2':
- resolution: {integrity: sha512-ZwFnxH+1z8Ehh8bNTMX3YFrYdzAv7JLY5X5X7XSFY+G9QGJVce/P9xb2mh+j5hKt8NceuHmdtllJvAHWKtsNrQ==}
+ '@tailwindcss/node@4.1.3':
+ resolution: {integrity: sha512-H/6r6IPFJkCfBJZ2dKZiPJ7Ueb2wbL592+9bQEl2r73qbX6yGnmQVIfiUvDRB2YI0a3PWDrzUwkvQx1XW1bNkA==}
- '@tailwindcss/oxide-android-arm64@4.1.2':
- resolution: {integrity: sha512-IxkXbntHX8lwGmwURUj4xTr6nezHhLYqeiJeqa179eihGv99pRlKV1W69WByPJDQgSf4qfmwx904H6MkQqTA8w==}
+ '@tailwindcss/oxide-android-arm64@4.1.3':
+ resolution: {integrity: sha512-cxklKjtNLwFl3mDYw4XpEfBY+G8ssSg9ADL4Wm6//5woi3XGqlxFsnV5Zb6v07dxw1NvEX2uoqsxO/zWQsgR+g==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [android]
- '@tailwindcss/oxide-darwin-arm64@4.1.2':
- resolution: {integrity: sha512-ZRtiHSnFYHb4jHKIdzxlFm6EDfijTCOT4qwUhJ3GWxfDoW2yT3z/y8xg0nE7e72unsmSj6dtfZ9Y5r75FIrlpA==}
+ '@tailwindcss/oxide-darwin-arm64@4.1.3':
+ resolution: {integrity: sha512-mqkf2tLR5VCrjBvuRDwzKNShRu99gCAVMkVsaEOFvv6cCjlEKXRecPu9DEnxp6STk5z+Vlbh1M5zY3nQCXMXhw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
- '@tailwindcss/oxide-darwin-x64@4.1.2':
- resolution: {integrity: sha512-BiKUNZf1A0pBNzndBvnPnBxonCY49mgbOsPfILhcCE5RM7pQlRoOgN7QnwNhY284bDbfQSEOWnFR0zbPo6IDTw==}
+ '@tailwindcss/oxide-darwin-x64@4.1.3':
+ resolution: {integrity: sha512-7sGraGaWzXvCLyxrc7d+CCpUN3fYnkkcso3rCzwUmo/LteAl2ZGCDlGvDD8Y/1D3ngxT8KgDj1DSwOnNewKhmg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
- '@tailwindcss/oxide-freebsd-x64@4.1.2':
- resolution: {integrity: sha512-Z30VcpUfRGkiddj4l5NRCpzbSGjhmmklVoqkVQdkEC0MOelpY+fJrVhzSaXHmWrmSvnX8yiaEqAbdDScjVujYQ==}
+ '@tailwindcss/oxide-freebsd-x64@4.1.3':
+ resolution: {integrity: sha512-E2+PbcbzIReaAYZe997wb9rId246yDkCwAakllAWSGqe6VTg9hHle67hfH6ExjpV2LSK/siRzBUs5wVff3RW9w==}
engines: {node: '>= 10'}
cpu: [x64]
os: [freebsd]
- '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.2':
- resolution: {integrity: sha512-w3wsK1ChOLeQ3gFOiwabtWU5e8fY3P1Ss8jR3IFIn/V0va3ir//hZ8AwURveS4oK1Pu6b8i+yxesT4qWnLVUow==}
+ '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.3':
+ resolution: {integrity: sha512-GvfbJ8wjSSjbLFFE3UYz4Eh8i4L6GiEYqCtA8j2Zd2oXriPuom/Ah/64pg/szWycQpzRnbDiJozoxFU2oJZyfg==}
engines: {node: '>= 10'}
cpu: [arm]
os: [linux]
- '@tailwindcss/oxide-linux-arm64-gnu@4.1.2':
- resolution: {integrity: sha512-oY/u+xJHpndTj7B5XwtmXGk8mQ1KALMfhjWMMpE8pdVAznjJsF5KkCceJ4Fmn5lS1nHMCwZum5M3/KzdmwDMdw==}
+ '@tailwindcss/oxide-linux-arm64-gnu@4.1.3':
+ resolution: {integrity: sha512-35UkuCWQTeG9BHcBQXndDOrpsnt3Pj9NVIB4CgNiKmpG8GnCNXeMczkUpOoqcOhO6Cc/mM2W7kaQ/MTEENDDXg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
- '@tailwindcss/oxide-linux-arm64-musl@4.1.2':
- resolution: {integrity: sha512-k7G6vcRK/D+JOWqnKzKN/yQq1q4dCkI49fMoLcfs2pVcaUAXEqCP9NmA8Jv+XahBv5DtDjSAY3HJbjosEdKczg==}
+ '@tailwindcss/oxide-linux-arm64-musl@4.1.3':
+ resolution: {integrity: sha512-dm18aQiML5QCj9DQo7wMbt1Z2tl3Giht54uVR87a84X8qRtuXxUqnKQkRDK5B4bCOmcZ580lF9YcoMkbDYTXHQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
- '@tailwindcss/oxide-linux-x64-gnu@4.1.2':
- resolution: {integrity: sha512-fLL+c678TkYKgkDLLNxSjPPK/SzTec7q/E5pTwvpTqrth867dftV4ezRyhPM5PaiCqX651Y8Yk0wRQMcWUGnmQ==}
+ '@tailwindcss/oxide-linux-x64-gnu@4.1.3':
+ resolution: {integrity: sha512-LMdTmGe/NPtGOaOfV2HuO7w07jI3cflPrVq5CXl+2O93DCewADK0uW1ORNAcfu2YxDUS035eY2W38TxrsqngxA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
- '@tailwindcss/oxide-linux-x64-musl@4.1.2':
- resolution: {integrity: sha512-0tU1Vjd1WucZ2ooq6y4nI9xyTSaH2g338bhrqk+2yzkMHskBm+pMsOCfY7nEIvALkA1PKPOycR4YVdlV7Czo+A==}
+ '@tailwindcss/oxide-linux-x64-musl@4.1.3':
+ resolution: {integrity: sha512-aalNWwIi54bbFEizwl1/XpmdDrOaCjRFQRgtbv9slWjmNPuJJTIKPHf5/XXDARc9CneW9FkSTqTbyvNecYAEGw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
- '@tailwindcss/oxide-win32-arm64-msvc@4.1.2':
- resolution: {integrity: sha512-r8QaMo3QKiHqUcn+vXYCypCEha+R0sfYxmaZSgZshx9NfkY+CHz91aS2xwNV/E4dmUDkTPUag7sSdiCHPzFVTg==}
+ '@tailwindcss/oxide-win32-arm64-msvc@4.1.3':
+ resolution: {integrity: sha512-PEj7XR4OGTGoboTIAdXicKuWl4EQIjKHKuR+bFy9oYN7CFZo0eu74+70O4XuERX4yjqVZGAkCdglBODlgqcCXg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
- '@tailwindcss/oxide-win32-x64-msvc@4.1.2':
- resolution: {integrity: sha512-lYCdkPxh9JRHXoBsPE8Pu/mppUsC2xihYArNAESub41PKhHTnvn6++5RpmFM+GLSt3ewyS8fwCVvht7ulWm6cw==}
+ '@tailwindcss/oxide-win32-x64-msvc@4.1.3':
+ resolution: {integrity: sha512-T8gfxECWDBENotpw3HR9SmNiHC9AOJdxs+woasRZ8Q/J4VHN0OMs7F+4yVNZ9EVN26Wv6mZbK0jv7eHYuLJLwA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
- '@tailwindcss/oxide@4.1.2':
- resolution: {integrity: sha512-Zwz//1QKo6+KqnCKMT7lA4bspGfwEgcPAHlSthmahtgrpKDfwRGk8PKQrW8Zg/ofCDIlg6EtjSTKSxxSufC+CQ==}
+ '@tailwindcss/oxide@4.1.3':
+ resolution: {integrity: sha512-t16lpHCU7LBxDe/8dCj9ntyNpXaSTAgxWm1u2XQP5NiIu4KGSyrDJJRlK9hJ4U9yJxx0UKCVI67MJWFNll5mOQ==}
engines: {node: '>= 10'}
- '@tailwindcss/postcss@4.1.2':
- resolution: {integrity: sha512-vgkMo6QRhG6uv97im6Y4ExDdq71y9v2IGZc+0wn7lauQFYJM/1KdUVhrOkexbUso8tUsMOWALxyHVkQEbsM7gw==}
+ '@tailwindcss/postcss@4.1.3':
+ resolution: {integrity: sha512-6s5nJODm98F++QT49qn8xJKHQRamhYHfMi3X7/ltxiSQ9dyRsaFSfFkfaMsanWzf+TMYQtbk8mt5f6cCVXJwfg==}
'@tanstack/react-virtual@3.13.6':
resolution: {integrity: sha512-WT7nWs8ximoQ0CDx/ngoFP7HbQF9Q2wQe4nh2NB+u2486eX3nZRE40P9g6ccCVq7ZfTSH5gFOuCoVH5DLNS/aA==}
@@ -2227,8 +2229,8 @@ packages:
camelize@1.0.1:
resolution: {integrity: sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==}
- caniuse-lite@1.0.30001710:
- resolution: {integrity: sha512-B5C0I0UmaGqHgo5FuqJ7hBd4L57A4dDD+Xi+XX1nXOoxGeDdY4Ko38qJYOyqznBVJEqON5p8P1x5zRR3+rsnxA==}
+ caniuse-lite@1.0.30001712:
+ resolution: {integrity: sha512-MBqPpGYYdQ7/hfKiet9SCI+nmN5/hp4ZzveOJubl5DTAMa5oggjAuoi0Z4onBpKPFI2ePGnQuQIzF3VxDjDJig==}
canonicalize@2.1.0:
resolution: {integrity: sha512-F705O3xrsUtgt98j7leetNhTWPe+5S72rlL5O4jA1pKqBVQ/dT1O1D6PFxmSXvc0SUOinWS57DKx0I3CHrXJHQ==}
@@ -2672,8 +2674,8 @@ packages:
resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- eslint@9.23.0:
- resolution: {integrity: sha512-jV7AbNoFPAY1EkFYpLq5bslU9NLNO8xnEeQXwErNibVryjk67wHVmddTBilc5srIttJDBrB0eMHKZBFbSIABCw==}
+ eslint@9.24.0:
+ resolution: {integrity: sha512-eh/jxIEJyZrvbWRe4XuVclLPDYSYYYgLy5zXGGxD6j8zjSAxFEzI2fL/8xNq6O2yKqVt+eF2YhV+hxjV6UKXwQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
hasBin: true
peerDependencies:
@@ -4146,8 +4148,8 @@ packages:
tailwind-merge@3.1.0:
resolution: {integrity: sha512-aV27Oj8B7U/tAOMhJsSGdWqelfmudnGMdXIlMnk1JfsjwSjts6o8HyfN7SFH3EztzH4YH8kk6GbLTHzITJO39Q==}
- tailwindcss@4.1.2:
- resolution: {integrity: sha512-VCsK+fitIbQF7JlxXaibFhxrPq4E2hDcG8apzHUdWFMCQWD8uLdlHg4iSkZ53cgLCCcZ+FZK7vG8VjvLcnBgKw==}
+ tailwindcss@4.1.3:
+ resolution: {integrity: sha512-2Q+rw9vy1WFXu5cIxlvsabCwhU2qUwodGq03ODhLJ0jW4ek5BUtoCsnLB0qG+m8AHgEsSJcJGDSDe06FXlP74g==}
tapable@2.2.1:
resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==}
@@ -4250,8 +4252,8 @@ packages:
resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==}
engines: {node: '>= 0.4'}
- typescript@5.8.2:
- resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==}
+ typescript@5.8.3:
+ resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==}
engines: {node: '>=14.17'}
hasBin: true
@@ -4707,14 +4709,14 @@ snapshots:
'@esbuild/win32-x64@0.25.2':
optional: true
- '@eslint-community/eslint-utils@4.5.1(eslint@9.23.0(jiti@2.4.2))':
+ '@eslint-community/eslint-utils@4.5.1(eslint@9.24.0(jiti@2.4.2))':
dependencies:
- eslint: 9.23.0(jiti@2.4.2)
+ eslint: 9.24.0(jiti@2.4.2)
eslint-visitor-keys: 3.4.3
'@eslint-community/regexpp@4.12.1': {}
- '@eslint/config-array@0.19.2':
+ '@eslint/config-array@0.20.0':
dependencies:
'@eslint/object-schema': 2.1.6
debug: 4.4.0
@@ -4746,7 +4748,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@eslint/js@9.23.0': {}
+ '@eslint/js@9.24.0': {}
'@eslint/object-schema@2.1.6': {}
@@ -5301,10 +5303,10 @@ snapshots:
'@nolyfill/is-core-module@1.0.39': {}
- '@prisma/client@6.5.0(prisma@6.5.0(typescript@5.8.2))(typescript@5.8.2)':
+ '@prisma/client@6.5.0(prisma@6.5.0(typescript@5.8.3))(typescript@5.8.3)':
optionalDependencies:
- prisma: 6.5.0(typescript@5.8.2)
- typescript: 5.8.2
+ prisma: 6.5.0(typescript@5.8.3)
+ typescript: 5.8.3
'@prisma/config@6.5.0':
dependencies:
@@ -5340,7 +5342,7 @@ snapshots:
'@privy-io/chains@0.0.1': {}
- '@privy-io/js-sdk-core@0.47.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(viem@2.25.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2))':
+ '@privy-io/js-sdk-core@0.47.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(viem@2.25.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2))':
dependencies:
'@ethersproject/abstract-signer': 5.8.0
'@ethersproject/bignumber': 5.8.0
@@ -5350,7 +5352,7 @@ snapshots:
'@ethersproject/units': 5.8.0
'@privy-io/api-base': 1.4.5
'@privy-io/chains': 0.0.1
- '@privy-io/public-api': 2.20.5(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)
+ '@privy-io/public-api': 2.20.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)
canonicalize: 2.1.0
eventemitter3: 5.0.1
fetch-retry: 6.0.0
@@ -5360,25 +5362,25 @@ snapshots:
set-cookie-parser: 2.7.1
uuid: 9.0.1
optionalDependencies:
- viem: 2.25.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ viem: 2.25.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
transitivePeerDependencies:
- bufferutil
- typescript
- utf-8-validate
- '@privy-io/public-api@2.20.5(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)':
+ '@privy-io/public-api@2.20.5(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)':
dependencies:
'@privy-io/api-base': 1.4.5
bs58: 5.0.0
libphonenumber-js: 1.12.6
- viem: 2.25.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ viem: 2.25.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
zod: 3.24.2
transitivePeerDependencies:
- bufferutil
- typescript
- utf-8-validate
- '@privy-io/react-auth@2.8.2(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(@types/react@19.1.0)(bs58@6.0.0)(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(use-sync-external-store@1.2.0(react@19.1.0))(utf-8-validate@5.0.10)(zod@3.24.2)':
+ '@privy-io/react-auth@2.8.2(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(@types/react@19.1.0)(bs58@6.0.0)(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.3)(use-sync-external-store@1.2.0(react@19.1.0))(utf-8-validate@5.0.10)(zod@3.24.2)':
dependencies:
'@coinbase/wallet-sdk': 4.3.0
'@floating-ui/react': 0.26.28(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
@@ -5387,13 +5389,13 @@ snapshots:
'@marsidev/react-turnstile': 0.4.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
'@metamask/eth-sig-util': 6.0.2
'@privy-io/chains': 0.0.1
- '@privy-io/js-sdk-core': 0.47.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(viem@2.25.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2))
+ '@privy-io/js-sdk-core': 0.47.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(viem@2.25.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2))
'@simplewebauthn/browser': 9.0.1
'@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))
'@solana/wallet-standard-wallet-adapter-base': 1.1.4(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bs58@6.0.0)
'@solana/wallet-standard-wallet-adapter-react': 1.1.4(@solana/wallet-adapter-base@0.9.23(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)))(@solana/web3.js@1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bs58@6.0.0)(react@19.1.0)
'@wallet-standard/app': 1.1.0
- '@walletconnect/ethereum-provider': 2.19.2(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ '@walletconnect/ethereum-provider': 2.19.2(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(react@19.1.0)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
'@walletconnect/modal': 2.7.0(@types/react@19.1.0)(react@19.1.0)
base64-js: 1.5.1
dotenv: 16.4.7
@@ -5404,7 +5406,7 @@ snapshots:
js-cookie: 3.0.5
lokijs: 1.5.12
md5: 2.3.0
- mipd: 0.0.7(typescript@5.8.2)
+ mipd: 0.0.7(typescript@5.8.3)
ofetch: 1.4.1
pino-pretty: 10.3.1
qrcode: 1.5.4
@@ -5416,7 +5418,7 @@ snapshots:
stylis: 4.3.6
tinycolor2: 1.6.0
uuid: 9.0.1
- viem: 2.25.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ viem: 2.25.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
zustand: 5.0.3(@types/react@19.1.0)(react@19.1.0)(use-sync-external-store@1.2.0(react@19.1.0))
optionalDependencies:
'@solana/web3.js': 1.98.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)
@@ -6015,7 +6017,7 @@ snapshots:
'@noble/hashes': 1.7.1
'@scure/base': 1.2.4
- '@selfxyz/core@0.0.19(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)':
+ '@selfxyz/core@0.0.24(bufferutil@4.0.9)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)':
dependencies:
'@types/react': 18.3.20
'@types/react-dom': 18.3.6(@types/react@18.3.20)
@@ -6028,7 +6030,6 @@ snapshots:
node-forge: 1.3.1
poseidon-lite: 0.3.0
react: 19.1.0
- react-dom: 19.1.0(react@19.1.0)
snarkjs: 0.7.5
uuid: 11.1.0
transitivePeerDependencies:
@@ -6037,10 +6038,11 @@ snapshots:
- '@playwright/test'
- babel-plugin-macros
- bufferutil
+ - react-dom
- sass
- utf-8-validate
- '@selfxyz/qrcode@0.0.17(bufferutil@4.0.9)(lottie-react@2.4.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)':
+ '@selfxyz/qrcode@0.0.19(bufferutil@4.0.9)(lottie-react@2.4.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(utf-8-validate@5.0.10)':
dependencies:
'@types/react': 18.3.20
'@types/react-dom': 18.3.6(@types/react@18.3.20)
@@ -6160,67 +6162,67 @@ snapshots:
'@swc/counter': 0.1.3
tslib: 2.8.1
- '@tailwindcss/node@4.1.2':
+ '@tailwindcss/node@4.1.3':
dependencies:
enhanced-resolve: 5.18.1
jiti: 2.4.2
lightningcss: 1.29.2
- tailwindcss: 4.1.2
+ tailwindcss: 4.1.3
- '@tailwindcss/oxide-android-arm64@4.1.2':
+ '@tailwindcss/oxide-android-arm64@4.1.3':
optional: true
- '@tailwindcss/oxide-darwin-arm64@4.1.2':
+ '@tailwindcss/oxide-darwin-arm64@4.1.3':
optional: true
- '@tailwindcss/oxide-darwin-x64@4.1.2':
+ '@tailwindcss/oxide-darwin-x64@4.1.3':
optional: true
- '@tailwindcss/oxide-freebsd-x64@4.1.2':
+ '@tailwindcss/oxide-freebsd-x64@4.1.3':
optional: true
- '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.2':
+ '@tailwindcss/oxide-linux-arm-gnueabihf@4.1.3':
optional: true
- '@tailwindcss/oxide-linux-arm64-gnu@4.1.2':
+ '@tailwindcss/oxide-linux-arm64-gnu@4.1.3':
optional: true
- '@tailwindcss/oxide-linux-arm64-musl@4.1.2':
+ '@tailwindcss/oxide-linux-arm64-musl@4.1.3':
optional: true
- '@tailwindcss/oxide-linux-x64-gnu@4.1.2':
+ '@tailwindcss/oxide-linux-x64-gnu@4.1.3':
optional: true
- '@tailwindcss/oxide-linux-x64-musl@4.1.2':
+ '@tailwindcss/oxide-linux-x64-musl@4.1.3':
optional: true
- '@tailwindcss/oxide-win32-arm64-msvc@4.1.2':
+ '@tailwindcss/oxide-win32-arm64-msvc@4.1.3':
optional: true
- '@tailwindcss/oxide-win32-x64-msvc@4.1.2':
+ '@tailwindcss/oxide-win32-x64-msvc@4.1.3':
optional: true
- '@tailwindcss/oxide@4.1.2':
+ '@tailwindcss/oxide@4.1.3':
optionalDependencies:
- '@tailwindcss/oxide-android-arm64': 4.1.2
- '@tailwindcss/oxide-darwin-arm64': 4.1.2
- '@tailwindcss/oxide-darwin-x64': 4.1.2
- '@tailwindcss/oxide-freebsd-x64': 4.1.2
- '@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.2
- '@tailwindcss/oxide-linux-arm64-gnu': 4.1.2
- '@tailwindcss/oxide-linux-arm64-musl': 4.1.2
- '@tailwindcss/oxide-linux-x64-gnu': 4.1.2
- '@tailwindcss/oxide-linux-x64-musl': 4.1.2
- '@tailwindcss/oxide-win32-arm64-msvc': 4.1.2
- '@tailwindcss/oxide-win32-x64-msvc': 4.1.2
-
- '@tailwindcss/postcss@4.1.2':
+ '@tailwindcss/oxide-android-arm64': 4.1.3
+ '@tailwindcss/oxide-darwin-arm64': 4.1.3
+ '@tailwindcss/oxide-darwin-x64': 4.1.3
+ '@tailwindcss/oxide-freebsd-x64': 4.1.3
+ '@tailwindcss/oxide-linux-arm-gnueabihf': 4.1.3
+ '@tailwindcss/oxide-linux-arm64-gnu': 4.1.3
+ '@tailwindcss/oxide-linux-arm64-musl': 4.1.3
+ '@tailwindcss/oxide-linux-x64-gnu': 4.1.3
+ '@tailwindcss/oxide-linux-x64-musl': 4.1.3
+ '@tailwindcss/oxide-win32-arm64-msvc': 4.1.3
+ '@tailwindcss/oxide-win32-x64-msvc': 4.1.3
+
+ '@tailwindcss/postcss@4.1.3':
dependencies:
'@alloc/quick-lru': 5.2.0
- '@tailwindcss/node': 4.1.2
- '@tailwindcss/oxide': 4.1.2
+ '@tailwindcss/node': 4.1.3
+ '@tailwindcss/oxide': 4.1.3
postcss: 8.5.3
- tailwindcss: 4.1.2
+ tailwindcss: 4.1.3
'@tanstack/react-virtual@3.13.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0)':
dependencies:
@@ -6336,32 +6338,32 @@ snapshots:
dependencies:
'@types/node': 20.17.30
- '@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)':
+ '@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)':
dependencies:
'@eslint-community/regexpp': 4.12.1
- '@typescript-eslint/parser': 8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/parser': 8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)
'@typescript-eslint/scope-manager': 8.29.0
- '@typescript-eslint/type-utils': 8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
- '@typescript-eslint/utils': 8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/type-utils': 8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)
+ '@typescript-eslint/utils': 8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)
'@typescript-eslint/visitor-keys': 8.29.0
- eslint: 9.23.0(jiti@2.4.2)
+ eslint: 9.24.0(jiti@2.4.2)
graphemer: 1.4.0
ignore: 5.3.2
natural-compare: 1.4.0
- ts-api-utils: 2.1.0(typescript@5.8.2)
- typescript: 5.8.2
+ ts-api-utils: 2.1.0(typescript@5.8.3)
+ typescript: 5.8.3
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)':
+ '@typescript-eslint/parser@8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)':
dependencies:
'@typescript-eslint/scope-manager': 8.29.0
'@typescript-eslint/types': 8.29.0
- '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2)
+ '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3)
'@typescript-eslint/visitor-keys': 8.29.0
debug: 4.4.0
- eslint: 9.23.0(jiti@2.4.2)
- typescript: 5.8.2
+ eslint: 9.24.0(jiti@2.4.2)
+ typescript: 5.8.3
transitivePeerDependencies:
- supports-color
@@ -6370,20 +6372,20 @@ snapshots:
'@typescript-eslint/types': 8.29.0
'@typescript-eslint/visitor-keys': 8.29.0
- '@typescript-eslint/type-utils@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)':
+ '@typescript-eslint/type-utils@8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)':
dependencies:
- '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2)
- '@typescript-eslint/utils': 8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3)
+ '@typescript-eslint/utils': 8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)
debug: 4.4.0
- eslint: 9.23.0(jiti@2.4.2)
- ts-api-utils: 2.1.0(typescript@5.8.2)
- typescript: 5.8.2
+ eslint: 9.24.0(jiti@2.4.2)
+ ts-api-utils: 2.1.0(typescript@5.8.3)
+ typescript: 5.8.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/types@8.29.0': {}
- '@typescript-eslint/typescript-estree@8.29.0(typescript@5.8.2)':
+ '@typescript-eslint/typescript-estree@8.29.0(typescript@5.8.3)':
dependencies:
'@typescript-eslint/types': 8.29.0
'@typescript-eslint/visitor-keys': 8.29.0
@@ -6392,19 +6394,19 @@ snapshots:
is-glob: 4.0.3
minimatch: 9.0.5
semver: 7.7.1
- ts-api-utils: 2.1.0(typescript@5.8.2)
- typescript: 5.8.2
+ ts-api-utils: 2.1.0(typescript@5.8.3)
+ typescript: 5.8.3
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/utils@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)':
+ '@typescript-eslint/utils@8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)':
dependencies:
- '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0(jiti@2.4.2))
+ '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0(jiti@2.4.2))
'@typescript-eslint/scope-manager': 8.29.0
'@typescript-eslint/types': 8.29.0
- '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2)
- eslint: 9.23.0(jiti@2.4.2)
- typescript: 5.8.2
+ '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3)
+ eslint: 9.24.0(jiti@2.4.2)
+ typescript: 5.8.3
transitivePeerDependencies:
- supports-color
@@ -6460,14 +6462,14 @@ snapshots:
'@unrs/resolver-binding-win32-x64-msvc@1.3.3':
optional: true
- '@wagmi/core@2.16.7(@types/react@19.1.0)(react@19.1.0)(typescript@5.8.2)(use-sync-external-store@1.2.0(react@19.1.0))(viem@2.25.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2))':
+ '@wagmi/core@2.16.7(@types/react@19.1.0)(react@19.1.0)(typescript@5.8.3)(use-sync-external-store@1.2.0(react@19.1.0))(viem@2.25.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2))':
dependencies:
eventemitter3: 5.0.1
- mipd: 0.0.7(typescript@5.8.2)
- viem: 2.25.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ mipd: 0.0.7(typescript@5.8.3)
+ viem: 2.25.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
zustand: 5.0.0(@types/react@19.1.0)(react@19.1.0)(use-sync-external-store@1.2.0(react@19.1.0))
optionalDependencies:
- typescript: 5.8.2
+ typescript: 5.8.3
transitivePeerDependencies:
- '@types/react'
- immer
@@ -6488,7 +6490,7 @@ snapshots:
dependencies:
'@wallet-standard/base': 1.1.0
- '@walletconnect/core@2.19.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)':
+ '@walletconnect/core@2.19.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)':
dependencies:
'@walletconnect/heartbeat': 1.2.2
'@walletconnect/jsonrpc-provider': 1.0.14
@@ -6502,7 +6504,7 @@ snapshots:
'@walletconnect/safe-json': 1.0.2
'@walletconnect/time': 1.0.2
'@walletconnect/types': 2.19.2
- '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
'@walletconnect/window-getters': 1.0.1
es-toolkit: 1.33.0
events: 3.3.0
@@ -6535,7 +6537,7 @@ snapshots:
dependencies:
tslib: 1.14.1
- '@walletconnect/ethereum-provider@2.19.2(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(react@19.1.0)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)':
+ '@walletconnect/ethereum-provider@2.19.2(@types/react@19.1.0)(bufferutil@4.0.9)(encoding@0.1.13)(react@19.1.0)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)':
dependencies:
'@walletconnect/jsonrpc-http-connection': 1.0.8(encoding@0.1.13)
'@walletconnect/jsonrpc-provider': 1.0.14
@@ -6543,10 +6545,10 @@ snapshots:
'@walletconnect/jsonrpc-utils': 1.0.8
'@walletconnect/keyvaluestorage': 1.1.1
'@walletconnect/modal': 2.7.0(@types/react@19.1.0)(react@19.1.0)
- '@walletconnect/sign-client': 2.19.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ '@walletconnect/sign-client': 2.19.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
'@walletconnect/types': 2.19.2
- '@walletconnect/universal-provider': 2.19.2(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
- '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ '@walletconnect/universal-provider': 2.19.2(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
+ '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
events: 3.3.0
transitivePeerDependencies:
- '@azure/app-configuration'
@@ -6692,16 +6694,16 @@ snapshots:
dependencies:
tslib: 1.14.1
- '@walletconnect/sign-client@2.19.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)':
+ '@walletconnect/sign-client@2.19.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)':
dependencies:
- '@walletconnect/core': 2.19.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ '@walletconnect/core': 2.19.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
'@walletconnect/events': 1.0.1
'@walletconnect/heartbeat': 1.2.2
'@walletconnect/jsonrpc-utils': 1.0.8
'@walletconnect/logger': 2.1.2
'@walletconnect/time': 1.0.2
'@walletconnect/types': 2.19.2
- '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
events: 3.3.0
transitivePeerDependencies:
- '@azure/app-configuration'
@@ -6759,7 +6761,7 @@ snapshots:
- ioredis
- uploadthing
- '@walletconnect/universal-provider@2.19.2(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)':
+ '@walletconnect/universal-provider@2.19.2(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)':
dependencies:
'@walletconnect/events': 1.0.1
'@walletconnect/jsonrpc-http-connection': 1.0.8(encoding@0.1.13)
@@ -6768,9 +6770,9 @@ snapshots:
'@walletconnect/jsonrpc-utils': 1.0.8
'@walletconnect/keyvaluestorage': 1.1.1
'@walletconnect/logger': 2.1.2
- '@walletconnect/sign-client': 2.19.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ '@walletconnect/sign-client': 2.19.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
'@walletconnect/types': 2.19.2
- '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ '@walletconnect/utils': 2.19.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
es-toolkit: 1.33.0
events: 3.3.0
transitivePeerDependencies:
@@ -6798,7 +6800,7 @@ snapshots:
- utf-8-validate
- zod
- '@walletconnect/utils@2.19.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)':
+ '@walletconnect/utils@2.19.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)':
dependencies:
'@noble/ciphers': 1.2.1
'@noble/curves': 1.8.1
@@ -6816,7 +6818,7 @@ snapshots:
detect-browser: 5.3.0
query-string: 7.1.3
uint8arrays: 3.1.0
- viem: 2.23.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2)
+ viem: 2.23.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2)
transitivePeerDependencies:
- '@azure/app-configuration'
- '@azure/cosmos'
@@ -6855,9 +6857,9 @@ snapshots:
jsonparse: 1.3.1
through: 2.3.8
- abitype@1.0.8(typescript@5.8.2)(zod@3.24.2):
+ abitype@1.0.8(typescript@5.8.3)(zod@3.24.2):
optionalDependencies:
- typescript: 5.8.2
+ typescript: 5.8.3
zod: 3.24.2
abort-controller@3.0.0:
@@ -7112,7 +7114,7 @@ snapshots:
camelize@1.0.1: {}
- caniuse-lite@1.0.30001710: {}
+ caniuse-lite@1.0.30001712: {}
canonicalize@2.1.0: {}
@@ -7546,21 +7548,21 @@ snapshots:
optionalDependencies:
source-map: 0.6.1
- eslint-config-next@15.2.3(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2):
+ eslint-config-next@15.2.3(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3):
dependencies:
'@next/eslint-plugin-next': 15.2.3
'@rushstack/eslint-patch': 1.11.0
- '@typescript-eslint/eslint-plugin': 8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
- '@typescript-eslint/parser': 8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
- eslint: 9.23.0(jiti@2.4.2)
+ '@typescript-eslint/eslint-plugin': 8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)
+ '@typescript-eslint/parser': 8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)
+ eslint: 9.24.0(jiti@2.4.2)
eslint-import-resolver-node: 0.3.9
- eslint-import-resolver-typescript: 3.10.0(eslint-plugin-import@2.31.0)(eslint@9.23.0(jiti@2.4.2))
- eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.10.0)(eslint@9.23.0(jiti@2.4.2))
- eslint-plugin-jsx-a11y: 6.10.2(eslint@9.23.0(jiti@2.4.2))
- eslint-plugin-react: 7.37.5(eslint@9.23.0(jiti@2.4.2))
- eslint-plugin-react-hooks: 5.2.0(eslint@9.23.0(jiti@2.4.2))
+ eslint-import-resolver-typescript: 3.10.0(eslint-plugin-import@2.31.0)(eslint@9.24.0(jiti@2.4.2))
+ eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.0)(eslint@9.24.0(jiti@2.4.2))
+ eslint-plugin-jsx-a11y: 6.10.2(eslint@9.24.0(jiti@2.4.2))
+ eslint-plugin-react: 7.37.5(eslint@9.24.0(jiti@2.4.2))
+ eslint-plugin-react-hooks: 5.2.0(eslint@9.24.0(jiti@2.4.2))
optionalDependencies:
- typescript: 5.8.2
+ typescript: 5.8.3
transitivePeerDependencies:
- eslint-import-resolver-webpack
- eslint-plugin-import-x
@@ -7574,33 +7576,33 @@ snapshots:
transitivePeerDependencies:
- supports-color
- eslint-import-resolver-typescript@3.10.0(eslint-plugin-import@2.31.0)(eslint@9.23.0(jiti@2.4.2)):
+ eslint-import-resolver-typescript@3.10.0(eslint-plugin-import@2.31.0)(eslint@9.24.0(jiti@2.4.2)):
dependencies:
'@nolyfill/is-core-module': 1.0.39
debug: 4.4.0
- eslint: 9.23.0(jiti@2.4.2)
+ eslint: 9.24.0(jiti@2.4.2)
get-tsconfig: 4.10.0
is-bun-module: 2.0.0
stable-hash: 0.0.5
tinyglobby: 0.2.12
unrs-resolver: 1.3.3
optionalDependencies:
- eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.10.0)(eslint@9.23.0(jiti@2.4.2))
+ eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.0)(eslint@9.24.0(jiti@2.4.2))
transitivePeerDependencies:
- supports-color
- eslint-module-utils@2.12.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.0)(eslint@9.23.0(jiti@2.4.2)):
+ eslint-module-utils@2.12.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.0)(eslint@9.24.0(jiti@2.4.2)):
dependencies:
debug: 3.2.7
optionalDependencies:
- '@typescript-eslint/parser': 8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
- eslint: 9.23.0(jiti@2.4.2)
+ '@typescript-eslint/parser': 8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)
+ eslint: 9.24.0(jiti@2.4.2)
eslint-import-resolver-node: 0.3.9
- eslint-import-resolver-typescript: 3.10.0(eslint-plugin-import@2.31.0)(eslint@9.23.0(jiti@2.4.2))
+ eslint-import-resolver-typescript: 3.10.0(eslint-plugin-import@2.31.0)(eslint@9.24.0(jiti@2.4.2))
transitivePeerDependencies:
- supports-color
- eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-typescript@3.10.0)(eslint@9.23.0(jiti@2.4.2)):
+ eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.0)(eslint@9.24.0(jiti@2.4.2)):
dependencies:
'@rtsao/scc': 1.1.0
array-includes: 3.1.8
@@ -7609,9 +7611,9 @@ snapshots:
array.prototype.flatmap: 1.3.3
debug: 3.2.7
doctrine: 2.1.0
- eslint: 9.23.0(jiti@2.4.2)
+ eslint: 9.24.0(jiti@2.4.2)
eslint-import-resolver-node: 0.3.9
- eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.0)(eslint@9.23.0(jiti@2.4.2))
+ eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.0)(eslint@9.24.0(jiti@2.4.2))
hasown: 2.0.2
is-core-module: 2.16.1
is-glob: 4.0.3
@@ -7623,13 +7625,13 @@ snapshots:
string.prototype.trimend: 1.0.9
tsconfig-paths: 3.15.0
optionalDependencies:
- '@typescript-eslint/parser': 8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2)
+ '@typescript-eslint/parser': 8.29.0(eslint@9.24.0(jiti@2.4.2))(typescript@5.8.3)
transitivePeerDependencies:
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- supports-color
- eslint-plugin-jsx-a11y@6.10.2(eslint@9.23.0(jiti@2.4.2)):
+ eslint-plugin-jsx-a11y@6.10.2(eslint@9.24.0(jiti@2.4.2)):
dependencies:
aria-query: 5.3.2
array-includes: 3.1.8
@@ -7639,7 +7641,7 @@ snapshots:
axobject-query: 4.1.0
damerau-levenshtein: 1.0.8
emoji-regex: 9.2.2
- eslint: 9.23.0(jiti@2.4.2)
+ eslint: 9.24.0(jiti@2.4.2)
hasown: 2.0.2
jsx-ast-utils: 3.3.5
language-tags: 1.0.9
@@ -7648,11 +7650,11 @@ snapshots:
safe-regex-test: 1.1.0
string.prototype.includes: 2.0.1
- eslint-plugin-react-hooks@5.2.0(eslint@9.23.0(jiti@2.4.2)):
+ eslint-plugin-react-hooks@5.2.0(eslint@9.24.0(jiti@2.4.2)):
dependencies:
- eslint: 9.23.0(jiti@2.4.2)
+ eslint: 9.24.0(jiti@2.4.2)
- eslint-plugin-react@7.37.5(eslint@9.23.0(jiti@2.4.2)):
+ eslint-plugin-react@7.37.5(eslint@9.24.0(jiti@2.4.2)):
dependencies:
array-includes: 3.1.8
array.prototype.findlast: 1.2.5
@@ -7660,7 +7662,7 @@ snapshots:
array.prototype.tosorted: 1.1.4
doctrine: 2.1.0
es-iterator-helpers: 1.2.1
- eslint: 9.23.0(jiti@2.4.2)
+ eslint: 9.24.0(jiti@2.4.2)
estraverse: 5.3.0
hasown: 2.0.2
jsx-ast-utils: 3.3.5
@@ -7683,15 +7685,15 @@ snapshots:
eslint-visitor-keys@4.2.0: {}
- eslint@9.23.0(jiti@2.4.2):
+ eslint@9.24.0(jiti@2.4.2):
dependencies:
- '@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0(jiti@2.4.2))
+ '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0(jiti@2.4.2))
'@eslint-community/regexpp': 4.12.1
- '@eslint/config-array': 0.19.2
+ '@eslint/config-array': 0.20.0
'@eslint/config-helpers': 0.2.1
'@eslint/core': 0.12.0
'@eslint/eslintrc': 3.3.1
- '@eslint/js': 9.23.0
+ '@eslint/js': 9.24.0
'@eslint/plugin-kit': 0.2.8
'@humanfs/node': 0.16.6
'@humanwhocodes/module-importer': 1.0.1
@@ -8422,9 +8424,9 @@ snapshots:
minimist@1.2.8: {}
- mipd@0.0.7(typescript@5.8.2):
+ mipd@0.0.7(typescript@5.8.3):
optionalDependencies:
- typescript: 5.8.2
+ typescript: 5.8.3
motion@10.16.2:
dependencies:
@@ -8455,7 +8457,7 @@ snapshots:
'@next/env': 14.2.26
'@swc/helpers': 0.5.5
busboy: 1.6.0
- caniuse-lite: 1.0.30001710
+ caniuse-lite: 1.0.30001712
graceful-fs: 4.2.11
postcss: 8.4.31
react: 19.1.0
@@ -8481,7 +8483,7 @@ snapshots:
'@swc/counter': 0.1.3
'@swc/helpers': 0.5.15
busboy: 1.6.0
- caniuse-lite: 1.0.30001710
+ caniuse-lite: 1.0.30001712
postcss: 8.4.31
react: 19.1.0
react-dom: 19.1.0(react@19.1.0)
@@ -8599,31 +8601,31 @@ snapshots:
object-keys: 1.1.1
safe-push-apply: 1.0.0
- ox@0.6.7(typescript@5.8.2)(zod@3.24.2):
+ ox@0.6.7(typescript@5.8.3)(zod@3.24.2):
dependencies:
'@adraffy/ens-normalize': 1.11.0
'@noble/curves': 1.8.1
'@noble/hashes': 1.7.1
'@scure/bip32': 1.6.2
'@scure/bip39': 1.5.4
- abitype: 1.0.8(typescript@5.8.2)(zod@3.24.2)
+ abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2)
eventemitter3: 5.0.1
optionalDependencies:
- typescript: 5.8.2
+ typescript: 5.8.3
transitivePeerDependencies:
- zod
- ox@0.6.9(typescript@5.8.2)(zod@3.24.2):
+ ox@0.6.9(typescript@5.8.3)(zod@3.24.2):
dependencies:
'@adraffy/ens-normalize': 1.11.0
'@noble/curves': 1.8.1
'@noble/hashes': 1.7.1
'@scure/bip32': 1.6.2
'@scure/bip39': 1.5.4
- abitype: 1.0.8(typescript@5.8.2)(zod@3.24.2)
+ abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2)
eventemitter3: 5.0.1
optionalDependencies:
- typescript: 5.8.2
+ typescript: 5.8.3
transitivePeerDependencies:
- zod
@@ -8736,13 +8738,13 @@ snapshots:
prelude-ls@1.2.1: {}
- prisma@6.5.0(typescript@5.8.2):
+ prisma@6.5.0(typescript@5.8.3):
dependencies:
'@prisma/config': 6.5.0
'@prisma/engines': 6.5.0
optionalDependencies:
fsevents: 2.3.3
- typescript: 5.8.2
+ typescript: 5.8.3
transitivePeerDependencies:
- supports-color
@@ -9286,7 +9288,7 @@ snapshots:
tailwind-merge@3.1.0: {}
- tailwindcss@4.1.2: {}
+ tailwindcss@4.1.3: {}
tapable@2.2.1: {}
@@ -9315,11 +9317,11 @@ snapshots:
tryer@1.0.1: {}
- ts-api-utils@2.1.0(typescript@5.8.2):
+ ts-api-utils@2.1.0(typescript@5.8.3):
dependencies:
- typescript: 5.8.2
+ typescript: 5.8.3
- ts-node@10.9.2(@types/node@20.17.30)(typescript@5.8.2):
+ ts-node@10.9.2(@types/node@20.17.30)(typescript@5.8.3):
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.11
@@ -9333,7 +9335,7 @@ snapshots:
create-require: 1.1.1
diff: 4.0.2
make-error: 1.3.6
- typescript: 5.8.2
+ typescript: 5.8.3
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
@@ -9399,7 +9401,7 @@ snapshots:
possible-typed-array-names: 1.1.0
reflect.getprototypeof: 1.0.10
- typescript@5.8.2: {}
+ typescript@5.8.3: {}
ua-parser-js@1.0.40: {}
@@ -9518,35 +9520,35 @@ snapshots:
d3-time: 3.1.0
d3-timer: 3.0.1
- viem@2.23.2(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2):
+ viem@2.23.2(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2):
dependencies:
'@noble/curves': 1.8.1
'@noble/hashes': 1.7.1
'@scure/bip32': 1.6.2
'@scure/bip39': 1.5.4
- abitype: 1.0.8(typescript@5.8.2)(zod@3.24.2)
+ abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2)
isows: 1.0.6(ws@8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))
- ox: 0.6.7(typescript@5.8.2)(zod@3.24.2)
+ ox: 0.6.7(typescript@5.8.3)(zod@3.24.2)
ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)
optionalDependencies:
- typescript: 5.8.2
+ typescript: 5.8.3
transitivePeerDependencies:
- bufferutil
- utf-8-validate
- zod
- viem@2.25.0(bufferutil@4.0.9)(typescript@5.8.2)(utf-8-validate@5.0.10)(zod@3.24.2):
+ viem@2.25.0(bufferutil@4.0.9)(typescript@5.8.3)(utf-8-validate@5.0.10)(zod@3.24.2):
dependencies:
'@noble/curves': 1.8.1
'@noble/hashes': 1.7.1
'@scure/bip32': 1.6.2
'@scure/bip39': 1.5.4
- abitype: 1.0.8(typescript@5.8.2)(zod@3.24.2)
+ abitype: 1.0.8(typescript@5.8.3)(zod@3.24.2)
isows: 1.0.6(ws@8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))
- ox: 0.6.9(typescript@5.8.2)(zod@3.24.2)
+ ox: 0.6.9(typescript@5.8.3)(zod@3.24.2)
ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)
optionalDependencies:
- typescript: 5.8.2
+ typescript: 5.8.3
transitivePeerDependencies:
- bufferutil
- utf-8-validate
diff --git a/prisma/migrations/20250405183016_add_provider_fields/migration.sql b/prisma/migrations/20250405183016_add_provider_fields/migration.sql
new file mode 100644
index 0000000..74a90de
--- /dev/null
+++ b/prisma/migrations/20250405183016_add_provider_fields/migration.sql
@@ -0,0 +1,26 @@
+/*
+ Warnings:
+
+ - Added the required column `businessAddress` to the `Provider` table without a default value. This is not possible if the table is not empty.
+ - Added the required column `businessEmail` to the `Provider` table without a default value. This is not possible if the table is not empty.
+ - Added the required column `businessName` to the `Provider` table without a default value. This is not possible if the table is not empty.
+ - Added the required column `businessType` to the `Provider` table without a default value. This is not possible if the table is not empty.
+ - Added the required column `paymentMethod` to the `Provider` table without a default value. This is not possible if the table is not empty.
+
+*/
+-- DropIndex
+DROP INDEX "Provider_walletAddress_key";
+
+-- AlterTable
+ALTER TABLE "Provider" ADD COLUMN "accountNumber" TEXT,
+ADD COLUMN "bankName" TEXT,
+ADD COLUMN "businessAddress" TEXT NOT NULL,
+ADD COLUMN "businessEmail" TEXT NOT NULL,
+ADD COLUMN "businessName" TEXT NOT NULL,
+ADD COLUMN "businessType" TEXT NOT NULL,
+ADD COLUMN "paymentMethod" TEXT NOT NULL,
+ADD COLUMN "selfVerificationName" TEXT,
+ADD COLUMN "selfVerified" BOOLEAN NOT NULL DEFAULT false,
+ADD COLUMN "taxId" TEXT,
+ALTER COLUMN "walletAddress" DROP NOT NULL,
+ALTER COLUMN "holderAddress" DROP NOT NULL;
diff --git a/prisma/migrations/20250405184210_update_user_provider_models/migration.sql b/prisma/migrations/20250405184210_update_user_provider_models/migration.sql
new file mode 100644
index 0000000..27ad27c
--- /dev/null
+++ b/prisma/migrations/20250405184210_update_user_provider_models/migration.sql
@@ -0,0 +1,4 @@
+-- AlterTable
+ALTER TABLE "User" ADD COLUMN "emailVerified" TIMESTAMP(3),
+ADD COLUMN "image" TEXT,
+ALTER COLUMN "name" DROP NOT NULL;
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 03c4a33..a5382f7 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -15,10 +15,12 @@ datasource db {
// User model to track both advertisers and providers
model User {
- id String @id @default(cuid())
- name String
+ id String @id @default(uuid())
+ name String?
username String @unique
- email String? @unique
+ email String? @unique
+ emailVerified DateTime?
+ image String?
avatar String?
role String @default("Advertiser")
memberSince DateTime @default(now())
@@ -27,15 +29,15 @@ model User {
holderAddress String? @unique
walletType String?
linkedWallets Json?
- createdAt DateTime @default(now())
- updatedAt DateTime @updatedAt
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+ provider Provider?
// Relations
balances Balance?
transactions Transaction[]
settings UserSettings?
stats UserStats?
- provider Provider?
campaigns Campaign[]
}
@@ -88,20 +90,30 @@ enum UserRole {
// Provider model for ad display service providers
model Provider {
- id String @id @default(uuid())
- userId String @unique
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
- createdAt DateTime @default(now())
- updatedAt DateTime @updatedAt
- isActive Boolean @default(true)
- walletAddress String @unique // Blockchain address for this provider
- holderAddress String @unique
- stakedAmount Float @default(0)
- stakingDate DateTime?
- locations Location[]
- metadata Json? // Additional provider details
- earningsTotal Float @default(0)
- earningsPerDay Json? // Track daily earnings
+ id String @id @default(uuid())
+ userId String @unique
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
+ businessName String
+ businessType String
+ businessAddress String
+ businessEmail String
+ paymentMethod String
+ walletAddress String?
+ bankName String?
+ accountNumber String?
+ taxId String?
+ selfVerified Boolean @default(false)
+ selfVerificationName String?
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+ isActive Boolean @default(true)
+ holderAddress String? @unique
+ stakedAmount Float @default(0)
+ stakingDate DateTime?
+ locations Location[]
+ metadata Json? // Additional provider details
+ earningsTotal Float @default(0)
+ earningsPerDay Json? // Track daily earnings
@@index([walletAddress])
}
diff --git a/src/app/account/page.tsx b/src/app/account/page.tsx
index 50cd459..87c6fd8 100644
--- a/src/app/account/page.tsx
+++ b/src/app/account/page.tsx
@@ -10,7 +10,6 @@ import { Progress } from "@/components/ui/progress"
import { useUserStore, useTransactionStore } from "@/lib/store"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
-import { Checkbox } from "@/components/ui/checkbox"
import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert"
import { Switch } from "@/components/ui/switch"
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
@@ -32,7 +31,6 @@ interface PasswordFormData {
export default function AccountPage() {
const [activeTab, setActiveTab] = useState("transactions")
const [isEditing, setIsEditing] = useState(false)
- const [showPasswordDialog, setShowPasswordDialog] = useState(false)
const [isSettingsChanged, setIsSettingsChanged] = useState(false)
const [formError, setFormError] = useState("")
@@ -884,4 +882,3 @@ export default function AccountPage() {
)
}
-
diff --git a/src/app/api/provider/data/route.ts b/src/app/api/provider/data/route.ts
new file mode 100644
index 0000000..edf15f6
--- /dev/null
+++ b/src/app/api/provider/data/route.ts
@@ -0,0 +1,60 @@
+import { NextResponse } from 'next/server';
+import { PrismaClient } from '@prisma/client';
+import { getSession } from '@/lib/auth';
+
+// Use the same PrismaClient instance
+const prisma = new PrismaClient();
+
+export async function GET() {
+ try {
+ // Get the authenticated user from the session
+ const session = await getSession();
+
+ if (!session?.user?.id) {
+ return NextResponse.json({ error: 'Authentication required' }, { status: 401 });
+ }
+
+ const userId = session.user.id;
+
+ // First check if the user exists
+ const user = await prisma.user.findUnique({
+ where: { id: userId }
+ });
+
+ if (!user) {
+ return NextResponse.json({
+ success: false,
+ error: 'User not found',
+ needsRegistration: true
+ }, { status: 404 });
+ }
+
+ // Fetch provider data for the authenticated user
+ const providerData = await prisma.provider.findUnique({
+ where: { userId },
+ });
+
+ if (!providerData) {
+ return NextResponse.json({
+ success: false,
+ error: 'Provider not found',
+ needsRegistration: true
+ }, { status: 404 });
+ }
+
+ // Return the provider data
+ return NextResponse.json({
+ success: true,
+ provider: providerData,
+ });
+ } catch (error) {
+ console.error('Error fetching provider data:', error);
+ return NextResponse.json(
+ {
+ success: false,
+ error: error instanceof Error ? error.message : 'Unknown error occurred'
+ },
+ { status: 500 }
+ );
+ }
+}
\ No newline at end of file
diff --git a/src/app/api/provider/register/route.ts b/src/app/api/provider/register/route.ts
new file mode 100644
index 0000000..cd4a42f
--- /dev/null
+++ b/src/app/api/provider/register/route.ts
@@ -0,0 +1,123 @@
+import { NextRequest, NextResponse } from 'next/server';
+import { PrismaClient } from '@prisma/client';
+import { getSession } from '@/lib/auth';
+import { v4 as uuidv4 } from 'uuid';
+
+// Create a single PrismaClient instance for the application
+const prisma = new PrismaClient();
+
+export async function POST(req: NextRequest) {
+ try {
+ // Get the authenticated user from the session
+ const session = await getSession();
+
+ if (!session?.user?.id) {
+ return NextResponse.json({ error: 'Authentication required' }, { status: 401 });
+ }
+
+ const userId = session.user.id;
+ const body = await req.json();
+
+ // Extract data from request body
+ const {
+ businessName,
+ businessType,
+ businessAddress,
+ businessEmail,
+ paymentMethod,
+ walletAddress,
+ bankName,
+ accountNumber,
+ taxId,
+ selfVerified,
+ selfVerificationData,
+ } = body;
+
+ // First, ensure the user exists in the database
+ let user = await prisma.user.findUnique({
+ where: { id: userId }
+ });
+
+ if (!user) {
+ // Create a basic user record if it doesn't exist
+ // Generate placeholder values for required fields
+ const generatedUsername = `user_${uuidv4().substring(0, 8)}`;
+ const generatedWalletAddress = `0x${uuidv4().replace(/-/g, '')}`;
+
+ user = await prisma.user.create({
+ data: {
+ id: userId,
+ name: businessName || 'Provider User',
+ email: businessEmail || 'provider@example.com',
+ username: generatedUsername,
+ walletAddress: walletAddress || generatedWalletAddress,
+ role: 'Provider',
+ }
+ });
+ }
+
+ // Check if provider already exists for this user
+ const existingProvider = await prisma.provider.findUnique({
+ where: { userId },
+ });
+
+ if (existingProvider) {
+ // Update existing provider
+ const updatedProvider = await prisma.provider.update({
+ where: { userId },
+ data: {
+ businessName,
+ businessType,
+ businessAddress,
+ businessEmail,
+ paymentMethod,
+ walletAddress: walletAddress || null,
+ bankName: bankName || null,
+ accountNumber: accountNumber || null,
+ taxId: taxId || null,
+ selfVerified: selfVerified || false,
+ selfVerificationName: selfVerificationData?.name || null,
+ },
+ });
+
+ return NextResponse.json({
+ success: true,
+ provider: updatedProvider,
+ message: 'Provider updated successfully',
+ });
+ } else {
+ // Create new provider
+ const newProvider = await prisma.provider.create({
+ data: {
+ userId,
+ businessName,
+ businessType,
+ businessAddress,
+ businessEmail,
+ paymentMethod,
+ walletAddress: walletAddress || null,
+ bankName: bankName || null,
+ accountNumber: accountNumber || null,
+ taxId: taxId || null,
+ selfVerified: selfVerified || false,
+ selfVerificationName: selfVerificationData?.name || null,
+ },
+ });
+
+ return NextResponse.json({
+ success: true,
+ provider: newProvider,
+ message: 'Provider created successfully',
+ });
+ }
+ } catch (error) {
+ console.error('Error creating/updating provider:', error);
+ return NextResponse.json(
+ {
+ success: false,
+ error: error instanceof Error ? error.message : 'Unknown error occurred'
+ },
+ { status: 500 }
+ );
+ }
+}
\ No newline at end of file
diff --git a/src/app/api/verify/route.ts b/src/app/api/verify/route.ts
index 9c34b0d..54438a1 100644
--- a/src/app/api/verify/route.ts
+++ b/src/app/api/verify/route.ts
@@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from 'next/server';
-import { getUserIdentifier, SelfBackendVerifier, countryCodes } from '@selfxyz/core';
+import { getUserIdentifier, SelfBackendVerifier } from '@selfxyz/core';
export async function POST(req: NextRequest) {
try {
@@ -17,21 +17,21 @@ export async function POST(req: NextRequest) {
const userId = await getUserIdentifier(publicSignals);
console.log("Extracted userId:", userId);
- // Initialize and configure the verifier
+ // Initialize and configure the verifier - test mode configuration
const selfBackendVerifier = new SelfBackendVerifier(
- 'https://forno.celo.org',
- 'adnet-protocol' // Use a consistent scope across frontend and backend
+ 'adnet-protocol',
+ 'https://3b28-111-235-226-124.ngrok-free.app',
+ 'uuid',
+ true, // Enable dev mode for testing
+ true // Use mock passport for testing
);
// Configure verification options
selfBackendVerifier.setMinimumAge(18);
- selfBackendVerifier.excludeCountries(
- countryCodes.IRN, // Iran
- countryCodes.PRK, // North Korea
- countryCodes.RUS // Russia
- );
- selfBackendVerifier.enableNameAndDobOfacCheck();
-
+ // selfBackendVerifier.excludeCountries(
+ // countryCodes.PRK, // North Korea
+ // );
+ // selfBackendVerifier.enableNameAndDobOfacCheck();`
// Verify the proof
const result = await selfBackendVerifier.verify(proof, publicSignals);
diff --git a/src/app/provider-account/page.tsx b/src/app/provider-account/page.tsx
index 4f424a3..a22430e 100644
--- a/src/app/provider-account/page.tsx
+++ b/src/app/provider-account/page.tsx
@@ -1,29 +1,57 @@
"use client"
-import { useState } from "react"
-import { Settings, Download, TrendingUp, MapPin, Monitor, DollarSign, Award, Check } from "lucide-react"
+import { Monitor, DollarSign, Award, MapPin, TrendingUp, Loader2, Download, Check, Settings } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
import { Progress } from "@/components/ui/progress"
-import { useUserStore, useTransactionStore } from "@/lib/store"
+import { useUserStore } from "@/lib/store"
+import { useProvider } from "@/hooks/use-provider"
+import { useRouter } from "next/navigation"
export default function ProviderAccountPage() {
- const [activeTab, setActiveTab] = useState("overview")
+ const router = useRouter()
+
+ // Get provider data from our hook
+ const { provider, isLoading, needsRegistration } = useProvider()
// Get user data from the user store
- const { user, balances, stats, updateUser, updateBalances } = useUserStore()
-
- // Get transaction data from the transaction store
- const { filters, isFilterOpen, toggleFilterOpen, setFilter, getFilteredTransactions } = useTransactionStore()
-
- // Get filtered transactions
- const filteredTransactions = getFilteredTransactions()
+ const { user } = useUserStore()
+
+ // Show loading state
+ if (isLoading) {
+ return (
+
+
+
Loading provider account...
+
+ );
+ }
- // Handle filter change
- const handleFilterChange = (filterType, value) => {
- setFilter(filterType, value)
+ // Show registration message if needed
+ if (needsRegistration) {
+ return (
+
+
+
+
Provider Account
+
+
+
No Provider Account Found
+
+ You need to register as a provider to access this page.
+
+
router.push('/provider-registration')}
+ className="bg-[#0055FF] text-white border-[3px] border-black hover:bg-[#003cc7] transition-all font-bold py-6 h-auto rounded-none"
+ >
+ Register as Provider
+
+
+
+
+ );
}
return (
@@ -42,7 +70,7 @@ export default function ProviderAccountPage() {
Provider Profile
- {user?.providerTier || "STANDARD"}
+ STANDARD
@@ -65,7 +93,7 @@ export default function ProviderAccountPage() {
@{user?.username || "guest"}
Provider
-
Since {user?.providerSince || "N/A"}
+
Since {user?.memberSince || "N/A"}
@@ -73,14 +101,14 @@ export default function ProviderAccountPage() {
Business Name
- {user?.businessName || "Not registered"}
+ {provider?.businessName || "Not registered"}
Business ID
- {user?.businessId || "Not registered"}
+ {provider?.id || "Not registered"}
diff --git a/src/app/provider-dashboard/page.tsx b/src/app/provider-dashboard/page.tsx
index a887d2f..e0fce5c 100644
--- a/src/app/provider-dashboard/page.tsx
+++ b/src/app/provider-dashboard/page.tsx
@@ -1,122 +1,144 @@
"use client"
import { useRouter } from "next/navigation"
-import { Bell, Menu, Loader2 } from "lucide-react"
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { Button } from "@/components/ui/button"
-import { useEffect, useRef, useState } from "react"
-import ProviderHeader from "@/components/provider-header"
-import DisplayOverview from "@/components/display-overview"
-import DisplayRegistration from "@/components/display-registration"
-import DisplayPerformance from "@/components/display-performance"
-import VerificationManagement from "@/components/verification-management"
-import EarningsPayments from "@/components/earnings-payments"
-// Import provider hook
-import { useProviderPages } from "@/hooks/use-provider-hooks"
+import { Building2, FileText, PlusCircle, Loader2 } from "lucide-react"
+import { useProvider } from "@/hooks/use-provider"
-export default function ProviderDashboard() {
- // Use the centralized provider hook
- const {
- serviceLoading,
- serviceError,
- isCorrectChain,
- switchChain,
- service,
- isConnected
- } = useProviderPages();
-
- const [initializing, setInitializing] = useState(true);
+const ProviderNotRegisteredView = ({ router }: { router: ReturnType }) => {
+ return (
+
+
+
Provider Dashboard
+
+
+
No Provider Account Found
+
+ You need to register as a provider to access this dashboard.
+
+
router.push('/provider-registration')}
+ className="bg-[#0055FF] text-white border-[3px] border-black hover:bg-[#003cc7] transition-all font-bold py-6 h-auto rounded-none"
+ >
+ Register as Provider
+
+
+
+
+ );
+};
- // Add effect to handle initialization state
- useEffect(() => {
- // Set initializing to false once service is loaded or if there's an error
- if (!serviceLoading || serviceError) {
- setTimeout(() => setInitializing(false), 500); // Short delay for smoother UX
- }
- }, [serviceLoading, serviceError]);
+export default function ProviderDashboardPage() {
+ const router = useRouter();
+ const { provider, isLoading, error, needsRegistration } = useProvider();
- // Show loading state while initializing blockchain services
- if (initializing) {
+ // Render loading state
+ if (isLoading) {
return (
-
-
-
-
Loading provider dashboard...
-
Connecting to blockchain services
-
+
+
+
Loading provider dashboard...
);
}
- return (
-
- {/* Checkered Background Pattern */}
-
-
+ // Render error state (only for actual errors, not the registration needed case)
+ if (error && !needsRegistration) {
+ return (
+
+
+
Error Loading Dashboard
+
{error}
+
router.refresh()}>Try Again
+
+ );
+ }
- {/* Animated Background Elements */}
-
+ // Render empty state (no provider registered)
+ if (!provider || needsRegistration) {
+ return
;
+ }
-
-
-
- {isConnected && service ? (
- <>
-
-
-
-
-
- >
- ) : (
-
-
Connect Wallet
-
You need to connect your wallet to view your provider dashboard.
+ // Render provider dashboard
+ return (
+
+
+
Provider Dashboard
+
+ {/* Provider information card */}
+
+
+
+
+ {provider.businessName}
+
+ Provider Account Details
+
+
+
+
+
Business Information
+
+
Type: {provider.businessType}
+
Email: {provider.businessEmail}
+
Address: {provider.businessAddress}
+
+
+
+
Payment Details
+
+
Method: {provider.paymentMethod}
+ {provider.paymentMethod === 'crypto' && provider.walletAddress && (
+
+ Wallet:
+ {provider.walletAddress}
+
+ )}
+ {provider.paymentMethod === 'bank' && (
+ <>
+
Bank: {provider.bankName}
+
Account: {provider.accountNumber}
+ >
+ )}
+ {provider.taxId &&
Tax ID: {provider.taxId}
}
+
+
+
+
+ {/* Verification info */}
+
+
Verification Status
+
+
+
+ Verified via {provider.selfVerified ? 'Self Protocol' : 'Document Upload'}
+ {provider.selfVerificationName && ` as ${provider.selfVerificationName}`}
+
+
+
+
+
+
+ {/* Ad Locations */}
+
+
+
Your Ad Locations
window.location.reload()}
+ className="bg-black text-white hover:bg-gray-800"
+ onClick={() => router.push('/provider-dashboard/locations/new')}
>
- Retry Connection
+ Add New Location
- )}
-
- {/* Display blockchain connection status notification if there are errors */}
- {serviceError && (
-
-
Blockchain Connection Error
-
{serviceError.message || "Unable to connect to blockchain service"}
- {!isCorrectChain && (
-
- Switch to Holesky
-
- )}
+
+
+
No ad locations added yet. Add your first location to start earning.
- )}
-
+
+
- )
+ );
}
diff --git a/src/app/provider-registration/page.tsx b/src/app/provider-registration/page.tsx
index 5ce5aae..c3444a1 100644
--- a/src/app/provider-registration/page.tsx
+++ b/src/app/provider-registration/page.tsx
@@ -2,7 +2,7 @@
import { useState, useEffect } from "react"
import { useRouter } from "next/navigation"
-import { Check, ChevronRight, Building2, CreditCard, FileText, MapPin, Loader2, AlertCircle, Scan } from "lucide-react"
+import { Check, ChevronRight, Building2, CreditCard, FileText, Loader2, Scan } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
@@ -10,8 +10,6 @@ import { Textarea } from "@/components/ui/textarea"
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
import { useRoleStore } from "@/lib/store"
import { toast } from "@/lib/toast"
-import { useAdContract } from "@/hooks/use-ad-contract"
-import { usePrivy } from "@privy-io/react-auth"
import { v4 as uuidv4 } from "uuid"
import dynamic from "next/dynamic"
@@ -22,8 +20,6 @@ const SelfQRcodeWrapper = dynamic(
)
// Import types but don't actually import the module directly
-// This is just for TypeScript type checking
-type SelfAppBuilderType = import('@selfxyz/qrcode').SelfAppBuilder;
type SelfAppOptionsType = import('@selfxyz/qrcode').SelfAppOptions;
// Type definitions for component props
@@ -246,6 +242,7 @@ const VerificationStep = ({ formData, updateForm, nextStep, prevStep }: StepProp
const [userId, setUserId] = useState
(null);
const [selfAppInstance, setSelfAppInstance] = useState(null);
const [loadingQR, setLoadingQR] = useState(false);
+ const [isSubmitting, setIsSubmitting] = useState(false);
useEffect(() => {
// Generate a user ID when the component mounts if it doesn't exist
@@ -268,18 +265,16 @@ const VerificationStep = ({ formData, updateForm, nextStep, prevStep }: StepProp
const config: SelfAppOptionsType = {
appName: "AdNet Protocol",
scope: "adnet-protocol",
- endpoint: `${window.location.origin}/api/verify`,
+ endpoint: `https://3b28-111-235-226-124.ngrok-free.app/api/verify`,
+ endpointType: "staging_https",
+ logoBase64: "https://i.imgur.com/Rz8B3s7.png",
userId,
+ devMode: true,
disclosures: {
- // Request passport information
name: true,
nationality: true,
date_of_birth: true,
-
- // Set verification rules
minimumAge: 18,
- excludedCountries: ["IRN", "PRK", "RUS"],
- ofac: true,
},
};
@@ -301,7 +296,7 @@ const VerificationStep = ({ formData, updateForm, nextStep, prevStep }: StepProp
setShowSelfQR(true);
};
- const handleSelfVerificationSuccess = (data: any) => {
+ const handleSelfVerificationSuccess = (data: Record) => {
console.log("Self verification successful:", data);
// Update the form with verification data
@@ -310,8 +305,8 @@ const VerificationStep = ({ formData, updateForm, nextStep, prevStep }: StepProp
selfVerificationData: {
name: data?.credentialSubject?.name,
nationality: data?.credentialSubject?.nationality,
- date_of_birth: data?.credentialSubject?.date_of_birth
- }
+ date_of_birth: data?.credentialSubject?.date_of_birth,
+ },
});
setShowSelfQR(false);
@@ -327,7 +322,6 @@ const VerificationStep = ({ formData, updateForm, nextStep, prevStep }: StepProp
// Only render the Self QR code if userId exists and showSelfQR is true
const renderSelfQRCode = () => {
if (!userId || !showSelfQR) return null;
-
if (typeof window === 'undefined') return null;
return (
@@ -373,15 +367,21 @@ const VerificationStep = ({ formData, updateForm, nextStep, prevStep }: StepProp
);
};
+ // Pass the isSubmitting state up to the parent component
+ const handleNext = () => {
+ setIsSubmitting(true);
+ nextStep();
+ };
+
return (
Verification
-
Upload documents to verify your business identity.
+
Verify your identity and business. Choose one option:
{/* Self Protocol Verification Option */}
-
Identity Verification
+
Identity Verification via Self
@@ -418,51 +418,58 @@ const VerificationStep = ({ formData, updateForm, nextStep, prevStep }: StepProp
- {/* Existing Verification Options */}
-
-
ID Verification (Alternative)
-
-
-
-
- Upload a government-issued ID (Passport, Driver's License, etc.)
-
-
updateForm({ idVerified: true })}
- >
- Upload ID
-
- {formData.idVerified && (
-
-
Uploaded
+ {/* Render alternative verification options only if not verified via Self */}
+ {!formData.selfVerified && (
+ <>
+
+
ID Verification (Alternative)
+
+
+
+
+ Upload a government-issued ID (Passport, Driver's License, etc.)
+
+
updateForm({ idVerified: true })}
+ >
+ Upload ID
+
+ {formData.idVerified && (
+
+ Uploaded
+
+ )}
- )}
+
-
-
-
-
Business Verification
-
-
-
-
Upload business registration documents or proof of business
-
updateForm({ businessVerified: true })}
- >
- Upload Documents
-
- {formData.businessVerified && (
-
-
Uploaded
+
+
Business Verification
+
+
+
+
+ Upload business registration documents or proof of business
+
+
updateForm({ businessVerified: true })}
+ >
+ Upload Documents
+
+ {formData.businessVerified && (
+
+ Uploaded
+
+ )}
- )}
+
-
-
+ >
+ )}
+ {/* Terms & Conditions */}
Terms & Conditions
@@ -474,8 +481,7 @@ const VerificationStep = ({ formData, updateForm, nextStep, prevStep }: StepProp
onChange={(e) => updateForm({ termsAgreed: e.target.checked })}
/>
- I agree to the AdNet Provider Terms of Service and understand that my information will be verified before
- I can list locations.
+ I agree to the AdNet Provider Terms of Service and understand that my information will be verified before I can list locations.
@@ -488,25 +494,38 @@ const VerificationStep = ({ formData, updateForm, nextStep, prevStep }: StepProp
Back
- Complete Registration
+ {isSubmitting ? (
+ <>
+
+ Submitting...
+ >
+ ) : (
+ <>Complete Registration >
+ )}
- )
-}
+ );
+};
-const SuccessStep = ({ router, transactionHash = null }: {
- router: any;
- transactionHash?: string | null;
-}) => {
+const SuccessStep = ({ router }: { router: ReturnType
}) => {
return (
@@ -514,24 +533,9 @@ const SuccessStep = ({ router, transactionHash = null }: {
Registration Complete!
- Congratulations! Your provider account has been successfully created and registered on-chain.
+ Congratulations! Your provider account has been successfully created.
- {transactionHash && (
-
- )}
-
router.push("/provider-dashboard")}
className="w-full bg-[#FF3366] text-white border-[3px] border-black hover:bg-[#e0234e] transition-all font-bold py-6 h-auto rounded-none"
@@ -542,221 +546,11 @@ const SuccessStep = ({ router, transactionHash = null }: {
)
}
-const OnChainRegistrationStep = ({
- formData,
- prevStep,
- completeRegistration
-}: {
- formData: FormData;
- prevStep: () => void;
- completeRegistration: (hash: string) => void;
-}) => {
- const { operations, isLoading, error, isCorrectChain, switchChain } = useAdContract();
- const { authenticated, login } = usePrivy();
- const [isRegistering, setIsRegistering] = useState(false);
-
- // Generate a metadata string from the form data
- const generateMetadata = () => {
- return JSON.stringify({
- businessName: formData.businessName,
- businessType: formData.businessType,
- businessEmail: formData.businessEmail,
- paymentMethod: formData.paymentMethod
- });
- };
-
- // Generate a unique device ID (just for demo purposes)
- const generateDeviceId = () => {
- return `0x${Math.random().toString(16).slice(2, 10)}${Math.random().toString(16).slice(2, 10)}`;
- };
-
- const handleConnect = async () => {
- try {
- await login();
- } catch (err) {
- console.error("Login error:", err);
- toast(
- "Login Failed",
- { description: "Failed to connect wallet. Please try again." },
- "error"
- );
- }
- };
-
- const handleSwitchNetwork = async () => {
- try {
- await switchChain();
- } catch (err) {
- console.error("Network switch error:", err);
- toast(
- "Network Switch Failed",
- { description: "Failed to switch network. Please try manually." },
- "error"
- );
- }
- };
-
- const handleRegister = async () => {
- setIsRegistering(true);
-
- try {
- const metadata = generateMetadata();
- const deviceId = generateDeviceId();
-
- const hash = await operations.registerProvider.execute(metadata, deviceId);
-
- if (hash) {
- toast(
- "Registration Submitted",
- { description: "Your provider registration has been submitted to the blockchain." },
- "success"
- );
-
- // Pass the transaction hash to the success step
- completeRegistration(hash);
- } else {
- throw new Error("Failed to register provider - transaction not sent");
- }
- } catch (err) {
- console.error("Registration error:", err);
- toast(
- "Registration Failed",
- { description: err instanceof Error ? err.message : "Unknown error" },
- "error"
- );
- setIsRegistering(false);
- }
- };
-
- // Not authenticated
- if (!authenticated) {
- return (
-
-
On-Chain Registration
-
Connect your wallet to complete the provider registration on the blockchain.
-
-
-
-
-
-
Wallet Connection Required
-
- To register as a provider, you'll need to connect your wallet and submit an on-chain transaction.
-
-
-
-
-
-
- Connect Wallet
-
-
-
- Back
-
-
- );
- }
-
- // Wrong network
- if (!isCorrectChain) {
- return (
-
-
On-Chain Registration
-
Switch to the Holesky testnet to complete your registration.
-
-
-
-
-
-
Wrong Network
-
- Please switch to the Holesky testnet to register as a provider.
-
-
-
-
-
-
- Switch to Holesky Testnet
-
-
-
- Back
-
-
- );
- }
-
- return (
-
-
On-Chain Registration
-
Complete your provider registration on the blockchain to start earning.
-
-
-
Ready to Register
-
- Your information is ready to be registered on the blockchain. This requires a transaction to be signed with your wallet.
-
-
-
-
-
Business Name:
-
{formData.businessName}
-
-
Business Type:
-
{formData.businessType}
-
-
Email:
-
{formData.businessEmail}
-
-
-
-
-
-
- Back
-
-
- {isRegistering ? (
- <>
-
- Registering...
- >
- ) : (
- "Complete Registration"
- )}
-
-
-
- );
-};
-
export default function ProviderRegistrationPage() {
const router = useRouter()
const { setProviderRegistered } = useRoleStore()
const [currentStep, setCurrentStep] = useState(1)
- const [transactionHash, setTransactionHash] = useState(null)
+ const [isSubmitting, setIsSubmitting] = useState(false)
const [formData, setFormData] = useState({
businessName: "",
businessType: "individual",
@@ -788,6 +582,14 @@ export default function ProviderRegistrationPage() {
toast("Missing Information", { description: "Please enter your wallet address" }, "error")
return
}
+
+ // If we're at the verification step and it's validated, submit the form
+ if (currentStep === 3 &&
+ ((formData.selfVerified && formData.termsAgreed) ||
+ (!formData.selfVerified && formData.idVerified && formData.businessVerified && formData.termsAgreed))) {
+ handleSubmitProvider();
+ return;
+ }
setCurrentStep(currentStep + 1)
}
@@ -795,19 +597,53 @@ export default function ProviderRegistrationPage() {
const prevStep = () => {
setCurrentStep(currentStep - 1)
}
-
- const completeRegistration = (hash: string) => {
- setTransactionHash(hash);
- setProviderRegistered(true);
- setCurrentStep(5);
- }
+
+ const handleSubmitProvider = async () => {
+ try {
+ setIsSubmitting(true);
+
+ const response = await fetch('/api/provider/register', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify(formData),
+ });
+
+ const data = await response.json();
+
+ if (!response.ok) {
+ throw new Error(data.error || 'Failed to register provider');
+ }
+
+ // Set provider as registered in the store
+ setProviderRegistered(true);
+
+ // Move to success page
+ setCurrentStep(4);
+
+ toast(
+ "Registration Successful",
+ { description: "Your provider account has been created successfully." },
+ "success"
+ );
+ } catch (error) {
+ console.error('Error registering provider:', error);
+ toast(
+ "Registration Failed",
+ { description: error instanceof Error ? error.message : "An unknown error occurred" },
+ "error"
+ );
+ } finally {
+ setIsSubmitting(false);
+ }
+ };
const renderProgressSteps = () => {
const steps = [
{ icon: Building2, label: "Business Info" },
{ icon: CreditCard, label: "Payment Setup" },
{ icon: FileText, label: "Verification" },
- { icon: MapPin, label: "On-Chain Registration" },
]
return (
@@ -846,7 +682,7 @@ export default function ProviderRegistrationPage() {
Provider Registration
- {currentStep <= 4 && renderProgressSteps()}
+ {currentStep <= 3 && renderProgressSteps()}
{currentStep === 1 && }
@@ -856,18 +692,15 @@ export default function ProviderRegistrationPage() {
)}
{currentStep === 3 && (
-
- )}
-
- {currentStep === 4 && (
-
)}
- {currentStep === 5 && }
+ {currentStep === 4 && }
)
diff --git a/src/hooks/use-provider.ts b/src/hooks/use-provider.ts
new file mode 100644
index 0000000..7ddf782
--- /dev/null
+++ b/src/hooks/use-provider.ts
@@ -0,0 +1,77 @@
+import { useState, useEffect } from 'react';
+import { toast } from '@/lib/toast';
+
+interface Provider {
+ id: string;
+ businessName: string;
+ businessType: string;
+ businessEmail: string;
+ businessAddress: string;
+ paymentMethod: string;
+ walletAddress: string | null;
+ bankName: string | null;
+ accountNumber: string | null;
+ taxId: string | null;
+ selfVerified: boolean;
+ selfVerificationName: string | null;
+}
+
+interface UseProviderResult {
+ provider: Provider | null;
+ isLoading: boolean;
+ error: string | null;
+ refreshProvider: () => Promise;
+ needsRegistration: boolean;
+}
+
+export function useProvider(): UseProviderResult {
+ const [provider, setProvider] = useState(null);
+ const [isLoading, setIsLoading] = useState(true);
+ const [error, setError] = useState(null);
+ const [needsRegistration, setNeedsRegistration] = useState(false);
+
+ const fetchProviderData = async () => {
+ try {
+ setIsLoading(true);
+ setError(null);
+
+ const response = await fetch('/api/provider/data');
+ const data = await response.json();
+
+ if (!response.ok) {
+ // Check if we need registration
+ if (data.needsRegistration) {
+ setNeedsRegistration(true);
+ setProvider(null);
+ } else {
+ throw new Error(data.error || 'Failed to fetch provider data');
+ }
+ } else {
+ setProvider(data.provider);
+ setNeedsRegistration(false);
+ }
+ } catch (err) {
+ console.error('Error fetching provider data:', err);
+ setError(err instanceof Error ? err.message : 'An unknown error occurred');
+ toast(
+ "Error",
+ { description: err instanceof Error ? err.message : "Failed to load provider data" },
+ "error"
+ );
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ useEffect(() => {
+ fetchProviderData();
+ }, []);
+
+ return {
+ provider,
+ isLoading,
+ error,
+ refreshProvider: fetchProviderData,
+ needsRegistration
+ };
+}
\ No newline at end of file
diff --git a/src/lib/auth.ts b/src/lib/auth.ts
new file mode 100644
index 0000000..58f7aaa
--- /dev/null
+++ b/src/lib/auth.ts
@@ -0,0 +1,16 @@
+// Simple auth implementation for development
+// In a real application, you would use a proper auth library
+
+/**
+ * Get the current user session
+ * This is a mock implementation that always returns a dev user
+ */
+export async function getSession() {
+ // For development purposes only - this always returns a mock session
+ // Replace with real authentication in production
+ return {
+ user: {
+ id: 'dev-user-id',
+ }
+ };
+}
\ No newline at end of file
diff --git a/src/types/self.d.ts b/src/types/self.d.ts
index 58607c0..1368faf 100644
--- a/src/types/self.d.ts
+++ b/src/types/self.d.ts
@@ -3,8 +3,10 @@ declare module '@selfxyz/qrcode' {
appName: string;
scope: string;
endpoint: string;
+ endpointType?: string;
logoBase64?: string;
userId: string;
+ devMode?: boolean;
disclosures?: {
issuing_state?: boolean;
name?: boolean;
@@ -47,7 +49,7 @@ declare module '@selfxyz/core' {
}
export class SelfBackendVerifier {
- constructor(rpcUrl: string, scope: string);
+ constructor(scope: string, endpoint: string, identityType?: string, devMode?: boolean, mockPassport?: boolean);
setMinimumAge(age: number): void;
excludeCountries(...countries: string[]): void;
enableNameAndDobOfacCheck(): void;