mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 01:56:44 +00:00
add bsms model, additional taproot signing check
This commit is contained in:
parent
caed93ca6d
commit
d0da764aad
2 changed files with 5 additions and 5 deletions
|
@ -8,10 +8,7 @@ import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static com.sparrowwallet.drongo.Utils.uint32ToByteStreamLE;
|
import static com.sparrowwallet.drongo.Utils.uint32ToByteStreamLE;
|
||||||
import static com.sparrowwallet.drongo.Utils.uint64ToByteStreamLE;
|
import static com.sparrowwallet.drongo.Utils.uint64ToByteStreamLE;
|
||||||
|
@ -634,6 +631,9 @@ public class Transaction extends ChildMessage {
|
||||||
if(spentUtxos.size() != getInputs().size()) {
|
if(spentUtxos.size() != getInputs().size()) {
|
||||||
throw new IllegalArgumentException("Provided spent UTXOs length does not equal the number of transaction inputs");
|
throw new IllegalArgumentException("Provided spent UTXOs length does not equal the number of transaction inputs");
|
||||||
}
|
}
|
||||||
|
if(spentUtxos.stream().anyMatch(Objects::isNull)) {
|
||||||
|
throw new IllegalArgumentException("Not all spent UTXOs are provided");
|
||||||
|
}
|
||||||
if(inputIndex >= getInputs().size()) {
|
if(inputIndex >= getInputs().size()) {
|
||||||
throw new IllegalArgumentException("Input index is greater than the number of transaction inputs");
|
throw new IllegalArgumentException("Input index is greater than the number of transaction inputs");
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.Locale;
|
||||||
|
|
||||||
public enum WalletModel {
|
public enum WalletModel {
|
||||||
SEED, SPARROW, BITCOIN_CORE, ELECTRUM, TREZOR_1, TREZOR_T, COLDCARD, LEDGER_NANO_S, LEDGER_NANO_X, DIGITALBITBOX_01, KEEPKEY, SPECTER_DESKTOP, COBO_VAULT,
|
SEED, SPARROW, BITCOIN_CORE, ELECTRUM, TREZOR_1, TREZOR_T, COLDCARD, LEDGER_NANO_S, LEDGER_NANO_X, DIGITALBITBOX_01, KEEPKEY, SPECTER_DESKTOP, COBO_VAULT,
|
||||||
BITBOX_02, SPECTER_DIY, PASSPORT, BLUE_WALLET, KEYSTONE, SEEDSIGNER, CARAVAN, GORDIAN_SEED_TOOL, JADE, LEDGER_NANO_S_PLUS, EPS, TAPSIGNER, SATSCARD, LABELS;
|
BITBOX_02, SPECTER_DIY, PASSPORT, BLUE_WALLET, KEYSTONE, SEEDSIGNER, CARAVAN, GORDIAN_SEED_TOOL, JADE, LEDGER_NANO_S_PLUS, EPS, TAPSIGNER, SATSCARD, LABELS, BSMS;
|
||||||
|
|
||||||
public static WalletModel getModel(String model) {
|
public static WalletModel getModel(String model) {
|
||||||
return valueOf(model.toUpperCase(Locale.ROOT));
|
return valueOf(model.toUpperCase(Locale.ROOT));
|
||||||
|
|
Loading…
Reference in a new issue