1 | <?php |
||
16 | class OutputScriptFactory |
||
17 | { |
||
18 | /** |
||
19 | * @return OutputClassifier |
||
20 | */ |
||
21 | public function classify() |
||
25 | |||
26 | /** |
||
27 | * @param AddressInterface $address |
||
28 | * @return ScriptInterface |
||
29 | */ |
||
30 | 108 | public function payToAddress(AddressInterface $address) |
|
36 | |||
37 | /** |
||
38 | * Create a Pay to pubkey output |
||
39 | * |
||
40 | * @param PublicKeyInterface $publicKey |
||
41 | * @return ScriptInterface |
||
42 | */ |
||
43 | 36 | public function payToPubKey(PublicKeyInterface $publicKey) |
|
47 | |||
48 | /** |
||
49 | * Create a P2PKH output script |
||
50 | * |
||
51 | * @param PublicKeyInterface $public_key |
||
52 | * @return ScriptInterface |
||
53 | */ |
||
54 | 18 | public function payToPubKeyHash(PublicKeyInterface $public_key) |
|
58 | |||
59 | /** |
||
60 | * Create a P2SH output script |
||
61 | * |
||
62 | * @param ScriptInterface $p2shScript |
||
63 | * @return ScriptInterface |
||
64 | */ |
||
65 | 96 | public function payToScriptHash(ScriptInterface $p2shScript) |
|
69 | |||
70 | /** |
||
71 | * @param int $m |
||
72 | * @param PublicKeyInterface[] $keys |
||
73 | * @param bool|true $sort |
||
74 | * @return ScriptCreator|Script |
||
75 | */ |
||
76 | 78 | public function multisig($m, array $keys = [], $sort = true) |
|
104 | } |
||
105 |