https://github.com/ziwot/cake-tezos
Tezos plugin for CakePHP
https://github.com/ziwot/cake-tezos
Last synced: 2 months ago
JSON representation
Tezos plugin for CakePHP
- Host: GitHub
- URL: https://github.com/ziwot/cake-tezos
- Owner: ziwot
- License: mit
- Created: 2025-04-21T19:58:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-30T13:42:11.000Z (11 months ago)
- Last Synced: 2025-08-25T23:13:04.618Z (10 months ago)
- Language: PHP
- Homepage:
- Size: 1.46 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CakeTezos

[](https://packagist.org/packages/ziwot/cake-tezos)
[](https://packagist.org/packages/ziwot/cake-tezos)
[](https://packagist.org/packages/ziwot/cake-tezos)
[](https://packagist.org/packages/ziwot/cake-tezos)
[](https://packagist.org/packages/ziwot/cake-tezos)
Tezos plugin for CakePHP
This plugin provides:
- Authenticator and Identifier for the [Authentication plugin](https://book.cakephp.org/authentication/3/en/index.html).
- Wallet connection via [SIWT](https://github.com/StakeNow/SIWT).
Install with :
```sh
composer require ziwot/cake-tezos
```
Load the plugin :
```sh
bin/cake plugin load CakeTezos
```
Link assets :
```sh
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 :
```sh
cake plugin assets copy
```
Load Authenticator and Identifier :
```php
// Load Authenticator & Identifier
$service->loadAuthenticator('CakeTezos.SignedMessage', [
'identifier' => 'CakeTezos.TezosBase',
]);
```
Load Component in (`src/Controller/AppController`) :
```php
$this->loadComponent('CakeTezos.Network', [
'network' => Network::Mainnet->value,
]);
```
Load Helper in (`src/View/AppView`) :
```php
$this->addHelper('CakeTezos.Tz');
```
In a view, load the element to allow connect :
```php
= $this->element('CakeTezos.connect') ?>
```
The statement is configurable :
```php
= $this->element('CakeTezos.connect', ['statement' => 'I accept the conditions']) ?>
```