Private keys import and export

Hello,


I have a little question about the keys bitcoin blockchain and importation.

What happen if I send asset to someone who own a bitcoin wallet (not CP) ?
As I understood the assets are related to a side blockchain on CP so it will be register as the owner of the asset as soon as he holds the private key ?

So now what happen if he wipes the private key to his counterparty wallet ? Will he be able to see the assets ?

And now what happen if he wipe the private key with another bitcoin wallet (counterparty blind) then wipe the new in counterparty. Will he lose the assets ?

Hi 


You can find most of answers to your questions at support.counterparty.co/support/solutions/, but here’s a quick summary:
1. If your wallet is a bitcoin wallet that doesn’t understand Counterparty, you’ll only see the BTC part of what was sent. Normally if I send you just a Counterparty asset you’ll get a dust amount of BTC and you won’t be able to see how much and what I sent you.
2. Who has the private key, he can control everything on the address. He may not be able to do much with CP assets on it of course.
3. Counterwallet and some other counterpartyd client can both see the same assets if they have the private key to the same address. For example you can find information on how to use Counterparty with Armory here - http://support.counterparty.io/support/solutions/articles/5000004858-cold-storage-of-counterparty-assets-btc-using-armory-counterwallet
4. He won’t lose assets just because he sweeps the key from another wallet. That just decrypts the address’s contents, but it doesn’t do anything with them.

This KB article explains how one can operate the same address from CW and Bitcon-Qt (with counterpartyd running alongside it).
http://support.counterparty.io/support/solutions/articles/5000499251-manual-btc-sell-ing-on-the-counterparty-distributed-exchange-dex-using-counterpartyd

I recommend you to install Bitcoin-Qt and Counterpartyd (or only the latter if you have the former) and try your scenarios with microscopic amounts of BTC and XCP.

You can send XCP and assets to any Bitcoin address where you know the private key (a string of letters and numbers). Then you can use this private key to import BTC, XCP and assets from it into Counterwallet.

Not sure what you mean by wiping the private key. They can’t be deleted or anything like that. If you know the private key, you can always retrieve the assets and XCP. If you don’t know the private key, the funds will be inaccessible.

If you’re thinking about “preloading” one’s address with whatever asset and then passing it on to another person, that’s possible (you give them your private key, of course). 

But since you know their private key, they would have to trust you that you destroyed it otherwise they wouldn’t “really” have exclusive ownership over the address (it would be shared, so to speak).
If you describe your use case scenario maybe we can better tell you how to approach the problem.

Actually my main concern is the following


I would like to send asset to people that have a bitcoin wallet. Before bringing them to CP. And I would like to make sure they can’t loose their assets if
1. They move their BTC to another wallet
2. They spend their BTC to buy a coffee

Let say they have 0.1 BTC and Myasset x1000
What happen if they spend all their BTC does the private key still hold Masset x1000

Yes

The only way to accidentally lose Counterparty assets is by losing the private key for an address or having it compromised. I don’t know of any Bitcoin wallets that let you delete keys easily so it shouldn’t be a big problem losing the assets. It just raises the bar on people needing to learn about dumpprivkey or key export.

@yodark in that case - if they spend everything on that address - the asset would be gone too.

Having the private key wouldn’t help them if they spent everything.

I think there’s a plan to have a Docker-based Counterwallet which could be released as a mobile wallet app.
Then you could have people use a mobile Counterwallet to access that wallet. In fact you don’t even need them to see the wallet. Read about GetGems.org, they completely (well it’s not released yet but based on interviews given in media) masked the underlying Counterparty with their app.


@yodark in that case - if they spend everything on that address - the asset would be gone too.
Having the private key wouldn’t help them if they spent everything.

I don’t think this is correct. The transfer of assets is created in the Counterparty database with that small amount of BTC but that dust can be spent and collected independent of the underlying units of the asset. In order to send the assets on, the address would need to have some BTC to be included in a new transaction but the content of that transaction would not depend on a specific output being there. Just that the address was designated in the transaction data as the spending address.

You may very well be right about this. I hope someone can confirm. 

My Federated Node fell apart while upgrading to 9.45 but I’ll try to reinstall. If I make it work I’ll try that out on the testnet.

Okay, here’s the deal: 

1. If you send “all” BTC from a Counterparty wallet that also has some non-BTC (Counterparty) asset on it, 0.0001 BTC remains. 
2. You can further sweep that address to extract another tiny bit of BTC, but the asset remains. 

I used the free https://testnet.counterwallet.co/ to test (2 wallets). 

> What happen if they spend all their BTC does the private key still hold Masset x1000 

@weex was right, Masset x1000 would remain. You can open a free testnet account above and test. 

How to get testnet coins: http://support.counterparty.io/support/solutions/articles/5000148486-how-do-i-get-xcp-on-counterparty-testnet-

Even if you send all the BTC and XCP, the asset will stay right where it is.

Thanks for the clarification. One other wrinkle I thought about since is the need for any BTC to be in the sending address. It’s not necessary. That sending address just has to sign the transaction. It doesn’t have to contribute any inputs. I think this is true because I recall someone saying fees can be paid by another address in your Counterwallet on a sweep.

@weex you’re right, but I didn’t want to complicate things in my answer.


Not only that is possible, but there’s even a GUI for it (Counterwallet): if there’s not enough BTC on the address that’s being swept the current version allows you to select another address from your wallet (in addition to “target” address) from which to pay for the transaction. 

However I don’t think you can deplete an address of dust amount of BTC because of Counterparty data on it.
You can send “all” (note that both here and before I surrounded that with the quotation marks, that’s why!) BTC from an address, but a tiny amount will persist. It may or may not (depending on how you do it - send or sweep) be enough for a transaction with which you want to sweep the Counterparty asset(s) on it. If it’s not, then like you said you need to use BTC funds from another address for that.