Skip to content

回复:JSON-RPC 状态 ​

首次公开证据

打开首次公开证据
查看 1 个交叉存档
来源说明

Published on GitHub in February 2024 as part of Martti Malmi's testimony in the COPA v. Wright trial

我已经把自己的 JSON-RPC 和命令行实现上传到了 SVN。我想等有更多时间考虑这些命令之后,再到论坛发帖。至少有些方法名会改变。

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

客户端命令不带任何开关,如下所示:

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

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

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

让 Linux 版本在没有安装 GTK 的情况下运行,会是另一项任务。

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

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

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

英文原文 ​

展开英文原文

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.

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

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

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?

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

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

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.

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