Bitcoin Forum
December 11, 2024, 07:36:17 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: walletnotify parameters  (Read 131 times)
pbies (OP)
Full Member
***
Offline Offline

Activity: 298
Merit: 133



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
Cricktor
Legendary
*
Offline Offline

Activity: 966
Merit: 1619


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: 3080
Merit: 8176


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: 298
Merit: 133



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
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!