// Path: src/main/java/com/bushidowallet/core/bitcoin/ecdsa/ECDSASignature.java
// public class ECDSASignature {
// 
//     public BigInteger r;
// 
//     public BigInteger s;
// 
//     public boolean compressed;
// 
//     public ECDSASignature(BigInteger r, BigInteger s, boolean compressed) {
//         this.r = r;
//         this.s = s;
//         this.compressed = compressed;
//     }
// 
//     public byte[] toDER() {
//         return toDER(r, s);
//     }
// 
//     private static byte[] toDER(BigInteger r, BigInteger s) {
//         ByteArrayOutputStream bos = new ByteArrayOutputStream(72);
//         DERSequenceGenerator seq = null;
//         byte[] res = new byte[0];
//         try {
//             seq = new DERSequenceGenerator(bos);
//             seq.addObject(new ASN1Integer(r));
//             seq.addObject(new ASN1Integer(s));
//             seq.close();
//             res = bos.toByteArray();
//             return res;
//         } catch (IOException e) {
// 
//         }
//         return null;
//     }
// }


import com.bushidowallet.core.bitcoin.ecdsa.ECDSASignature;
package com.bushidowallet.core.bitcoin.tx;


/**
 * Created by Jesion on 2015-04-08.
 */
public class TransactionSignature {

    public static int SIGHASH_ALL = 0x01;
    public static int SIGHASH_NONE = 0x02;
    public static int SIGHASH_SINGLE = 0x03;
    public static int SIGHASH_ANYONECANPAY = 0x80;

    public int inputIndex;
    public int outputIndex;
    public byte[] publicKey;
    public boolean publicKeyCompressed;
    public byte[] prevTxId;
    public ECDSASignature signature;
    public int sigType;

    public TransactionSignature() {

    }

// Path: src/main/java/com/bushidowallet/core/bitcoin/ecdsa/ECDSASignature.java
// public class ECDSASignature {
// 
//     public BigInteger r;
// 
//     public BigInteger s;
// 
//     public boolean compressed;
// 
//     public ECDSASignature(BigInteger r, BigInteger s, boolean compressed) {
//         this.r = r;
//         this.s = s;
//         this.compressed = compressed;
//     }
// 
//     public byte[] toDER() {
//         return toDER(r, s);
//     }
// 
//     private static byte[] toDER(BigInteger r, BigInteger s) {
//         ByteArrayOutputStream bos = new ByteArrayOutputStream(72);
//         DERSequenceGenerator seq = null;
//         byte[] res = new byte[0];
//         try {
//             seq = new DERSequenceGenerator(bos);
//             seq.addObject(new ASN1Integer(r));
//             seq.addObject(new ASN1Integer(s));
//             seq.close();
//             res = bos.toByteArray();
//             return res;
//         } catch (IOException e) {
// 
//         }
//         return null;
//     }
// }


// Path: src/main/java/com/bushidowallet/core/bitcoin/tx/TransactionSignature.java
import com.bushidowallet.core.bitcoin.ecdsa.ECDSASignature;

package com.bushidowallet.core.bitcoin.tx;


/**
 * Created by Jesion on 2015-04-08.
 */
public class TransactionSignature {

    public static int SIGHASH_ALL = 0x01;
    public static int SIGHASH_NONE = 0x02;
    public static int SIGHASH_SINGLE = 0x03;
    public static int SIGHASH_ANYONECANPAY = 0x80;

    public int inputIndex;
    public int outputIndex;
    public byte[] publicKey;
    public boolean publicKeyCompressed;
    public byte[] prevTxId;
    public ECDSASignature signature;
    public int sigType;

    public TransactionSignature() {

    }

    public TransactionSignature(byte[] publicKey, boolean publicKeyCompressed, byte[] prevTxId, int outputIndex, int inputIndex, ECDSASignature signature, int sigType) {