1.2 KiB
1.2 KiB
API
This document is a work in progress.
The systems API is defined in here. The JSON RPC maps directly to the API defined here using the JSON RPC package.
Overview
By default 127.0.0.1:1234
- daemon stores the API endpoint multiaddr in ~/.lotus/api
http://[api:port]/rpc/v0
- JSON RPC HTTP endpointws://[api:port]/rpc/v0
- JSON RPC websocket endpointPUT http://[api:port]/rest/v0/import
- import file to the node repo, it requires write permission.
For JSON RPC interface definition see api/api.go. Required permissions are defined in api/struct.go
Auth
JWT in the Authorization: Bearer <token>
http header
Permissions
read
- Read node state, no private datawrite
- Write to local store / chain, read private datasign
- Use private keys stored in wallet for signingadmin
- Manage permissions
Payload
{
"Allow": ["read", "write", ...]
}
Admin token is stored in ~/.lotus/token