Skip to content

feat: add terminal JSON-RPC provider and WebSocket disposal - #283

Draft
sidhujag wants to merge 1 commit into
WalletConnect:masterfrom
sidhujag:codex/terminal-disposal
Draft

sidhujag wants to merge 1 commit into
WalletConnect:masterfrom
sidhujag:codex/terminal-disposal

Conversation

@sidhujag

@sidhujag sidhujag commented Nov 8, 2026

Copy link
Copy Markdown

Summary

Adds a distinct terminal disposal contract for JSON-RPC providers and WebSocket connections. Wallet hosts need to retire one authenticated client and its transport before closing storage or replacing that client.

  • Reject new operations immediately after disposal begins.
  • Cancel a connecting WebSocket and wait for native close completion.
  • Detach owned listeners and reject pending JSON-RPC responses.
  • Allow a request-specific AbortSignal without cancelling another request's connection.
  • Preserve ordinary disconnect/reconnect behavior.
  • Report an unsupported terminal connection explicitly.

Validation

  • 13 focused provider and WebSocket tests pass, including a real Node ws connecting-handshake cancellation.
  • Composed TypeScript check passes against the companion Core/SignClient source.
  • Existing source lint and formatting checks pass.

The focused tests use the existing Mocha/ts-node runner with the removed suppressImplicitAnyIndexErrors option disabled under the installed TypeScript compiler. Running Mocha through its programmatic API avoids Node's experimental TypeScript strip-only loader.

Integration

A companion Core/SignClient PR consumes these capabilities. Keep this draft during maintainer review and coordinated package release. Native iOS/Android close completion and live-relay qualification remain outstanding. No packages have been published from this branch.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Thank you for your contribution! We ask that you please read and sign our CTA Document before we can accept your contribution. You can sign the CTA simply by posting a Pull Request Comment with the following text:


I have read the CTA Document and I hereby sign the CTA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@sidhujag

sidhujag commented Nov 8, 2026

Copy link
Copy Markdown
Author

The companion Core/SignClient consumer is now open at WalletConnect/walletconnect-monorepo#7391. Both drafts have been tested together with source aliases, and the Core draft explicitly retains its package-release adoption gate.

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.

1 participant