2017 © Pedro Peláez
 

symfony-bundle zcash-bundle

Symfony ZCash RPC Bundle

image

hexim/zcash-bundle

Symfony ZCash RPC Bundle

  • Sunday, June 4, 2017
  • by heximcz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Installation

NOTE: The bundle is compatible with Symfony 2.0 upwards., (*1)

  1. Download this bundle to your project first. The preferred way to do it is to use Composer package manager:, (*2)

    json $ composer require hexim/zcash-bundle, (*3)

  2. Add this bundle to your application's kernel:, (*4)

    php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Hexim\HeximZcashBundle\HeximZcashBundle(), // ... ); }, (*5)

  3. Configure the bundle in your config:, (*6)

    ``` yaml, (*7)

    app/config/config.yml

    hexim_zcash: rpc_password: "%zcash_rpc_password%" rpc_user: "%zcash_rpc_user%" rpc_port: "%zcash_rpc_port%", (*8)

    ``` yaml
    # app/config/parameters.yml
    parameters:
        zcash_rpc_password: password
        zcash_rpc_user: user
        zcash_rpc_port: 8282
    

Usage

In your application controller methods:, (*9)

public function yourAction(Request $request)
{
        $wallet = $this->get('hexim_zcash.wallet');
        if (!$walletInfo = $wallet->getWalletInfo()) {
            throw new \Exception('Error: ' . $wallet->getError());
        }

        ...
}
public function yourAction(Request $request)
{
        $wallet = $this->get('hexim_zcash.wallet');
        $walletInfo = $wallet->getWalletInfo();
        $transactions = $wallet->listTransactions($walletInfo['result']['txcount']);

        ...
}
public function yourAction(Request $request)
{
        $myAddress = "t1ededed...";

        $zcashUtil = $this->get('hexim_zcash.util');
        if ($data = $zcashUtil->validateAddress($myAddress) {
            if (!$data['result']['isvalid']) {
                $this->addFlash('error', ' Sorry but this tAddress is not valid zcash address.');
                return $this->render('any.html.twig', [
                    'anyForm' => $form->createView(),
                ]);
            }
        }

        ...
}

The Versions

04/06 2017

dev-master

9999999-dev

Symfony ZCash RPC Bundle

  Sources   Download

MIT

The Requires

 

zcash symfony bundle

04/06 2017

0.0.3

0.0.3.0

Symfony ZCash RPC Bundle

  Sources   Download

MIT

The Requires

 

zcash symfony bundle

28/05 2017

0.0.2

0.0.2.0

Symfony ZCash RPC Bundle

  Sources   Download

MIT

The Requires

 

zcash symfony bundle

28/05 2017

0.0.1

0.0.1.0

Symfony ZCash RPC Bundle

  Sources   Download

MIT

The Requires

 

zcash symfony bundle