ziwot/cake-tezos

Tezos plugin for CakePHP

Maintainers

Package info

github.com/ziwot/cake-tezos

Type:cakephp-plugin

pkg:composer/ziwot/cake-tezos

Statistics

Installs: 47

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.0.8 2026-04-29 18:31 UTC

This package is auto-updated.

Last update: 2026-04-29 18:32:11 UTC


README

tests Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Tezos plugin for CakePHP

This plugin provides:

Install with :

composer require ziwot/cake-tezos

Load the plugin :

bin/cake plugin load CakeTezos

Link assets :

cake plugin assets symlink

You should also add it to your .gitignore :

# Plugins
/webroot/cake_tezos

Of course, when you deploy to prod, then, copy the assets :

cake plugin assets copy

Authentication

Load Authenticator and Identifier :

// Load Authenticator & Identifier
$service->loadAuthenticator('CakeTezos.SignedMessage', [
    'identifier' => 'CakeTezos.TezosBase',
]);

Network Component

Load Component in (src/Controller/AppController) :

$this->loadComponent('CakeTezos.Network', [
    'network' => Network::Mainnet->value,
]);

Helpers

Load Helper in (src/View/AppView) :

$this->addHelper('CakeTezos.Tz');

Elements

⚠️ To be able to use the elements, you need to import the js module, you must add this at the top of your page :

$this->append('script', $this->Html->importmap([
    'CakeTezos' => '/cake_tezos/dist/cake-tezos.js'
]));

connect

In a view, load the element to allow connect :

<?= $this->element('CakeTezos.connect') ?>

The statement is configurable :

<?= $this->element('CakeTezos.connect', ['statement' => 'I accept the conditions']) ?>

get_metadata

<?= $this->element('CakeTezos.get_metadata', [
        'address' => $airdrop->address,
        'callBackUrl' => $this->Url->build([
            '_name' => 'admin:airdrops:edit',
            $airdrop->id
        ]),
        'csrfToken' => $this->request->getAttribute('csrfToken'),
]) ?>