Setup secp256k1-php PHP-Extenssion For Broadcast In php-graphene-node-client [+ dockerfile]

in #utopian-io6 years ago (edited)

php-graphene-node-client

It is PHP API client for Steem/GOLOS blockchain

Github or packagist with MIT license. Author @t3ran13 and active helper @semaspring

secp256k1-php

are used for signing transaction with canonical sign

Setup

You have to install secp256k1-php for using broadcast (sending transactions to blockchain).

install components

sudo apt-get install automake
sudo apt-get install libtool

only after this install secp256k1-php as discribed in 'To Install' section

Dockerfile is setted up for broadcast for all components are used in php-graphene-node-client

# our base image
FROM php:7.1-fpm


#install zip extension for composer
RUN apt-get update && apt-get install -y \
    zip \
    automake \
    libtool \
    libgmp-dev \
    && docker-php-ext-install gmp

#install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

#install secp256k1-php
RUN  cd ~  && \
    curl -#L https://github.com/bitcoin-core/secp256k1/archive/master.zip > file.zip && \
    unzip file.zip && \
    rm file.zip && \
    cd secp256k1-master && \
    ./autogen.sh && \
    ./configure --enable-experimental --enable-module-ecdh --enable-module-recovery && \
    make && \
    make install
RUN  cd ~  && \
    curl -#L https://github.com/Bit-Wasp/secp256k1-php/archive/v0.1.2.zip > file.zip && \
    unzip file.zip && \
    rm file.zip && \
    cd secp256k1-php-0.1.2/secp256k1 && \
    phpize && \
    ./configure --with-secp256k1 && \
    make && \
    make install
RUN echo "extension=secp256k1.so" > /usr/local/etc/php/conf.d/secp256k1.ini

RUN chown -R www-data:www-data /var/www

WORKDIR  /var/www/php-node-client



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Your contribution cannot be approved yet because it is not as informative as other contributions. See the Utopian Rules. Please edit your contribution and add try to improve the length and detail of your contribution (or add more images/mockups/screenshots), to reapply for approval.

You may edit your post here, as shown below:

You can contact us on Discord.
[utopian-moderator]

it is not book about my impressions, it is the solution of 1 problem. Sometimes you can spend a lot of time for understanding 1 little thing.

sorry, upd
but more info will be as water

Congratulations @php-node-client! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:
SteemitBoard World Cup Contest - The results, the winners and the prizes

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @php-node-client! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 6000 upvotes. Your next target is to reach 7000 upvotes.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemFest3 and SteemitBoard - Meet the Steemians Contest

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @php-node-client! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

Click here to view your Board

Do not miss the last post from @steemitboard:

Carnival Challenge - Collect badge and win 5 STEEM
Vote for @Steemitboard as a witness and get one more award and increased upvotes!

Congratulations @php-node-client! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 3 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

Use your witness votes and get the Community Badge
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 70733.96
ETH 3563.16
USDT 1.00
SBD 4.76