2017 © Pedro Peláez
 

library coinegger-client-bundle

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

image

dizda/coinegger-client-bundle

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  • Saturday, December 17, 2016
  • by dizda
  • Repository
  • 1 Watchers
  • 2 Stars
  • 947 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

BitdepotClientBundle - Work In Progress

When bitcoin meet Arnold Schwarzenegger., (*1)

See the API Project., (*2)

Setup

Install with Composer, (*3)

composer require dizda/bitdepot-client-bundle

Configuration

To active hooks, you must update your routing.yml:, (*4)

dizda_bitdepot_client:
    resource: "@DizdaBitdepotClientBundle/Resources/config/routing.yml"
    prefix:   /callback # don't forget to restrict the path you specify in your security.yml

Add this to your config.yml:, (*5)

dizda_bitdepot_client:
    base_url:   %bitdepot_endpoint%    # Correspond to the bitdepot api server
    app_id:     %bitdepot_app_id%
    app_secret: %bitdepot_app_secret%

Listeners

You probably want to listening all interactions that are made on/by your addresses? It's simple., (*6)

DepositListener

An event dizda_bitdepot_client.deposit_callback is dispatched everytime a deposit is made (and reached confirmations you specified)., (*7)

So, for example, you could create a listener:, (*8)

<?php
// AdvertisingBundle/EventListener/DepositListener.php

namespace Dizda\Bundle\AdvertisingBundle\EventListener;

use Dizda\BitdepotClientBundle\Event\CallbackEvent;

/**
 * Class DepositListener
 */
class DepositListener
{
    /**
     * When a deposit is made, the listener will trigger this hook
     *
     * @param CallbackEvent $event
     */
    public function onDepositCallback(CallbackEvent $event)
    {
        $data = $event->getData();

        if ($data['is_fulfilled'] === false) {
            // The case when the deposit were not sufficient
            return;
        }

        if ($data['is_overfilled'] === true) {
            // do something
        }

        // The deposit was notified to be successful, so you can do your stuff there
        $advertiser = $this->em
            ->getRepository('DizdaAdvertisingBundlee:Advertiser')
            ->findOneByDepositAddress($data['address_external']['value'])
        ;

        // Activate the campaign
        $advertiser->activate();

        // [...]
    }
}

And add the listener to services.xml:, (*9)

<service id="dizda_advertising.listener.deposit" class="Dizda\Bundle\AdvertisingBundle\EventListener\DepositListener">
    <tag name="kernel.event_listener" event="dizda_bitdepot_client.deposit_callback" method="onDepositCallback" />
</service>

That's it!, (*10)

License

MIT Licensed, see LICENSE., (*11)

The Versions

17/12 2016

dev-master

9999999-dev https://github.com/dizda

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet bitdepot

17/12 2016

0.0.12

0.0.12.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet bitdepot

16/12 2016

0.0.11

0.0.11.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet bitdepot

16/12 2016

0.0.10

0.0.10.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet bitdepot

11/11 2016

0.0.9

0.0.9.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet bitdepot

25/10 2016

0.0.8

0.0.8.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet bitdepot

25/10 2016

0.0.7

0.0.7.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet bitdepot

25/10 2016

0.0.6

0.0.6.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet bitdepot

24/10 2016

0.0.5

0.0.5.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet bitdepot

15/06 2015

0.0.4

0.0.4.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Bitdepot bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet bitdepot

02/06 2015

0.0.3

0.0.3.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Coinegger bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet coinegger

16/01 2015

0.0.2

0.0.2.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Coinegger bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet coinegger

14/01 2015

0.0.1

0.0.1.0 https://github.com/dizda

A Symfony2 bundle to interoperate with the Coinegger bitcoin wallet.

  Sources   Download

MIT

The Requires

 

The Development Requires

bitcoin wallet coinegger