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 | 2682 | public static function create(BufferInterface $buffer = null, Opcodes $opcodes = null, Math $math = null) |
|
42 | |||
43 | /** |
||
44 | * @param Operation[] $operations |
||
45 | * @return ScriptInterface |
||
46 | */ |
||
47 | 126 | public static function fromOperations(array $operations) |
|
55 | |||
56 | /** |
||
57 | * @param int[]|\BitWasp\Bitcoin\Script\Interpreter\Number[]|BufferInterface[] $sequence |
||
58 | * @return ScriptInterface |
||
59 | */ |
||
60 | 2618 | public static function sequence(array $sequence) |
|
64 | |||
65 | /** |
||
66 | * @return OutputScriptFactory |
||
67 | */ |
||
68 | 146 | public static function scriptPubKey() |
|
76 | |||
77 | /** |
||
78 | * @param EcAdapterInterface|null $ecAdapter |
||
79 | * @return NativeConsensus |
||
80 | */ |
||
81 | 90 | public static function getNativeConsensus(EcAdapterInterface $ecAdapter = null) |
|
85 | |||
86 | /** |
||
87 | * @return BitcoinConsensus |
||
88 | */ |
||
89 | public static function getBitcoinConsensus() |
||
93 | |||
94 | /** |
||
95 | * @param EcAdapterInterface|null $ecAdapter |
||
96 | * @return \BitWasp\Bitcoin\Script\Consensus\ConsensusInterface |
||
97 | */ |
||
98 | 88 | public static function consensus(EcAdapterInterface $ecAdapter = null) |
|
106 | } |
||
107 |