Skip to content

Develop an off-main-thread Web Worker for generating complex Soroban XDR transaction trees #468

Description

@Damola-Sodiq

Description

Isolate the heavy cryptographic serialization of multi-operation Soroban XDR payloads into a dedicated Web Worker to prevent UI freezing.

Architecture & Context

When users batch multiple fractional asset purchases into a single atomic transaction, encoding the payload to XDR strings blocks the React main thread. Shifting this to a background worker keeps animations and inputs buttery smooth.

Technical Requirements

  • Instantiate a Web Worker within the Next.js Webpack configuration.
  • Pass JSON transaction intents via message passing and await the Base64 XDR result.
  • Ensure exact TypeScript typings for the asynchronous worker communication bridge.

Acceptance Criteria

  • XDR generation for 50+ operations does not drop main thread frames.
  • The worker instance scales and terminates correctly without leaking memory.
  • Error boundaries properly catch and surface XDR serialization failures.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions