Package org.bitcoinj.crypto

Examples of org.bitcoinj.crypto.TransactionSignature


        ECKey key = input.getOutpoint().getConnectedKey(this);
        checkNotNull(key);
        Script script = stub.getScriptPubKey();
        if (aesKey != null)
            key = key.maybeDecrypt(aesKey);
        TransactionSignature signature = pledge.calculateSignature(0, key, script,
                Transaction.SigHash.ALL, true /* anyone can pay! */);
        if (script.isSentToAddress()) {
            input.setScriptSig(ScriptBuilder.createInputScript(signature, key));
        } else if (script.isSentToRawPubKey()) {
            // This branch will never be taken with the current design of the app because the only way to get money
View Full Code Here


        pledge.getPledgeDetailsBuilder();
        return new Triplet<>(tx0, tx1, pledge.build());
    }

    public static TransactionInput makeRandomInput() {
        TransactionSignature dummy = TransactionSignature.dummy();
        dummy = new TransactionSignature(dummy.toCanonicalised(), Transaction.SigHash.ALL, true);
        byte[] script = ScriptBuilder.createInputScript(dummy).getProgram();
        // Nonsense outpoint, it doesn't matter.
        counter[0]++;
        return new TransactionInput(UnitTestParams.get(), null, script, new TransactionOutPoint(UnitTestParams.get(), 0, Sha256Hash.create(counter)));
    }
View Full Code Here

TOP

Related Classes of org.bitcoinj.crypto.TransactionSignature

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.