Skip to content

Commit bf39230

Browse files
committed
better namescape
1 parent 94300b2 commit bf39230

File tree

14 files changed

+60
-45
lines changed

14 files changed

+60
-45
lines changed

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM php:7.2-cli
2+
3+
RUN apt-get update && apt-get install -y libdb5.3++-dev
4+
5+
RUN curl -O --referer https://fossies.org/linux/misc/db-18.1.25.tar.gz/ \
6+
https://fossies.org/linux/misc/db-18.1.25.tar.gz \
7+
&& tar -zxf db-18.1.25.tar.gz && cd db-18.1.25/lang/php_db4/ \
8+
&& phpize \
9+
&& ./configure --with-db4 \
10+
&& make \
11+
&& make install \
12+
&& docker-php-ext-enable db4
13+
14+
RUN apt-get install libgmp-dev \
15+
&& docker-php-ext-install gmp

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ composer require andkom/php-bitcoin-wallet
1313
```PHP
1414
<?php
1515

16-
use AndKom\PhpBitcoinWallet\Wallet;
16+
use AndKom\Bitcoin\Wallet\Wallet;
1717

1818
// create wallet instance
1919
$wallet = new Wallet();

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616
"require": {
1717
"php": "^7.1",
1818
"bitwasp/bitcoin": "~0.0.34",
19-
"andkom/php-berkeley-db": "^1.0.0",
19+
"andkom/php-berkeley-db": "^1.1",
2020
"andkom/php-bcdatastream": "^1.1"
2121
},
2222
"require-dev": {
2323
"phpunit/phpunit": ">=5.0"
2424
},
2525
"autoload": {
2626
"psr-4": {
27-
"AndKom\\PhpBitcoinWallet\\": "src/"
27+
"AndKom\\Bitcoin\\Wallet\\": "src/"
2828
}
2929
},
3030
"autoload-dev": {
3131
"psr-4": {
32-
"AndKom\\PhpBitcoinWallet\\Tests\\": "tests/"
32+
"AndKom\\Bitcoin\\Wallet\\Tests\\": "tests/"
3333
}
3434
}
3535
}

src/Crypter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
declare(strict_types=1);
44

5-
namespace AndKom\PhpBitcoinWallet;
5+
namespace AndKom\Bitcoin\Wallet;
66

77
/**
88
* Class Crypter
9-
* @package AndKom\PhpBitcoinWallet
9+
* @package AndKom\Bitcoin\Wallet
1010
*/
1111
class Crypter
1212
{

src/Exception.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
declare(strict_types=1);
44

5-
namespace AndKom\PhpBitcoinWallet;
5+
namespace AndKom\Bitcoin\Wallet;
66

77
/**
88
* Class Exception
9-
* @package AndKom\PhpBitcoinWallet
9+
* @package AndKom\Bitcoin\Wallet
1010
*/
1111
class Exception extends \Exception
1212
{

src/Item/EncryptedKey.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
declare(strict_types=1);
44

5-
namespace AndKom\PhpBitcoinWallet\Item;
5+
namespace AndKom\Bitcoin\Wallet\Item;
66

7-
use AndKom\PhpBitcoinWallet\Crypter;
8-
use AndKom\PhpBitcoinWallet\Exception;
7+
use AndKom\Bitcoin\Wallet\Crypter;
8+
use AndKom\Bitcoin\Wallet\Exception;
99
use BitWasp\Bitcoin\Crypto\EcAdapter\Key\PrivateKeyInterface;
1010

1111
/**
1212
* Class EncryptedKey
13-
* @package AndKom\PhpBitcoinWallet\Item
13+
* @package AndKom\Bitcoin\Wallet\Item
1414
*/
1515
class EncryptedKey extends Key
1616
{

src/Item/ItemFactory.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
declare(strict_types=1);
44

5-
namespace AndKom\PhpBitcoinWallet\Item;
5+
namespace AndKom\Bitcoin\Wallet\Item;
66

77
use AndKom\BCDataStream\Reader;
88
use AndKom\BCDataStream\Writer;
9-
use AndKom\PhpBerkeleyDb\Adapter\AdapterInterface;
9+
use AndKom\BerkeleyDb\Adapter\AdapterInterface;
1010

1111
/**
1212
* Class ItemFactory
13-
* @package AndKom\PhpBitcoinWallet\Item
13+
* @package AndKom\Bitcoin\Wallet\Item
1414
*/
1515
class ItemFactory
1616
{
@@ -32,7 +32,7 @@ public function __construct(AdapterInterface $adapter)
3232
* @param Reader $kds
3333
* @param Reader $vds
3434
* @return Key
35-
* @throws \AndKom\PhpBerkeleyDb\Exception
35+
* @throws \AndKom\BerkeleyDb\Exception
3636
*/
3737
public function createKey(Reader $kds, Reader $vds): Key
3838
{
@@ -46,7 +46,7 @@ public function createKey(Reader $kds, Reader $vds): Key
4646
* @param Reader $kds
4747
* @param Reader $vds
4848
* @return EncryptedKey
49-
* @throws \AndKom\PhpBerkeleyDb\Exception
49+
* @throws \AndKom\BerkeleyDb\Exception
5050
*/
5151
public function createEncryptedKey(Reader $kds, Reader $vds): EncryptedKey
5252
{
@@ -60,7 +60,7 @@ public function createEncryptedKey(Reader $kds, Reader $vds): EncryptedKey
6060
* @param Reader $kds
6161
* @param Reader $vds
6262
* @return WKey
63-
* @throws \AndKom\PhpBerkeleyDb\Exception
63+
* @throws \AndKom\BerkeleyDb\Exception
6464
*/
6565
public function createWKey(Reader $kds, Reader $vds): WKey
6666
{
@@ -113,7 +113,7 @@ public function createKeyMeta(Reader $vds): KeyMeta
113113
/**
114114
* @param string $public
115115
* @return KeyMeta|null
116-
* @throws \AndKom\PhpBerkeleyDb\Exception
116+
* @throws \AndKom\BerkeleyDb\Exception
117117
*/
118118
public function getKeyMeta(string $public): ?KeyMeta
119119
{

src/Item/Key.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
declare(strict_types=1);
44

5-
namespace AndKom\PhpBitcoinWallet\Item;
5+
namespace AndKom\Bitcoin\Wallet\Item;
66

7-
use AndKom\PhpBitcoinWallet\Exception;
7+
use AndKom\Bitcoin\Wallet\Exception;
88
use BitWasp\Bitcoin\Crypto\EcAdapter\Key\PrivateKeyInterface;
99
use BitWasp\Bitcoin\Crypto\EcAdapter\Key\PublicKeyInterface;
1010
use BitWasp\Bitcoin\Key\PrivateKeyFactory;
1111
use BitWasp\Bitcoin\Key\PublicKeyFactory;
1212

1313
/**
1414
* Class Key
15-
* @package AndKom\PhpBitcoinWallet\Item
15+
* @package AndKom\Bitcoin\Wallet\Item
1616
*/
1717
class Key
1818
{

src/Item/KeyMeta.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(strict_types=1);
44

5-
namespace AndKom\PhpBitcoinWallet\Item;
5+
namespace AndKom\Bitcoin\Wallet\Item;
66

7-
use AndKom\PhpBitcoinWallet\Exception;
7+
use AndKom\Bitcoin\Wallet\Exception;
88

99
/**
1010
* Class KeyMeta
11-
* @package AndKom\PhpBitcoinWallet\Item
11+
* @package AndKom\Bitcoin\Wallet\Item
1212
*/
1313
class KeyMeta
1414
{

src/Item/MasterKey.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(strict_types=1);
44

5-
namespace AndKom\PhpBitcoinWallet\Item;
5+
namespace AndKom\Bitcoin\Wallet\Item;
66

7-
use AndKom\PhpBitcoinWallet\Crypter;
7+
use AndKom\Bitcoin\Wallet\Crypter;
88

99
/**
1010
* Class MasterKey
11-
* @package AndKom\PhpBitcoinWallet\Item
11+
* @package AndKom\Bitcoin\Wallet\Item
1212
*/
1313
class MasterKey
1414
{
@@ -70,7 +70,7 @@ public function getDerivationIterations(): int
7070
* Returns master key hash for hashcat.
7171
* @param EncryptedKey $encryptedKey
7272
* @return string
73-
* @throws \AndKom\PhpBitcoinWallet\Exception
73+
* @throws \AndKom\Bitcoin\Wallet\Exception
7474
*/
7575
public function getHash(EncryptedKey $encryptedKey): string
7676
{
@@ -94,7 +94,7 @@ public function getHash(EncryptedKey $encryptedKey): string
9494
/**
9595
* @param string $passphrase
9696
* @return string
97-
* @throws \AndKom\PhpBitcoinWallet\Exception
97+
* @throws \AndKom\Bitcoin\Wallet\Exception
9898
*/
9999
public function decrypt(string $passphrase): string
100100
{

0 commit comments

Comments
 (0)