mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 18:26:43 +00:00
various changes to support soroban
This commit is contained in:
parent
3a061cb73a
commit
4a4a62f239
4 changed files with 15 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
||||||
package com.sparrowwallet.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import com.sparrowwallet.drongo.rpc.BitcoinJSONRPCClient;
|
import com.sparrowwallet.drongo.rpc.BitcoinJSONRPCClient;
|
||||||
|
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.slf4j.event.Level;
|
import org.slf4j.event.Level;
|
||||||
|
@ -8,6 +9,7 @@ import org.zeromq.SocketType;
|
||||||
import org.zeromq.ZContext;
|
import org.zeromq.ZContext;
|
||||||
import org.zeromq.ZMQ;
|
import org.zeromq.ZMQ;
|
||||||
|
|
||||||
|
import java.security.Provider;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
@ -80,4 +82,8 @@ public class Drongo {
|
||||||
ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger)LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
|
ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger)LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
|
||||||
root.setLevel(ch.qos.logback.classic.Level.toLevel(level.toString()));
|
root.setLevel(ch.qos.logback.classic.Level.toLevel(level.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Provider getProvider() {
|
||||||
|
return new BouncyCastleProvider();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,14 +257,6 @@ public class PSBT {
|
||||||
if(transaction == null) {
|
if(transaction == null) {
|
||||||
throw new PSBTParseException("Missing transaction");
|
throw new PSBTParseException("Missing transaction");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(currentState == STATE_INPUTS) {
|
|
||||||
throw new PSBTParseException("Missing inputs");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(currentState == STATE_OUTPUTS) {
|
|
||||||
throw new PSBTParseException("Missing outputs");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(log.isDebugEnabled()) {
|
if(log.isDebugEnabled()) {
|
||||||
|
|
|
@ -62,6 +62,6 @@ public class Payment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Type {
|
public enum Type {
|
||||||
DEFAULT, WHIRLPOOL_FEE, FAKE_MIX;
|
DEFAULT, WHIRLPOOL_FEE, FAKE_MIX, MIX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,6 +164,14 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Wallet> getAllWallets() {
|
||||||
|
List<Wallet> allWallets = new ArrayList<>();
|
||||||
|
Wallet masterWallet = isMasterWallet() ? this : getMasterWallet();
|
||||||
|
allWallets.add(masterWallet);
|
||||||
|
allWallets.addAll(masterWallet.getChildWallets());
|
||||||
|
return allWallets;
|
||||||
|
}
|
||||||
|
|
||||||
public StandardAccount getStandardAccountType() {
|
public StandardAccount getStandardAccountType() {
|
||||||
int accountIndex = getAccountIndex();
|
int accountIndex = getAccountIndex();
|
||||||
return Arrays.stream(StandardAccount.values()).filter(standardAccount -> standardAccount.getChildNumber().num() == accountIndex).findFirst().orElse(null);
|
return Arrays.stream(StandardAccount.values()).filter(standardAccount -> standardAccount.getChildNumber().num() == accountIndex).findFirst().orElse(null);
|
||||||
|
|
Loading…
Reference in a new issue