Skip to content

回复:一台电脑使用多个钱包 ​

原始发布页

打开来源页面
查看 1 个交叉存档

我已经开始做类似的东西了。大体上和 Gavin 描述的差不多。

再增加一些 rpc 接口:

move <fromaccount> <toaccount> <amount> 从一个内部账户移动到另一个内部账户。我认为空账户名("")将是你的默认账户。如果你向某个用户出售东西,可以执行 move "theiraccount" "" 123.45。 “move”是最合适的名称吗?我避开了“transfer”,因为它听起来太像发送一笔交易。

我在考虑新增一个 getaccountaddress 函数,而不是让 getnewaddress 承担多种用途:

getaccountaddress <account> 为你提供一个由 getnewaddress <account> 分配的地址。在这个地址收到东西之前,它会一直返回同一个地址,之后再分配一个新地址。(它会自动完成我前段时间发布的示例代码所做的事情)

这些命令是否能让你在简单情况下无需自己的数据库就实现网站?

英文原文 ​

展开英文原文

I have the beginning of something like this. It's mostly like what Gavin described.

Some more rpc interface:

move <fromaccount> <toaccount> <amount> Move from one internal account to another. I think blank account name ("") will be your default account. If you sell something to a user, you could do move "theiraccount" "" 123.45. Is "move" the best name for this? I shied away from "transfer" because that sounds too close to sending a transaction.

I'm thinking a new function getaccountaddress instead of overloading getnewaddress:

getaccountaddress <account> Gives you an address allocated from getnewaddress <account>. It'll keep giving the same address until something is received on the address, then it allocates a new address. (It automatically does what the sample code I posted some time ago did)

Would these commands make it possible in simple cases to implement your website without needing a database of your own?

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。