ziwot / cake-tezos
Tezos plugin for CakePHP
v0.0.5
2026-04-05 15:13 UTC
Requires
- php: >=8.1
- cakephp/authentication: ^3.3
- cakephp/cakephp: ^5.0.1
- ziwot/pezos: ^0.2.2
- ziwot/tzkt-php-client: ^0.3.1
Requires (Dev)
- cakedc/cakephp-phpstan: ^4.1
- cakephp/cakephp-codesniffer: ^5.2
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.1
- slevomat/coding-standard: ^8.15
README
Tezos plugin for CakePHP
This plugin provides:
- Authenticator and Identifier for the Authentication plugin.
- Wallet connection via SIWT.
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
Load Authenticator and Identifier :
// Load Authenticator & Identifier $service->loadAuthenticator('CakeTezos.SignedMessage', [ 'identifier' => 'CakeTezos.TezosBase', ]);
Load Component in (src/Controller/AppController) :
$this->loadComponent('CakeTezos.Network', [ 'network' => Network::Mainnet->value, ]);
Load Helper in (src/View/AppView) :
$this->addHelper('CakeTezos.Tz');
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']) ?>