Skip to content

Bun + Deno runtime compatibility audit #23

@truthixify

Description

@truthixify

Labels: Stellar Wave, compat, audit, drips, help-wanted
Tier: M (2–4 days)
Type: compat / audit

Context

The SDK is tested on Node 22. Modern serverless and edge platforms increasingly target Bun and Deno. Cloudflare Workers, Vercel Edge, and Deno Deploy are common deployment targets for "scan announcements for incoming payments" cron jobs. If the SDK silently fails on those runtimes, we've cut off a substantial integration surface.

Scope

Run the SDK test suite under each runtime and document the result:

  1. Bun (latest)
    • Install via bun install.
    • Run bun test (or wire vitest through bun's compat shim).
    • Document failures.
  2. Deno (latest, with --unstable-sloppy-imports if needed)
    • Use the npm specifier: import { ... } from "npm:@wraith-protocol/sdk@1.x/chains/stellar".
    • Run a smoke script that does the basic flow.
  3. Cloudflare Workers (workerd runtime)
    • Spin up wrangler dev and import the SDK.
    • Note any failures (likely crypto.randomBytes vs. crypto.getRandomValues).

For each runtime:

  • Document working / broken / partially-working state.
  • Identify the root cause of each break (missing API, different ESM resolution, etc.).
  • Fix the SDK where the fix is small and broadly applicable; document a polyfill or workaround where it isn't.

Acceptance criteria

  • COMPAT.md table covering Node 20/22, Bun, Deno, Cloudflare Workers, Vercel Edge.
  • All fixable issues fixed.
  • CI matrix expanded to include at least one non-Node runtime (Bun is easiest).
  • Docs guide added for "running Wraith on the edge."

Why this matters

Spectre, a Stellar-scanning cron, or any "watch this address" service is a natural fit for edge runtimes. Closing the gap unlocks a wave of integrators who don't want to run Node infrastructure.

Resources

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programauditProduces a written report as primary deliverablecompatBrowser / runtime compatibilitydripsFunded via Drips Networkhelp wantedExtra attention is needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions