private function verifyBaseSignature(Base $transaction) { $issuer = $transaction->getIssuerAddress(); if (!$this->key->verify(Signer::squash($transaction), $issuer, $transaction->getSignature())) { $this->errors[] = "Invalid signature by [{$issuer}]"; } }
/** * Creates a new coin with a value proportional to the bases of the backer. * * @param Binary $backerKey * @param Coin $coin * @return Coin * @throws \Exception */ public function confirmCoin(Binary $backerKey, Coin $coin) { $backer = $this->key->getAddress($backerKey); $confirmed = $coin->confirm($backer, new Signer($this->key, $backerKey)); (new Verification($this->key))->verify($confirmed)->mustBeOk(); return $confirmed; }