call(name, params) {
        return new Promise((resolve, reject) => {
            this.jsonPost(name, params, headers).then((json) => {
                console.log(json)
                if (json.result) {
                    resolve(json.result);
                } else if (json.error) {
                    reject(json.error);
                } else {
                    reject(new Error(`Unknown JSON RPC response: ${json}`));
                }
            }).catch((error) => reject(error));
        });
    }
/**
    * This call analyses JSON RPC response.
    * It returns promise which resolves whether 'result' field found
    * or reject in case 'error' field found.
    *
    * @returns {Promise}
    */
This call analyses JSON RPC response.
It returns promise which resolves whether 'result' field found
or reject in case 'error' field found.

@returns {Promise}
This call analyses JSON RPC response . It returns promise which resolves whether ' result ' field found or reject in case ' error ' field found . @returns { Promise }
call(name, params) {
        return new Promise((resolve, reject) => {
            this.jsonPost(name, params, headers).then((json) => {
                console.log(json)
                if (json.result) {
                    resolve(json.result);
                } else if (json.error) {
                    reject(json.error);
                } else {
                    reject(new Error(`Unknown JSON RPC response: ${json}`));
                }
            }).catch((error) => reject(error));
        });
    }
call ( name , params ) { return new Promise ( ( resolve , reject ) => { this . jsonPost ( name , params , headers ) . then ( ( json ) => { console . log ( json ) if ( json . result ) { resolve ( json . result ) ; } else if ( json . error ) { reject ( json . error ) ; } else { reject ( new Error ( ` ${ json } ` ) ) ; } } ) . catch ( ( error ) => reject ( error ) ) ; } ) ; }
This call analyses JSON RPC response.
This call analyses JSON RPC response .