2017 © Pedro Peláez
 

library bitmessage-php

Bitmessage PHP library

image

createproblem/bitmessage-php

Bitmessage PHP library

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

bitmessage-php

Bitmessage-php is a backend library to communicate with an installed [Bitmessage][1] client., (*1)

In this context the installed Bitmessage client is the server where the communication passed., (*2)

Bitmessage-Api features to communicate with the client gui directly are not inclueded. Its a server side library., (*3)

Installation

You can install bitmessage-php using composer, (*4)

"require": {
    "username/bitmessage-php": "dev-master"
}

or just typing composer require username/bitmessage-php, (*5)

Usage

Example: Hello World, (*6)

$bmc = new Bitmessage\BitmessageClient('localhost', 8442, 'testUser', 'testPw');
echo $bmc->test('helloWorld', 'Hello', 'World');
Hello-World

Example: Create Random Address, (*7)

$bmc = new Bitmessage\BitmessageClient('localhost', 8442, 'testUser', 'testPw');
echo $bmc->createRandomAddress('Test-Label');
BM-2D7QKHUhFGd7SKwtVSzawWpB3Mmw5j8BNw

Example: Send message, (*8)

$bmc = new Bitmessage\BitmessageClient('localhost', 8442, 'testUser', 'testPw');
echo $bmc->sendMessage('to-address', 'from-address', 'subject', 'message');
b3ce1c0308eb0765e0c67eeaf851fc8d0d752359c8f1e499d1fe02e39affbc67

NOTICE, (*9)

The from-address have to be present as an identity in the bitmessage client., (*10)

Testing

You can run all unit tests at once by executing phpunit in the root directory., (*11)

~/bitmessage-php $ phpunit, (*12)

The Versions

16/08 2013

dev-master

9999999-dev https://github.com/createproblem/bitmessage-php

Bitmessage PHP library

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

bitmessage