Set of classes and tools to communicate with a Noso wallet using NosoP

Overview

NosoPHP

Set of classes and tools to communicate with a Noso wallet using NosoP(Noso Protocol)

Examples

Node Info

include __DIR__ . '/vendor/autoload.php';

use Noso\NosoNode;
$nodes = [
    ['name'=>'Win1','host'=>'192.210.226.118','port'=>8080],
    ['name'=>'Win2','host'=>'107.172.5.8','port'=>8080]


];

echo "Nodes\n";

foreach ($nodes as $node) {

    echo "   Name     : {$node['name']}\n";
    $nosoNode = new NosoNode($node['host'], intval($node['port']));
    $nodeInfo = $nosoNode->getInfo();
    if ($nodeInfo) {
        echo "   Version  : {$nodeInfo->version}\n";
        echo "   Host     : {$nodeInfo->host}\n";
        echo "   Port     : {$nodeInfo->port}\n";
        echo "   Peers    : {$nodeInfo->peers}\n";
        echo "   Block    : {$nodeInfo->block}\n";
        echo "   Pending  : {$nodeInfo->pending}\n";
        echo "   Branch   : {$nodeInfo->branch}\n";
        echo "   SyncDelta: {$nodeInfo->syncDelta}\n";
    }
    echo "====================================\n";
}

Pool Info

include __DIR__ . '/vendor/autoload.php';

use Noso\NosoPool;

$pools = [
    'DevNoso'=>
        ['host'=>'devnosoeu.nosocoin.com', 'port'=>8082, 'password'=>'UnMaTcHeD'],
    'RussiaPool'=>
        ['host'=>'95.54.44.147', 'port'=>8080, 'password'=>'RussiaPool'],
    'Leviable'=>
        ['host'=>'164.90.252.232', 'port'=>8080, 'password'=>'password'],
    'ITBPool'=>
        ['host'=>'2.tcp.ngrok.io', 'port'=>8080, 'password'=>'Password']
];

$name='DevNoso';
$pool = new NosoPool($name, $pools[$name]['host'], $pools[$name]['port'], $pools[$name]['password']);

$poolInfo = $pool->getInfo('gcarreno-main');
if ($poolInfo) {
    echo "Pool: {$name}\n";
    echo "   Hash rate: {$poolInfo->hashRate}\n";
    echo "   Hash rate: {$poolInfo->HashRate}\n";
    echo "   Fee      : {$poolInfo->fee}\n";
    echo "   Fee      : {$poolInfo->Fee}\n";
    echo "   Share    : {$poolInfo->share}\n";
    echo "   Share    : {$poolInfo->Share}\n";
    if ($poolInfo->minerCount > 0 ) {
        echo "   === Miners ({$poolInfo->minerCount})\n";
        foreach($poolInfo->miners as $miner) {
            echo "   Address: {$miner->address}\n";
            echo "      Balance: {$miner->balance}\n";
            echo "      Balance: {$miner->Balance}\n";
            echo "      Blocks : {$miner->blocks_until_payment}\n";
        }
        echo "   === Miners\n";
    } else {
        echo "   No Miners";
    }
} else {
    echo "Something went wrong!\n";
}
You might also like...
Class PHP Api อั่งเปา True Wallet

Description: API อั่งเปา True Wallet (Rework) Features: ตรวจสอบอั่งเปา ใช้อั่งเปา แสดงผลออกมาเป็น Json Example: ?php use M4h45amu7x\Voucher; require

Iranian wallet provider's integration component for Laravel Framework

Iranian Wallets Integration Component For Laravel Iranian Wallet provider integration handler for Laravel 8.1+ known as LaraWallet component completel

This component provides a collection of functions/classes using the symfony/intl package when the Intl extension is not installed.

Symfony Polyfill / Intl: ICU This package provides fallback implementations when the Intl extension is not installed. It is limited to the "en" locale

The Assure Alliance support website. This website is based on Questions2Answers and is a forum for support using Biblical Tools

The Assure Alliance support website. This website is based on Questions2Answers and is a forum for support using Biblical Tools

This package provides a set of factories to be used with containers using the PSR-11 standard for an easy Doctrine integration in a project

psr-container-doctrine: Doctrine Factories for PSR-11 Containers Doctrine factories for PSR-11 containers. This package provides a set of factories to

[READ-ONLY] CakePHP Utility classes such as Inflector, Text, Hash, Security and Xml. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp

CakePHP Utility Classes This library provides a range of utility classes that are used throughout the CakePHP framework What's in the toolbox? Hash A

Collection of useful PHP functions, mini-classes, and snippets for every day.

JBZoo / Utils Collection of PHP functions, mini classes and snippets for everyday developer's routine life. Install composer require jbzoo/utils Usage

this starter kite inspired by laravel & Geo and mvc pattern. it's wrap for Wordpress built in classes.

WordpressStarterKite Introduction Built With Prerequisite Directory Structure Guidelines Getting Started Authors Introduction this starter kite inspir

This library can be used, among other things, to retrieve the classes, interfaces, traits, enums, functions and constants declared in a file

marijnvanwezel/reflection-file Library that allows reflection of files. This library can be used, among other things, to retrieve the classes, interfa

Releases(v0.2.18)
Owner
Noso Project
Noso Project
PHP package to communicate with the CMI payment plateform in Morocco

CMI PHP Payment bindings CMI PHP PAYMENT is an open source PHP payment handling library. it provides an easier way to communicate with CMI PAYMENT PLA

medhi rochdi 45 Dec 26, 2022
A set of classes to create and manipulate HTML objects abstractions

HTMLObject HTMLObject is a set of classes to create and manipulate HTML objects abstractions. Static calls to the classes echo Element::p('text')->cla

Emma Fabre 128 Dec 22, 2022
A set of PHP classes to let you manage your Dynamic Widget UI programmatically.

Dynamic Widget for Flutter A set of PHP classes to let you manage your Dynamic Widget UI programmatically. Why? Why not? Developing my application I f

Agostino Fiscale 3 Mar 22, 2022
Naive Bayes works by looking at a training set and making a guess based on that set.

Naive Bayes Naive Bayes works by looking at a training set and making a guess based on that set. It uses simple statistics and a bit of math to calcul

Assisted Mindfulness 29 Nov 27, 2022
GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

Shivam Mathur 2.4k Jan 6, 2023
Set of front-end tools for Magento 2 based on Gulp.js

Magento 2 Frontools Set of front-end tools for Magento 2 Requirements Unix-like OS (please, do not ask about Windows support) Node.js LTS version. We

SNOW.DOG 433 Dec 6, 2022
> Create e-wallet, send money, withdraw and check balance all via USSD protocol

Mobile Money USSD solution Create e-wallet, send money, withdraw and check balance all via USSD protocol Create e-wallet Step 1 Step 2 Step 3 Step 4 S

Emmanuel HAKORIMANA 1 Nov 3, 2021
Allow your users to login with their Ethereum wallet.

Allow your users to login with their Ethereum wallet Allow your users to link their Ethereum wallet to their account to skip entering their login cred

Miguel Piedrafita 84 Nov 7, 2022
A simple laravel package for wallet implementation

wallet A simple laravel package for wallet implementation. This package can basically be plugged into a laravel project and it will handle wallet impl

Ademuyiwa Adetunji 8 Dec 1, 2022
ระบบโดเนท Truemoney Wallet แบบขึ้นจอ streamlabs

ระบบ Donate Truemoney Wallet ฟีเจอร์ โดเนทผ่านลองค์ของขวัญ Truemoney Wallet ขึ้นจอ Streamlabs แจ้งเตือนผ่าน Line Notify การใช้งาน โหลดไฟล์ แก้ไฟล์ con

null 6 Sep 22, 2022