/** * @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()]; }
/** * Signs an Authorization for the given issuer with the currency's key * * @param Binary $currencyKey * @param Binary $issuerAddress * @return Authorization */ public function authorizeIssuer(Binary $currencyKey, Binary $issuerAddress) { return Authorization::signed($issuerAddress, new Signer($this->key, $currencyKey)); }