-
Notifications
You must be signed in to change notification settings - Fork 42
X402 Transactions #627
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
Merged
Merged
X402 Transactions #627
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
|
🚅 Deployed to the echo-pr-627 environment in echo
|
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
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.
This PR adds the ability to track x402 transactions in the echo control plane, and the ability to set markup on transactions that pass through echo.
Echo apps can now pass x-echo-app-id when requesting LLM resources with x402. This will allow them to charge a mark-up to the end user. They can claim this payout via Echo, in the creator earnings screen. Currently we support mark-up only, not referrals for x402.
Adding a few fields + enums to the transactions and payouts table in order to support these features, as well as the tracking of funds from the server wallet into their respective places.
All payouts are now managed through echo-control, there is no fund-repo events happening in the router (and as a result, none are happening in the hot path). The only transfer that occurs in echo-data is the refund events that occur during finalization or otherwise.
Resources are still delivered at cost - this can be done in a later PR once the Echo markup system is stable.
A follow-on PR can include wallet identification for requesting users.
env var updates to control:
Coinbase CDP (5 variables)
CDP_API_KEY_ID
CDP_API_KEY_SECRET
CDP_WALLET_SECRET
WALLET_OWNER
BASE_RPC_URL
Crypto Addresses (3 variables)
USDC_ADDRESS
ETH_ADDRESS
ECHO_PAYOUTS_ADDRESS
Merit (2 variables)
MERIT_CONTRACT_ADDRESS
MERIT_REPO_ID