MCPcopy Create free account
hub / github.com/FactomProject/factom / NewJSON2Request

Function NewJSON2Request

jsonrpc.go:79–88  ·  view source on GitHub ↗
(method string, id, params interface{})

Source from the content-addressed store, hash-verified

77}
78
79func NewJSON2Request(method string, id, params interface{}) *JSON2Request {
80 j := new(JSON2Request)
81 j.JSONRPC = "2.0"
82 j.ID = id
83 if b, err := json.Marshal(params); err == nil {
84 j.Params = b
85 }
86 j.Method = method
87 return j
88}
89
90func ParseJSON2Request(request string) (*JSON2Request, error) {
91 j := new(JSON2Request)

Callers 15

GetBlockByHeightRawFunction · 0.85
GetDBlockByHeightFunction · 0.85
GetECBlockByHeightFunction · 0.85
GetFBlockByHeightFunction · 0.85
GetABlockByHeightFunction · 0.85
BackupWalletFunction · 0.85
GenerateFactoidAddressFunction · 0.85
GenerateECAddressFunction · 0.85
GenerateIdentityKeyFunction · 0.85
ImportAddressesFunction · 0.85
ImportKoinifyFunction · 0.85
RemoveAddressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected