Showing posts with label API. Show all posts
Showing posts with label API. Show all posts

Thursday, April 28, 2011

ClearCoin API

The ClearCoin API is now up and running on the testnet ClearCoin:

Documentation

Python code that makes it easy to interact with ClearCoin is up on github. It does double-duty as a command-line tool to try out API commands; for example:


$ clearcoin_api.py escrow_list
{u'current': [u'XYDnDXTGDrfRJdsXNNXtoF'], u'expired': []}

$ clearcoin_api.py escrow_read XYDnDXTGDrfRJdsXNNXtoF
{u'escrow_id': u'XYDnDXTGDrfRJdsXNNXtoF', u'release_address': u'miGuMc6qtVEKS6Pf1jKddaa81DeHjMzkpB', u'expires': 1306133393, u'amount_available': 20.0, u'amount_pending_confirmation': 0, u'amount_released': 30.0, u'state': u'active', u'fund_address': u'mvnpMSHDVQy1hQGgmdjFfv3PxQYgzRCz6Q'}


API functionality will be enabled on production ClearCoin within the next week or so; I have a little bit more work to do to make sure the API can't be used to attempt denial-of-service attacks (by creating thousands of escrow accounts, for example).