You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/setup.md
+19-37Lines changed: 19 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,16 @@ let seed = [UInt8](keyData)
201
201
let timestampSeconds =UInt64(NSDate().timeIntervalSince1970)
202
202
let timestampNanos =UInt32.init(truncating: NSNumber(value: timestampSeconds *1000*1000))
203
203
let keysManager =KeysManager(seed: seed, startingTimeSecs: timestampSeconds, startingTimeNanos: timestampNanos)
204
-
let keysInterface = keysManager.asKeysInterface()
204
+
```
205
+
### NetworkGraph
206
+
207
+
If you intend to use the LDK's built-in routing algorithm, you will need to instantiate
208
+
a `NetworkGraph` that can later be passed to the `ChannelManagerConstructor`:
209
+
210
+
```swift
211
+
// main context (continued)
212
+
213
+
let networkGraph =NetworkGraph(network: .Regtest, logger: logger)
205
214
```
206
215
207
216
### ChannelManager
@@ -213,7 +222,7 @@ a random block at a height that does not exist at the time of this writing.
213
222
214
223
```swift
215
224
let latestBlockHash = [UInt8](Data(base64Encoded: "AAAAAAAAAAAABe5Xh25D12zkQuLAJQbBeLoF1tEQqR8=")!)
216
-
let latestBlockHeight =700123
225
+
let latestBlockHeight =UInt32(700123)
217
226
```
218
227
219
228
Second, we also need to initialize a default user config, which we simply do like this:
@@ -222,40 +231,18 @@ Second, we also need to initialize a default user config, which we simply do lik
222
231
let userConfig = UserConfig.initWithDefault()
223
232
```
224
233
225
-
Finally, we can proceed by instantiating the `ChannelManager` using `ChannelManagerConstructor`.
234
+
Finally, we can proceed by instantiating the `ChannelManager` using `ChannelManagerConstructor`, for which we need `ChannelManagerConstructionParameters`.
226
235
227
236
```swift
228
237
// main context (continued)
229
238
230
-
let channelManagerConstructor =ChannelManagerConstructor(
0 commit comments