src/Transactions/Transaction.php
public function verify(): bool
    {
        $factory = new PublicKeyFactory;
        $publicKey = $factory->fromHex($this->senderPublicKey);

        return $publicKey->verify(
            Hash::sha256($this->toBytes()),
            SignatureFactory::fromHex($this->signature)
        );
    }
public function verify(): bool
    {
        $factory = new PublicKeyFactory;
        $publicKey = $factory->fromHex($this->senderPublicKey);

        return $publicKey->verify(
            Hash::sha256($this->toBytes()),
            SignatureFactory::fromHex($this->signature)
        );
    }
public function verify ( ) : bool { $ factory = new PublicKeyFactory ; $ publicKey = $ factory -> fromHex ( $ this -> senderPublicKey ) ; return $ publicKey -> verify ( Hash :: sha256 ( $ this -> toBytes ( ) ) , SignatureFactory :: fromHex ( $ this -> signature ) ) ; }
Verify the transaction.

@return bool
Verify the transaction .