KeyPair { public static KeyPair fromSecretSeed(char[] seed) { byte[] decoded = StrKey.decodeStellarSecretSeed(seed); KeyPair keypair = fromSecretSeed(decoded); Arrays.fill(decoded, (byte) 0); return keypair; } KeyPair(EdDSAPublicKey publicKey);  KeyPair(EdDSAPublicKey publicKey, EdDSAPrivateKey privateKey); boolean canSign(); static KeyPair fromSecretSeed(char[] seed); static KeyPair fromSecretSeed(String seed); static KeyPair fromSecretSeed(byte[] seed); static KeyPair fromAccountId(String accountId); static KeyPair fromPublicKey(byte[] publicKey); static KeyPair random(); String getAccountId(); char[] getSecretSeed(); byte[] getRawSecretSeed(); byte[] getPublicKey(); SignatureHint getSignatureHint(); PublicKey getXdrPublicKey(); SignerKey getXdrSignerKey(); static KeyPair fromXdrPublicKey(PublicKey key); static KeyPair fromXdrSignerKey(SignerKey key); byte[] sign(byte[] data); DecoratedSignature signDecorated(byte[] data); boolean verify(byte[] data, byte[] signature); @Override boolean equals(Object obj);  }
@Test public void testFromSecretSeed() throws Exception { Map<String, String> keypairs = new HashMap<String, String>(); keypairs.put("SDJHRQF4GCMIIKAAAQ6IHY42X73FQFLHUULAPSKKD4DFDM7UXWWCRHBE", "GCZHXL5HXQX5ABDM26LHYRCQZ5OJFHLOPLZX47WEBP3V2PF5AVFK2A5D"); keypairs.put("SDTQN6XUC3D2Z6TIG3XLUTJIMHOSON2FMSKCTM2OHKKH2UX56RQ7R5Y4", "GDEAOZWTVHQZGGJY6KG4NAGJQ6DXATXAJO3AMW7C4IXLKMPWWB4FDNFZ"); keypairs.put("SDIREFASXYQVEI6RWCQW7F37E6YNXECQJ4SPIOFMMMJRU5CMDQVW32L5", "GD2EVR7DGDLNKWEG366FIKXO2KCUAIE3HBUQP4RNY7LEZR5LDKBYHMM6"); keypairs.put("SDAPE6RHEJ7745VQEKCI2LMYKZB3H6H366I33A42DG7XKV57673XLCC2", "GDLXVH2BTLCLZM53GF7ELZFF4BW4MHH2WXEA4Z5Z3O6DPNZNR44A56UJ"); keypairs.put("SDYZ5IYOML3LTWJ6WIAC2YWORKVO7GJRTPPGGNJQERH72I6ZCQHDAJZN", "GABXJTV7ELEB2TQZKJYEGXBUIG6QODJULKJDI65KZMIZZG2EACJU5EA7"); for (String seed : keypairs.keySet()) { String accountId = keypairs.get(seed); KeyPair keypair = KeyPair.fromSecretSeed(seed); assertEquals(accountId, keypair.getAccountId()); assertEquals(seed, String.valueOf(keypair.getSecretSeed())); } }