src/Wallet.php
public function _request($body)
    {
        if(isset($body['params'])){
            $response = $this->client->send($this->client->request(0, $body['method'], $body['params']));
        } else {
            $response = $this->client->send($this->client->request(0, $body['method']));
        }
        $response = json_decode($response->getBody());
        // if there is an error, return the error message otherwise respond with result
        if(property_exists($response, 'error')){
            return json_encode($response->error);
        } else {
            return json_encode($response->result);
        }
    }
public function _request($body)
    {
        if(isset($body['params'])){
            $response = $this->client->send($this->client->request(0, $body['method'], $body['params']));
        } else {
            $response = $this->client->send($this->client->request(0, $body['method']));
        }
        $response = json_decode($response->getBody());
        // if there is an error, return the error message otherwise respond with result
        if(property_exists($response, 'error')){
            return json_encode($response->error);
        } else {
            return json_encode($response->result);
        }
    }
public function _request ( $ body ) { if ( isset ( $ body [ 'params' ] ) ) { $ response = $ this -> client -> send ( $ this -> client -> request ( 0 , $ body [ 'method' ] , $ body [ 'params' ] ) ) ; } else { $ response = $ this -> client -> send ( $ this -> client -> request ( 0 , $ body [ 'method' ] ) ) ; } $ response = json_decode ( $ response -> getBody ( ) ) ; // if there is an error, return the error message otherwise respond with result if ( property_exists ( $ response , 'error' ) ) { return json_encode ( $ response -> error ) ; } else { return json_encode ( $ response -> result ) ; } }
Helper function for creating wallet requests
@param array $body
@return string
Helper function for creating wallet requests