Impervious
Search…
Websocket
Listen or subscribe to inbound messages (events) from your Impervious node.

Overview

The websocket output is a stream of messages, with the above message ID, or a far end message ID. The websocket is used for asynchronous/random reception of messages. For some API endpoints, the response is via the websocket because there could be a long wait state for the Lightning Network to forward the messages. In our design, these GRPC/REST interfaces, generate a message ID, fire off the message into the Lightning Network, and then immediately respond to the developer with the message ID. The developer then monitors the websocket for that message ID to return. It is recommended to always monitor the websocket for asynchronous incoming messages. Do not transmit INTO the websocket, it will be ignored.

proto/imp/api/websocket/websocket.proto

Allows for receiving messages from your IMP node

Websocket

Websocket service allows for receiving messages received into your Impervious node.
Method Name
Request Type
Response Type
Description
Subscribe
SubscribeRequest
SubscribeResponse stream
Subscribe opens up a stream/websocket to receive all messages received on your Impervious node.

HTTP bindings

Method Name
Method
Pattern
Subscribe
GET
/v1/subscribe

SubscribeRequest

Represents a request to subscribe to the event websocket

SubscribeResponse

Represents a response back from the websocket containing event information
Field
Type
Label
Description
id
string
The ID of the message
reply_to_id
string
Optional ID of the message the sender is replying to
from_pubkey
string
The node that sent the message
data
bytes
The data the node is sending over
service_type
string
The type of service the message is meant for
amount
int64
The amount sent as part of the message

Scalar Value Types

.proto Type
C++
Java
Python
Go
C#
PHP
Ruby
double
double
double
float
float64
double
float
Float
float
float
float
float
float32
float
float
Float
int32
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
int64
int64
long
int/long
int64
long
integer/string
Bignum
uint32
uint32
int
int/long
uint32
uint
integer
Bignum or Fixnum (as required)
uint64
uint64
long
int/long
uint64
ulong
integer/string
Bignum or Fixnum (as required)
sint32
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
sint64
int64
long
int/long
int64
long
integer/string
Bignum
fixed32
uint32
int
int
uint32
uint
integer
Bignum or Fixnum (as required)
fixed64
uint64
long
int/long
uint64
ulong
integer/string
Bignum
sfixed32
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
sfixed64
int64
long
int/long
int64
long
integer/string
Bignum
bool
bool
boolean
boolean
bool
bool
boolean
TrueClass/FalseClass
string
string
String
str/unicode
string
string
string
String (UTF-8)
bytes
string
ByteString
str
[]byte
ByteString
string
String (ASCII-8BIT)
Last modified 1mo ago