Java Code Examples for net.bither.bitherj.core.HDMAddress#HDMFetchOtherSignatureDelegate

The following examples show how to use net.bither.bitherj.core.HDMAddress#HDMFetchOtherSignatureDelegate . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CompleteTransactionRunnable.java    From bither-desktop-java with Apache License 2.0 5 votes vote down vote up
public CompleteTransactionRunnable(Address a, long amount, String toAddress,
                                   String changeAddress, SecureCharSequence password,
                                   HDMAddress.HDMFetchOtherSignatureDelegate
                                           otherSigFetcher1,
                                   HDMAddress.HDMFetchOtherSignatureDelegate
                                           otherSigFetcher2) throws Exception {
    boolean isHDM = otherSigFetcher1 != null || otherSigFetcher2 != null;
    this.amount = amount;
    this.toAddress = toAddress;
    this.password = password;
    sigFetcher1 = otherSigFetcher1;
    sigFetcher2 = otherSigFetcher2;
    if (isHDM) {
        wallet = a;
        toSign = true;
    } else if (password == null || password.length() == 0) {
        wallet = a;
        toSign = false;
    } else {
        if (a.hasPrivKey()) {
            wallet = a;
        } else {
            throw new Exception("address not with private key");
        }
        toSign = true;
    }
    if (!Utils.isEmpty(changeAddress)) {
        this.changeAddress = changeAddress;
    } else {
        this.changeAddress = wallet.getAddress();
    }
}
 
Example 2
Source File: CompleteTransactionRunnable.java    From bither-android with Apache License 2.0 5 votes vote down vote up
public CompleteTransactionRunnable(int addressPosition, long amount, String toAddress,
                                   String changeAddress, SecureCharSequence password,
                                   HDMAddress.HDMFetchOtherSignatureDelegate
                                           otherSigFetcher1,HDMAddress.HDMFetchOtherSignatureDelegate
                                           otherSigFetcher2) throws Exception {
    this(Coin.BTC, addressPosition, amount, toAddress, changeAddress, password, otherSigFetcher1, otherSigFetcher2);
}
 
Example 3
Source File: CompleteTransactionRunnable.java    From bither-desktop-java with Apache License 2.0 5 votes vote down vote up
public CompleteTransactionRunnable(Address a, long amount, String toAddress,
                                   String changeAddress, SecureCharSequence password,
                                   HDMAddress.HDMFetchOtherSignatureDelegate
                                           otherSigFetcher1,
                                   HDMAddress.HDMFetchOtherSignatureDelegate
                                           otherSigFetcher2) throws Exception {
    boolean isHDM = otherSigFetcher1 != null || otherSigFetcher2 != null;
    this.amount = amount;
    this.toAddress = toAddress;
    this.password = password;
    sigFetcher1 = otherSigFetcher1;
    sigFetcher2 = otherSigFetcher2;
    if (isHDM) {
        wallet = a;
        toSign = true;
    } else if (password == null || password.length() == 0) {
        wallet = a;
        toSign = false;
    } else {
        if (a.hasPrivKey()) {
            wallet = a;
        } else {
            throw new Exception("address not with private key");
        }
        toSign = true;
    }
    if (!Utils.isEmpty(changeAddress)) {
        this.changeAddress = changeAddress;
    } else {
        this.changeAddress = wallet.getAddress();
    }
}
 
Example 4
Source File: CompleteTransactionRunnable.java    From bither-desktop-java with Apache License 2.0 4 votes vote down vote up
public CompleteTransactionRunnable(Address a, long amount, String toAddress,
                                   String changeAddress, SecureCharSequence password,
                                   HDMAddress.HDMFetchOtherSignatureDelegate
                                           otherSigFetcher1) throws Exception {
    this(a, amount, toAddress, changeAddress, password, otherSigFetcher1, null);
}
 
Example 5
Source File: CompleteTransactionRunnable.java    From bither-android with Apache License 2.0 4 votes vote down vote up
public CompleteTransactionRunnable(int addressPosition, long amount, String toAddress,
                                   String changeAddress, SecureCharSequence password,
                                   HDMAddress.HDMFetchOtherSignatureDelegate
                                           otherSigFetcher1) throws Exception {
    this(Coin.BTC, addressPosition, amount, toAddress, changeAddress, password, otherSigFetcher1, null);
}
 
Example 6
Source File: CompleteTransactionRunnable.java    From bither-android with Apache License 2.0 4 votes vote down vote up
public CompleteTransactionRunnable(Coin coin, int addressPosition, long amount, String toAddress,
                                   String changeAddress, SecureCharSequence password,
                                   HDMAddress.HDMFetchOtherSignatureDelegate
                                           otherSigFetcher1) throws Exception {
    this(coin, addressPosition, amount, toAddress, changeAddress, password, otherSigFetcher1, null);
}
 
Example 7
Source File: CompleteTransactionRunnable.java    From bither-desktop-java with Apache License 2.0 4 votes vote down vote up
public CompleteTransactionRunnable(Address a, long amount, String toAddress,
                                   String changeAddress, SecureCharSequence password,
                                   HDMAddress.HDMFetchOtherSignatureDelegate
                                           otherSigFetcher1) throws Exception {
    this(a, amount, toAddress, changeAddress, password, otherSigFetcher1, null);
}