1 | <?php |
||
21 | class ScriptFactory |
||
22 | { |
||
23 | /** |
||
24 | * @param BufferInterface|string $string |
||
25 | * @return Script |
||
26 | */ |
||
27 | 708 | 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 | 1137 | public static function create(BufferInterface $buffer = null, Opcodes $opcodes = null, Math $math = null) |
|
42 | |||
43 | /** |
||
44 | * @return InputScriptFactory |
||
45 | */ |
||
46 | 93 | public static function scriptSig() |
|
50 | |||
51 | /** |
||
52 | * @return OutputScriptFactory |
||
53 | */ |
||
54 | 345 | public static function scriptPubKey() |
|
58 | |||
59 | /** |
||
60 | * @param Opcodes|null $opcodes |
||
61 | * @return P2shScriptFactory |
||
62 | */ |
||
63 | 42 | public static function p2sh(Opcodes $opcodes = null) |
|
67 | |||
68 | /** |
||
69 | * @param Opcodes|null $opcodes |
||
70 | * @return WitnessScriptFactory |
||
71 | */ |
||
72 | public static function witness(Opcodes $opcodes = null) |
||
76 | |||
77 | /** |
||
78 | * @param ScriptInterface $script |
||
79 | * @param ScriptInterface|null $redeemScript |
||
80 | * @return ScriptInfo\ScriptInfoInterface |
||
81 | */ |
||
82 | 135 | public static function info(ScriptInterface $script, ScriptInterface $redeemScript = null) |
|
86 | |||
87 | /** |
||
88 | * @return Flags |
||
89 | */ |
||
90 | 24 | public static function defaultFlags() |
|
99 | |||
100 | /** |
||
101 | * @param Flags|null $flags |
||
102 | * @param EcAdapterInterface|null $ecAdapter |
||
103 | * @return NativeConsensus |
||
104 | */ |
||
105 | 12 | public static function getNativeConsensus(Flags $flags = null, EcAdapterInterface $ecAdapter = null) |
|
109 | |||
110 | /** |
||
111 | * @param Flags|null $flags |
||
112 | * @return BitcoinConsensus |
||
113 | */ |
||
114 | public static function getBitcoinConsensus(Flags $flags = null) |
||
118 | |||
119 | /** |
||
120 | * @param Flags|null $flags |
||
121 | * @param EcAdapterInterface|null $ecAdapter |
||
122 | * @return \BitWasp\Bitcoin\Script\Consensus\ConsensusInterface |
||
123 | */ |
||
124 | 6 | public static function consensus(Flags $flags = null, EcAdapterInterface $ecAdapter = null) |
|
132 | } |
||
133 |