lotus/daemon/rpc.go
Łukasz Magiera 9299ba5fa6 Fix imports
2019-07-08 14:46:30 +02:00

16 lines
339 B
Go

package daemon
import (
"github.com/filecoin-project/go-lotus/lib/jsonrpc"
"net/http"
"github.com/filecoin-project/go-lotus/api"
)
func serveRPC(api api.API) error {
rpcServer := jsonrpc.NewServer()
rpcServer.Register("Filecoin", api)
http.Handle("/rpc/v0", rpcServer)
return http.ListenAndServe(":1234", http.DefaultServeMux)
}