package org.blackbananacoin.common.bitcoin;

import static com.google.common.base.Preconditions.checkNotNull;

public class Bitcoins {

	public static final long COIN = 100000000L;;

	/**
	 * @param addr
	 * @param amount
	 * @return
	 */
	public static String buildUri(String addr, double amount) {
		checkNotNull(addr);
		final StringBuilder uri = new StringBuilder("bitcoin:");
		uri.append(addr);
		uri.append("?amount=").append(String.format("%.8f", amount));
		return uri.toString();
	}
}

@@ -104,16 +104,168 @@
 tNull;%0A%0A
+import java.io.UnsupportedEncodingException;%0Aimport java.math.BigInteger;%0A%0Aimport com.google.bitcoin.core.ECKey;%0Aimport com.google.bitcoin.core.Utils;%0A%0A
 public c
@@ -637,11 +637,233 @@
 ng();%0A%09%7D
+%0A%0A%09public static ECKey createECKeyByDoubleDigestString(String seed)%0A%09%09%09throws UnsupportedEncodingException %7B%0A%09%09ECKey eckey = new ECKey(new BigInteger(1, Utils.doubleDigest(seed%0A%09%09%09%09.getBytes(%22UTF-8%22))));%0A%09%09return eckey;%0A%09%7D
 %0A%7D%0A

create address by double digest