MCPcopy Create free account
hub / github.com/CPChain/chain / newMessage

Method newMessage

api/rpc/client.go:449–455  ·  view source on GitHub ↗
(method string, paramsIn ...interface{})

Source from the content-addressed store, hash-verified

447}
448
449func (c *Client) newMessage(method string, paramsIn ...interface{}) (*jsonrpcMessage, error) {
450 params, err := json.Marshal(paramsIn)
451 if err != nil {
452 return nil, err
453 }
454 return &jsonrpcMessage{Version: "2.0", ID: c.nextID(), Method: method, Params: params}, nil
455}
456
457// send registers op with the dispatch loop, then sends msg on the connection.
458// if sending fails, op is deregistered.

Callers 3

CallContextMethod · 0.95
BatchCallContextMethod · 0.95
SubscribeMethod · 0.95

Calls 1

nextIDMethod · 0.95

Tested by

no test coverage detected