JSONRPCProvider

Class
Base interface for handling JSONRPCRequests and returning JSONRPCResponses.
export abstract class JSONRPCProvider 

Methods

handleResponse

(responseJSON: any): any => { 
    if (responseJSON.error !== undefined) { 
        if (responseJSON.error.code === -100 && responseJSON.error.message === 'Unknown block') { 
            throw new UnknownBlockError(); 
        } 
        throw new JSONRPCError(responseJSON.error); 
    } 
    return responseJSON.result; 
} 

request

public abstract request(req: JSONRPCRequest): Promise<JSONRPCResponse>; 

Parameters

req
JSONRPCRequest
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitterYouTube
COPYRIGHT © 2021 NEO•ONE