Handling counterparty assets in my webserver

[font=verdana][size=13px]I just got some time to play around with counterparty. Was looking to integrate it with a project I’m working on.[/size][/font][font=verdana][/size][size=13px]I need a few high level clarifications regarding this,I want to be able create and move a bunch of counterparty assets amongst bitcoin addresses on my server. So far I have used the BitcoinSCI library to create the bitcoin addresses on my server(using php framework). Now I need figure out the best way to create and distribute counterparty assets between these addresses. Here are two specific questions,1) I want to create one main asset and a bunch of subassets under that. Does counterparty support subassets yet?2) I want to be able to move an asset from an issuer address(Address A) to another address(Address B) without Address B needing to make any payment. Think of it as a free asset or “token” that I would like to award to Address B. Is this possible?I would love to get clarification from the devs or other more knowledgble folks. Thx.[/size][/font]

Counterparty does not have a concept of sub assets. All assets are top level.

In your scenario address B does not need to pay anything if you wish to send assets to B. However, address A would need to pay to broadcast the Counterparty transaction.

If the transactions are all within your web site,  you could just move asset between address A and B internally within your database. When the person owning address B wants to ‘cash out’  the tokens,  they can make a withdrawal request. At that point you would make the transfer. This is similar to how exchanges operate and it would save you the fees that may accumulate over a large number of internal transfers.

You should hook into the API for counterpartyd and optionally counterwalletd. Creating your own counterparty transactions manually is not recommended.


API docs: http://counterpartyd.readthedocs.org/en/develop/API.html

[quote author=Global_trade_repo link=topic=265.msg1967#msg1967 date=1397705241]
Counterparty does not have a concept of sub assets. All assets are top level.

In your scenario address B does not need to pay anything if you wish to send assets to B. However, address A would need to pay to broadcast the Counterparty transaction.

If the transactions are all within your web site,  you could just move asset between address A and B internally within your database. When the person owning address B wants to ‘cash out’  the tokens,  they can make a withdrawal request. At that point you would make the transfer. This is similar to how exchanges operate and it would save you the fees that may accumulate over a large number of internal transfers.
[/quote]


Cool thx for the clarification.  Ya storing the transactions internally until the final withdrawal sounds like the better idea. Will look into this.

[quote author=xnova link=topic=265.msg1968#msg1968 date=1397709948]
You should hook into the API for counterpartyd and optionally counterwalletd. Creating your own counterparty transactions manually is not recommended.


API docs: http://counterpartyd.readthedocs.org/en/develop/API.html
[/quote]


This would require both counterpartyd and bitcoind running on my server correct?


Can I also accomplish the same tasks by using the pyrpcwallet(light wallet)?




Thx,

[quote author=reader31 link=topic=265.msg1989#msg1989 date=1397865141]
[quote author=xnova link=topic=265.msg1968#msg1968 date=1397709948]
You should hook into the API for counterpartyd and optionally counterwalletd. Creating your own counterparty transactions manually is not recommended.


API docs: http://counterpartyd.readthedocs.org/en/develop/API.html
[/quote]


This would require both counterpartyd and bitcoind running on my server correct?


Can I also accomplish the same tasks by using the pyrpcwallet(light wallet)?




Thx,
[/quote]


Yes, you would need counterpartyd and bitcoind running. Easiest way to get all that up may be to set up the server as a federated node (which is how we run the counterwallet servers), see: https://github.com/xnova/counterpartyd_build/blob/develop/docs/SettingUpAFederatedNode.rst#node-setup


[font=Verdana]Then, you could just stop/disable counterwalletd from running, and host your stuff already. (or, you could keep counterwalletd running…it has a pretty powerful API that may provide some useful functionality to you over what counterpartyd does).[/font]

You could use pyrpcwallet I’d think, instead of bitcoind… I haven’t done much with it, but it’s Ouziel’s (JahPowerBit’s) baby, and he’ll be able to answer questions about it.
However, if you are providing a service to other users, I would definitely run bitcoind directly, for security and stability sake.



great thx for the clarification. I would look into setting up a federated node.