Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for Custom WSS Endpoint in Jupiter Terminal Widget #76

Open
cereum opened this issue May 30, 2024 · 1 comment
Open

Allow for Custom WSS Endpoint in Jupiter Terminal Widget #76

cereum opened this issue May 30, 2024 · 1 comment

Comments

@cereum
Copy link

cereum commented May 30, 2024

Description

The Jupiter Terminal Widget currently allows users to set a custom RPC endpoint. However, there is an issue when using session-based authentication on Vercel to secure the endpoint. We have a session-based authenticated websocket endpoint, but the terminal interface only accepts a single endpoint for both HTTP and WSS requests.

Due to using an API route, it is not possible to handle websockets in the same place as the RPC endpoint. This limitation prevents us from properly configuring the authentication for our specific setup.

Proposed Solution

To address this issue, we suggest modifying the Jupiter Terminal Widget to allow users to specify separate endpoints for HTTP and WSS requests. This enhancement would align with the connection configuration exposed by @solana/web3.js and provide more flexibility for users with custom authentication requirements.

The proposed changes would include:

  1. Updating the widget's configuration options to accept two separate endpoints:
  • endpoint: The HTTP endpoint for RPC requests.
  • wsEndpoint (optional): The WSS endpoint for websocket connections.
  1. Modifying the internal logic of the widget to use the specified wsEndpoint (if provided) for establishing websocket connections, while continuing to use the endpoint for regular HTTP requests.
  2. Updating the widget's documentation and examples to reflect the new configuration options and their usage.

By implementing this enhancement, users will have the flexibility to configure the Jupiter Terminal Widget to work seamlessly with their session-based authenticated websocket endpoints on Vercel or other hosting platforms.

@worlddlckgh
Copy link
Contributor

Hi, we have this PR that I hope would be useful,
#87

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 a pull request may close this issue.

2 participants