MCPcopy Create free account
hub / github.com/btccom/btcagent / ToRPC2JSONBytes

Method ToRPC2JSONBytes

JSONRPC.go:145–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143}
144
145func (rpcData *JSONRPCRequest) ToRPC2JSONBytes() ([]byte, error) {
146 id := rpcData.ID
147 if id == nil {
148 id = 0
149 }
150 rpc2Data := JSONRPC2Request{id, "2.0", rpcData.Method, rpcData.Params}
151 return json.Marshal(rpc2Data)
152}
153
154func (rpcData *JSONRPCRequest) ToRPC2JSONBytesLine() (bytes []byte, err error) {
155 bytes, err = rpcData.ToRPC2JSONBytes()

Callers 1

ToRPC2JSONBytesLineMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected