原始文献 / 论坛帖 / Re: Multiple Wallets, one computer
Re: Multiple Wallets, one computer
Bitcointalk · 2010-10-24 19:17:51 UTC
我已经有了一个类似东西的雏形。跟 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?
