Skip to content
This repository was archived by the owner on Sep 4, 2021. It is now read-only.

Commit eba10d2

Browse files
authored
Update README.md
1 parent a646696 commit eba10d2

1 file changed

Lines changed: 39 additions & 2 deletions

File tree

README.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,39 @@
1-
# php-electrum-api
2-
PHP wrapper for Electrum JSONRPC-API
1+
# php-electrum-api - Lightweight Electrum libarary with zero dependencies
2+
```
3+
Licence: GPL-3.0
4+
Author: Pascal Krason <p.krason@padr.io>
5+
Language: PHP 5.6
6+
```
7+
Please note, this library is by far not completed and production ready, there are still a lot methods which aren't neither tested or even implemented.
8+
9+
# Setting up Electrum
10+
First you need to setup a new Electrum wallet. Follow the instructions according to your OS at the [Electrum Download Page](https://electrum.org/#download). After the successfull installation you need to set a rpcport by typing:
11+
```
12+
electrum setconfig rpcport 777
13+
```
14+
Then we can create a default wallet, dont forget to note your generated seed, it's nescessary if you want to recover it one day:
15+
```
16+
electrum create
17+
```
18+
Now we can go ahead and start Electrum in daemon mode:
19+
```
20+
electrum daemon start
21+
```
22+
23+
# Requirements
24+
On the PHP side there are not much requirements, you only need atleast PHP 5.6 and the curl-Extension installed. Optional you need [Composer](http://getcomposer.org) to install this library.
25+
26+
# Install
27+
First you need to install (Composer)[https://getcomposer.org/doc/00-intro.md], after you accomplished this you can go ahead:
28+
```
29+
composer require padrio/php-electrum-api
30+
```
31+
Then you can simply include the autoloader and begin using the library:
32+
```php
33+
// Include composer autoloader
34+
require_once 'vendor/autoloader.php';
35+
36+
// Create new instance
37+
$electrum = new Padrio\Electrum('http://127.0.0.1/', 7777);
38+
$electrum->getVersion();
39+
```

0 commit comments

Comments
 (0)