From bbe2678fee476a4f2111c87384f47e231191f87e Mon Sep 17 00:00:00 2001 From: Hunter Trujillo Date: Mon, 22 Aug 2022 10:33:16 -0600 Subject: [PATCH 1/4] Refactor out install script, can be executed separately. --- contrib/demo-rgb.sh | 15 ++++----------- contrib/install.sh | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 11 deletions(-) mode change 100644 => 100755 contrib/demo-rgb.sh create mode 100755 contrib/install.sh diff --git a/contrib/demo-rgb.sh b/contrib/demo-rgb.sh old mode 100644 new mode 100755 index 95688b6..05f1b0c --- a/contrib/demo-rgb.sh +++ b/contrib/demo-rgb.sh @@ -2,13 +2,8 @@ # --- INITIAL SETUP -# Only nightly cargo supports installing binary bundles -rustup add nigtly -rustup update nigtly -# This installs all 4 LNP/BP nodes at onc -cargo +nightly -Z bindeps install lnpbp_nodes --version 0.8.0-rc.1 -# This installs a dozen of command-line tools for working with LNP/BP stack -cargo +nightly -Z bindeps install lnpbp-cli --version 0.8.0-rc.1 +# Run separate install script +./install.sh DIR=~/.demo # Replace with the desired location @@ -49,10 +44,8 @@ rgb-cli -n testnet contract state ${CONTRACT_ID} # ---------------------------------------------------------- # Go to a remote server / other machine and do the following -rustup add nigtly -rustup update nigtly -cargo +nightly -Z bindeps install lnpbp_nodes --version 0.8.0-rc.1 -cargo +nightly -Z bindeps install lnpbp-cli --version 0.8.0-rc.1 +# Run separate install script +./install.sh DIR=~/.demo # Replace with the desired location diff --git a/contrib/install.sh b/contrib/install.sh new file mode 100755 index 0000000..2caaed5 --- /dev/null +++ b/contrib/install.sh @@ -0,0 +1,19 @@ +# Only nightly cargo supports installing binary bundles +rustup toolchain install nightly +rustup update nightly +# This installs all 4 LNP/BP nodes +cargo install --force --all-features bp_node --version "0.8.0-alpha.2" +cargo install --force --all-features lnp_node --version "0.8.0" +cargo install --force --all-features rgb_node --version "0.8.0" +cargo install --force --all-features storm_node --version "0.8.0" +cargo install --force --all-features store_daemon --version "0.8.0" +# This install --forces a dozen of command-line tools for working with LNP/BP stack +cargo install --force --all-features descriptor-wallet --version "0.8.2" +cargo install --force --all-features bp-core --version "0.8.0" +cargo install --force --all-features rgb-std --version "0.8.0" +cargo install --force --all-features rgb20 --version "0.8.0-rc.4" +cargo install --force --all-features bp-cli --version "0.8.0-alpha.2" +cargo install --force --all-features lnp-cli --version "0.8.0" +cargo install --force --all-features rgb-cli --version "0.8.0" +cargo install --force --all-features storm-cli --version "0.8.0" +cargo install --force --all-features store-cli --version "0.8.0" From f60f3d008897d76c024656f1efdc286132f7b3fb Mon Sep 17 00:00:00 2001 From: Hunter Trujillo Date: Tue, 23 Aug 2022 04:08:07 -0600 Subject: [PATCH 2/4] Remove dbc commit step. Add msg argument. Clarify some steps. --- contrib/demo-rgb.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/contrib/demo-rgb.sh b/contrib/demo-rgb.sh index 05f1b0c..b6c0b58 100755 --- a/contrib/demo-rgb.sh +++ b/contrib/demo-rgb.sh @@ -22,11 +22,18 @@ btc-cold check ${WALLET} # Note the transaction outputs and save them to these variables UTXO_ISSUE=":" UTXO_CHANGE=":" +# Find your wallet's testnet xprv (it's in black text for dark theme terminal users) +btc-hot -P info ${DIR}/testnet.seed +# Initialize lnpd with your hot wallet xprv +lnpd -vvv --network testnet init tmux new-session -d -s store stored -vvv tmux new-session -d -s lnp lnpd -vvv --network testnet tmux new-session -d -s rgb rgbd -vvv --network testnet -tmux new-session -d -s storm storm -vvv --chat --downpour +tmux new-session -d -s storm stormd -vvv --chat --downpour --msg ~/.lnp_node/testnet/msg +# -OR- run all the daemons within the same terminal (processes must be exited using process manager) +# Note: Try all these commands separately first to ensure they can run +stored -vvv & lnpd -vvv --network testnet & rgbd -vvv --network testnet & stormd -vvv --chat --downpour --msg /home/hunter/.lnp_node/testnet/msg & # --- CONTRACT ISSUANCE @@ -60,6 +67,10 @@ btc-cold address ${DIR}/testnet2.wallet btc-cold check ${DIR}/testnet2.wallet # Note the first transaction output and save it to variable UTXO=":" +# Find your wallet's testnet xprv (it's in black text for dark theme terminal users) +btc-hot -P info ${DIR}/testnet.seed +# Initialize lnpd with your hot wallet xprv +lnpd -vvv --network testnet init tmux new-session -d -s store stored -vvv tmux new-session -d -s lnp lnpd -vvv --network testnet --listen-all --bifrost @@ -129,7 +140,8 @@ rgb psbt analyze ${PSBT} # data, the txid of the witness transaction is final. # Now we can finalize the consignment by adding the anchor information to it # referencing this txid. -# We also instruct the daemon to send the consignment to the beneficiaty LN node. +# We also instruct the daemon to send the consignment to the beneficiary LN node. +# If done on the same system (a self-payment), the --send argument can be omitted. rgb-cli -n testnet transfer finalize --endseal ${TXOB} ${PSBT} ${CONSIGNMENT} --send # Those who interested can look into the transfer consignment @@ -141,7 +153,6 @@ rgb consignment inspect ${CONSIGNMENT} rgb consignment validate ${CONSIGNMENT} # Lets finalize, sign & publish the witness transaction -dbc commit ${PSBT} btc-hot sign ${PSBT} ${DIR}/testnet btc-cold finalize --publish testnet ${PSBT} From 92d9b3522d1b1391c1f5911f12ff492a5803b3d4 Mon Sep 17 00:00:00 2001 From: Hunter Trujillo Date: Wed, 24 Aug 2022 11:49:08 -0600 Subject: [PATCH 3/4] Fix typo --- contrib/demo-rgb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/demo-rgb.sh b/contrib/demo-rgb.sh index b6c0b58..36034fe 100755 --- a/contrib/demo-rgb.sh +++ b/contrib/demo-rgb.sh @@ -33,7 +33,7 @@ tmux new-session -d -s rgb rgbd -vvv --network testnet tmux new-session -d -s storm stormd -vvv --chat --downpour --msg ~/.lnp_node/testnet/msg # -OR- run all the daemons within the same terminal (processes must be exited using process manager) # Note: Try all these commands separately first to ensure they can run -stored -vvv & lnpd -vvv --network testnet & rgbd -vvv --network testnet & stormd -vvv --chat --downpour --msg /home/hunter/.lnp_node/testnet/msg & +stored -vvv & lnpd -vvv --network testnet & rgbd -vvv --network testnet & stormd -vvv --chat --downpour --msg ~/.lnp_node/testnet/msg & # --- CONTRACT ISSUANCE From 57396c12580120f0744cb506aeb6795ee19b666a Mon Sep 17 00:00:00 2001 From: Hunter Trujillo Date: Fri, 26 Aug 2022 16:42:24 -0600 Subject: [PATCH 4/4] Update install script to use descriptor-wallet 0.8.3. --- contrib/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/install.sh b/contrib/install.sh index 2caaed5..e06a1ca 100755 --- a/contrib/install.sh +++ b/contrib/install.sh @@ -8,7 +8,7 @@ cargo install --force --all-features rgb_node --version "0.8.0" cargo install --force --all-features storm_node --version "0.8.0" cargo install --force --all-features store_daemon --version "0.8.0" # This install --forces a dozen of command-line tools for working with LNP/BP stack -cargo install --force --all-features descriptor-wallet --version "0.8.2" +cargo install --force --all-features descriptor-wallet --version "0.8.3" cargo install --force --all-features bp-core --version "0.8.0" cargo install --force --all-features rgb-std --version "0.8.0" cargo install --force --all-features rgb20 --version "0.8.0-rc.4"