mmxca/bitmessage-plugin

There is no license information available for the latest version (0.0.2) of this package.

BitMessagePlugin plugin for CakePHP3

Installs: 34

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 0

Open Issues: 0

Type:cakephp-plugin

0.0.2 2016-06-27 03:01 UTC

This package is not auto-updated.

Last update: 2024-03-16 16:30:54 UTC


README

Credits

A tip of the hat to Convertor, who created the PhpBitMessage class. I had to do this as a plugin to make the class available to CakePHP. All credit goes to him. All I did was reformat it for usage in CakePHP.

Prerequisites

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require mmxca/BitmessagePlugin

Add route to bootstrap.php

Plugin::load('BitmessagePlugin', ['bootstrap' => false, 'routes' => true]);

Add component to your Controller

public $components = ['BitmessagePlugin.Bitmessage'];

Add configuration to config/app.php

    'BitMessage' => [
        'rpc_url' => 'http://localhost:8442',
        'rpc_username' => '*USERNAME*',
        'rpc_password' => '*PASSWORD*',
        'debug' => 0,
        'cookie' => 'bitmessage_cookie.txt',
        'cache' => 0
    ],

Example Usage

        $this->Bitmessage->initialize();
        $this->Bitmessage->setStrip(true);
        
        //to, from, subject, message
        $this->Bitmessage->sendMessage(*TO_ADDRESS*, 
                *FROM_ADDRESS*,
                "Test Subject", 
                "Test Message Body"
            );