Download the PHP package viz-blockchain/viz-php-lib without Composer
On this page you can find all versions of the php package viz-blockchain/viz-php-lib. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download viz-blockchain/viz-php-lib
More information about viz-blockchain/viz-php-lib
Files in viz-blockchain/viz-php-lib
Package viz-php-lib
Short Description Native PHP class for VIZ Keys, Transaction, JsonRPC
License MIT
Homepage https://github.com/VIZ-Blockchain/viz-php-lib
Informations about the package viz-php-lib
viz-php-lib
Native PHP class for VIZ Keys, Transaction, JsonRPC
Features
- JsonRPC — native socket usage (all API methods, hostname cache, ssl flag, full result flag)
- Keys — private (sign), public (verify), shared, encoded keys support (wif, public encoded, compressed/uncompressed public key in hex representation)
- Transaction — easy workflow, multi-signature support, multi-operations support, execute by JsonRPC, support all 38 operations: transfer, transfer_to_vesting, withdraw_vesting, award, create_invite, etc...
- Classes support PSR-4
- Contains modificated classes for best fit to VIZ Blockchain (all-in-one)
- Native code without additional installations (sry composer, but we need other changes in third-party classes)
- Utils for keys compatibility with Ethereum, Bitcoin addresses
- Utilities with (Voice protocol)[https://github.com/VIZ-Blockchain/Free-Speech-Project/blob/master/specification.md] support: voice_text, voice_publication
- MIT License
Dependencies
One PHP extension from the list:
- GMP (GNU Multiple Precision) —
sudo apt-get install libgmp-dev php-gmp
- BCMath —
sudo apt-get install php-bcmath
Most hosting providers have it turned on already, but if not found, check your control panel.
Thanks to third-party class developers:
- https://github.com/simplito/bigint-wrapper-php
- https://github.com/simplito/bn-php
- https://github.com/simplito/elliptic-php
- https://github.com/kornrunner/php-keccak
Examples
Some examples have placeholders for private keys or accounts. Change them for successfull test.
Keys: init from hex, encode to wif, get public key from private, get encoded version, verify signature.
JsonRPC: init with endpoint, api method without parameters, change endpoint, get account, turn on all json result, request a non-existent account.
Transaction: init with endpoint and private key in wif, build simple transaction with award operation and execute it.
Init with endpoint and private key in wif, activate queue mode and add 2 operations, end queue and get result array. Execute transaction json from array. Add additional signature for multi-sig example (can be false if canonical signature was not found).
Create new private key, get public key from it, execute transaction with create_invite operation.
Find shared key from two sides. Simple string encrypt and decrypt with AES-256-CBC. Encode and decode memo with viz-js-lib
compability structure for encrypted memo.
Generate data and signature for passwordless authentication and check it for domain auth action with active authority.
Make transaction with custom operation.
Make transaction with account create operation.
Make transaction with proposal operations as array (need to use build_
prefix). Approve that proposal with other account active key.
Utils method for post text object to Voice protocol. Method attributes (* - is optional):
Attribute | Description |
---|---|
text | Simple text note. |
reply* | Link to replied context in viz:// url scheme. |
share* | Link to shared context in any url scheme. |
beneficiaries* | Array of objects [] contains ["account"=>"committee","weight"=>100] for awarding beneficiaries details. |
loop* | Block num. Ability to make loop for previous objects, exclude from personal activity feed. |
Utils method for post publication object to Voice protocol. Method attributes (* - is optional):
Attribute | Description |
---|---|
title | Publication title. |
markdown | Publication text with voice markdown. |
description* | Publication short description for preview. |
image* | Link to publication image for preview thumbnail. |
reply* | Link to replied context in viz:// url scheme. |
share* | Link to shared context in any url scheme. |
beneficiaries* | Array of objects [] contains ["account"=>"committee","weight"=>100] for awarding beneficiaries details. |
loop* | Block num. Ability to make loop for previous objects, exclude from personal activity feed. |
Create Voice text object, hide it with Voice Event.
Create Voice text object, check transaction size, split it for add
Voice Event.
May VIZ be with you.