1 | <?php |
||
16 | class ScriptFactory |
||
17 | { |
||
18 | /** |
||
19 | * @var OutputScriptFactory |
||
20 | */ |
||
21 | private static $outputScriptFactory = null; |
||
22 | |||
23 | /** |
||
24 | * @param BufferInterface|string $string |
||
25 | * @return ScriptInterface |
||
26 | */ |
||
27 | 38 | public static function fromHex($string) |
|
31 | |||
32 | /** |
||
33 | * @param BufferInterface|null $buffer |
||
34 | * @param Opcodes|null $opcodes |
||
35 | * @param Math|null $math |
||
36 | * @return ScriptCreator |
||
37 | */ |
||
38 | 2644 | public static function create(BufferInterface $buffer = null, Opcodes $opcodes = null, Math $math = null) |
|
42 | |||
43 | /** |
||
44 | * @param int[]|\BitWasp\Bitcoin\Script\Interpreter\Number[]|BufferInterface[] $sequence |
||
45 | * @return ScriptInterface |
||
46 | */ |
||
47 | 2580 | public static function sequence(array $sequence) |
|
51 | |||
52 | /** |
||
53 | * @param Operation[] $operations |
||
54 | * @return ScriptInterface |
||
55 | */ |
||
56 | 2 | public static function fromOperations(array $operations) |
|
69 | |||
70 | /** |
||
71 | * @return OutputScriptFactory |
||
72 | */ |
||
73 | 150 | public static function scriptPubKey() |
|
81 | |||
82 | /** |
||
83 | * @param EcAdapterInterface|null $ecAdapter |
||
84 | * @return NativeConsensus |
||
85 | */ |
||
86 | 54 | public static function getNativeConsensus(EcAdapterInterface $ecAdapter = null) |
|
90 | |||
91 | /** |
||
92 | * @return BitcoinConsensus |
||
93 | */ |
||
94 | public static function getBitcoinConsensus() |
||
98 | |||
99 | /** |
||
100 | * @param EcAdapterInterface|null $ecAdapter |
||
101 | * @return \BitWasp\Bitcoin\Script\Consensus\ConsensusInterface |
||
102 | */ |
||
103 | 52 | public static function consensus(EcAdapterInterface $ecAdapter = null) |
|
111 | } |
||
112 |