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