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