Skip to content

Remove WebSocket client and streaming APIs from JSON-RPC transport#965

Merged
hayes-mysten merged 3 commits intomainfrom
worktree-remove-jsonrpc-websocket
Mar 24, 2026
Merged

Remove WebSocket client and streaming APIs from JSON-RPC transport#965
hayes-mysten merged 3 commits intomainfrom
worktree-remove-jsonrpc-websocket

Conversation

@hayes-mysten
Copy link
Contributor

Description

Remove the WebSocket-based subscription system from the JSON-RPC client. This removes:

  • rpc-websocket-client.ts (the WebsocketClient class)
  • subscribe method from JsonRpcHTTPTransport and JsonRpcTransport interface
  • WebSocketConstructor and websocket options from JsonRpcHTTPTransportOptions
  • JsonRpcTransportSubscribeOptions exported type
  • Unsubscribe type from jsonRpc/types/common.ts
  • ws and @types/ws dev dependencies
  • All subscription-related unit tests

Test plan

  • Unit tests updated: removed subscription tests from http-transport.test.ts, kept HTTP request tests
  • E2e setup updated: removed WebSocketConstructor from test client construction
  • Verified no remaining references to removed APIs in source code

AI Assistance Notice

  • This PR was primarily written by AI.
  • I used AI for docs / tests, but manually wrote the source code.
  • I used AI to understand the problem space / repository.
  • I did not use AI for this PR.

Remove the WebSocket-based subscription system from the JSON-RPC client,
including rpc-websocket-client.ts, the subscribe method on
JsonRpcHTTPTransport, and related types (JsonRpcTransportSubscribeOptions,
Unsubscribe, WebsocketClientOptions). Also removes ws/\@types/ws dev deps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hayes-mysten hayes-mysten requested a review from a team as a code owner March 24, 2026 23:12
@vercel
Copy link

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sui-typescript-docs Ignored Ignored Preview Mar 24, 2026 11:16pm

Request Review

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hayes-mysten hayes-mysten had a problem deploying to sui-typescript-aws-kms-test-env March 24, 2026 23:14 — with GitHub Actions Failure
@@ -0,0 +1,5 @@
---
'@mysten/sui': minor
Copy link
Collaborator

Choose a reason for hiding this comment

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

We're just doing this because this has never worked right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we removed all the methods in 2.0, I think everything we are removing is either internal only, or removing options that won't cause issues if you continue to pass them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess there are some types that may have been re-exported, but unlikely they are being used

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hayes-mysten hayes-mysten temporarily deployed to sui-typescript-aws-kms-test-env March 24, 2026 23:16 — with GitHub Actions Inactive
@hayes-mysten hayes-mysten merged commit 319aae1 into main Mar 24, 2026
9 checks passed
@hayes-mysten hayes-mysten deleted the worktree-remove-jsonrpc-websocket branch March 24, 2026 23:26
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