Skip to content

feat(perms): add SSE subscribe_bundles to BuilderTxCache#131

Merged
Evalir merged 2 commits intomainfrom
evalir/subscribe-bundles-sse
Apr 2, 2026
Merged

feat(perms): add SSE subscribe_bundles to BuilderTxCache#131
Evalir merged 2 commits intomainfrom
evalir/subscribe-bundles-sse

Conversation

@Evalir
Copy link
Copy Markdown
Member

@Evalir Evalir commented Apr 2, 2026

Summary

  • Adds a new sse cargo feature that enables signet-tx-cache/sse, gated behind perms so SSE deps (eventsource-stream, serde_json) stay opt-in
  • Adds subscribe_bundles() to BuilderTxCache which connects to the /bundles/feed SSE endpoint with bearer auth, using the upstream subscribe_inner helper to avoid code duplication
  • Bundles are a protected route, so the method fetches the OAuth token from SharedToken and passes it as Some(&secret) — unlike subscribe_transactions/subscribe_orders which pass None

Test plan

  • cargo check --features sse compiles
  • cargo check --features perms still compiles (no regression)

🤖 Generated with Claude Code

Copy link
Copy Markdown
Member Author

Evalir commented Apr 2, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Evalir Evalir requested review from Fraser999 and prestwich April 2, 2026 14:31
}

const BUNDLES: &str = "bundles";
#[cfg(feature = "sse")]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we're missing this feature from the manifest. I expect we want something like:

sse = ["perms", "signet-tx-cache/sse"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep i messed up a conflict marker here :D

Evalir and others added 2 commits April 2, 2026 16:44
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Evalir Evalir force-pushed the evalir/subscribe-bundles-sse branch from ada1356 to f6dfdd3 Compare April 2, 2026 14:45
@Evalir Evalir merged commit e41792e into main Apr 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants