aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerrick Schwabe <[email protected]>2022-02-28 22:15:45 -0700
committerDerrick Schwabe <[email protected]>2022-02-28 22:15:45 -0700
commit5890774dc37afcab06c408d6c40c2e7727c08b55 (patch)
tree1990e060f8e48f1b371a6d67cddcdff28ae138a4
parentf4dd6ff6156cb7599ecdff69142c6a131197ca31 (diff)
parent1efcea585979cb7deec292554260360c83fb516b (diff)
downloadcoinos-server-5890774dc37afcab06c408d6c40c2e7727c08b55.tar.gz
coinos-server-5890774dc37afcab06c408d6c40c2e7727c08b55.zip
Merge remote-tracking branch 'origin/readme-update' into dChanges
-rw-r--r--README.md77
1 files changed, 76 insertions, 1 deletions
diff --git a/README.md b/README.md
index 918e754c..a2053fdc 100644
--- a/README.md
+++ b/README.md
@@ -169,6 +169,81 @@ I've only tested with <a href="https://mariadb.org/">Maria</a>. Here's a [schema
cat db/schema.sql | mysql -u root -p
+# Miscellaneous Commands
+
+## Funding the regtest with bitcoin
+
+---
+Bitcoin
+---
+
+generate some blocks
+
+ docker exec -it bitcoin bitcoin-cli -datadir=config/ generatetoaddress 1 $(docker exec -it bitcoin bitcoin-cli -datadir=config/ getnewaddress "" "legacy")
+
+get balance
+
+ docker exec -it bitcoin bitcoin-cli -datadir=config/ getbalance
+
+---
+Liquid
+---
+
+The Liquid network gives you a starting balance of Bitcoin specified in the `config/liquid/elements.conf` file as `initialfreecoins`.
+
+generate some blocks
+
+ docker exec -it liquid elements-cli -datadir=/home/elements/.elements generatetoaddress 1 $(docker exec -it liquid elements-cli -datadir=/home/elements/.elements getnewaddress)
+
+get balance
+
+ docker exec -it liquid elements-cli -datadir=/home/elements/.elements getbalance
+
+---
+Lightning
+---
+
+get node id of clighting node
+
+ docker exec -it cl lightning-cli getinfo
+
+connect to clightning node
+
+ docker exec -it lnd lncli --network=regtest --chain=bitcoin connect 029ba19ec5f65f82b1952fd535a86ff136ccc67ff7f91e19c3fcbc83a5224adaee@cl:9735
+
+open a channel
+
+ docker exec -it lnd lncli --network=regtest --chain=bitcoin openchannel 029ba19ec5f65f82b1952fd535a86ff136ccc67ff7f91e19c3fcbc83a5224adaee 10000000
+
+generate 10 btc blocks
+
+ docker exec -it bitcoin bitcoin-cli -datadir=config/ generatetoaddress 10 $(docker exec -it bitcoin bitcoin-cli -datadir=config/ getnewaddress "" "legacy")
+
+---
+Test clightning payment
+---
+
+payment request from clightning
+
+ docker exec -it cl lightning-cli invoice 100000 "test payment" "test desc"
+
+get full payment request code from field bolt11
+
+ something like this
+
+ lnbcrt1u1p3qhle9pp5mzn7aezr59tmlmp5mg9x2sa45j8fec5ygmwx6mg2x29qpnnw3j9qdq0w3jhxapqv3jhxccxqyjw5qcqp2sp54tuk3ns3gd66w50hflkzwks0d9z9eelsa8284283zhkug9kevzqq9qyyssqjsprhd38eywg6kp8w7gmwf48hnx0mpd28465v9f595xfrec0dg2jnqdumrmeh9srw32u5t9g6tdy6tdpu47emhkfnu72fnzevvwd0acqxmurkx
+
+Use this botl11 address and paste in the UI to check
+
+---
+Check if all three nodes are connected
+---
+
+ curl https://attackme.coinos.io/api/info
+
+ look for nodes array at the end
+
+---
[Config changes]:(#config-changes)
[config/lnd/lnd.conf]:./sampleconfig/lnd/lnd.conf
-[pwd file]:./sampleconfig/lnd/pwd \ No newline at end of file
+[pwd file]:./sampleconfig/lnd/pwd