Joe Looney discusses his "XCP Wallet for Chrome"
What's up, party people? Chris DeRose here, Community Director of the Counterparty Foundation. And today I'm going to be interviewing Joe Looney. Joe Looney contributed a very excellent Counterparty extension for Chrome, and it's great. If you haven't used it, I highly recommend that you check it out. I've actually been playing around with it for about a week now and I'm really impressed with what he's done. So I'm getting him on the show here to talk about what he has learned about Counterparty and what he has found using Counterparty.
Joe, welcome. Thank you. Thanks for having me. Tell me, how did you come to find out about Counterparty? I ran into it the same way most people in this space do; it was either Reddit or Bitcoin Fog or something. I saw it when it came out where they had the initial burn and didn't think too much of it, but as soon as Counterwallet came out, I could actually use it. It was pretty great.
It was something I've always thought . . . it has been talked about colored coins and that type of thing and thought it was possible user issued assets that ride within the Blockchain, the Bitcoin Blockchain. Once Counterwallet came out, it definitely peaked my interest a lot more. Now, I don't think I saw anything come out of you, though, until this Chrome extension.
But I looked at your repo, you have a couple things in there. When did you start developing with Counterparty? With Counterparty probably anything that anybody would've seen would've been this wallet if I made anything, really. No, I don't think so. For a while, it was only block skins, API, to work with. And I hadn't really gotten the motivation to really dive in to Counterparty and the nuts and bolts and figure out exactly how the transactions are put together and everything. But the guys over at Let's Talk Bitcoin, the developers over there have been putting a lot of tools together recently.
They're very knowledgeable. Devin in particular is very helpful when it comes to kind of sounding board to ask questions to instead of having to search through forums and figure it out on my own. Working with him a little bit to start and he put that spec out, it made a lot more sense how the transactions were put together so I figured I should go for it and put something together. Adam, that's Adam Levine, I had made a Bitcoin calculator extension. Just starting trying to make Chrome extensions and seeing how they're put together. He gave me the challenge and said, "Hey, could you put a wallet together?" Because we were figuring out how to encode the transactions.
I said, "Okay, I'll give it a shot." I'm pretty proud of it. It was an effort. We started it probably early February, it's been the hobby ever since. I don't sit down in front of the TV and watch TV. I'll sit down in front of the computer and put the different program scripts together.
So that's been my main focus since being here in February. That's awesome. I'm glad to hear that. For anybody who's listening to this who wants to be a developer, one of the best things you can do is stop watching television. I don't have a TV in my house either, and I haven't had one for years now. I've been a developer for a long time but I've found that my productivity has gotten much better with getting rid of the TV.
Sorry, slight plug, I'm a believer in that myself. So what was more complicated for you, do you think? You did a couple things in that project. You made a Chrome extension and of course you did the Counterparty stuff. Do you think the Chrome extension was harder than the Counterparty components? What were big the challenges in that job? What helped was working with Chrome extensions already. I had messed around and had the basic knowledge of how to put them together. There was a learning curve there obviously.
Google actually has pretty good documentation for all their stuff so just read through that and figure it out. The most challenging part was definitely the Counterparty transaction encoding and decoding. So that was fishing through the Python code and I'm not really familiar with Python code at all. I understand the basic structure of the program so I was able to see the parallels with languages I am familiar with. Then again Devin was a huge help with that. He picked a big part of it out for me so it was a lot easier to digest.
It was interesting, I learned a lot about how information is stored on a computer. Just in the different . . . converting between hexadecimal and decimal; floating point decimal and then integers and all that kind of stuff. It was interesting, it was a challenge for sure.
So you've been programming for how long, exactly? What languages have you learned thus far? I've been programming ever since I've had a computer. I've never done it professionally. I've always put websites together ever since maybe 12 or 13 years old for different companies and stuff. It was always just a side project; it's not my 9 to 5 job, but Bitcoin really got me back into interacting with the internet and writing code. Not just the basic website, but actually working with scripting. PHP was the first one I learned.
It takes time and devotion to learning it but once you understand it, it's definitely satisfying getting the computer to do what you want it to do. Tell me a little bit more about how the application is designed. Now, there's a couple of different ways you can work with Counterparty. If you're composing transactions, I'm guessing that you're probably relaying through something like blockchain.info instead of one of the public Counterparty servers or perhaps you're querying from one of the Counter Party servers? Tell me a bit more about how it works under the hood in terms of like, what services you're using and what parts of the API you're using. Yeah.
Actually it queries a few APIs because you're not actually running any real Counterparty software in your computer, not running the Bitcoin client, you don't have Blockchain so it uses blockchain.info to push transactions and to view the transaction. There's a link to it once you send the transaction through. Then it uses Insight, which is Bitpay, put that out; it's another block explorer. It uses that for unspent outputs. And then the only time and interaction with Counterparty is really through counterpartychain.
io and it uses that to get lists of assets and current balances, and that type of thing. The way you send a transaction, the entire transaction is put together, serialized, and signed within the app locally on your computer and then that signed transaction is just pushed to the Blockchain using blockchain.info. They have a raw transaction API. Right. So that's the hard way to do it.
But it came out really well. Why did you choose to do it that way as opposed to relying on the public servers? Was it a little bit iffy for you, or did you just want to learn? I haven't had a lot of luck working with the Counterparty servers. They're up and down. Yeah, It's great that they host them but I didn't have a lot of luck and I ...
I really,. Because Counterparty works in Bitcoin, or it rides on top of Bitcoin, I like the challenge of just working with Bitcoin and Bitcoin libraries. Basically I'll encode and decode the transaction myself, and then just basically rely on Bitcoin-based APIs as opposed to Counterparty. It was more of a challenge; a lot of those . . .
blockchain.info is very robust. A lot of people use that API so it was not a lot of worry about that going down or having issues. I really think it's an advantage to the protocol itself to have a way to send. If for some reason there's some flaw in Python in the core software -- none of the Counterparty software worked anymore -- you could still send transactions with the wallet. That would still work.
You wouldn't be able to see anything because the data will be parsed to view. I think it's just necessary as a protocol grows, for different implementations and ways to parse the Bitcoin Blockchain to view the Counterparty data that's there. This also goes well for mobile integrations that we can do these types of things. Otherwise we wouldn't have that as an option for us as easily. Let me ask you another question. Did you use Op-return or Check Multisig? How did you encode your transactions? Check Multisig.
I think Counterparty's going to move over to op-return exclusively in the near future. I heard that, but there's always that risk of certain mining pools not minding op-return and just the whole issue with that. With the Check Multisig there's really no risk of that transaction not getting picked up and included in a block, so it's the standard way that Counterwallet does it right now. I figured that was really the way to go for more robustness with the . . .
So if was going to put the time into it, I might as well figure out how to encode it in Op-check Multisig. Have you thought about taking your work out into a separate library for the purposes of just Counterparty encoding? Yeah, actually I have in my GitHub, there's XCP tools JS, which is just that. It's the library that the XCP Wallet uses to encode and decode transactions. Actually there's no decoding done in the wallet because I have the API from the Counterparty chain. But for testing I also . .
. so there is decoding in the XCP Tools JS library. If you want to make sure your encoding is working by decoding it, then you can do it there. And it's all in there if anyone has any questions. They can feel free to ask me and I try to help point you in the right direction. Not that you need any suggestions, but I'd love to see you factor that out into a separate library maybe.
Even if you just left it as is but made it easily accessible so that others can add to it, I think that'd be really great because I would love to see that mature a bit more. I think that . . . Yeah, if anyone wants to contribute to it, absolutely submit a pro request. I've got send transactions and broadcasts working encoding and decoding, but there's a bunch of other types of transactions.
Okay, cool. We don't have that luxury at Ruby so I'm kind of working on that right now and it is a pain in the neck. I wouldn't wish that on anybody that didn't have to deal with transaction signing. That has been the most difficult part. I'm surprised there are no libraries for Ruby. There are a couple of really bad ones that I haven't got to work reliably and have some weird dependencies.
I think I'm going to have to roll my own. Plus I wanted to learn quite truthfully, too. I think it's a good skill to have. Yeah, absolutely. Not too many people like working with that, so it's a good place to look for your own personal enrichment in these things, I think. Yeah, for sure.
Tell me, where do you think Counterparty is going to go? How do you see it being useful in the developer environment? There are no wrong answers here. I'd be curious to see what your personal thoughts are. Useful to developers, or useful to the general public? Let's stick with developers first. Let's start with developers, and then you can take it towards general public after that. I think for developers, it's the best non- Bitcoin thing to work on because it is Bitcoin. You get all the advantages.
I use Bitcore, Big Coin JS for message signing, not transaction signing but there's a tab in the wallet for message signing as well. So many people have done so much work. Like you said, you're trying to figure out how to sign a transaction which is incredibly complicated. I was reading through that Ken Shirriff blog post that I gave you earlier. He lays it out pretty good for someone who's trying to learn it but still it's extremely complicated..
.. it's not just Bitcoin and provides a lot more functionality. Counterparty's definitely the way to go. What problems do you think it was going to solve for developers? Where do you think that a developer is going to sit and say, "Wait, I'll use Counterparty for that going forward." I've got my own ideas about this, but I'd be curious if you've developed your ideas about that.
Are you thinking developers outside of the Bitcoin space? Yeah, I think in general and probably the ones outside of Bitcoin space, yeah. Let's make it more interesting. Yeah, I think as Bitcoin becomes more popular, hopefully, I mean it seems to be going that direction. And it becomes more of a standard payment option for people. You can create a lot of applications where you accept Bitcoin either to charge up your account or even not have an account at all. But as long as that payment option is available, the use of Counterparty assets is huge.
You've got your ability to create your own scarce assets that the securities handle for you. You don't have to worry about maintaining a database of balances and stuff like that. You don't really want to. I don't know anybody that wants to maintain and secure databases. I really think, in general, if Bitcoin matures a lot more as a payment option, then it's wide open for Counterparty as far as people using assets for any kind of in-program either reward or token, or really anything when you start to create applications for the real world and interacting with a plethora of options that open up to you with using Counterparty assets and not having to worry about all the security that goes along with maintaining asset balances and things like that. It has potential, I really think it does.
I enjoy working with it. Everybody is really helpful so as a developer it's been a good experience working with Counterparty. I look at what you're doing and the first thing that I thought of was that it was a great idea for a couple of reasons. We don't have a lot of Counterparty integrations right now but I could foresee a time when gamers check out their gaming coins into their web browsing wallet, and maybe they take it out to a forum to pay for service, or to gamble, or to engage in some kind of a trade for goods right there on the forum outside of the gaming application. That would be one really cool use for your integration right there. I think that we could see things like that where you pull out value from a silo and engage in a greater ecosystem that may not even be the original developer's ecosystem.
It could be some putz-y forum that some guy made that's very successful. Realistically, I think a lot of the people that are using this at first are going to be young men probably, so you're looking at gaming being really easy, low-hanging fruit there. Earning karma on a Reddit site or on Reddit or something like that and using that karma perhaps to maybe assert your credentials elsewhere, I could see that being useful perhaps if your karma is at 2,000 on Reddit, then you enter a forum with some of that reputation already migrating over, per se. Maybe something like that could work. I don't know, but I like how easy you made it in your app. it was very browser integrated.
I think all these virtual currencies are going to need browser integrations to be as fluid as what you've done. Love what you're doing. Another question I would have for you is where are you going to go from here in Counterparty? Do you have any plans to up the ante with your app? Are you going to keep maintaining it? Yeah, I definitely plan to maintain the app and improve it. When I first started working with Counterparty . . .
maybe not even working with it, just using it. I think it really is going to be your easiest option for hiding all the cryptocurrency stuff from the user that doesn't really care and they just want to use whatever the application is and whatever the currency or token or what have you within that application and they don't care about the cryptocurrency stuff. Actually I see the wallet going more towards simplification than towards feature rich. Obviously I want to figure out how to encode all the different kinds of transactions and maybe include them in a different extension or pro app, or maybe just update the library that I was telling you about earlier, the XCP Tools JS Library. I really think moving the other way and making it easy for people that are scared off from the idea of a cryptocurrency and it would just be kind of a wallet without you knowing it's a wallet. It's just your application that does some function that you want it to do and then there's some built-in token or something like that in there that provides utility for the user.
I really think that's probably going to be where I go with it as opposed to the other way, the more complex, future rich stuff. Cool, and as far as the community support, do you find that Counterparty's doing pretty well there offering resources to you? Do you think we can do something better as a developer, what we could do to help you make apps? Yeah. I think everything you're doing is great. It's the best of any other community that I've kind of bounced in and out of. Let's hope Bitcoin does a really good job. Those guys are great, they're really helpful.
You guys have a similar setup with the way you integrate. You have a forum, you have a slack, you have the same GitHub repo and that type of thing. I really think it's more personality than working with people and everybody at Counterparty. Like I said, they're really great and really helpful, so it makes you want to work with the protocol more. As long as you understand it and it's something you want to do, with everyone being helpful and when you ask questions and bounce ideas off, then it's going to motivate you a lot more to want to do more. So, yeah, I think you guys are doing a great job.
I don't think I would do anything different from what you're currently doing now. Cool. We're going to keep working on that spec. Developers have been really doing all the work there so hopefully I can add a little bit more to it myself. I think that'll probably be something that helps people like you in the future. We're really trying to recruit more wallet devs.
I'm thinking in the mobile space it'd be nice to see people doing pretty much exactly what you did. So I think we can use you as a sample portfolio of what we'd like to see in the future from others. But thank you. Yeah, use all the functions I've written, too. There's a whole library so don't reinvent the wheel. Agreed.
For everybody watching this, pay attention. There's a lot of coding to pull from. That's how open source works. Is there anything else you want to promote on the channel here? Is there anything else that the audience should know about you that you'd like to mention? I don't think so. I'm pretty accessible. I'm active in both Counterparty forums and Let's Talk Bitcoin.
I don't think I have any more to add as far as projects I'm working on. A lot has been taking up my time. If you have any questions or want to know more or want to help me out, let me know. What's your personal website, Joe? It's joelooney.org. So J-O-E-L-O-O-N-E-Y.
org. I have my email and Twitter on there, so that's another way you can get in touch with me. Thank you so much for your time. I really enjoyed you in the site channel. Just for the limited amount of time we spent together, I can see you're a real asset for the Counterparty team and ecosystem and all that. So thanks for doing what you're doing and keep up the great work.
I think that's it, everyone. That was Joe Looney, and I thought he was a really interesting interview. I'd love to see any other projects that maybe you are working on if you're listening to this program and you've got something to show me. Why don't you tweet me at DeRose Tech, or just find me on all the normal Counterparty channels, like counterpartytalk.org. If you liked this video, subscribe to the channel.
There's plenty of other stuff coming and we love to talk all things Counterparty. Later, party people. Say goodbye, cat. Pickles says goodbye.