ln-service
Advanced tools
Comparing version 56.1.0 to 56.2.0
# Versions | ||
## 56.2.0 | ||
- `getChannels`: Add support for `type` to show channel type | ||
- `getWalletInfo`: Add support for LND 0.16.2 | ||
- `subscribeToChannels`: Add support for `channel_opened` `type` to show type | ||
## 56.1.0 | ||
@@ -4,0 +10,0 @@ |
@@ -14,3 +14,3 @@ { | ||
"invoices": "2.2.3", | ||
"lightning": "9.1.0", | ||
"lightning": "9.2.1", | ||
"macaroon": "3.0.4", | ||
@@ -32,3 +32,3 @@ "morgan": "1.10.0", | ||
"ecpair": "2.1.0", | ||
"ln-docker-daemons": "5.0.1", | ||
"ln-docker-daemons": "5.0.2", | ||
"p2tr": "1.3.3", | ||
@@ -61,2 +61,3 @@ "portfinder": "1.0.32", | ||
"scripts": { | ||
"integration-test-0.16.2": "DOCKER_LND_VERSION=v0.16.2-beta npm run test", | ||
"integration-test-0.16.1": "DOCKER_LND_VERSION=v0.16.1-beta npm run test", | ||
@@ -72,3 +73,3 @@ "integration-test-0.16.0": "DOCKER_LND_VERSION=v0.16.0-beta npm run test", | ||
}, | ||
"version": "56.1.0" | ||
"version": "56.2.0" | ||
} |
@@ -33,3 +33,3 @@ const {once} = require('events'); | ||
const timeout = 1000 * 20; | ||
const times = 500; | ||
const times = 1000; | ||
@@ -135,2 +135,4 @@ // Forfeiting a pending channel should remove the pending channel | ||
await broadcastChainTransaction({lnd, transaction}); | ||
await generate({}); | ||
@@ -137,0 +139,0 @@ |
@@ -31,4 +31,2 @@ const {spawnLightningCluster} = require('ln-docker-daemons'); | ||
const isAnchors = !!features.find(n => n.bit === anchorFeatureBit); | ||
equal(targetChan.is_partner_initiated, true, 'Self-init channel'); | ||
@@ -59,14 +57,5 @@ | ||
// LND 0.11.1 and below do not support anchor channels | ||
if (isAnchors) { | ||
equal(channel.local_balance, 896530, 'Local balance'); | ||
equal(channel.commit_transaction_fee, 2810, 'Commit fee'); | ||
equal(channel.commit_transaction_weight, 1116, 'Commit weight'); | ||
} else { | ||
equal(channel.local_balance, 890950, 'Local balance'); | ||
equal(channel.commit_transaction_fee, 9050, 'Commit fee'); | ||
equal(channel.commit_transaction_weight, 724, 'Commit weight'); | ||
} | ||
equal(channel.capacity, 1000000, 'Channel capacity'); | ||
equal(channel.commit_transaction_fee, 2810, 'Commit fee'); | ||
equal(channel.commit_transaction_weight, 1116, 'Commit weight'); | ||
equal(channel.id, chan.id, 'Channel id returned'); | ||
@@ -78,2 +67,3 @@ equal(channel.is_active, true, 'Channel active'); | ||
equal(channel.is_private, false, 'Channel not private'); | ||
equal(channel.local_balance, 896530, 'Local balance'); | ||
equal(channel.local_reserve, 10000, 'Local reserve'); | ||
@@ -88,2 +78,3 @@ equal(channel.partner_public_key, target.id, 'Pubkey'); | ||
equal(channel.transaction_vout, 0, 'Channel transactin vout'); | ||
equal(channel.type, 'anchor', 'Channel type is returned'); | ||
equal(channel.unsettled_balance, 0, 'Channel unsettled balance'); | ||
@@ -90,0 +81,0 @@ |
@@ -124,2 +124,3 @@ const asyncRetry = require('async/retry'); | ||
equal(openEvent.transaction_vout, channelOpen.transaction_vout, 'Fund vout'); | ||
equal(openEvent.type, 'anchor', 'Got channel type'); | ||
equal(openEvent.unsettled_balance, 0, 'No unsettled balance'); | ||
@@ -126,0 +127,0 @@ |
@@ -125,3 +125,3 @@ const {spawnLightningCluster} = require('ln-docker-daemons'); | ||
{ | ||
try { | ||
const {subscription} = await subscribeToRpcRequests({ | ||
@@ -170,6 +170,10 @@ lnd, | ||
await delay(2000); | ||
subscription.removeAllListeners(); | ||
} catch (err) { | ||
equal(err, null, 'Expected no error opening channel'); | ||
} | ||
{ | ||
try { | ||
const {subscription} = await subscribeToRpcRequests({ | ||
@@ -212,3 +216,3 @@ lnd, | ||
strictSame(code, 503, 'Close fails with server error'); | ||
strictSame(message, 'UnexpectedCloseChannelError', 'Close err message'); | ||
strictSame(message, 'UnexpectedCloseChannelError', 'Close error'); | ||
strictSame(raw.err.details, 'message', 'Custom message received'); | ||
@@ -219,2 +223,4 @@ } | ||
subscription.removeAllListeners(); | ||
} catch (err) { | ||
equal(err, null, 'Expected no error'); | ||
} | ||
@@ -243,33 +249,39 @@ | ||
try { | ||
// Attempt a payment | ||
await payViaRoutes({ | ||
lnd, | ||
routes: [{ | ||
fee: 0, | ||
fee_mtokens: '0', | ||
hops: [{ | ||
channel: '0x0x1', | ||
channel_capacity: 1, | ||
await asyncRetry({interval, times}, async () => { | ||
try { | ||
// Attempt a payment | ||
await payViaRoutes({ | ||
lnd, | ||
routes: [{ | ||
fee: 0, | ||
fee_mtokens: '0', | ||
forward: 0, | ||
forward_mtokens: '1', | ||
public_key: key, | ||
hops: [{ | ||
channel: '0x0x1', | ||
channel_capacity: 1, | ||
fee: 0, | ||
fee_mtokens: '0', | ||
forward: 0, | ||
forward_mtokens: '1', | ||
public_key: key, | ||
timeout: 1, | ||
}], | ||
mtokens: '1', | ||
timeout: 1, | ||
tokens: 0, | ||
}], | ||
mtokens: '1', | ||
timeout: 1, | ||
tokens: 0, | ||
}], | ||
}); | ||
}); | ||
fail('ExpectedPayViaRouteRejected'); | ||
} catch (err) { | ||
const [code, message] = err; | ||
fail('ExpectedPayViaRouteRejected'); | ||
} catch (err) { | ||
const [code, message] = err; | ||
equal(code, 503); | ||
equal(message, 'UnexpectedErrorWhenPayingViaRoute'); | ||
} | ||
if (message !== 'UnexpectedErrorWhenPayingViaRoute') { | ||
throw err; | ||
} | ||
equal(code, 503); | ||
equal(message, 'UnexpectedErrorWhenPayingViaRoute'); | ||
} | ||
}); | ||
subscription.removeAllListeners(); | ||
@@ -276,0 +288,0 @@ } |
@@ -208,9 +208,9 @@ const asyncRetry = require('async/retry'); | ||
// Generate the channel into a block | ||
await broadcastChainTransaction({ | ||
lnd, | ||
transaction: signedPrivate.transaction, | ||
}); | ||
const privateConfirmed = await asyncRetry({interval, times}, async () => { | ||
// Generate the channel into a block | ||
await broadcastChainTransaction({ | ||
lnd, | ||
transaction: signedPrivate.transaction, | ||
}); | ||
const privateConfirmed = await asyncRetry({interval, times}, async () => { | ||
await generate({}); | ||
@@ -217,0 +217,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
780925
13339
7526
+ Added@types/node@18.16.2(transitive)
+ Addedlightning@9.2.1(transitive)
- Removed@types/node@18.16.1(transitive)
- Removedlightning@9.1.0(transitive)
Updatedlightning@9.2.1