Exemplo n.º 1
0
        async Task <bool> InternalVerify(Transaction transaction, TransactionInput input)
        {
            var priorOutput = await fetcher.FetchPriorOutput(input);

            var script  = new Script(input.SigScript, priorOutput.ScriptPubKey);
            var sigHash = hasher.ComputeSigHash(transaction, input, priorOutput, SigHashType.All);

            return(evaluator.Evaluate(script.Commands, sigHash));
        }
Exemplo n.º 2
0
        protected async Task <byte[]> ComputeSignatureBytes(PrivateKey privateKey, Transaction transaction, TransactionInput input, SigHashType sigHashType)
        {
            var hash = await hasher.ComputeSigHash(transaction, input, sigHashType);

            return(privateKey.Sign(hash).ToDer().Concat((byte)sigHashType));
        }