1 | <?php |
||
19 | class ScriptFactory |
||
20 | { |
||
21 | /** |
||
22 | * @param Buffer|string $string |
||
23 | * @return Script |
||
24 | */ |
||
25 | 714 | public static function fromHex($string) |
|
29 | |||
30 | /** |
||
31 | * @param Buffer|null $buffer |
||
32 | * @param Opcodes|null $opcodes |
||
33 | * @param Math|null $math |
||
34 | * @return ScriptCreator |
||
35 | */ |
||
36 | 1125 | public static function create(Buffer $buffer = null, Opcodes $opcodes = null, Math $math = null) |
|
40 | |||
41 | /** |
||
42 | * @return InputScriptFactory |
||
43 | */ |
||
44 | 93 | public static function scriptSig() |
|
48 | |||
49 | /** |
||
50 | * @return OutputScriptFactory |
||
51 | */ |
||
52 | 321 | public static function scriptPubKey() |
|
56 | |||
57 | /** |
||
58 | * @return P2shScriptFactory |
||
59 | */ |
||
60 | public static function p2sh() |
||
64 | |||
65 | /** |
||
66 | * @param ScriptInterface $script |
||
67 | * @param ScriptInterface|null $redeemScript |
||
68 | * @return ScriptInfo\ScriptInfoInterface |
||
69 | */ |
||
70 | 135 | public static function info(ScriptInterface $script, ScriptInterface $redeemScript = null) |
|
74 | |||
75 | |||
76 | /** |
||
77 | * @return Flags |
||
78 | */ |
||
79 | 24 | public static function defaultFlags() |
|
88 | |||
89 | /** |
||
90 | * @param Flags|null $flags |
||
91 | * @param EcAdapterInterface|null $ecAdapter |
||
92 | * @return NativeConsensus |
||
93 | */ |
||
94 | 12 | public static function getNativeConsensus(Flags $flags = null, EcAdapterInterface $ecAdapter = null) |
|
98 | |||
99 | /** |
||
100 | * @param Flags|null $flags |
||
101 | * @return BitcoinConsensus |
||
102 | */ |
||
103 | public static function getBitcoinConsensus(Flags $flags = null) |
||
107 | |||
108 | /** |
||
109 | * @param Flags|null $flags |
||
110 | * @param EcAdapterInterface|null $ecAdapter |
||
111 | * @return \BitWasp\Bitcoin\Script\Consensus\ConsensusInterface |
||
112 | */ |
||
113 | 6 | public static function consensus(Flags $flags = null, EcAdapterInterface $ecAdapter = null) |
|
121 | } |
||
122 |