Skip to content

Commit

Permalink
lsp: lqwd
Browse files Browse the repository at this point in the history
  • Loading branch information
reez authored Dec 9, 2024
1 parent 53ee3b4 commit ede53bf
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/reez/BitcoinUI.git",
"state" : {
"branch" : "main",
"revision" : "22ea27e2495aac9035c39a1b09165a802d90bdde"
"revision" : "a92d2426526cf50858122c9c019e9b5ac138214a",
"version" : "1.0.8"
}
},
{
Expand All @@ -33,8 +33,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/lightningdevkit/ldk-node.git",
"state" : {
"revision" : "21566111f1c32f6f562a15711158020fa416f1d7",
"version" : "0.4.2"
"revision" : "db66cb90e5878833f367f46c4368259efde31720",
"version" : "0.4.0"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class LightningNodeService {
let storedNetworkString = try! keyService.getNetwork() ?? Network.signet.description
let storedEsploraURL =
try! keyService.getEsploraURL()
?? EsploraServer.mutiny_signet.url
?? EsploraServer.lqwd_signet.url

self.network = Network(stringValue: storedNetworkString) ?? .signet
self.keyService = keyService
Expand All @@ -34,7 +34,7 @@ class LightningNodeService {
config.logDirPath = FileManager.default.getDocumentsDirectoryPath()
config.network = self.network
config.trustedPeers0conf = [
Constants.Config.LiquiditySourceLsps2.Signet.mutiny.nodeId
Constants.Config.LiquiditySourceLsps2.Signet.lqwd.nodeId
]
config.logLevel = .trace

Expand All @@ -53,10 +53,13 @@ class LightningNodeService {
)
self.networkColor = Constants.BitcoinNetworkColor.testnet.color
case .signet:
nodeBuilder.setGossipSourceRgs(
rgsServerUrl: Constants.Config.RGSServerURLNetwork.signet
)
nodeBuilder.setLiquiditySourceLsps2(
address: Constants.Config.LiquiditySourceLsps2.Signet.mutiny.address,
nodeId: Constants.Config.LiquiditySourceLsps2.Signet.mutiny.nodeId,
token: Constants.Config.LiquiditySourceLsps2.Signet.mutiny.token
address: Constants.Config.LiquiditySourceLsps2.Signet.lqwd.address,
nodeId: Constants.Config.LiquiditySourceLsps2.Signet.lqwd.nodeId,
token: Constants.Config.LiquiditySourceLsps2.Signet.lqwd.token
)
self.networkColor = Constants.BitcoinNetworkColor.signet.color
case .regtest:
Expand Down
9 changes: 9 additions & 0 deletions LDKNodeMonday/Utilities/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ struct Constants {
static let allValues = [
EsploraServer.mutiny_signet,
EsploraServer.bdk_signet,
EsploraServer.lqwd_signet
]
}
struct Testnet {
Expand All @@ -42,12 +43,14 @@ struct Constants {
struct LiquiditySourceLsps2 {
struct Signet {
static let mutiny = LSP.mutiny
static let lqwd = LSP.lqwd
}
}

struct RGSServerURLNetwork {
static let bitcoin = "https://rapidsync.lightningdevkit.org/snapshot/"
static let testnet = "https://rapidsync.lightningdevkit.org/testnet/snapshot/"
static let signet = "https://mutinynet.lspd.lqwd.tech"
}

}
Expand All @@ -64,6 +67,11 @@ struct Constants {
nodeId: "031b301307574bbe9b9ac7b79cbe1700e31e544513eae0b5d7497483083f99e581",
token: ""
)
static let lqwd = LightningServiceProvider(
address: "192.243.215.98:27100",
nodeId: "0275eb44504d53b2a083852e3bffcc4e178195b9546c162590d8c282f3ed3243fc",
token: ""
)
}

enum BitcoinNetworkColor {
Expand Down Expand Up @@ -107,6 +115,7 @@ struct EsploraServer: Hashable {

static let mutiny_signet = EsploraServer(name: "Mutiny", url: "https://mutinynet.com/api")
static let bdk_signet = EsploraServer(name: "BDK", url: "http://signet.bitcoindevkit.net")
static let lqwd_signet = EsploraServer(name: "LQWD", url: "https://mutinynet.ltbl.io/api")

static let local_regtest = EsploraServer(name: "Local", url: "http://127.0.0.1:3002")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class JITInvoiceViewModel: ObservableObject {
@Published var invoice: Bolt11Invoice = ""
@Published var receiveViewError: MondayError?
@Published var networkColor = Color.gray
@Published var amountMsat: String = "11000" // Note: temp amount, zero wont work below min
@Published var amountMsat: String = "121000"

func receivePaymentViaJitChannel(
amountMsat: UInt64,
Expand Down

0 comments on commit ede53bf

Please sign in to comment.