Lightning Network probing utilities
npm install probingUtility methods to assist in probing Lightning Network destinations
Get a synthetic ignore list to simulate an outbound restriction
{
[ignore]: [{
from_public_key:
[to_public_key]:
}]
lnd:
out: [
}
@returns via cbk or Promise
{
ignore: [{
from_public_key:
to_public_key:
}]
}
Subscribe to a probe to find the max routable amount along a route
{
cltv:
[delay]:
hops: [{
channel:
public_key:
}]
lnd:
max:
[request]:
[routes]: [[{
base_fee_mtokens:
channel:
cltv_delta:
fee_rate:
public_key:
}]]
}
@returns
@event 'error'
@event 'evaluating'
{
tokens:
}
@event 'failure'
{}
@event 'success'
{
maximum:
}
Subscribe to a payment over multiple paths
{
[cltv_delta]:
destination:
id:
lnd:
[max_attempts]:
max_fee:
[max_timeout]:
mtokens:
paths: [{
channels: [
fee:
fee_mtokens:
liquidity:
relays: [
}]
payment:
[routes]: [[{
[base_fee_mtokens]:
[channel]:
[cltv_delta]:
[fee_rate]:
public_key:
}]]
}
@throws
@returns
@event 'error'
@event 'failure'
{}
@event 'paid'
{
secret:
}
@event 'path_success'
{
fee:
fee_mtokens:
hops: [{
channel:
channel_capacity:
fee_mtokens:
forward_mtokens:
timeout:
}]
id:
is_confirmed:
is_outgoing:
mtokens:
route: {
fee:
fee_mtokens:
hops: [{
channel:
channel_capacity:
fee:
fee_mtokens:
forward:
forward_mtokens:
public_key:
timeout:
}]
mtokens:
timeout:
tokens:
}
safe_fee:
safe_tokens:
secret:
tokens:
}
@event 'paying'
{
route: {
fee:
fee_mtokens:
hops: [{
channel:
channel_capacity:
fee:
fee_mtokens:
forward:
forward_mtokens:
public_key:
timeout:
}]
mtokens:
timeout:
tokens:
}
}
@event 'routing_failure'
{
[channel]:
[height]:
[index]:
[mtokens]:
[policy]: {
base_fee_mtokens:
cltv_delta:
fee_rate:
[is_disabled]:
max_htlc_mtokens:
min_htlc_mtokens:
}
public_key:
reason:
route: {
fee:
fee_mtokens:
hops: [{
channel:
channel_capacity:
fee:
fee_mtokens:
forward:
forward_mtokens:
public_key:
timeout:
}]
mtokens:
safe_fee:
safe_tokens:
timeout:
tokens:
}
[timeout_height]:
[update]: {
chain:
channel_flags:
extra_opaque_data:
message_flags:
signature:
}
}
@event 'success'
{
routes: [{
fee:
fee_mtokens:
hops: [{
channel:
channel_capacity:
fee_mtokens:
forward_mtokens:
timeout:
}]
id:
is_confirmed:
is_outgoing:
mtokens:
route: {
fee:
fee_mtokens:
hops: [{
channel:
channel_capacity:
fee:
fee_mtokens:
forward:
forward_mtokens:
public_key:
timeout:
}]
mtokens:
timeout:
tokens:
}
safe_fee:
safe_tokens:
secret:
tokens:
}]
}
Subscribe to find multiple paths to a destination
This method is not supported on versions below LND 0.10.0
{
[allow_stacking]: [{
from_public_key:
to_public_key:
}]
cltv_delta:
[destination]:
[features]: [{
bit:
}]
[ignore]: [{
from_public_key:
[to_public_key]:
}]
[incoming_peer]:
lnd:
[max_paths]:
[max_timeout_height]:
[mtokens]:
[outgoing_channel]:
[path_timeout_ms]:
[probe_timeout_ms]:
[routes]: [[{
[base_fee_mtokens]:
[channel]:
[cltv_delta]:
[fee_rate]:
public_key:
}]]
}
@throws
@returns
@event 'error'
@event 'evaluating'
{
tokens:
}
@event 'failure'
{}
@event 'probing'
{
route: {
[confidence]:
fee:
fee_mtokens:
hops: [{
channel:
channel_capacity:
fee:
fee_mtokens:
forward:
forward_mtokens:
public_key:
timeout:
}]
[messages]: [{
type:
value:
}]
mtokens:
[payment]:
safe_fee:
safe_tokens:
timeout:
tokens:
[total_mtokens]:
}
}
@event 'routing_failure'
{
[channel]:
index:
[mtokens]:
[policy]: {
base_fee_mtokens:
cltv_delta:
fee_rate:
[is_disabled]:
max_htlc_mtokens:
min_htlc_mtokens:
[public_key]:
[updated_at]:
}
[public_key]:
reason:
route: {
[confidence]:
fee:
fee_mtokens:
hops: [{
channel:
channel_capacity:
fee:
fee_mtokens:
forward:
forward_mtokens:
public_key:
timeout:
}]
[messages]: [{
type:
value:
}]
mtokens:
[payment]:
safe_fee:
safe_tokens:
timeout:
tokens:
[total_mtokens]:
}
[update]: {
chain:
channel_flags:
extra_opaque_data:
message_flags:
signature:
}
}
@event 'routing_success'
{
route: {
[confidence]:
fee:
fee_mtokens:
hops: [{
channel:
channel_capacity:
fee:
fee_mtokens:
forward:
forward_mtokens:
public_key:
timeout:
}]
[messages]: [{
type:
value:
}]
mtokens:
[payment]:
safe_fee:
safe_tokens:
timeout:
tokens:
[total_mtokens]:
}
[update]: {
chain:
channel_flags:
extra_opaque_data:
message_flags:
signature:
}
}
@event 'success'
{
paths: [{
channels: [
fee:
fee_mtokens:
liquidity:
relays: [
}]
}