20

Filecoin RPC API中文文档【Lotus】

 3 years ago
source link: http://blog.hubwiz.com/2020/12/13/filecoin-rpc-api/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Filecoin RPC API中文文档【Lotus】

2020-12-13

| 区块链

区块链开发课程精选

JSON-RPC是一种标准的远程调用方式,在以太坊和比特币等区块链实现中都得到了广泛的应用。 Filecoin Lotus也是使用JSON-RPC实现服务进程与客户端的通信,默认监听端口为1234, 支持HTTP和Websocket。Filecoin RPC API中文文档由汇智网提供,访问地址:http://cw.hubwiz.com/card/c/filecoin-lotus-rpc/。

各种常见开发语言或命令行工具都可以访问Filecoin的JSON RPC API。例如使用CURL查询版本信息:

1
2
3
4
5
6
7
8
9
curl -X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "Filecoin.Version",
"params": [],
"id": 1
}' \
http://127.0.0.1:1234/rpc/v0

响应结果看起来会像这样:

1
2
3
4
5
6
7
8
9
{
"jsonrpc":"2.0",
"result":{
"Version":"0.3.0+gite4b5f1df.dirty",
"APIVersion":512,
"BlockDelay":6
},
"id":1
}

根据用途不同,Filecoin Lutos RPC API可分为如下12个不同的组:

1、Auth/授权令牌相关API

2、Chain/链相关API

3、Client/节点相关API

4、公共API

5、Gas/手续费相关API

6、Miner/挖矿相关API

7、Mpool/内存池相关API

8、Msig/多重签名相关API

9、Net/网络相关API

10、Paych/支付通道相关API

11、State/状态相关API

12、Sync/同步相关API

13、Wallet/钱包相关API


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK