use of com.hedera.services.legacy.core.AccountKeyListObj in project hedera-services by hashgraph.
the class Base64KeyPairGen method main.
public static void main(String... args) throws IOException {
String privateKeyHex = "302e020100300506032b6570042204204cc2d50f9449affc43e851b8d4338f98c50ff5c56cb3c741f3f9b3d075a709fd";
String publicKeyHex = "302a300506032b657003210034171a7d250b6a41cc2355eeb3e36919bace1f848b14341daa4ab4b67c337a00";
String account = "0.0.950";
KeyPairObj tempKeyPair = new KeyPairObj(publicKeyHex, privateKeyHex);
AccountKeyListObj tempAccountKeyListObj = new AccountKeyListObj(HapiPropertySource.asAccount(account), List.of(tempKeyPair));
Map<String, List<AccountKeyListObj>> tempMap = Map.of("START_ACCOUNT", List.of(tempAccountKeyListObj));
ByteArrayOutputStream tempByteAS = new ByteArrayOutputStream();
ObjectOutputStream tempObjS = new ObjectOutputStream(tempByteAS);
tempObjS.writeObject(tempMap);
tempObjS.close();
ByteSink byteSink = Files.asByteSink(new File("NewStartUpAccount.txt"));
byteSink.write(CommonUtils.base64encode(tempByteAS.toByteArray()).getBytes());
}
Aggregations