mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-11 17:55:53 +00:00
Complete rename to libdohj
This commit is contained in:
parent
39fe02389b
commit
562ea4f56c
2
pom.xml
2
pom.xml
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.altcoinj</groupId>
|
||||
<groupId>org.libdohj</groupId>
|
||||
<artifactId>libdohj</artifactId>
|
||||
<version>0.14-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import org.altcoinj.core.AltcoinNetworkParameters;
|
||||
import org.libdohj.core.AltcoinNetworkParameters;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@ -28,8 +28,8 @@ import java.math.BigInteger;
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.util.List;
|
||||
|
||||
import org.altcoinj.core.ScryptHash;
|
||||
import static org.altcoinj.core.Utils.scryptDigest;
|
||||
import org.libdohj.core.ScryptHash;
|
||||
import static org.libdohj.core.Utils.scryptDigest;
|
||||
|
||||
import static org.bitcoinj.core.Utils.reverseBytes;
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import org.altcoinj.core.AltcoinNetworkParameters;
|
||||
import org.libdohj.core.AltcoinNetworkParameters;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
24
src/main/java/org/bitcoinj/core/ConvertAddress.java
Normal file
24
src/main/java/org/bitcoinj/core/ConvertAddress.java
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import org.libdohj.params.DogecoinMainNetParams;
|
||||
import org.bitcoinj.params.MainNetParams;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jrn
|
||||
*/
|
||||
public class ConvertAddress {
|
||||
public static void main(final String[] argv) throws AddressFormatException {
|
||||
final NetworkParameters mainParams = MainNetParams.get();
|
||||
final NetworkParameters dogeParams = DogecoinMainNetParams.get();
|
||||
final Address address = Address.fromBase58(mainParams, "1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L");
|
||||
final Address newAddress = new Address(dogeParams, 30, address.getHash160());
|
||||
|
||||
System.out.println(newAddress.toBase58());
|
||||
}
|
||||
}
|
23
src/main/java/org/bitcoinj/core/ConvertPrivateKey.java
Normal file
23
src/main/java/org/bitcoinj/core/ConvertPrivateKey.java
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import org.libdohj.params.DogecoinMainNetParams;
|
||||
import org.bitcoinj.params.MainNetParams;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jrn
|
||||
*/
|
||||
public class ConvertPrivateKey {
|
||||
public static void main(final String[] argv) throws AddressFormatException {
|
||||
final NetworkParameters mainParams = MainNetParams.get();
|
||||
final NetworkParameters dogeParams = DogecoinMainNetParams.get();
|
||||
final DumpedPrivateKey key = new DumpedPrivateKey(mainParams, "5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf");
|
||||
final DumpedPrivateKey newKey = new DumpedPrivateKey(dogeParams, key.getKey().getPrivKeyBytes(), false);
|
||||
System.out.println(newKey.toString());
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.altcoinj.core;
|
||||
package org.libdohj.core;
|
||||
|
||||
import org.bitcoinj.core.Block;
|
||||
import org.bitcoinj.core.Sha256Hash;
|
@ -3,7 +3,7 @@
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.altcoinj.core;
|
||||
package org.libdohj.core;
|
||||
|
||||
import org.bitcoinj.core.AltcoinBlock;
|
||||
import org.bitcoinj.core.BitcoinSerializer;
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.altcoinj.core;
|
||||
package org.libdohj.core;
|
||||
|
||||
import org.bitcoinj.core.Sha256Hash;
|
||||
import org.bitcoinj.core.Sha256Hash;
|
@ -14,7 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.altcoinj.core;
|
||||
package org.libdohj.core;
|
||||
|
||||
import com.lambdaworks.crypto.SCrypt;
|
||||
import java.security.GeneralSecurityException;
|
@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.altcoinj.params;
|
||||
package org.libdohj.params;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.math.BigInteger;
|
||||
import org.bitcoinj.core.AltcoinBlock;
|
||||
|
||||
import org.altcoinj.core.AltcoinNetworkParameters;
|
||||
import org.libdohj.core.AltcoinNetworkParameters;
|
||||
import org.bitcoinj.core.Block;
|
||||
import org.bitcoinj.core.Coin;
|
||||
import static org.bitcoinj.core.Coin.COIN;
|
||||
@ -35,7 +35,7 @@ import org.bitcoinj.utils.MonetaryFormat;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.altcoinj.core.AltcoinSerializer;
|
||||
import org.libdohj.core.AltcoinSerializer;
|
||||
import org.bitcoinj.core.Sha256Hash;
|
||||
import org.bitcoinj.core.StoredBlock;
|
||||
import org.bitcoinj.core.Transaction;
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.altcoinj.params;
|
||||
package org.libdohj.params;
|
||||
|
||||
import org.altcoinj.core.ScryptHash;
|
||||
import org.libdohj.core.ScryptHash;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.altcoinj.params;
|
||||
package org.libdohj.params;
|
||||
|
||||
import org.bitcoinj.core.NetworkParameters;
|
||||
import org.bitcoinj.core.Utils;
|
@ -2,4 +2,4 @@
|
||||
* Network parameters encapsulate some of the differences between different altcoin networks such as the main
|
||||
* network, the testnet, regtest mode, unit testing params and so on.
|
||||
*/
|
||||
package org.altcoinj.params;
|
||||
package org.libdohj.params;
|
@ -2,8 +2,8 @@ package org.bitcoinj.core;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import org.altcoinj.core.AltcoinSerializer;
|
||||
import org.altcoinj.params.DogecoinMainNetParams;
|
||||
import org.libdohj.core.AltcoinSerializer;
|
||||
import org.libdohj.params.DogecoinMainNetParams;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.bitcoinj.core.Util.getBytes;
|
||||
|
@ -5,9 +5,9 @@
|
||||
*/
|
||||
package org.bitcoinj.core;
|
||||
|
||||
import org.altcoinj.core.AltcoinSerializer;
|
||||
import org.libdohj.core.AltcoinSerializer;
|
||||
import java.io.IOException;
|
||||
import org.altcoinj.params.DogecoinMainNetParams;
|
||||
import org.libdohj.params.DogecoinMainNetParams;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
@ -13,8 +13,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.altcoinj.params;
|
||||
package org.libdohj.params;
|
||||
|
||||
import org.libdohj.params.AbstractDogecoinParams;
|
||||
import org.libdohj.params.DogecoinMainNetParams;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import org.junit.Test;
|
||||
|
Loading…
x
Reference in New Issue
Block a user