deals: Sending initial proposal works

This commit is contained in:
Łukasz Magiera
2019-08-07 20:01:22 -07:00
committed by whyrusleeping
parent 322031d8e4
commit b65041cac1
8 changed files with 71 additions and 21 deletions
+11
View File
@@ -7,6 +7,17 @@ import (
"github.com/filecoin-project/go-lotus/lib/jsonrpc"
)
// NewCommonRPC creates a new http jsonrpc client.
func NewCommonRPC(addr string, requestHeader http.Header) (api.Common, error) {
var res api.CommonStruct
_, err := jsonrpc.NewMergeClient(addr, "Filecoin",
[]interface{}{
&res.Internal,
}, requestHeader)
return &res, err
}
// NewFullNodeRPC creates a new http jsonrpc client.
func NewFullNodeRPC(addr string, requestHeader http.Header) (api.FullNode, error) {
var res api.FullNodeStruct