1 | <?php |
||
14 | class Signer |
||
15 | { |
||
16 | /** |
||
17 | * @var EcAdapterInterface |
||
18 | */ |
||
19 | private $ecAdapter; |
||
20 | |||
21 | /** |
||
22 | * @var TransactionInterface |
||
23 | */ |
||
24 | private $tx; |
||
25 | |||
26 | /** |
||
27 | * @var InputSigner |
||
28 | */ |
||
29 | private $signatureCreator = []; |
||
30 | |||
31 | /** |
||
32 | * TxWitnessSigner constructor. |
||
33 | * @param TransactionInterface $tx |
||
34 | * @param EcAdapterInterface $ecAdapter |
||
35 | */ |
||
36 | 84 | public function __construct(TransactionInterface $tx, EcAdapterInterface $ecAdapter) |
|
41 | |||
42 | /** |
||
43 | * @param int $nIn |
||
44 | * @param PrivateKeyInterface $key |
||
45 | * @param TransactionOutputInterface $txOut |
||
46 | * @param ScriptInterface|null $redeemScript |
||
47 | * @param ScriptInterface|null $witnessScript |
||
48 | * @param int $sigHashType |
||
49 | * @return $this |
||
50 | */ |
||
51 | 84 | public function sign($nIn, PrivateKeyInterface $key, TransactionOutputInterface $txOut, ScriptInterface $redeemScript = null, ScriptInterface $witnessScript = null, $sigHashType = SigHash::ALL) |
|
63 | |||
64 | /** |
||
65 | * @return TransactionInterface |
||
66 | */ |
||
67 | 84 | public function get() |
|
84 | } |
||
85 |