How to implement asset withdrawal from user's wallet?

+1 vote

I've got a scenario here.

1. Consider an application where we've got a virtual wallet implementation, in which we've got multiple users having their individual wallets (different address).
2. To load money (asset) into those specific wallet(s), we can use the issue command and the asset is assigned to that particular wallet address directly.

3. Now, consider a case where the user would like to withdraw his/her wallet amount (asset) back. So here, after the transaction his wallet balance should be 0. But I believe transferring an asset can happen only between two addresses. But here since we do not have a destination address, I'm currently not able to implement this amount withdrawal case.

Would really appreciate if any our developer friends can help me or show me a path where I can successfully implement the same.

Thanking in advance.

asked Nov 3, 2018 by Rakesh

1 Answer

0 votes

If you want to "retire" an asset quantity, there are two options:

1) Send it back to the address of the asset issuer, who then has more units they can send on in future to other address.

2) Send the asset units to the chain's "burn address" (see output of getinfo command) from where it is not possible for anyone to ever spend them, since it has no corresponding private key.

answered Nov 5, 2018 by MultiChain