curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
after the above script finishes successfully
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install v16
nvm use v16
git clone https://github.com/gcharang/nn-return-btc && cd nn-return-btc
npm ci
Open the return-btc.js
file and input your wif and desired fee
then, run the following command to get a hex and txid that will return the btc when broadcast
node return-btc.js
After decoding ( https://live.blockcypher.com/btc/decodetx/ ) the txn's hex and verifying that it is doing what it should, copy and paste the hex in the form at https://blockstream.info/tx/push and click on the "Broadcast transaction" button