Ejemplo n.º 1
0
 private function arrayToOutput($array, Transcoder $transcoder)
 {
     return new Output(new Binary($transcoder->decode($array['to'])), $this->arrayToFraction($array['val']));
 }
Ejemplo n.º 2
0
 /**
  * @return Transcoder
  */
 public function getBinaryTranscoder()
 {
     return $this->inner->getBinaryTranscoder();
 }
Ejemplo n.º 3
0
 /**
  * @param array $array
  * @param Transcoder $transcoder
  * @return object
  */
 public function toObject($array, Transcoder $transcoder)
 {
     return new RuleBook(new Binary($transcoder->decode($array['by'])), $array['rules'], $array['sig'], array_key_exists('prev', $array) ? new Binary($transcoder->decode($array['prev'])) : null);
 }
Ejemplo n.º 4
0
 /**
  * @param Authorization $object
  * @param Transcoder $transcoder
  * @return array
  */
 public function toArray($object, Transcoder $transcoder)
 {
     return ['issuer' => $transcoder->encode($object->getIssuerAddress()->getData()), 'currency' => $transcoder->encode($object->getCurrencyAddress()->getData()), 'sig' => $object->getSignature()];
 }