Peercoin transfers with note to payee, wallet callbacks

Hello,

When I want to transfer ppc from my wallet to another wallet, is it possible to add a “note to the payee”, so that the receiver of the coins can relate the transfer somehow?

In the peercoin-cli client I don’t see an option to do that, hence my question. In the transaction list (‘peercoin-cli listtransactions’) I see that there is a “label” field, which looks like it could serve the purpose, but I don’t know whether it does. It is empty in all my transactions.

The next question then: if it is possible to add note to payee, is it possible to execute a predefined callback when a transaction comes into the wallet? I would need some function that is executed on an incoming transaction, takes the transaction as parameter and does something useful based on it, i.e. notify some web service… programming language doesn’t matter. Is that possible?

Thanks

Greetings,

It is possible to add an extra OP_RETURN data output to your transaction, with an arbitrary data. However, this functionality is not exposed to reference wallet software GUI, so you have to form your transaction yourself or using something like cointoolkit

Wallet allows to specify commands to be executed when transaction hits a wallet, have a look at option:

   -walletnotify=<cmd>
       Execute command when a wallet transaction changes (%s in cmd is replaced
       by TxID)

Thanks, that is helpful :slight_smile: .

Is it possible to integrate that in the reference wallet GUI? Imho it’s a pretty standard functionality and should be easily accessible.

Sure, I’ll open a ticket.