create account

Update Of PHP Graphene Node Client [v5.1.2 - v5.2.0] by t3ran13

View this thread on: hive.blogpeakd.comecency.com
· @t3ran13 ·
$49.20
Update Of PHP Graphene Node Client [v5.1.2 - v5.2.0]
# php-graphene-node-client
It is PHP API client for [VIZ](https://github.com/viz-world)/[STEEM](https://github.com/steemit)/[GOLOS](https://github.com/goloschain)/[WHALESHARES](https://gitlab.com/beyondbitcoin) blockchain

[Github](https://github.com/t3ran13/php-graphene-node-client) or [packagist](https://packagist.org/packages/t3ran13/php-graphene-node-client) with MIT license. Author @t3ran13 and active contributor @semasping

## In Release [v5.1.2](https://github.com/t3ran13/php-graphene-node-client/releases/tag/v5.1.2)
- upd VIZ public nodes list
- fix InitConnector bug for VIZ

## In Release [v5.1.3](https://github.com/t3ran13/php-graphene-node-client/releases/tag/v5.1.3)
- VIZ content operation was deleted
- VIZ custom operation was added

## In Release [v5.1.3](https://github.com/t3ran13/php-graphene-node-client/releases/tag/v5.2.0)
- Steem HTTPS nodes was updated in connector
- Own Classes with operations IDs and fields types was added for each chain
- New GetTransactionHex command was added (debug your serialized transactions)
- New BOOL and INT8 types were added for operation fields
- Beneficiaries serialization was fixeds


### upd VIZ public nodes list

Actual list of VIZ nodes are:
- https://rpc.viz.lexai.host and wss://viz.lexai.host
- https://solox.world and wss://solox.world/ws


### fix InitConnector bug for VIZ

It was not working correct before and was fixed. Now you can use InitConnector for convenient simultaneous work with few chains.

```php
$connector = InitConnector::getConnector(ConnectorInterface::PLATFORM_VIZ);
```


### VIZ content operation was deleted

It was deprecated and does not wark in VIZ anymore.



### VIZ custom operation was added

It is the same as custom_json in STEEM/GOLOS/WHALESHARES, but in VIZ it has other name

   
Example of using
   
```php
$connector = InitConnector::getConnector(ConnectorInterface::PLATFORM_VIZ);
$chainName = $connector->getPlatform();
/** @var CommandQueryData $tx */
$tx = Transaction::init($connector);
$tx->setParamByKey(
    '0:operations:0',
    [
        'custom',
        [
            'required_auths'         => [],
            'required_posting_auths' => ['guest123'],
            'id'                     => 'YOUR_ID',
            'json'                   => json_encode(YOUR_JSON)
        ]
    ]
);
Transaction::sign(
    $chainName,
    $tx,
    [
        'posting' => '5POSTING_KEY', 
    ]
);

$command = new BroadcastTransactionSynchronousCommand($connector);
$answer = $command->execute(
    $tx
);

```


### Steem HTTPS nodes was updated in connector

Actual list of STEEM HTTPS nodes are:
- https://rpc.steemviz.com
- https://steemd.privex.io
- https://api.steemit.com
- https://anyx.io
- https://rpc.usesteem.com



### Own Classes with operations IDs and fields types was added for each chain

Each chain has own class with operations IDs and fields types:
- ChainOperationsGolos.php
- ChainOperationsSteem.php
- ChainOperationsViz.php
- ChainOperationsWhaleshares.php

Thanks of this each chain can has difference in operations from other and it is easy to add this changes.




### New GetTransactionHex command was added (debug your serialized transactions)

It is best way for dubag serialiaer with  GetTransactionHex api method.
You have to prepare Tx *without signature* and send it to node and witch back serialized hex string.

```php
$chainName = $connector->getPlatform();
/** @var CommandQueryData $tx */
$tx = Transaction::init($connector);

$tx->setParamByKey(// some data
);

$command = new GetTransactionHexCommand($connector);
$answer = $command->execute(
    $tx
);
echo PHP_EOL . '<pre>' . print_r($answer, true) . '<pre>';
```





### New BOOL and INT8 types were added for operation fields

This types use for serialization Tx. Now it is easy to add some operation with this types.






### Beneficiaries serialization was fixeds

It was bug with serialization Tx with 2 and more beneficiaries. It works correct now.


-------

It is better with each commit

[Commits](https://github.com/t3ran13/php-graphene-node-client/commits/master) were done by me in master branch

- fix InitConnector bug for VIZ
- upd VIZ public nodes list
- upd VIZ new operation
- upd VIZ operation content is deleted 
- fix VIZ custom operation order 
- ups own operations list for each chain (last 14 days)
- fix viz and whaleshares operations and new operation for steem, whale and golos (last 14 days)
- add GetTransactionHex command  (last 14 days)
- add own serializer operations types for each chain (last 14 days)
- add type BOOL for operation field and fix type beneficiaries (last 14 days)
- upd https nodes of steem (last 14 days)
- upd README (last 14 days)

Compare [v5.1.1 - v5.2.0](https://github.com/t3ran13/php-graphene-node-client/compare/v5.1.1...v5.2.0)
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 65 others
properties (23)
authort3ran13
permlinkupdate-of-php-graphene-node-client-v5-1-2-v5-2-0
categoryutopian-io
json_metadata{"tags":["utopian-io","development","opensource","steemdev","php"],"users":["t3ran13","semasping"],"links":["https://github.com/viz-world","https://github.com/steemit","https://github.com/goloschain","https://gitlab.com/beyondbitcoin","https://github.com/t3ran13/php-graphene-node-client","https://packagist.org/packages/t3ran13/php-graphene-node-client","https://github.com/t3ran13/php-graphene-node-client/releases/tag/v5.1.2","https://github.com/t3ran13/php-graphene-node-client/releases/tag/v5.1.3","https://github.com/t3ran13/php-graphene-node-client/releases/tag/v5.2.0","https://rpc.viz.lexai.host","https://solox.world","https://rpc.steemviz.com","https://steemd.privex.io","https://api.steemit.com","https://anyx.io","https://rpc.usesteem.com","https://github.com/t3ran13/php-graphene-node-client/commits/master","https://github.com/t3ran13/php-graphene-node-client/compare/v5.1.1...v5.2.0"],"app":"steemit/0.1","format":"markdown"}
created2019-03-05 06:21:30
last_update2019-03-05 06:21:30
depth0
children7
last_payout2019-03-12 06:21:30
cashout_time1969-12-31 23:59:59
total_payout_value38.309 HBD
curator_payout_value10.890 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,797
author_reputation50,037,290,585,145
root_title"Update Of PHP Graphene Node Client [v5.1.2 - v5.2.0]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,758,285
net_rshares67,222,333,437,582
author_curate_reward""
vote details (129)
@amosbastian ·
$13.16
Welcome back! It's cool to see you guys are still actively working on this, as I remember seeing some posts about this project before. Here is some feedback:

* In the comparison there are some commits > 14 days old - even if we are sort of lenient with this, try and keep it below.
* Some magic numbers like `16511` and variables called `n2`, `n3` etc. - could make into constants and make more descriptive respectively.
* Could provide a description of what the function does instead of only having the arguments' names and types.
* Some funny indentation in the lists. Is lining up everything like this common in PHP?

Am interested to see what kind of features you guys add next. Any specific plans?

---

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/2-2-2-1-2-1-2-).

---- 
Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm).

[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , , , , , , , , , , , , , , ,
properties (23)
authoramosbastian
permlinkre-t3ran13-update-of-php-graphene-node-client-v5-1-2-v5-2-0-20190305t195727669z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2-2-2-1-2-1-2-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2019-03-05 19:57:27
last_update2019-03-05 19:57:27
depth1
children4
last_payout2019-03-12 19:57:27
cashout_time1969-12-31 23:59:59
total_payout_value9.965 HBD
curator_payout_value3.199 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,158
author_reputation174,473,586,900,705
root_title"Update Of PHP Graphene Node Client [v5.1.2 - v5.2.0]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,785,516
net_rshares17,447,515,884,722
author_curate_reward""
vote details (20)
@t3ran13 ·
Hi :)
Thanks for feedback!

> Some funny indentation in the lists. Is lining up everything like this common in PHP?

It is my style more than PSR, but at most it corresponds to PSR =)

> Am interested to see what kind of features you guys add next. Any specific plans?

I do not have so much time as before and i am working ander other project - subchain for steem/viz chains.
i have some ideas about improvements for lib and i will add it in future
properties (22)
authort3ran13
permlinkre-amosbastian-re-t3ran13-update-of-php-graphene-node-client-v5-1-2-v5-2-0-20190305t202211662z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-03-05 20:23:30
last_update2019-03-05 20:23:30
depth2
children2
last_payout2019-03-12 20:23:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length449
author_reputation50,037,290,585,145
root_title"Update Of PHP Graphene Node Client [v5.1.2 - v5.2.0]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,786,428
net_rshares0
@amosbastian ·
It's the 2nd time this week I've seen indentation like this, pretty funny. It reminds me of what I used to do when I first started programming because I thought it looked nice, and then someone told me off lol.
πŸ‘  , , ,
properties (23)
authoramosbastian
permlinkre-t3ran13-re-amosbastian-re-t3ran13-update-of-php-graphene-node-client-v5-1-2-v5-2-0-20190305t214724787z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-03-05 21:47:24
last_update2019-03-05 21:47:24
depth3
children1
last_payout2019-03-12 21:47:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length210
author_reputation174,473,586,900,705
root_title"Update Of PHP Graphene Node Client [v5.1.2 - v5.2.0]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,789,440
net_rshares8,393,197,877
author_curate_reward""
vote details (4)
@utopian-io ·
Thank you for your review, @amosbastian! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-t3ran13-update-of-php-graphene-node-client-v5-1-2-v5-2-0-20190305t195727669z-20190307t231226z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-03-07 23:12:27
last_update2019-03-07 23:12:27
depth2
children0
last_payout2019-03-14 23:12:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length63
author_reputation152,955,367,999,756
root_title"Update Of PHP Graphene Node Client [v5.1.2 - v5.2.0]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,894,361
net_rshares0
@steem-ua ·
#### Hi @t3ran13!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-update-of-php-graphene-node-client-v5-1-2-v5-2-0-20190305t213516z
categoryutopian-io
json_metadata"{"app": "beem/0.20.18"}"
created2019-03-05 21:35:18
last_update2019-03-05 21:35:18
depth1
children0
last_payout2019-03-12 21:35:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length286
author_reputation23,214,230,978,060
root_title"Update Of PHP Graphene Node Client [v5.1.2 - v5.2.0]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,789,000
net_rshares0
@utopian-io ·
Hey, @t3ran13!

**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Get higher incentives and support Utopian.io!**
 Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-update-of-php-graphene-node-client-v5-1-2-v5-2-0-20190306t002437z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-03-06 00:24:39
last_update2019-03-06 00:24:39
depth1
children0
last_payout2019-03-13 00:24:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length589
author_reputation152,955,367,999,756
root_title"Update Of PHP Graphene Node Client [v5.1.2 - v5.2.0]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id80,794,078
net_rshares0