1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace BitWasp\Bitcoin\Network; |
4
|
|
|
|
5
|
|
|
class NetworkFactory |
6
|
|
|
{ |
7
|
|
|
/** |
8
|
|
|
* @return NetworkInterface |
9
|
|
|
* @throws \Exception |
10
|
|
|
*/ |
11
|
46 |
|
public static function bitcoin() |
12
|
|
|
{ |
13
|
46 |
|
return new Networks\Bitcoin(); |
14
|
|
|
} |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* @return NetworkInterface |
18
|
|
|
* @throws \Exception |
19
|
|
|
*/ |
20
|
17 |
|
public static function bitcoinTestnet() |
21
|
|
|
{ |
22
|
17 |
|
return new Networks\BitcoinTestnet(); |
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @return NetworkInterface |
27
|
|
|
* @throws \Exception |
28
|
|
|
*/ |
29
|
1 |
|
public static function bitcoinRegtest() |
30
|
|
|
{ |
31
|
1 |
|
return new Networks\BitcoinRegtest(); |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @return Networks\Litecoin |
36
|
|
|
*/ |
37
|
2 |
|
public static function litecoin() |
38
|
|
|
{ |
39
|
2 |
|
return new Networks\Litecoin(); |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @return Networks\LitecoinTestnet |
44
|
|
|
*/ |
45
|
1 |
|
public static function litecoinTestnet() |
46
|
|
|
{ |
47
|
1 |
|
return new Networks\LitecoinTestnet(); |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @return Networks\Viacoin |
52
|
|
|
*/ |
53
|
3 |
|
public static function viacoin() |
54
|
|
|
{ |
55
|
3 |
|
return new Networks\Viacoin(); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @return Networks\ViacoinTestnet |
60
|
|
|
*/ |
61
|
2 |
|
public static function viacoinTestnet() |
62
|
|
|
{ |
63
|
2 |
|
return new Networks\ViacoinTestnet(); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return Networks\Dogecoin |
68
|
|
|
*/ |
69
|
2 |
|
public static function dogecoin() |
70
|
|
|
{ |
71
|
2 |
|
return new Networks\Dogecoin(); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @return Networks\DogecoinTestnet |
76
|
|
|
*/ |
77
|
2 |
|
public static function dogecoinTestnet() |
78
|
|
|
{ |
79
|
2 |
|
return new Networks\DogecoinTestnet(); |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return Networks\Dash |
84
|
|
|
*/ |
85
|
2 |
|
public static function dash() |
86
|
|
|
{ |
87
|
2 |
|
return new Networks\Dash(); |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @return Networks\DashTestnet |
92
|
|
|
*/ |
93
|
2 |
|
public static function dashTestnet() |
94
|
|
|
{ |
95
|
2 |
|
return new Networks\DashTestnet(); |
96
|
|
|
} |
97
|
|
|
} |
98
|
|
|
|