Author

Topic: walletnotify parameters (Read 100 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
August 21, 2022, 08:23:18 AM
#5
...
You can obtain some explanation from bitcoind --help. You also could use bitcoin-qt --help.
...

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)

Not directly. IIRC you can get amount of BTC using gettransaction.
full member
Activity: 244
Merit: 126
August 21, 2022, 07:03:44 AM
#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=
       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)
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
August 21, 2022, 05:44:25 AM
#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=
       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.
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
August 21, 2022, 04:58:35 AM
#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.
full member
Activity: 244
Merit: 126
August 20, 2022, 11:54:27 PM
#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?
Jump to: