Bitcoin Forum
May 03, 2024, 12:37:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: walletnotify parameters  (Read 100 times)
pbies (OP)
Full Member
***
Offline Offline

Activity: 244
Merit: 126



View Profile
August 21, 2022, 03:54:27 AM
 #1

There is no Wiki about that and no post explaining:

What are the parameters possible for walletnotify?

I know:

%s - transaction ID
%b - ?
%h - ?
%w - wallet name

Any other?

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 14900K and RTX 4090
1714696672
Hero Member
*
Offline Offline

Posts: 1714696672

View Profile Personal Message (Offline)

Ignore
1714696672
Reply with quote  #2

1714696672
Report to moderator
1714696672
Hero Member
*
Offline Offline

Posts: 1714696672

View Profile Personal Message (Offline)

Ignore
1714696672
Reply with quote  #2

1714696672
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Cricktor
Hero Member
*****
Offline Offline

Activity: 756
Merit: 1110


Crypto Swap Exchange


View Profile
August 21, 2022, 08:58:35 AM
Last edit: August 21, 2022, 09:16:51 AM by Cricktor
Merited by odolvlobo (1)
 #2

There is no Wiki about that and no post explaining:

That's not true, see https://en.bitcoinwiki.org/wiki/Running_Bitcoind

%b gets replaced by the block hash if transaction is confirmed or 'unconfirmed' as long as the transaction is still in the mempool waiting to be confirmed.

%h gets replaced by the block height or -1 if not yet confirmed.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7452


Crypto Swap Exchange


View Profile
August 21, 2022, 09:44:25 AM
Merited by pooya87 (2)
 #3

There is no Wiki about that and no post explaining

You can obtain some explanation from bitcoind --help. You also could use bitcoin-qt --help.

Quote from: bitcoind --help
 -walletnotify=<cmd>
       Execute command when a wallet transaction changes. %s in cmd is replaced by TxID, %w is replaced by wallet name, %b is replaced by the hash of the block including the transaction (set to 'unconfirmed' if the transaction is not included) and %h is replaced by the block height (-1 if not included). %w is not currently implemented on windows. On systems where %w is supported, it should NOT be quoted because this would break shell escaping used to invoke the command.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pbies (OP)
Full Member
***
Offline Offline

Activity: 244
Merit: 126



View Profile
August 21, 2022, 11:03:44 AM
Last edit: August 21, 2022, 11:23:39 AM by pbies
 #4

There is no Wiki about that and no post explaining

You can obtain some explanation from bitcoind --help. You also could use bitcoin-qt --help.

Quote from: bitcoind --help
 -walletnotify=<cmd>
       Execute command when a wallet transaction changes. %s in cmd is replaced by TxID, %w is replaced by wallet name, %b is replaced by the hash of the block including the transaction (set to 'unconfirmed' if the transaction is not included) and %h is replaced by the block height (-1 if not included). %w is not currently implemented on windows. On systems where %w is supported, it should NOT be quoted because this would break shell escaping used to invoke the command.

I cannot see anything beside these 4 letters. Aren't there any more info from walletnotify? Like amount of BTC?

I know I can do

Code:
amnt=$(./bin/bitcoin-cli -getinfo | grep wallet_name | cut -d " " -f1)

BTC: bc1qmrexlspd24kevspp42uvjg7sjwm8xcf9w86h5k
I have 9900K and 1080 Ti, gathering funds for new desktop PC for Bitcoin operations - 14900K and RTX 4090
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!