-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Add consumer payment flow with AccessSettlement integration #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tnunamak
wants to merge
20
commits into
feat/PRO-768/data-access-v1
Choose a base branch
from
feat/payment-flow
base: feat/PRO-768/data-access-v1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add /consume page for data access requests and payment - Update @opendatalabs/vana-sdk to v0.1.0-alpha.e2f8234 - Integrate AccessSettlementController for payment settlement - Implement simple state machine: request → process → pay → download 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Update PGE_URL to new server: https://7e59ad2764...phala.network - Remove /api/pge/public-key proxy (no longer needed) - Call PGE directly from browser (CORS is now enabled) - Fix ESLint: remove unused derivePgeAddress import - Update .env.example with new PGE URL The new PGE deployment has CORS enabled, so browser clients can call /v1/public-key directly without needing a server-side proxy. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add ESLint disable for walletClient type assertion - Use vana-app pattern for SDK initialization - Add address guard to payment handler - Configure webpack to ignore .devcontainer symlink - Update task image URL to vanaorg/vana-task-demo - Remove yarn.lock in favor of package-lock.json 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The .devcontainer symlink is local-only and won't exist in Vercel, so the webpack ignore config is unnecessary. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add mounted state to prevent hydration mismatch between server and client when wallet connection state differs. Fixes React error #418 (hydration mismatch) caused by useAccount() having different values on server vs client. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add automatic Google OAuth access token refresh to prevent "Invalid Credentials" errors when tokens expire (after ~1 hour). Changes: - Implement refreshAccessToken() function to exchange refresh token for new access token - Track access token expiration time in JWT - Automatically refresh token when expired - Update TypeScript types for new session/JWT fields - Add detailed error logging for Google API calls Fixes 401 "Invalid Credentials" errors by refreshing expired tokens before making API calls. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix signature verification failure by signing the actual request body
instead of a separate timestamp message.
Issue:
- Frontend was signing: {"permission_id":1,"timestamp":...}
- Runtime was verifying: {"operation_request_json":{...},"permission_id":1}
- Result: Signature mismatch (recovered wrong signer address)
Fix:
- Build request body without signature
- Sign canonical JSON of request body (RFC 8785 format)
- Add signature to request body before sending
- Runtime can now recover correct signer address
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix artifact data structure mapping (top_keywords) - Update operation status polling endpoint - Improve error handling with user-friendly messages - Remove debug logging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ment-flow # Conflicts: # scripts/start-thinker-task.sh
Replace `any` type with properly typed ExtendedToken interface that extends JWT. Add null check for refresh token before using it in URLSearchParams. This ensures type safety and fixes ESLint no-explicit-any error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Updates start-thinker-task.sh to detect execution mode based on ORCHESTRATOR_URL env var. Supports both direct runtime connection and orchestrator-proxied connections with appropriate health checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add consumer-facing UI for viewing purchased operations and downloading artifacts with wallet signature authentication. Includes task health checking and automatic cleanup of stale tasks. Changes: - Add operation history view with payment status tracking - Implement artifact download with signature verification - Add data visualization for keywords, evolution, and insights - Add task health check and cleanup logic to startup script - Handle artifact authentication errors with clear user feedback Co-Authored-By: Claude <noreply@anthropic.com>
Fix compilation errors preventing Vercel deployment: - Replace unknown types with any for dynamic JSON data - Remove unused selectedOperation state variables - Wrap loadMyOperations in useCallback to fix hooks dependency - Move hooks before conditional render to follow Rules of Hooks - Fix payment status conditional to include both pending_payment and paying states Co-Authored-By: Claude <noreply@anthropic.com>
Updated dependencies to fix Next.js CVE vulnerabilities. The fix-react2shell-next tool automatically updated the following packages to their secure versions: - next - react-server-dom-webpack - react-server-dom-parcel - react-server-dom-turbopack All package.json files have been scanned and vulnerable versions have been patched to the correct fixed versions based on the official React advisory. Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
…isor-zeon0a Fix React Server Components RCE vulnerability
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements the data consumer payment flow, enabling users to request access to datasets, pay for operations, and download results.
Changes
New Consumer Page
/consumepage for data access requestsidle → requesting → processing → pending_payment → paying → paidSDK Upgrade
@opendatalabs/vana-sdkfrom^2.0.0to^v0.1.0-alpha.e2f8234AccessSettlementControllerfor on-chain payment settlementRuntimePermissionsControllerfor permission managementPayment Settlement
sdk.accessSettlement.settlePaymentWithNative()to pay invoices on-chainTesting
/consumepageDependencies
finalPricein responsesRelated
/workspace/mvp-design-v2-final.md🤖 Generated with Claude Code