Skip to main content
  • Snap

snap_getWebSockets

Description

Get the connected WebSockets for the Snap.

Parameters

This method does not have any parameters.

Returns

object[]

An array of connected WebSockets for the Snap.

object

id

string

The unique identifier of the WebSocket connection.

url

string

The URL of the WebSocket connection.

protocols

string[]

An array of subprotocols used in the WebSocket connection (if any).

Example

{
"initialPermissions": {
"endowment:network-access": {}
}
}