Skip to content

Instantly share code, notes, and snippets.

@askaaqib
askaaqib / skycoin.php
Last active August 18, 2022 03:48
SkyCoin SDK PHP
<?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
@BigOokie
BigOokie / Load-balanced Skycoin Nodes with Caddy
Last active August 18, 2022 03:48
Load-balanced Skycoin in Docker
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)
@azhuravlov
azhuravlov / emercoin.js
Last active August 30, 2024 21:23
Emercoin + NodeJS
'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';
<?php
class StorageRequest
{
protected $data;
protected $error;
function __construct($dsn, $method, $params = [])
{