SN-2005 已核对来源,附原文与上下文。
这是一段伪代码,演示怎么使用基于账户的命令。它确实让网站整合容易多了。
Here's some pseudocode of how you would use the account based commands. It sure makes website integration a lot easier.
print "send to " + getaccountaddress(username) + " to fund your account"
print "send to " + getaccountaddress(username) + " to fund your account"
print "balance: " + getbalance(username, 0)
print "balance: " + getbalance(username, 0)
print "available balance: " + getbalance(username, 6)
print "available balance: " + getbalance(username, 6)
// 如果达成一笔销售,把钱从他们的账户里移出
// if you make a sale, move the money out of their account
move(username, "", amount, 6)
move(username, "", amount, 6)
// 提现
// withdrawal
sendfrom(username, bitcoinaddress, amount, 6)
sendfrom(username, bitcoinaddress, amount, 6)