예제 #1
0
 public function fetchByInput(TransactionInputInterface $input)
 {
     return $this->fetch($input->getTransactionId(), $input->getVout());
 }
예제 #2
0
 /**
  * @param TransactionInputInterface $input
  * @return array
  */
 public function convertTxinToArray(TransactionInputInterface $input)
 {
     return ['outpoint' => $this->convertOutpointToArray($input->getOutPoint()), 'scriptSig' => $input->getScript()->getHex(), 'sequence' => $input->getSequence()];
 }
 /**
  * @param TransactionInputInterface $input
  * @return Buffer
  */
 public function serialize(TransactionInputInterface $input)
 {
     return $this->getTemplate()->write([Buffer::hex($input->getTransactionId()), $input->getVout(), $input->getScript()->getBuffer(), $input->getSequence()]);
 }
예제 #4
0
 /**
  * @param array $array
  * @return $this
  */
 private function replace(array $array = [])
 {
     $this->input = new TransactionInput(array_key_exists('outpoint', $array) ? $array['outpoint'] : $this->input->getOutPoint(), array_key_exists('script', $array) ? $array['script'] : $this->input->getScript(), array_key_exists('nSequence', $array) ? $array['nSequence'] : $this->input->getSequence());
     return $this;
 }
 /**
  * @param TransactionInputInterface $input
  * @return Buffer
  */
 public function serialize(TransactionInputInterface $input)
 {
     return Buffertools::concat($this->outpointSerializer->serialize($input->getOutPoint()), $this->getInputTemplate()->write([$input->getScript()->getBuffer(), $input->getSequence()]));
 }
예제 #6
0
 /**
  * @param TransactionInputInterface $input
  * @return Utxo
  */
 public function fetchByInput(TransactionInputInterface $input)
 {
     return $this->fetch($input->getOutPoint());
 }