{
"subject": "Accounts example code",
"content": {
"format": "html",
"body": "<div class=\"post\">Some sample pseudocode using the new Accounts based commands in 0.3.18.<br/><br/>print \"send to \" + getaccountaddress(username) + \" to fund your account\"<br/>print \"balance: \" + getbalance(username, 0)<br/>print \"available balance: \" + getbalance(username, 6)<br/><br/>// if you make a sale, move the money from their account to your \"\" account<br/>if (move(username, \"\", amount, 6, \"purchased item\"))<br/> SendTheGoods()<br/><br/>// withdrawal<br/>sendfrom(username, bitcoinaddress, amount, 6, \"withdrawal by user\")<br/><br/>You can use listtransactions(username) to show them a list of their recent transactions.<br/></div>"
},
"source": {
"name": "Bitcoin Forum",
"url": "https://bitcointalk.org/index.php?topic=2202.msg28947#msg28947"
},
"date": "2010-12-10T19:21:03Z"
}