Update README.md

This commit is contained in:
Marco Argentieri
2020-09-21 20:32:46 +02:00
committed by GitHub
parent 5af3371205
commit c34402c02b

View File

@@ -33,23 +33,24 @@ $ open -a Docker
```
$ nigiri start --liquid
```
That's it.
**That's it.**
Go to http://localhost:5000 for quickly inspect the Bitcoin blockchain or http://localhost:5001 for Liquid.
* Use the Bitcoin CLI inside the box
```
$ alias bcli='docker exec -it bitcoin bitcoin-cli -datadir=config'
$ bcli getblockchaininfo
$ nigiri rpc getnewaddress "" "bech32"
bcrt1qsl4j5je4gu3ecjle8lckl3u8yywh8rff6xxk2r
```
* Use the Elements CLI inside the box
```
$ alias ecli='docker exec -it liquid elements-cli -datadir=config'
$ ecli getblockchaininfo
$ nigiri rpc --liquid getnewaddress "" "bech32"
el1qqwwx9gyrcrjrhgnrnjq9dq9t4hykmr6ela46ej63dnkdkcg8veadrvg5p0xg0zd6j3aug74cv9m4cf4jslwdqnha2w2nsg9x3
```
# Make from scratch
## Utensils
@@ -123,6 +124,31 @@ $ nigiri stop
```
Use the `--delete` flag to not just stop Docker containers but also to remove them and delete the config file and any new data written in volumes.
* Generate and send bitcoin to given address
```bash
# Bitcoin
$ nigiri faucet bcrt1qsl4j5je4gu3ecjle8lckl3u8yywh8rff6xxk2r
# Elements
$ nigiri faucet --liquid el1qqwwx9gyrcrjrhgnrnjq9dq9t4hykmr6ela46ej63dnkdkcg8veadrvg5p0xg0zd6j3aug74cv9m4cf4jslwdqnha2w2nsg9x3
```
* Liquid only Issue and send a given quantity of an asset
```bash
$ nigiri mint el1qqwwx9gyrcrjrhgnrnjq9dq9t4hykmr6ela46ej63dnkdkcg8veadrvg5p0xg0zd6j3aug74cv9m4cf4jslwdqnha2w2nsg9x3 1000 VulpemToken VLP
```
* Broadcast a raw transaction and automatically generate a block
```bash
# Bitcoin
$ nigiri push <hex>
# Elements
$ nigiri push --liquid <hex>
```
* Check the logs of Bitcoin services
@@ -149,17 +175,19 @@ $ nigiri logs chopsticks --liquid
* Use the Bitcoin CLI inside the box
```
$ alias bcli='docker exec -it bitcoin bitcoin-cli -datadir=config'
$ bcli getblockchaininfo
$ nigiri rpc getnewaddress "" "bech32"
bcrt1qsl4j5je4gu3ecjle8lckl3u8yywh8rff6xxk2r
```
* Use the Elements CLI inside the box
```
$ alias ecli='docker exec -it liquid elements-cli -datadir=config'
$ ecli getblockchaininfo
$ nigiri rpc --liquid getnewaddress "" "bech32"
el1qqwwx9gyrcrjrhgnrnjq9dq9t4hykmr6ela46ej63dnkdkcg8veadrvg5p0xg0zd6j3aug74cv9m4cf4jslwdqnha2w2nsg9x3
```
Nigiri uses the default directory `~/.nigiri` to store configuration files and docker-compose files.
To set a custom directory use the `--datadir` flag.