-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add HMAC-authenticated analytics API endpoints #63
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,8 +36,23 @@ generate: | |||||||||||||||||||||||||
| nostr: | ||||||||||||||||||||||||||
| private_key: "hex private key here" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # API Send Configuration | ||||||||||||||||||||||||||
| # API Configuration | ||||||||||||||||||||||||||
| api: | ||||||||||||||||||||||||||
| # Analytics API - HMAC authenticated endpoints for data export | ||||||||||||||||||||||||||
| # Generate secrets with: openssl rand -hex 32 | ||||||||||||||||||||||||||
| analytics: | ||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||
| timestamp_tolerance: 300 # seconds (5 minutes) | ||||||||||||||||||||||||||
| api_keys: | ||||||||||||||||||||||||||
| data-team: | ||||||||||||||||||||||||||
| name: "Data Team" | ||||||||||||||||||||||||||
| hmac_secret: "your-analytics-hmac-secret-here" | ||||||||||||||||||||||||||
|
Comment on lines
+44
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The sample analytics config disables itself as written.
Suggested fix- enabled: true
+ enabled: false📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| # Add more keys for different consumers: | ||||||||||||||||||||||||||
| # dashboard: | ||||||||||||||||||||||||||
| # name: "Internal Dashboard" | ||||||||||||||||||||||||||
| # hmac_secret: "another-secure-secret-here" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Send API - wallet-based HMAC authenticated endpoints | ||||||||||||||||||||||||||
| send: | ||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||
| internal_network: "10.0.0.0/24" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 186
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 49
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 92
🏁 Script executed:
# Check the git diff for the .gitignore change to understand context git diff HEAD -- .gitignoreRepository: CeyLabs/BitcoinDeepaBot
Length of output: 49
🏁 Script executed:
# Check the analytics.go file to understand what it does head -n 50 internal/api/analytics.goRepository: CeyLabs/BitcoinDeepaBot
Length of output: 1828
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 99
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 103
🏁 Script executed:
# Check the main README for API documentation cat README.mdRepository: CeyLabs/BitcoinDeepaBot
Length of output: 7939
🏁 Script executed:
# Check the .gitignore context - look at the full file to understand the pattern cat .gitignoreRepository: CeyLabs/BitcoinDeepaBot
Length of output: 312
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 81
🏁 Script executed:
Repository: CeyLabs/BitcoinDeepaBot
Length of output: 146
Remove unnecessary .gitignore entries for non-existent analytics documentation files.
ANALYTICS_API.mdandANALYTICS_QUICKSTART.mddo not exist in the repository and are not referenced anywhere in the codebase. The.gitignoreentries for these files appear to be preventative but serve no current purpose.Either:
.gitignoreentries if documentation is not planned, orIf these files are intended as documentation for the analytics functionality in
internal/api/analytics.go, they should be tracked in version control.🤖 Prompt for AI Agents