账户示例代码

中本聪SN-3834

一个使用 0.3.18 新的基于账户命令的伪代码示例。

Some sample pseudocode using the new Accounts based commands in 0.3.18.

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 from their account to your "" account

// if you make a sale, move the money from their account to your "" account

if (move(username, "", amount, 6, "purchased item"))

if (move(username, "", amount, 6, "purchased item"))

SendTheGoods()

SendTheGoods()

// withdrawal

// withdrawal

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

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

你能用 listtransactions(username) 向他们展示其近期交易列表。

You can use listtransactions(username) to show them a list of their recent transactions.

上下文
← 上一条 SN-3834 · 当前 下一条 → 在档案中查看完整主题串 →
译文校对、修订与纠错

当前版本尚未建立逐条校对状态记录。来源核验、历史审校与当前译文校对是不同事项。

查看历史审校与代表修订 →

译文内容版本:b5a4e94069fb。用于比对文本,不代表校对等级或更新时间。

准备纠错说明

请填写对应原文、现译文、建议译法和理由。复制后通过你联系本站作者的渠道提交;此处不会自动发送。

来源
英文原标题

Accounts example code

Bitcointalk · 原始链接 ↗ 记录编号 SN-3834

阅读字号

选择适合你的字号,之后阅读会继续使用。