Skip to content

Commit e1955e7

Browse files
committed
update to beta.55
1 parent 450a4ba commit e1955e7

15 files changed

Lines changed: 343 additions & 517 deletions

File tree

package-lock.json

Lines changed: 56 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"check": "tsc --noEmit"
77
},
88
"dependencies": {
9-
"@start9labs/start-sdk": "0.4.0-beta.48"
9+
"@start9labs/start-sdk": "^0.4.0-beta.53"
1010
},
1111
"devDependencies": {
1212
"@types/node": "^22.1.0",
1313
"@vercel/ncc": "^0.38.1",
14-
"bitcoind-startos": "git+https://github.com/Start9Labs/bitcoind-startos.git#update/040",
14+
"bitcoind-startos": "git+https://github.com/Start9Labs/bitcoind-startos.git#040/30.2",
1515
"prettier": "^3.2.5",
1616
"typescript": "^5.9.3"
1717
},

startos/actions/enableLightning.ts

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { configJson } from '../file-models/mempool-config.json'
22
import { sdk } from '../sdk'
3-
import { configJsonDefaults } from '../utils'
3+
import { lndMountpoint, clnMountpoint } from '../utils'
44
import { i18n } from '../i18n'
55
const { InputSpec, Value } = sdk
66

@@ -18,12 +18,12 @@ export const lightningInputSpec = InputSpec.of({
1818
})
1919

2020
export const matchLightningInputSpec = lightningInputSpec.validator
21-
export type LightningInputSpec = typeof matchLightningInputSpec._TYPE
21+
export type LightningInputSpec = typeof lightningInputSpec._TYPE
2222

2323
export const enableLightning = sdk.Action.withInput(
2424
'enable-lightning',
2525

26-
async ({ effects }) => ({
26+
{
2727
name: i18n('Enable Lightning'),
2828
description: i18n(
2929
'Use this setting to select the Lightning node used to serve network data to the Lightning tab in Mempool',
@@ -32,7 +32,7 @@ export const enableLightning = sdk.Action.withInput(
3232
allowedStatuses: 'any',
3333
group: null,
3434
visibility: 'enabled',
35-
}),
35+
},
3636

3737
// form input specification
3838
lightningInputSpec,
@@ -49,33 +49,27 @@ export const enableLightning = sdk.Action.withInput(
4949

5050
// the execution function
5151
async ({ effects, input }) => {
52-
const config = await configJson.read().const(effects)
53-
if (!config) throw new Error('Config file not found')
54-
55-
// return early if nothing changed
56-
if (
57-
config.LIGHTNING.ENABLED &&
58-
config.LIGHTNING.BACKEND === input.lightning
59-
)
60-
return
61-
6252
switch (input.lightning) {
6353
case 'lnd':
64-
config.LIGHTNING.ENABLED = true
65-
config.LIGHTNING.BACKEND = 'lnd'
66-
config.LND.TLS_CERT_PATH = configJsonDefaults.LND.TLS_CERT_PATH
67-
config.LND.MACAROON_PATH = configJsonDefaults.LND.MACAROON_PATH
54+
await configJson.merge(effects, {
55+
LIGHTNING: { ENABLED: true, BACKEND: 'lnd' },
56+
LND: {
57+
TLS_CERT_PATH: `${lndMountpoint}/tls.cert`,
58+
MACAROON_PATH: `${lndMountpoint}/readonly.macaroon`,
59+
},
60+
})
6861
break
6962
case 'cln':
70-
config.LIGHTNING.ENABLED = true
71-
config.LIGHTNING.BACKEND = 'cln'
72-
config.CLIGHTNING.SOCKET = configJsonDefaults.CLIGHTNING.SOCKET
63+
await configJson.merge(effects, {
64+
LIGHTNING: { ENABLED: true, BACKEND: 'cln' },
65+
CLIGHTNING: { SOCKET: `${clnMountpoint}/lightning-rpc` },
66+
})
7367
break
7468
default:
75-
config.LIGHTNING.ENABLED = false
69+
await configJson.merge(effects, {
70+
LIGHTNING: { ENABLED: false },
71+
})
7672
break
7773
}
78-
79-
await configJson.merge(effects, config)
8074
},
8175
)

startos/actions/selectIndexer.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,19 @@ const indexerInputSpec = InputSpec.of({
1515
}),
1616
})
1717

18-
const matchElectrsInputSpec = indexerInputSpec.validator
19-
type ElectrsInputSpec = typeof matchElectrsInputSpec._TYPE
20-
2118
export const selectIndexer = sdk.Action.withInput(
2219
'select-indexer',
2320

24-
async ({ effects }) => ({
21+
{
2522
name: i18n('Select Indexer'),
26-
description: i18n('Enables address lookups via an internal indexer instance'),
23+
description: i18n(
24+
'Enables address lookups via an internal indexer instance',
25+
),
2726
warning: null,
2827
allowedStatuses: 'any',
2928
group: null,
3029
visibility: 'enabled',
31-
}),
30+
},
3231

3332
// form input specification
3433
indexerInputSpec,

startos/dependencies.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const setDependencies = sdk.setupDependencies(async ({ effects }) => {
3535
id: 'lnd',
3636
kind: 'running',
3737
versionRange: '>=0.19.3-beta:1-beta.0',
38-
healthChecks: [],
38+
healthChecks: ['lnd'],
3939
}
4040
}
4141

@@ -69,8 +69,8 @@ export const setDependencies = sdk.setupDependencies(async ({ effects }) => {
6969
...currentDeps,
7070
bitcoind: {
7171
kind: 'running',
72-
versionRange: '>=29.1:2-beta.0',
73-
healthChecks: [],
72+
versionRange: '>=28.3:0-beta.0',
73+
healthChecks: ['bitcoind'],
7474
},
7575
}
7676
})

0 commit comments

Comments
 (0)