1

Couldn’t find the answer inside the source code.

If I receive a pay to pubkey transaction to the pubkey of a 1r address, will it shows up using getreceivedbyaddress or listreceivedbyaddress or listunspent? Or will it ignore the coins received that way.
The same question apply when 1-of-n bare multisig.

1

In the Bitcoin Core wallet, it depends:

  • For P2PK outputs to a public key that's in your wallet, yes for current wallet versions, but this won't be the case for the new "descriptor" wallets (unless explicitly imported).
  • For bare multisig, only when explicitly imported. Before PR 13002, bare N-of-N multisig was automatically treated as incoming payment (in case you had all N private keys). Since that PR you need to explicitly import these scripts to watch them.

For other wallet software, things may be different.

In general, you cannot assume that anyone will ever treat an incoming transaction as a valid payment, unless it was sent to an exact address they gave you (or you have some other explicit arrangement). Which scripts/addresses a user considers "theirs" is up to them, depends heavily on the software they use, and not something you can infer.

| improve this answer | |
  • So do you mean that before the pr that it wasn t enough to be able to spend automatically the outputs in bare multisig and that all of the 3 keys of bare multisig 2 of 3 transaction has to be inside the wallet? – user2284570 Sep 16 at 0:45
  • I don't understand your question. If you explicitly import a script, you can watch whatever you want in your wallet. Before that PR, some bare multisigs were automatically watched (N-of-N ones where you had all private keys). – Pieter Wuille Sep 16 at 0:46
  • Correct but I m thinking about use cases where everything has to be implicit and automatic. The only thing that has to be done from the receiver end is generating a payment from a new address. – user2284570 Sep 16 at 0:48
  • You cannot assume that anyone will ever treat an incoming transaction as a valid payment, unless it was sent to an exact address they gave you (or you have some other explicit arrangement). You can't send to public keys extracted from transactions, you can't even send back to the "sender" addresses in incoming transactions that pay you - the address may be of a joint wallet or website rather than crediting the specific person who sent things to you. – Pieter Wuille Sep 16 at 0:51
  • what you describe depends on the address type. – user2284570 Sep 16 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.