Download the PHP package onzcoin/onz-php-api without Composer

On this page you can find all versions of the php package onzcoin/onz-php-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package onz-php-api

** API compatibility

Currently supports ONZ API Version 0.94 The following sections from the onz api are available:

** Installation

It's a composer based package. \ Installation is as easy as:

+BEGIN_SRC sh

composer require onzcoin/onz-php-api

+END_SRC

** Usage: *** General To start communicating with a onz server you need to instanciate onz client and specify the servers ip and port.

This would connect to the official onz testnet. 
#+BEGIN_SRC php
$client = new \Onz\Client('https://tnode11.onzcoin.com');
#+END_SRC

* Accounts
**
Get Account Balance Request the balance of an account.

+BEGIN_SRC php

 $client->getBalance($address);
 #+END_SRC

**** Get Public Key Get the public key of an account. If the account does not exist the API call will return an error.

+BEGIN_SRC php

 $client->getPublicKey($secret);
 #+END_SRC

**** Open Account Request information about an account. If account with secret does not exist, account will be created.

+BEGIN_SRC php

 $client->openAccount($secret);
 #+END_SRC

**** Generate Public Key Returns the public key of the provided secret key.

+BEGIN_SRC php

 $client->generatePublicKey($secret);
 #+END_SRC

**** Get Account Information from Address Returns account information of an address.

+BEGIN_SRC php

 $client->getAccountInfo($address);
 #+END_SRC

**** Get Delegates Returns delegate accounts by address.

+BEGIN_SRC php

 $client->getDelegates($address);
 #+END_SRC

**** Vote Delegates Vote for the selected delegates. Maximum of 33 delegates at once. (Note: This is currently not working with onz api. Exception: "a.asset.votes.join is not a function")

+BEGIN_SRC php

 $client->voteDelegates($delegates, $secret, $secondSecret = null, $publicKey = null);
 #+END_SRC

* Loader ** Get Loading Status

+BEGIN_SRC php

 $client->getLoadingStatus();
 #+END_SRC

**** Get Synchronization Status Get the synchronization status of the client.

+BEGIN_SRC php

 $client->getSynchronizationStatus();
 #+END_SRC

**** Get Block Receipt Status Get the status of last received block. Returns true if block was received in the past 120 seconds.

+BEGIN_SRC php

 $client->getBlockStatus();
 #+END_SRC

* Transactions ** Get List of Transactions List of transactions matched by provided parameters.

+BEGIN_SRC php

 $client->listTransactions($blockId, $senderId, $recipientId, $limit, $offset, $orderBy);
 #+END_SRC

**** Send Transaction Send transaction to broadcast network.

+BEGIN_SRC php

 $client->sendTransaction($secret, $amount, $recipientId, $publicKey, $secondSecret);
 #+END_SRC

**** Get Transaction Get transaction that matches the provided id.

+BEGIN_SRC php

 $client->getTransaction($id);
 #+END_SRC

**** Get Unconfirmed Transaction Get unconfirmed transaction that matches the provided id.

+BEGIN_SRC php

 $client->getUnconfirmedTransaction($id);
 #+END_SRC

**** Get List of Unconfirmed Transactions Gets a list of unconfirmed transactions.

+BEGIN_SRC php

 $client->listUnconfirmedTransactions();
 #+END_SRC

**** Get List of Queued Transactions Gets a list of queued transactions.

+BEGIN_SRC php

 $client->listQueuedTransactions();
 #+END_SRC

**** Get Specific Queued Transaction Get queued transaction that matches the provided id.

+BEGIN_SRC php

 $client->getQueuedTransaction($id);
 #+END_SRC

* Peers ** Get Peers List Gets list of peers from provided filter parameters.

+BEGIN_SRC php

 $client->getPeerList($state, $os, $version, $limit, $offset, $orderBy);
 #+END_SRC

**** Get Peer Version/Build Time Gets a list peer versions and build times

+BEGIN_SRC php

 $client->getPeerVersion();
 #+END_SRC

**** Get Peer Gets peer by IP address and port.

+BEGIN_SRC php

 $client->getPeer($ip, $port);
 #+END_SRC

* Blocks ** Get Blocks Gets all blocks by provided filter(s).

+BEGIN_SRC php

 $client->getBlocks($totalFee, $totalAmount, $previousBlock, $height, $generatorPublicKey, $limit, $offset, $orderBy);
 #+END_SRC

**** Get Block Gets block by provided id.

+BEGIN_SRC php

 $client->getBlock($id);
 #+END_SRC

**** Get Blockchain Fee Get transaction fee for sending "normal" transactions.

+BEGIN_SRC php

 $client->getBlockchainFee();
 #+END_SRC

**** Get Blockchain Fees Schedule Get transaction fee for all types of transactions.

+BEGIN_SRC php

 $client->getBlockchainFees();
 #+END_SRC

**** Get Blockchain Reward Schedule Gets the forging reward for blocks.

+BEGIN_SRC php

 $client->getBlockchainReward();
 #+END_SRC

**** Get Total Supply of Onz Tokens (ONZ) Gets the total amount of Onz in circulation

+BEGIN_SRC php

 $client->getTotalSupply();
 #+END_SRC

**** Get Blockchain Height Gets the blockchain height of the client.

+BEGIN_SRC php

 $client->getBlockchainHeight();
 #+END_SRC

**** Get Status of Height, Fee, Milestone, Blockreward and Supply Gets status of height, fee, milestone, blockreward and supply

+BEGIN_SRC php

 $client->getStatusInfos();
 #+END_SRC

**** Get Blockchain Nethash Gets the nethash of the blockchain on a client.

+BEGIN_SRC php

 $client->getBlockchainNethash();
 #+END_SRC

**** Get Blockchain Milestone Gets the milestone of the blockchain on a client.

+BEGIN_SRC php

 $client->getBlockchainMilestone();
 #+END_SRC

* Signatures ** Get Signature Fees
Gets the second signature status of an account.

+BEGIN_SRC php

 $client->getSignatureFee();
 #+END_SRC

**** Add Second Signature Add a second signature to an account.

+BEGIN_SRC php

 $client->addSecondSignature($secret, $secondSecret, $publicKey);
 #+END_SRC

* Delegates ** Enable Delegate on Account Puts request to create a delegate.

+BEGIN_SRC php

 $client->createDelegate($secret, $username, $secondSecret);
 #+END_SRC

**** Get Delegates List Gets list of delegates by provided filter.

+BEGIN_SRC php

 $client->getDelegateList($limit, $offset, $orderBy);
 #+END_SRC

**** Get Delegate Gets delegate by public key or username.

+BEGIN_SRC php

 $client->getDelegate($publicKey, $username);
 #+END_SRC

**** Search for Delegates Search for Delegates by "fuzzy" username.

+BEGIN_SRC php

 $client->searchDelegate($username, $orderBy);
 #+END_SRC

**** Get Delegates Count Get total count of registered delegates.

+BEGIN_SRC php

 $client->getDelegateCount();
 #+END_SRC

**** Get votes of account Get votes by account wallet address.

+BEGIN_SRC php

 $client->getDelegateVotes($address);
 #+END_SRC

**** Get Voters Get voters of delegate.

+BEGIN_SRC php

 $client->getDelegateVoters($publicKey);
 #+END_SRC

**** Enable Forging on Delegate Enables forging for a delegate on the client node.

+BEGIN_SRC php

 $client->enableForging($secret);
 #+END_SRC

**** Disable Forging on Delegate Disables forging for a delegate on the client node.

+BEGIN_SRC php

 $client->disableForging($secret);
 #+END_SRC

**** Get Forged by Account Get amount of Onz forged by an account.

+BEGIN_SRC php

 $client->getForgedByAccount($generatorPublicKey, $start, $end);
 #+END_SRC

**** Get Next Forgers Get next delegate lining up to forge.

+BEGIN_SRC php

 $client->getNextForger($limit);
 #+END_SRC

* Apps ** Registers Apps Registers a Blockchain Application.

+BEGIN_SRC php

 $client->registerApp($secret, $category, $name, $type, $link, $secondSecret, $publicKey, $description, $tags, $icon);
 #+END_SRC

**** Get Apps Gets a list of Blockchain Applications registered on the network.

+BEGIN_SRC php

 $client->getApps($category, $name, $appType, $link, $limit, $offset, $orderBy);
 #+END_SRC

**** Get App Gets a specific Blockchain Application by registered id.

+BEGIN_SRC php

 $client->getApp($id);
 #+END_SRC

**** Search for Apps Searches for Blockchain Applications by filter(s) on a node.

+BEGIN_SRC php

 $client->searchApps($q, $category, $installed);
 #+END_SRC

**** Install App Installs a app by id on the node.

+BEGIN_SRC php

 $client->installApp($id);
 #+END_SRC

**** Installed Apps Returns a list of installed apps on the requested node.

+BEGIN_SRC php

 $client->getInstalledApps();
 #+END_SRC

**** Installed Apps Ids Returns a list of installed app ids on the requested node.

+BEGIN_SRC php

 $client->getAllInstalledApps();
 #+END_SRC

**** Uninstall Apps Uninstalls a app by id from the requested node.

+BEGIN_SRC php

 $client->uninstallApp($id);
 #+END_SRC

**** Launch App Launches a app by id on the requested node.

+BEGIN_SRC php

 $client->launchApp($id, $params);
 #+END_SRC

**** Installing Returns a list of app ids currently being installed on the requested node.

+BEGIN_SRC php

 $client->installingApp();
 #+END_SRC

**** Uninstalling Returns a list of app ids currently being uninstalled on the client node.

+BEGIN_SRC php

 $client->uninstallingApp();
 #+END_SRC

**** Launched Returns a list of app ids which are currently launched on the client node.

+BEGIN_SRC php

 $client->launchedApps();
 #+END_SRC

**** Categories Returns a full list of app categories.

+BEGIN_SRC php

 $client->getCategories();
 #+END_SRC

**** Stop App Stops a app by id on the requested node.

+BEGIN_SRC php

 $client->stopApp($id);
 #+END_SRC

* Multi-signature ** Create Multi-signature Account Create a multi-signature account.

+BEGIN_SRC php

 $client->createMultiSignatureAccount($secret, $lifetime, $min, $keysgroup, $secondSecret);
 #+END_SRC

**** Get Multi-signature Accounts Gets a list of accounts that belong to a multi-signature account.

+BEGIN_SRC php

 $client->getMultiSignatureAccounts($publicKey);
 #+END_SRC

**** Sign Multi-signature Transaction Signs a transaction that is awaiting signature.

+BEGIN_SRC php

 $client->getPendingTransactions($publicKey);
 #+END_SRC

**** Get Pending Multi-signature Transactions Returns a list of multi-signature transactions that waiting for signature by publicKey.

+BEGIN_SRC php

 $client->signPendingTransaction($secret, $transactionId, $publicKey);
 #+END_SRC

*** ToDo:

*** Support

If you want to support me please consider voting for my onz delegate
- *pelops* (ONZkXgbtn3UXx9VwVVGAtMmKNxuo5Su7cdYc) on MainNet
- *pelops_testnet* (ONZfnjELpTooW64V6CSXg5puP3v6pHTWA265) on TestNet

** Development
If you want to support the development just create a pull request or fork this project. I'll try to merge everything into the projects asap.

*** Project Supporters These people have contributed to this project:

** License

License under GNU General Public License v3.0

Copyright (c) 2018 OnzCoin [email protected]

OnzPhp is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

OnzPhpis distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with OnzPhp. If not, see http://www.gnu.org/licenses/.


All versions of onz-php-api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
tcdent/php-restclient Version ^0.1.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package onzcoin/onz-php-api contains the following files

Loading the files please wait ...