This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright (c) 2007, Roger Veciana | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* Redistributions of source code must retain the above copyright notice, this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | Aberdeenshire | |
---|---|---|
2 | Angus | |
3 | Argyll and Bute | |
4 | Bath and North East Somerset | |
5 | Bedfordshire | |
6 | Berkshire | |
7 | Blaenau Gwent | |
8 | Bridgend | |
9 | Buckinghamshire | |
10 | Caerphilly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { sha256 } = require('js-sha256').sha256; | |
class Miner { | |
constructor(fnHash, difficulty = 1, maxAttempts = 1000, verbose = true) { | |
if (difficulty <= 0 || difficulty > 5) { | |
throw new Error('Invalid difficulty provided'); | |
} | |
this.fnHash = fnHash; | |
this.maxAttempts = maxAttempts; |