@@ -74,7 +74,7 @@ $ docker-compose run -d --name alice lnd_btc
74
74
$ docker exec -i -t alice bash
75
75
76
76
# Generate a new backward compatible nested p2sh address for Alice:
77
- alice$ lncli newaddress np2wkh
77
+ alice$ lncli --network=simnet newaddress np2wkh
78
78
79
79
# Recreate "btcd" node and set Alice's address as mining address:
80
80
$ MINING_ADDRESS=< alice_address> docker-compose up -d btcd
@@ -89,7 +89,7 @@ $ docker-compose run btcctl getblockchaininfo | grep -A 1 segwit
89
89
90
90
Check ` Alice ` balance:
91
91
```
92
- alice$ lncli walletbalance
92
+ alice$ lncli --network=simnet walletbalance
93
93
```
94
94
95
95
Connect ` Bob ` node to ` Alice ` node.
@@ -100,7 +100,7 @@ $ docker-compose run -d --name bob lnd_btc
100
100
$ docker exec -i -t bob bash
101
101
102
102
# Get the identity pubkey of "Bob" node:
103
- bob$ lncli getinfo
103
+ bob$ lncli --network=simnet getinfo
104
104
105
105
{
106
106
-----> " identity_pubkey" : " 0343bc80b914aebf8e50eb0b8e445fc79b9e6e8e5e018fa8c5f85c7d429c117b38" ,
@@ -121,10 +121,10 @@ bob$ lncli getinfo
121
121
$ docker inspect bob | grep IPAddress
122
122
123
123
# Connect "Alice" to the "Bob" node:
124
- alice$ lncli connect < bob_pubkey> @< bob_host>
124
+ alice$ lncli --network=simnet connect < bob_pubkey> @< bob_host>
125
125
126
126
# Check list of peers on "Alice" side:
127
- alice$ lncli listpeers
127
+ alice$ lncli --network=simnet listpeers
128
128
{
129
129
" peers" : [
130
130
{
@@ -141,7 +141,7 @@ alice$ lncli listpeers
141
141
}
142
142
143
143
# Check list of peers on "Bob" side:
144
- bob$ lncli listpeers
144
+ bob$ lncli --network=simnet listpeers
145
145
{
146
146
" peers" : [
147
147
{
@@ -161,13 +161,13 @@ bob$ lncli listpeers
161
161
Create the ` Alice<->Bob ` channel.
162
162
``` bash
163
163
# Open the channel with "Bob":
164
- alice$ lncli openchannel --node_key=< bob_identity_pubkey> --local_amt=1000000
164
+ alice$ lncli --network=simnet openchannel --node_key=< bob_identity_pubkey> --local_amt=1000000
165
165
166
166
# Include funding transaction in block thereby opening the channel:
167
167
$ docker-compose run btcctl generate 3
168
168
169
169
# Check that channel with "Bob" was opened:
170
- alice$ lncli listchannels
170
+ alice$ lncli --network=simnet listchannels
171
171
{
172
172
" channels" : [
173
173
{
@@ -196,20 +196,20 @@ alice$ lncli listchannels
196
196
Send the payment from ` Alice ` to ` Bob ` .
197
197
``` bash
198
198
# Add invoice on "Bob" side:
199
- bob$ lncli addinvoice --amt=10000
199
+ bob$ lncli --network=simnet addinvoice --amt=10000
200
200
{
201
201
" r_hash" : " <your_random_rhash_here>" ,
202
202
" pay_req" : " <encoded_invoice>" ,
203
203
}
204
204
205
205
# Send payment from "Alice" to "Bob":
206
- alice$ lncli sendpayment --pay_req=< encoded_invoice>
206
+ alice$ lncli --network=simnet sendpayment --pay_req=< encoded_invoice>
207
207
208
208
# Check "Alice"'s channel balance
209
- alice$ lncli channelbalance
209
+ alice$ lncli --network=simnet channelbalance
210
210
211
211
# Check "Bob"'s channel balance
212
- bob$ lncli channelbalance
212
+ bob$ lncli --network=simnet channelbalance
213
213
```
214
214
215
215
Now we have open channel in which we sent only one payment, let's imagine
218
218
``` bash
219
219
# List the "Alice" channel and retrieve "channel_point" which represents
220
220
# the opened channel:
221
- alice$ lncli listchannels
221
+ alice$ lncli --network=simnet listchannels
222
222
{
223
223
" channels" : [
224
224
{
@@ -245,17 +245,17 @@ alice$ lncli listchannels
245
245
246
246
# Channel point consists of two numbers separated by a colon. The first one
247
247
# is "funding_txid" and the second one is "output_index":
248
- alice$ lncli closechannel --funding_txid=< funding_txid> --output_index=< output_index>
248
+ alice$ lncli --network=simnet closechannel --funding_txid=< funding_txid> --output_index=< output_index>
249
249
250
250
# Include close transaction in a block thereby closing the channel:
251
251
$ docker-compose run btcctl generate 3
252
252
253
253
# Check "Alice" on-chain balance was credited by her settled amount in the channel:
254
- alice$ lncli walletbalance
254
+ alice$ lncli --network=simnet walletbalance
255
255
256
256
# Check "Bob" on-chain balance was credited with the funds he received in the
257
257
# channel:
258
- bob$ lncli walletbalance
258
+ bob$ lncli --network=simnet walletbalance
259
259
{
260
260
" total_balance" : " 10000" ,
261
261
" confirmed_balance" : " 10000" ,
@@ -315,7 +315,7 @@ The `Faucet` node address can be found at the [Faucet Lightning Community webpag
315
315
$ docker-compose up -d " alice" ; docker exec -i -t " alice" bash
316
316
317
317
# Connect "Alice" to the "Faucet" node:
318
- alice$ lncli connect < faucet_identity_address> @< faucet_host>
318
+ alice$ lncli --network=simnet connect < faucet_identity_address> @< faucet_host>
319
319
```
320
320
321
321
After a connection is achieved, the ` Faucet ` node should create the channel
0 commit comments