2019-06-25 11:42:17 +00:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/filecoin-project/go-lotus/api"
|
2019-07-03 17:39:07 +00:00
|
|
|
"github.com/filecoin-project/go-lotus/jsonrpc"
|
2019-06-25 11:42:17 +00:00
|
|
|
)
|
|
|
|
|
2019-07-02 17:45:03 +00:00
|
|
|
// NewRPC creates a new http jsonrpc client.
|
2019-06-25 11:42:17 +00:00
|
|
|
func NewRPC(addr string) api.API {
|
2019-06-29 09:19:06 +00:00
|
|
|
var res api.Struct
|
2019-07-03 17:39:07 +00:00
|
|
|
jsonrpc.NewClient(addr, "Filecoin", &res.Internal)
|
2019-06-29 09:19:06 +00:00
|
|
|
return &res
|
2019-07-01 20:00:22 +00:00
|
|
|
}
|