eliza
eliza copied to clipboard
feat: implement coinbase webhook generation
Relates to:
Implementation of a Coinbase Webhook Plugin for Eliza.
Risks:
- Low Risk:
- Potential misconfiguration of the webhook URL.
- Possible delays in receiving real-time events due to network or service interruptions.
- Mitigation: Thorough testing using services like [Webhook.site](https://webhook.site) and error-handling mechanisms.
Background:
What does this PR do?
This PR introduces a plugin enabling Eliza to manage Coinbase webhooks. It allows real-time updates and actions based on cryptocurrency transactions, enhancing the system's dynamic capabilities.
What kind of change is this?
- Feature: Adds new functionality to create, manage, and retrieve Coinbase webhooks for cryptocurrency events.
- Improvement: Provides support for seamless integration with the Coinbase SDK.
Documentation changes needed?
- Yes:
- Update the project documentation to include instructions on configuring and testing the Coinbase Webhook Plugin.
- Add a section detailing supported event types and example webhook payloads.
Testing:
Where should a reviewer start?
- Review the
CREATE_WEBHOOKandwebhookProviderfunctionality for accurate event handling and API interactions. - Verify the implementation of error-handling and security measures (e.g., webhook secret validation).
Detailed testing steps:
-
Testing Webhook Creation:
- Use a public testing service like [Webhook.site](https://webhook.site) to create a webhook URL.
- Replace the
notificationUrifield in the example code with the generated URL. - Run the
CREATE_WEBHOOKaction and validate the response.
-
Testing Webhook Listing:
- Trigger the
webhookProvideraction to fetch and log existing webhooks. - Cross-check the response data with Coinbase's CDP portal to ensure consistency.
- Trigger the
-
Error Scenarios:
- Test webhook creation with invalid inputs (e.g., invalid network ID or event type) and confirm appropriate error responses.
-
Security Validation:
- Verify the webhook secret is securely stored and not exposed in logs or public code.
Deploy Notes:
- Deploy as part of the Eliza core runtime update.
- Ensure the necessary environment variables (e.g., API keys, webhook secret) are set in production.
- Include retry logic in case of intermittent service failures during webhook registration.
Database Changes:
- None: This plugin does not introduce database dependencies.
Deployment Instructions:
- Set up the Coinbase API key file in a secure environment.
- Configure
runtime.character.settings.secretswith the webhook secret. - Verify the webhook functionality using test and production environments.
Discord Username:
0x8664