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
Plugins allow users to extend Warnet. Plugin authors can import commands from Warnet and plugin users can run plugin commands from the command line or on each invocation of `warnet deploy`.
4
+
5
+
## Activating plugins from 'network.yaml'
6
+
7
+
You can activate a plugin command by placing it in the `plugin` section at the bottom of each `network.yaml` file like so:
SimLN uses "activity" definitions to create payment activity between lightning nodes. These definitions are in JSON format.
11
+
12
+
SimLN also requires access details for each node; however, the SimLN plugin will automatically generate these access details for each LND node. The access details look like this:
13
+
14
+
````JSON
15
+
{
16
+
"id": <node_id>,
17
+
"address": https://<ip:port or domain:port>,
18
+
"macaroon": <path_to_selected_macaroon>,
19
+
"cert": <path_to_tls_cert>
20
+
}
21
+
````
22
+
23
+
Since SimLN already has access to those LND connection details, it means you can focus on the "activity" definitions.
24
+
25
+
### Launch activity definitions from the command line
26
+
The SimLN plugin takes "activity" definitions like so:
### Launch activity definitions from within `network.yaml`
31
+
When you initialize a new Warnet network, Warnet will create a new `network.yaml` file. If your `network.yaml` file includes lightning nodes, then you can use SimLN to produce activity between those nodes like this:
32
+
33
+
<details>
34
+
<summary>network.yaml</summary>
35
+
36
+
````yaml
37
+
nodes:
38
+
- name: tank-0000
39
+
addnode:
40
+
- tank-0001
41
+
ln:
42
+
lnd: true
43
+
44
+
- name: tank-0001
45
+
addnode:
46
+
- tank-0002
47
+
ln:
48
+
lnd: true
49
+
50
+
- name: tank-0002
51
+
addnode:
52
+
- tank-0000
53
+
ln:
54
+
lnd: true
55
+
56
+
- name: tank-0003
57
+
addnode:
58
+
- tank-0000
59
+
ln:
60
+
lnd: true
61
+
lnd:
62
+
config: |
63
+
bitcoin.timelockdelta=33
64
+
channels:
65
+
- id:
66
+
block: 300
67
+
index: 1
68
+
target: tank-0004-ln
69
+
capacity: 100000
70
+
push_amt: 50000
71
+
72
+
- name: tank-0004
73
+
addnode:
74
+
- tank-0000
75
+
ln:
76
+
lnd: true
77
+
lnd:
78
+
channels:
79
+
- id:
80
+
block: 300
81
+
index: 2
82
+
target: tank-0005-ln
83
+
capacity: 50000
84
+
push_amt: 25000
85
+
86
+
- name: tank-0005
87
+
addnode:
88
+
- tank-0000
89
+
ln:
90
+
lnd: true
91
+
92
+
plugins:
93
+
# Take note: the path to the plugin file is relative to the `network.yaml` file. The location of your `simln.py` file and `network.yaml` file may differ than what is shown below.
0 commit comments