Impervious
Search…
Messaging
Sends a raw message to the far end node.

Overview

The Messaging API allows for raw messaging to pass in between two Impervious nodes. Potential applications of this include chat, JSON passthrough, key exchanges, custom protocols, and sending invoices. Of course, there are many use cases for this API with some imagination!
As of IMP v0.1.4, you can now send longer data and even files through the lightning network with IMP! For this initial release, IMP will support up to ~480KB of data in a single message. For each 900 bytes of data, you are required to send at minimum 1 satoshi. IE, 9,000 bytes require the message to send at least 10 sats (not in addition, just at minimum). This is required so that the message can be split up amongst multiple lightning payment parts of 1 sat minimum.

proto/imp/api/messaging/messaging.proto

Allows for p2p messaging between Impervious nodes

Messaging

Messaging service allows for p2p messaging between Impervious nodes.
Method Name
Request Type
Response Type
Description
SendMessage
SendMessageRequest
SendMessageResponse
SendMessage sends a text message to another node.

HTTP bindings

Method Name
Method
Pattern
SendMessage
POST
/v1/message/send

SendMessageRequest

Represents a message send to a far end node
Field
Type
Label
Description
msg
bytes
the raw message itself to be sent to the far end node
pubkey
string
The public key of the far end lightning node running IMP
amount
int64
Optional satoshi amount to send along with the message, defaults to 1 sat.
reply_to_id
string
Optional ID of the message that this message is replying to.

SendMessageResponse

Represents a response back from a sent message
Field
Type
Label
Description
id
string
returned message ID

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