PHP code example of katena-chain / client-bundle

1. Go to this page and download the library: Download katena-chain/client-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

katena-chain / client-bundle example snippets


// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...
            new <vendor>\<bundle-name>\<bundle-long-name>(),
        ];

        // ...
    }

    // ...
}

// bundles.php

return [
    //...
    KatenaChain\ClientBundle\KCClientBundle::class => ['all' => true]
];

//...

use KatenaChain\ClientBundle\Services\Transactor;

//...

    /**
     * @var Transactor
     */
    protected $transactor;

//...
    public function __construct(Transactor $transactor)
    {
        //...
        $this->transactor = $transactor;
        //...
    }
//...

$transactor = $this->get("kc_client.transactor");

$transactor->sendCertificateRawV1Tx("ce492f92-a529-40c1-91e9-2af71e74ebea", "document_signature_value");