mirror of
https://github.com/ben-grande/qusal.git
synced 2025-09-20 20:44:35 -04:00
feat: Bitcoin Core and Electrum servers and wallet
This commit is contained in:
parent
e6fb72c22e
commit
dbed18dfa2
148 changed files with 5302 additions and 36 deletions
24
salt/sys-bitcoin/files/client/bin/bitcoin-tx-notify
Executable file
24
salt/sys-bitcoin/files/client/bin/bitcoin-tx-notify
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
## SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
##
|
||||
## SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
set -eu
|
||||
|
||||
qube="$(qubesdb-read /name)"
|
||||
txid="${1}"
|
||||
wallet="${2}"
|
||||
block_hash="${3}"
|
||||
block_height="${4-}"
|
||||
title="${qube}: wallet: ${wallet}"
|
||||
date="$(date +%FT%H:%m:%SZ)"
|
||||
|
||||
if test "${block_hash}" = "unconfirmed"; then
|
||||
body="TXID ${txid} is ${block_hash}"
|
||||
else
|
||||
body="TXID ${txid} is in block ${block_height} ${block_hash}"
|
||||
fi
|
||||
|
||||
echo "${date} ${title}: ${body}" | tee ~/.bitcoin/walletnotify.log
|
||||
if command -v notify-send >/dev/null; then
|
||||
notify-send -t 10000 "${title}" "${body}"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue