void MiningNotify(JObject obj) { //obj = JsonConvert.DeserializeObject<JObject>("{\"params\": [\"b3ba\", \"7dcf1304b04e79024066cd9481aa464e2fe17966e19edf6f33970e1fe0b60277\", \"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff270362f401062f503253482f049b8f175308\", \"0d2f7374726174756d506f6f6c2f000000000100868591052100001976a91431482118f1d7504daf1c001cbfaf91ad580d176d88ac00000000\", [\"57351e8569cb9d036187a79fd1844fd930c1309efcd16c46af9bb9713b6ee734\", \"936ab9c33420f187acae660fcdb07ffdffa081273674f0f41e6ecc1347451d23\"], \"00000002\", \"1b44dfdb\", \"53178f9b\", true], \"id\": null, \"method\": \"mining.notify\"}"); /* { "params": [ "bf", "4d16b6f85af6e2198f44ae2a6de67f78487ae5611b77c6c0440b921e00000000", "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff20020862062f503253482f04b8864e5008", "072f736c7573682f000000000100f2052a010000001976a914d23fcdf86f7e756a64a7a9688ef9903327048ed988ac00000000", [], "00000002", "1c2ac4af", "504e86b9", false ], "id": null, "method": "mining.notify" } job_id - ID of the job. Use this ID while submitting share generated from this job. prevhash - Hash of previous block. coinb1 - Initial part of coinbase transaction. coinb2 - Final part of coinbase transaction. merkle_branch - List of hashes, will be used for calculation of merkle root. This is not a list of all transactions, it only contains prepared hashes of steps of merkle tree algorithm. Please read some materials for understanding how merkle trees calculation works. Unfortunately this example don't have any step hashes included, my bad! version - Bitcoin block version. nbits - Encoded current network difficulty ntime - Current ntime/ clean_jobs - When true, server indicates that submitting shares from previous jobs don't have a sense and such shares will be rejected. When this flag is set, miner should also drop all previous jobs, so job_ids can be eventually rotated. */ JArray parms = (JArray)obj["params"]; if (parms.Count == 9) { JobInfo ji = new JobInfo(mExtraNOnce, mExtraNOnceSize); ji.mJobID = (string)parms[0]; ji.mPrevHash = (string)parms[1]; ji.mCoinBaseA = (string)parms[2]; ji.mCoinBaseB = (string)parms[3]; JArray merkleBranch = (JArray)parms[4]; foreach (JToken t in merkleBranch) ji.mMerkleBranch.Add((string)t); ji.mVersion = (string)parms[5]; ji.mDifficulty = (string)parms[6]; ji.mTime = (string)parms[7]; ji.Initialize(mServerDiff); bool cleanJobs = (bool)parms[8]; if (cleanJobs) mJobs.Clear(); mJobs.Add(ji); mNewBlockReady = true; } else { Disconnect(); Console.WriteLine("MiningNotify - Bad Data"); } }