Martti Malmi 通信

回复:JSON-RPC 进展

中本聪 · 2010 年 2 月 13 日

SN-10150 附来源、原文与上下文。

阅读语言

我把 JSON-RPC 和命令行实现上传到了 SVN。我想多花些时间考虑命令,再发到论坛。至少有一些方法名还会改变。

I uploaded my JSON-RPC and command line implementation to SVN. I'm waiting to post on the forum when I've had more time to think about the commands. At least some method names are going to change.

要启用 RPC 服务器,请添加 -server 开关。默认不启用。

To enable the RPC server, add the switch -server. It's not on by default.

客户端命令不带任何开关,像这样:

Client commands are without any switches, as such:

bitcoin getblockcount
bitcoin getdifficulty
bitcoin getnewaddress somelabel
bitcoin sendtoaddress 1DvqsbZ... 1.00
bitcoin getallpayments 0
bitcoin stop
bitcoin getblockcount
bitcoin getdifficulty
bitcoin getnewaddress somelabel
bitcoin sendtoaddress 1DvqsbZ... 1.00
bitcoin getallpayments 0
bitcoin stop

应用程序通常会直接使用 JSON-RPC,而不是命令行。

Applications would normally use JSON-RPC directly, not command line.

我还没用其他程序测试过自己的 JSON-RPC 服务器。如果你测试了,请告诉我结果。你用的是 Python,对吧?

I haven't tested my JSON-RPC server with anything else yet. If you do, please tell me how it goes. You're using Python, right?

让 Linux 版在未安装 GTK 时运行,是另一项独立任务。

Getting the Linux version to run without the GTK installed will be a separate task.

引用 Martti Malmi 的文字Martti Malmi来源 ↗

太好了!我会开始熟悉 Liberty Reserve 及其 API。

That's great! I'll start familiarizing myself with Liberty Reserve and its api.

引用中本聪此前的文字中本聪来源 ↗

JSON-RPC 实现进展顺利。我用 boost::asio 处理套接字。JSON-RPC 可以使用普通套接字或 HTTP,但似乎大多数其他实现都用 HTTP,所以我自己做了简单的 HTTP 头。 JSON 解析用的是 JSON Spirit,它充分使用 STL,用起来很好。它只有头文件,不增加构建工作,而且足够小,可以直接放入我们的源码树。采用 MIT 许可证。再过几天,这些应该都能运作了。

The JSON-RPC implementation is going well. I'm using boost::asio for sockets. JSON-RPC can be plain socket or HTTP, but it seems most other implementations are HTTP, so I made my own simple HTTP headers. For JSON parsing I'm using JSON Spirit, which makes full use of STL and has been really nice to use. It's header-only so it's no added build work, and small enough to just add it to our source tree. MIT license. This should all be working in a few more days.

论坛确实热闹起来了。我没想到这么快就会有这么多活动。

The forum sure is taking off. I didn't expect to have so much activity so fast.

来源

阅读字号

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