Update docs/liquid/liquid-part1.md
This commit is contained in:
parent
ce0962eb70
commit
dd5cabb231
@ -67,11 +67,7 @@ Liquid uses a variation of BTC Core program known as Elements, much of the setup
|
||||
* Install Elements 'App'
|
||||
|
||||
... Go take a several hour break while it downloads ...
|
||||
* ssh into umbrel and install the elements-cli programs [^3]
|
||||
- `ssh umbrel.local`
|
||||
- `$ wget https://github.com/ElementsProject/elements/releases/download/elements-23.2.1/elements-23.2.1-x86_64-linux-gnu.tar.gz`
|
||||
- `$ tar xf elements-23.2.1-x86_64-linux-gnu.tar.gz`
|
||||
- `$ ln -s elements-23.2.1-x86_64 elements`
|
||||
|
||||
* Navigate to Elements 'App' web interface on Umbrel and copy `rpcuser` and `rpcpassword` values
|
||||
|
||||

|
||||
@ -80,17 +76,18 @@ Liquid uses a variation of BTC Core program known as Elements, much of the setup
|
||||
- `$ export E_RPCUSER=elements`
|
||||
- `$ export E_RPCPASS=XXXXXXXXXXXXXXXXXXXXXXX`
|
||||
* You should now be able to issue commands against the elements daemon
|
||||
- `$ /elements/bin/elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getblockcount`
|
||||
- `25846` (It doesn’t matter what the number returned is, can even be 0, as long as no error.)
|
||||
- `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getblockcount`
|
||||
|
||||
25846 (It doesn’t matter what the number returned is as long as no error.)
|
||||
* Create a default wallet
|
||||
- `$ /elements/bin/elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS createwallet ""`
|
||||
- `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS createwallet ""`
|
||||
* Check balance info
|
||||
- `$ /elements/bin/elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getwalletinfo`
|
||||
- `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getwalletinfo`
|
||||
|
||||
Now let's peg-in some bitcoin in order to receive L-BTC within our Liquid wallet. (*NOTE: There are online services that automate this entire process and make it much simpler. In general services like [Sideswap](https://sideswap.io/peg-in-out/) makke this process much easier*)
|
||||
|
||||
* Generate a new peg-in address
|
||||
- `$ /elements/bin/elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getpeginaddress`
|
||||
- `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getpeginaddress`
|
||||
|
||||
{
|
||||
"mainchain_address": "bc1qXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
@ -103,29 +100,29 @@ Now let's peg-in some bitcoin in order to receive L-BTC within our Liquid wallet
|
||||
* Copy the BTC transaction ID and save to variable
|
||||
- `$ export B_TRANSID="bb1d0903XXXXXXXXXXXXXXXXXXXXXXXXXXX"`
|
||||
* Wait for the BTC transaction to confirm[^4]
|
||||
* On your **BITCOIN** node, run the following command
|
||||
* On your BITCOIN node, run the following command
|
||||
- `$ sudo ./scripts/app compose bitcoin exec bitcoind bitcoin-cli getrawtransaction $B_TRANSID`
|
||||
|
||||
020000000173f50....
|
||||
* Save that output to bash variable
|
||||
- `$ export B_RAWTRANS='020000000173f50....`
|
||||
* On your **BITCOIN** node, get output proof
|
||||
* On your BITCOIN node, get output proof
|
||||
- `$ sudo ./scripts/app compose bitcoin exec bitcoind bitcoin-cli gettxoutproof '["<transaction_id_paste>"]'`
|
||||
|
||||
00406426ea774aff7437de482c73f2ac8......
|
||||
* Save output proof in bash variable
|
||||
- `$ export B_OUTPROOF='00406426ea774aff7437de482c73f2ac8....'`
|
||||
* Now back on the elements node, we can claim the L-BTC
|
||||
- `$ elements/bin/elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS claimpegin $B_RAWTRANS $B_OUTPROOF $E_CLAIMSCR`
|
||||
- `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS claimpegin $B_RAWTRANS $B_OUTPROOF $E_CLAIMSCR`
|
||||
* Issue a getwallet info on Elements and you should see an unconfirmed balance
|
||||
- `$ elements/bin/elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getwalletinfo`
|
||||
- `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getwalletinfo`
|
||||
|
||||
"unconfirmed_balance": {
|
||||
"bitcoin": 0.00149952
|
||||
}[^5],
|
||||
|
||||
* After 1 confirmations (approx 2 mins) the balance should be confirmed
|
||||
- `$ elements/bin/elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getwalletinfo`
|
||||
- `$ sudo ./scripts/app compose elements exec node elements-cli -rpcuser=$E_RPCUSER -rpcpassword=$E_RPCPASS getwalletinfo`
|
||||
|
||||
"balance": {
|
||||
"bitcoin": 0.00149952}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user