区块链:由助记词⽣成ETH钱包,BTC钱包
1 ⽣成ETH钱包
好车保
String ed = MnemonicCode();
String edCode = ed;
String ethKeyath = “M/44H/60H/0H/0/0”;
NetworkParameters params =();
String ethAddrss = null;
String keytext = null;
try {
合金是溶液吗ethAddrss = hAddress(edCode, “”, ethKeyath);
keytext = pt3DES(edCode,password);
} catch (Exception e) {
e.printStackTrace();
}
MnemonicToKey.java
public static String ethAddress(String edCode,String passphra,String strKeypath) throws Exception { DeterministicKey key = getDeterministicKey(edCode,passphra,strKeypath);
BigInteger privKey = PrivKey();
// Web3j
幼儿园手指游戏Credentials credentials = String(16));
String address = Address();
String privateKey = String(16);
Address();
}
2 ⽣成BTC钱包
String ed = MnemonicCode();
String edCode = ed;
String btcKeyath = “M/44H/0H/0H/0/0”;
NetworkParameters params =();
String bip44Address = null;
String bip49Address = null;
String keytext = null;
try {
bip44Address = MnemonicToKey.btc44Address(edCode, “”, params, btcKeyath);
母爱名言
bip49Address = MnemonicToKey.btc49Address(edCode, “”, params, btcKeyath);
keytext = pt3DES(edCode, password);
} catch (Exception e) {
e.printStackTrace();
}
数学的拼音
MnemonicToKey.java
public static String btc49Address(String edCode,String passphra,NetworkParameters params,String strKeypath) throws Exception
{
读书说DeterministicKey key = getDeterministicKey(edCode,passphra,strKeypath);
BigInteger privKey = PrivKey();
ECKey ecKey = ECKey.fromPrivate(privKey);
return getAddressAsString(ecKey,params);
}
新育儿>做梦梦见下雪
public static String btc44Address(String edCode,String passphra,NetworkParameters params,String strKeypath) throws Exception { DeterministicKey key = getDeterministicKey(edCode,passphra,strKeypath);
BigInteger privKey = PrivKey();
ECKey ecKey = ECKey.fromPrivate(privKey);
Address address = Address(params);
Ba58();
}