mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-27 02:26:44 +00:00
rename tld
This commit is contained in:
parent
520aa89baf
commit
e0a4b29ed4
55 changed files with 155 additions and 161 deletions
|
@ -23,7 +23,7 @@ if(hasPlugin) {
|
||||||
apply plugin: "org.javamodularity.moduleplugin"
|
apply plugin: "org.javamodularity.moduleplugin"
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'com.craigraw'
|
group 'com.sparrowwallet'
|
||||||
version '0.1'
|
version '0.1'
|
||||||
|
|
||||||
sourceCompatibility = 1.9
|
sourceCompatibility = 1.9
|
||||||
|
@ -54,14 +54,14 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
task(runDrongo, dependsOn: 'classes', type: JavaExec) {
|
task(runDrongo, dependsOn: 'classes', type: JavaExec) {
|
||||||
main = 'com.craigraw.drongo.Main'
|
main = 'com.sparrowwallet.drongo.Main'
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
args 'drongo.properties'
|
args 'drongo.properties'
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes "Main-Class": "com.craigraw.drongo.Main"
|
attributes "Main-Class": "com.sparrowwallet.drongo.Main"
|
||||||
}
|
}
|
||||||
|
|
||||||
baseName = 'drongo'
|
baseName = 'drongo'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.craigraw.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import com.craigraw.drongo.rpc.BitcoinJSONRPCClient;
|
import com.sparrowwallet.drongo.rpc.BitcoinJSONRPCClient;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.zeromq.SocketType;
|
import org.zeromq.SocketType;
|
|
@ -1,13 +1,13 @@
|
||||||
package com.craigraw.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import com.craigraw.drongo.crypto.*;
|
import com.sparrowwallet.drongo.crypto.*;
|
||||||
import com.craigraw.drongo.protocol.Base58;
|
import com.sparrowwallet.drongo.protocol.Base58;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static com.craigraw.drongo.KeyDerivation.parsePath;
|
import static com.sparrowwallet.drongo.KeyDerivation.parsePath;
|
||||||
import static com.craigraw.drongo.KeyDerivation.writePath;
|
import static com.sparrowwallet.drongo.KeyDerivation.writePath;
|
||||||
|
|
||||||
public class ExtendedPublicKey {
|
public class ExtendedPublicKey {
|
||||||
private static final int bip32HeaderP2PKHXPub = 0x0488B21E; //The 4 byte header that serializes in base58 to "xpub".
|
private static final int bip32HeaderP2PKHXPub = 0x0488B21E; //The 4 byte header that serializes in base58 to "xpub".
|
|
@ -1,6 +1,6 @@
|
||||||
package com.craigraw.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import com.craigraw.drongo.crypto.ChildNumber;
|
import com.sparrowwallet.drongo.crypto.ChildNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
|
@ -1,11 +1,11 @@
|
||||||
package com.craigraw.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import com.craigraw.drongo.address.*;
|
import com.sparrowwallet.drongo.address.*;
|
||||||
import com.craigraw.drongo.crypto.ChildNumber;
|
import com.sparrowwallet.drongo.crypto.ChildNumber;
|
||||||
import com.craigraw.drongo.crypto.DeterministicKey;
|
import com.sparrowwallet.drongo.crypto.DeterministicKey;
|
||||||
import com.craigraw.drongo.protocol.Script;
|
import com.sparrowwallet.drongo.protocol.Script;
|
||||||
import com.craigraw.drongo.protocol.ScriptChunk;
|
import com.sparrowwallet.drongo.protocol.ScriptChunk;
|
||||||
import com.craigraw.drongo.protocol.ScriptOpCodes;
|
import com.sparrowwallet.drongo.protocol.ScriptOpCodes;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.craigraw.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import com.craigraw.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
import com.craigraw.drongo.protocol.*;
|
import com.sparrowwallet.drongo.protocol.*;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package com.craigraw.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import com.craigraw.drongo.crypto.ChildNumber;
|
import com.sparrowwallet.drongo.crypto.ChildNumber;
|
||||||
import com.craigraw.drongo.protocol.ProtocolException;
|
import com.sparrowwallet.drongo.protocol.ProtocolException;
|
||||||
import com.craigraw.drongo.protocol.Ripemd160;
|
import com.sparrowwallet.drongo.protocol.Ripemd160;
|
||||||
import com.craigraw.drongo.protocol.Sha256Hash;
|
import com.sparrowwallet.drongo.protocol.Sha256Hash;
|
||||||
import org.bouncycastle.crypto.digests.SHA512Digest;
|
import org.bouncycastle.crypto.digests.SHA512Digest;
|
||||||
import org.bouncycastle.crypto.macs.HMac;
|
import org.bouncycastle.crypto.macs.HMac;
|
||||||
import org.bouncycastle.crypto.params.KeyParameter;
|
import org.bouncycastle.crypto.params.KeyParameter;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.craigraw.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import com.craigraw.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
import com.craigraw.drongo.crypto.*;
|
import com.sparrowwallet.drongo.crypto.*;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.craigraw.drongo.address;
|
package com.sparrowwallet.drongo.address;
|
||||||
|
|
||||||
import com.craigraw.drongo.protocol.Base58;
|
import com.sparrowwallet.drongo.protocol.Base58;
|
||||||
import com.craigraw.drongo.protocol.Script;
|
import com.sparrowwallet.drongo.protocol.Script;
|
||||||
|
|
||||||
public abstract class Address {
|
public abstract class Address {
|
||||||
protected final byte[] pubKeyHash;
|
protected final byte[] pubKeyHash;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.craigraw.drongo.address;
|
package com.sparrowwallet.drongo.address;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.protocol.Script;
|
import com.sparrowwallet.drongo.protocol.Script;
|
||||||
import com.craigraw.drongo.protocol.ScriptChunk;
|
import com.sparrowwallet.drongo.protocol.ScriptChunk;
|
||||||
import com.craigraw.drongo.protocol.ScriptOpCodes;
|
import com.sparrowwallet.drongo.protocol.ScriptOpCodes;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,8 +1,8 @@
|
||||||
package com.craigraw.drongo.address;
|
package com.sparrowwallet.drongo.address;
|
||||||
|
|
||||||
import com.craigraw.drongo.protocol.Script;
|
import com.sparrowwallet.drongo.protocol.Script;
|
||||||
import com.craigraw.drongo.protocol.ScriptChunk;
|
import com.sparrowwallet.drongo.protocol.ScriptChunk;
|
||||||
import com.craigraw.drongo.protocol.ScriptOpCodes;
|
import com.sparrowwallet.drongo.protocol.ScriptOpCodes;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.craigraw.drongo.address;
|
package com.sparrowwallet.drongo.address;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.protocol.Script;
|
import com.sparrowwallet.drongo.protocol.Script;
|
||||||
import com.craigraw.drongo.protocol.ScriptChunk;
|
import com.sparrowwallet.drongo.protocol.ScriptChunk;
|
||||||
import com.craigraw.drongo.protocol.ScriptOpCodes;
|
import com.sparrowwallet.drongo.protocol.ScriptOpCodes;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,8 +1,8 @@
|
||||||
package com.craigraw.drongo.address;
|
package com.sparrowwallet.drongo.address;
|
||||||
|
|
||||||
import com.craigraw.drongo.protocol.Bech32;
|
import com.sparrowwallet.drongo.protocol.Bech32;
|
||||||
import com.craigraw.drongo.protocol.Script;
|
import com.sparrowwallet.drongo.protocol.Script;
|
||||||
import com.craigraw.drongo.protocol.ScriptChunk;
|
import com.sparrowwallet.drongo.protocol.ScriptChunk;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,11 +1,11 @@
|
||||||
package com.craigraw.drongo.address;
|
package com.sparrowwallet.drongo.address;
|
||||||
|
|
||||||
import com.craigraw.drongo.protocol.*;
|
import com.sparrowwallet.drongo.protocol.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.craigraw.drongo.address.P2WPKHAddress.HRP;
|
import static com.sparrowwallet.drongo.address.P2WPKHAddress.HRP;
|
||||||
|
|
||||||
public class P2WSHAddress extends Address {
|
public class P2WSHAddress extends Address {
|
||||||
public P2WSHAddress(byte[] pubKeyHash) {
|
public P2WSHAddress(byte[] pubKeyHash) {
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.crypto;
|
package com.sparrowwallet.drongo.crypto;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
package com.craigraw.drongo.crypto;
|
package com.sparrowwallet.drongo.crypto;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
|
||||||
import com.craigraw.drongo.protocol.Base58;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class DeterministicHierarchy {
|
public class DeterministicHierarchy {
|
|
@ -1,9 +1,9 @@
|
||||||
package com.craigraw.drongo.crypto;
|
package com.sparrowwallet.drongo.crypto;
|
||||||
|
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.protocol.Base58;
|
import com.sparrowwallet.drongo.protocol.Base58;
|
||||||
import com.craigraw.drongo.protocol.Sha256Hash;
|
import com.sparrowwallet.drongo.protocol.Sha256Hash;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,8 +1,8 @@
|
||||||
package com.craigraw.drongo.crypto;
|
package com.sparrowwallet.drongo.crypto;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.protocol.Sha256Hash;
|
import com.sparrowwallet.drongo.protocol.Sha256Hash;
|
||||||
import com.craigraw.drongo.protocol.SignatureDecodeException;
|
import com.sparrowwallet.drongo.protocol.SignatureDecodeException;
|
||||||
import org.bouncycastle.asn1.*;
|
import org.bouncycastle.asn1.*;
|
||||||
import org.bouncycastle.asn1.x9.X9ECParameters;
|
import org.bouncycastle.asn1.x9.X9ECParameters;
|
||||||
import org.bouncycastle.crypto.ec.CustomNamedCurves;
|
import org.bouncycastle.crypto.ec.CustomNamedCurves;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.craigraw.drongo.crypto;
|
package com.sparrowwallet.drongo.crypto;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import org.bouncycastle.math.ec.ECPoint;
|
import org.bouncycastle.math.ec.ECPoint;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.crypto;
|
package com.sparrowwallet.drongo.crypto;
|
||||||
|
|
||||||
import org.bouncycastle.math.ec.ECCurve;
|
import org.bouncycastle.math.ec.ECCurve;
|
||||||
import org.bouncycastle.math.ec.ECPoint;
|
import org.bouncycastle.math.ec.ECPoint;
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2018 Coinomi Ltd
|
* Copyright 2018 Coinomi Ltd
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
public class NonStandardScriptException extends Exception {
|
public class NonStandardScriptException extends Exception {
|
||||||
public NonStandardScriptException() {
|
public NonStandardScriptException() {
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
public class ProtocolException extends RuntimeException {
|
public class ProtocolException extends RuntimeException {
|
||||||
public ProtocolException() {
|
public ProtocolException() {
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bitcoin cryptography library
|
* Bitcoin cryptography library
|
|
@ -1,7 +1,7 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.address.*;
|
import com.sparrowwallet.drongo.address.*;
|
||||||
import org.bouncycastle.util.encoders.Hex;
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
@ -12,7 +12,7 @@ import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.craigraw.drongo.protocol.ScriptOpCodes.*;
|
import static com.sparrowwallet.drongo.protocol.ScriptOpCodes.*;
|
||||||
|
|
||||||
public class Script {
|
public class Script {
|
||||||
public static final long MAX_SCRIPT_ELEMENT_SIZE = 520;
|
public static final long MAX_SCRIPT_ELEMENT_SIZE = 520;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import org.bouncycastle.util.encoders.Hex;
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
|
@ -9,7 +9,7 @@ import java.io.OutputStream;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static com.craigraw.drongo.protocol.ScriptOpCodes.*;
|
import static com.sparrowwallet.drongo.protocol.ScriptOpCodes.*;
|
||||||
|
|
||||||
public class ScriptChunk {
|
public class ScriptChunk {
|
||||||
/** Operation to be executed. Opcodes are defined in {@link ScriptOpCodes}. */
|
/** Operation to be executed. Opcodes are defined in {@link ScriptOpCodes}. */
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
|
@ -1,13 +1,13 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
import com.craigraw.drongo.address.P2PKAddress;
|
import com.sparrowwallet.drongo.address.P2PKAddress;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.craigraw.drongo.protocol.ScriptOpCodes.*;
|
import static com.sparrowwallet.drongo.protocol.ScriptOpCodes.*;
|
||||||
import static com.craigraw.drongo.protocol.Script.decodeFromOpN;
|
import static com.sparrowwallet.drongo.protocol.Script.decodeFromOpN;
|
||||||
|
|
||||||
public class ScriptPattern {
|
public class ScriptPattern {
|
||||||
/**
|
/**
|
|
@ -15,9 +15,9 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
public class SignatureDecodeException extends RuntimeException {
|
public class SignatureDecodeException extends RuntimeException {
|
||||||
public SignatureDecodeException() {
|
public SignatureDecodeException() {
|
|
@ -1,9 +1,9 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
import com.craigraw.drongo.address.P2PKHAddress;
|
import com.sparrowwallet.drongo.address.P2PKHAddress;
|
||||||
import com.craigraw.drongo.crypto.ECKey;
|
import com.sparrowwallet.drongo.crypto.ECKey;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -14,8 +14,8 @@ import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.craigraw.drongo.Utils.uint32ToByteStreamLE;
|
import static com.sparrowwallet.drongo.Utils.uint32ToByteStreamLE;
|
||||||
import static com.craigraw.drongo.Utils.uint64ToByteStreamLE;
|
import static com.sparrowwallet.drongo.Utils.uint64ToByteStreamLE;
|
||||||
|
|
||||||
public class Transaction extends TransactionPart {
|
public class Transaction extends TransactionPart {
|
||||||
public static final int MAX_BLOCK_SIZE = 1000 * 1000;
|
public static final int MAX_BLOCK_SIZE = 1000 * 1000;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.crypto.ECKey;
|
import com.sparrowwallet.drongo.crypto.ECKey;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import org.bouncycastle.util.encoders.Hex;
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2011 Steve Coughlan.
|
* Copyright 2011 Steve Coughlan.
|
|
@ -14,9 +14,9 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A variable-length encoded unsigned integer using Satoshi's encoding (a.k.a. "CompactSize").
|
* A variable-length encoded unsigned integer using Satoshi's encoding (a.k.a. "CompactSize").
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
public class VerificationException extends RuntimeException {
|
public class VerificationException extends RuntimeException {
|
||||||
public VerificationException(String msg) {
|
public VerificationException(String msg) {
|
|
@ -1,9 +1,9 @@
|
||||||
package com.craigraw.drongo.psbt;
|
package com.sparrowwallet.drongo.psbt;
|
||||||
|
|
||||||
import com.craigraw.drongo.ExtendedPublicKey;
|
import com.sparrowwallet.drongo.ExtendedPublicKey;
|
||||||
import com.craigraw.drongo.KeyDerivation;
|
import com.sparrowwallet.drongo.KeyDerivation;
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.protocol.*;
|
import com.sparrowwallet.drongo.protocol.*;
|
||||||
import org.bouncycastle.util.encoders.Base64;
|
import org.bouncycastle.util.encoders.Base64;
|
||||||
import org.bouncycastle.util.encoders.Hex;
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -14,7 +14,7 @@ import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static com.craigraw.drongo.psbt.PSBTEntry.parseKeyDerivation;
|
import static com.sparrowwallet.drongo.psbt.PSBTEntry.parseKeyDerivation;
|
||||||
|
|
||||||
public class PSBT {
|
public class PSBT {
|
||||||
public static final byte PSBT_GLOBAL_UNSIGNED_TX = 0x00;
|
public static final byte PSBT_GLOBAL_UNSIGNED_TX = 0x00;
|
|
@ -1,7 +1,7 @@
|
||||||
package com.craigraw.drongo.psbt;
|
package com.sparrowwallet.drongo.psbt;
|
||||||
|
|
||||||
import com.craigraw.drongo.KeyDerivation;
|
import com.sparrowwallet.drongo.KeyDerivation;
|
||||||
import com.craigraw.drongo.crypto.ChildNumber;
|
import com.sparrowwallet.drongo.crypto.ChildNumber;
|
||||||
import org.bouncycastle.util.encoders.Hex;
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
|
@ -1,12 +1,11 @@
|
||||||
package com.craigraw.drongo.psbt;
|
package com.sparrowwallet.drongo.psbt;
|
||||||
|
|
||||||
import com.craigraw.drongo.KeyDerivation;
|
import com.sparrowwallet.drongo.KeyDerivation;
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
import com.craigraw.drongo.address.P2PKHAddress;
|
import com.sparrowwallet.drongo.address.P2PKHAddress;
|
||||||
import com.craigraw.drongo.crypto.ECKey;
|
import com.sparrowwallet.drongo.crypto.ECKey;
|
||||||
import com.craigraw.drongo.crypto.LazyECPoint;
|
import com.sparrowwallet.drongo.protocol.*;
|
||||||
import com.craigraw.drongo.protocol.*;
|
|
||||||
import org.bouncycastle.util.encoders.Hex;
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -17,7 +16,7 @@ import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static com.craigraw.drongo.psbt.PSBTEntry.parseKeyDerivation;
|
import static com.sparrowwallet.drongo.psbt.PSBTEntry.parseKeyDerivation;
|
||||||
|
|
||||||
public class PSBTInput {
|
public class PSBTInput {
|
||||||
public static final byte PSBT_IN_NON_WITNESS_UTXO = 0x00;
|
public static final byte PSBT_IN_NON_WITNESS_UTXO = 0x00;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.craigraw.drongo.psbt;
|
package com.sparrowwallet.drongo.psbt;
|
||||||
|
|
||||||
import com.craigraw.drongo.KeyDerivation;
|
import com.sparrowwallet.drongo.KeyDerivation;
|
||||||
import com.craigraw.drongo.crypto.ECKey;
|
import com.sparrowwallet.drongo.crypto.ECKey;
|
||||||
import com.craigraw.drongo.crypto.LazyECPoint;
|
import com.sparrowwallet.drongo.crypto.LazyECPoint;
|
||||||
import com.craigraw.drongo.protocol.Script;
|
import com.sparrowwallet.drongo.protocol.Script;
|
||||||
import org.bouncycastle.util.encoders.Hex;
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.psbt;
|
package com.sparrowwallet.drongo.psbt;
|
||||||
|
|
||||||
public class PSBTParseException extends Exception {
|
public class PSBTParseException extends Exception {
|
||||||
public PSBTParseException() {
|
public PSBTParseException() {
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.rpc;
|
package com.sparrowwallet.drongo.rpc;
|
||||||
|
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
import org.json.simple.parser.JSONParser;
|
import org.json.simple.parser.JSONParser;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo.rpc;
|
package com.sparrowwallet.drongo.rpc;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.craigraw.drongo.rpc;
|
package com.sparrowwallet.drongo.rpc;
|
||||||
|
|
||||||
import org.json.simple.JSONObject;
|
|
||||||
import org.json.simple.parser.JSONParser;
|
import org.json.simple.parser.JSONParser;
|
||||||
import org.json.simple.parser.ParseException;
|
import org.json.simple.parser.ParseException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
|
@ -1,8 +1,8 @@
|
||||||
module com.craigraw.drongo {
|
module com.sparrowwallet.drongo {
|
||||||
requires org.bouncycastle.provider;
|
requires org.bouncycastle.provider;
|
||||||
requires slf4j.api;
|
requires slf4j.api;
|
||||||
exports com.craigraw.drongo;
|
exports com.sparrowwallet.drongo;
|
||||||
exports com.craigraw.drongo.psbt;
|
exports com.sparrowwallet.drongo.psbt;
|
||||||
exports com.craigraw.drongo.protocol;
|
exports com.sparrowwallet.drongo.protocol;
|
||||||
exports com.craigraw.drongo.address;
|
exports com.sparrowwallet.drongo.address;
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.craigraw.drongo;
|
package com.sparrowwallet.drongo;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.craigraw.drongo.protocol;
|
package com.sparrowwallet.drongo.protocol;
|
||||||
|
|
||||||
import com.craigraw.drongo.Utils;
|
import com.sparrowwallet.drongo.Utils;
|
||||||
import com.craigraw.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
import com.craigraw.drongo.address.P2PKHAddress;
|
import com.sparrowwallet.drongo.address.P2PKHAddress;
|
||||||
import com.craigraw.drongo.crypto.ECKey;
|
import com.sparrowwallet.drongo.crypto.ECKey;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.craigraw.drongo.psbt;
|
package com.sparrowwallet.drongo.psbt;
|
||||||
|
|
||||||
import com.craigraw.drongo.protocol.NonStandardScriptException;
|
import com.sparrowwallet.drongo.protocol.NonStandardScriptException;
|
||||||
import com.craigraw.drongo.protocol.Transaction;
|
import com.sparrowwallet.drongo.protocol.Transaction;
|
||||||
import org.bouncycastle.util.encoders.Hex;
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
Loading…
Reference in a new issue