ビットコイン・インスティテュート

アカウントの​サンプルコード

0.3.18の新しいアカウントベースのコマンドを使用した疑似コードのサンプルだ。

print "send to " + getaccountaddress(username) + " to fund your account"
print "balance: " + getbalance(username, 0)
print "available balance: " + getbalance(username, 6)

// 売れたら、そのユーザーのアカウントから、あなた自身の""(名前なし)アカウントにお金を移す
if (move(username, "", amount, 6, "purchased item"))
    SendTheGoods()

// 出金
sendfrom(username, bitcoinaddress, amount, 6, "withdrawal by user")

listtransactions(username)を使って、最近のトランザクションの一覧を表示できる。