<commit_before><?php
namespace Headzoo\Bitcoin\Wallet\Api;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;

/**
 * Core class which directly communicates with Bitcoin wallets supporting the JSON-RPC API.
 *
 * This class provides a single `query($method, array $params = [])` method via the
 * `Headzoo\Bitcoin\Wallet\Api\JsonRPCInterface` interface. Although you may use this class directly to query a wallet,
 * it's best to use an instance of `Headzoo\Bitcoin\Wallet\Api\Wallet` instead.
 * 
 * Example:
 * ```php
 *  $conf = [
 *      "user" => "test",
 *      "pass" => "<PASSWORD>",
 *      "host" => "localhost",
 *      "port" => 9332
 *  ];
 *  $rpc  = new JsonRPC($conf);
 *  $info = $rpc->query("getInfo");
 * ```
 */
class JsonRPC
    implements JsonRPCInterface
{
    /**
     * Configuration for the litecoind rpc
     * @var array
     */
    private $conf = [
        "user" => "test",
        "pass" => "<PASSWORD>",
        "host" => "localhost",
        "port" => 9332
    ];

    /**<commit_msg>Updated phpdoc<commit_after><?php
namespace Headzoo\Bitcoin\Wallet\Api;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;

/**
 * Core class which directly communicates with Bitcoin wallets supporting the JSON-RPC API.
 *
 * This class provides a single `query($method, array $params = [])` method via the
 * `Headzoo\Bitcoin\Wallet\Api\JsonRPCInterface` interface. Although you may use this class directly to query a wallet,
 * it's best to use an instance of `Headzoo\Bitcoin\Wallet\Api\Wallet` instead.
 * 
 * Example:
 * ```php
 *  $conf = [
 *      "user" => "test",
 *      "pass" => "<PASSWORD>",
 *      "host" => "localhost",
 *      "port" => 9332
 *  ];
 *  $rpc  = new JsonRPC($conf);
 *
 *  $info      = $rpc->query("getInfo");
 *  $balance   = $rpc->query("getBalance", ["headz", 1]);
 *  $signature = $rpc->query(
 *      "signMessage",
 *      [
 *          "1Headz2mYtpBRo6KFaaUEtcm5Kce6BZRJM",
 *          "Mary had a little lamb."
 *      ]
 *  );
 * ```
 */
class JsonRPC
    implements JsonRPCInterface
{
    /**
     * Configuration for the litecoind rpc
     * @var array
     */
    private $conf = [
        "user" => "test",
        "pass" => "<PASSWORD>",
        "host" => "localhost",
        "port" => 9332
    ];

    /**
{'fraction_non_alphanumeric': 0.16380449141347425, 'fraction_numerical': 0.009687362395420519, 'mean_word_length': 2.641025641025641, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3214139', 'n_tokens_mistral': 767, 'n_tokens_neox': 760, 'n_words': 192}