Newb, apologies if this is a dumb question. If a bitcoin is sent to my wallet is there a way the sender can use any part of the blockchain/transaction as a unique identifier so they can claim a credit in the future for the amount sent, that is, without assigning them any additional identifying information to them? (e.g. You send me a bitcoin, I treat it as a credit. You can claim the credit by using some combination of the numbers used in the transaction, so I can credit you the amount sent, without assigning any additional information to you, and no one else could be privy to that identifying information. Thank you for the help!
This is possible, but your customers will have to use a wallet that supports the functionality of signing messages using the wallet’s private keys. For example, bitcoind has the
signmessage command. The user could input a message such as ”todays date is ____, and I control bitcoin address ____, which sent coins to ____ service” in order to prove their identity.
Using any identifying info from the transaction itself will not be a good way to prove user identity, since all transaction details are a matter of public record.
Note: By utilizing this functionality, you will be restricting your potential user-base to only more knowledgeable users. Not all wallets have this functionality, in fact most do not. If a user happens to sends bitcoin from a wallet that cannot sign messages, they can prove their identities by importing the private key into some other software that is capable and then using it to sign a message— but again this is a more ‘advanced user’ sort of operation.
Another note: DO NOT build a service which requires users to communicate their private key to you. This would be an irresponsible thing to do.
is there a way the sender can use any part of the blockchain/transaction as a unique identifier so they can claim a credit in the future
The only secure unique identifier is a private key used to send the funds (or a digital signature proving ownership of that key).
If I understand you correctly, you want to give someone credit for sending bitcoin. The only way to be sure that a specific person sent you bitcoin is for them to provide proof that they own the private key that sent it. This could mean either showing you the private key (usually not preferred, because now its exposed), or digitally signing a message (that you provide) with the same key that was used to pay you. And even this doesn't prove that they sent it, it just proves they have access to the key that was able to send it.
The problem is the entire blockchain is public so anyone can look up the transaction and provide data about it like the
txid or the block it was in, even an exact amount, and pretend they sent it.
Note: By the way there is an RPC method
signmessage in bitcoin core that could be used to do this, see https://bitcoincore.org/en/doc/0.16.2/rpc/wallet/signmessage/
Update: As mentioned in the comments, generating a new Bitcoin address for each customer, which you only need to share with them, would be a decent (and common) way of tracking payments. If someone else found out about the address and sent funds, only the customer you assigned that address to would get credit. This would best be implemented as a Hierarchical Deterministic wallet so your keys can all be generated from a master key.