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 | |
| declare(strict_types=1); | |
| require "../vendor/autoload.php"; | |
| $sky = new \SkyCoin\SkyCoin("192.168.100.27", 6420); | |
| $walletFactory = new \SkyCoin\Wallets\WalletsFactory($sky); | |
| echo "<pre>"; | |
| ////GET BLOCK BY HEIGHT |
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. Ensure Docker is installed. | |
| 2. Create a new pair of Docker Volumes for each the Skycoin Node instance | |
| - `docker volume create skycoin-1-wallet` | |
| - `docker volume create skycoin-1-data` | |
| 3. Create and run a new Docker container for the new instance. | |
| - `docker run -d -v skycoin-1-data:/data/.skycoin -v skycoin-1-wallet:/wallet -p 6000:6000 -p 6420:6420 --name skycoin-node-1 skycoinproject/skycoin` | |
| Repeat the above steps as many times as you want Skycoin Nodes. Make sure to do the following for each however: | |
| - Create new volumes | |
| - Map different host ports (6000 and 6420, 6001 and 6421, etc) |
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
| 'use strict'; | |
| process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; | |
| function Connection(username, password, hostname, port, protocol) { | |
| let _this = this; | |
| _this.username = username; | |
| _this.password = password; | |
| _this.hostname = hostname ? hostname : '127.0.0.1'; |
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 | |
| class StorageRequest | |
| { | |
| protected $data; | |
| protected $error; | |
| function __construct($dsn, $method, $params = []) | |
| { |