### Question:
DeriveXpub { public static byte[] deriveXpub(byte[] xprv) { byte[] xpub = new byte[xprv.length]; byte[] scalar = new byte[xprv.length / 2]; System.arraycopy(xprv, 0, scalar, 0, xprv.length / 2); byte[] buf = Ed25519.scalarMultWithBaseToBytes(scalar); System.arraycopy(buf, 0, xpub, 0, buf.length); System.arraycopy(xprv, xprv.length / 2, xpub, xprv.length / 2, xprv.length / 2); return xpub; }  static byte[] deriveXpub(byte[] xprv);  }### Answer:
@Test public void testDeriveXpub() { String hxprv = "10fdbc41a4d3b8e5a0f50dd3905c1660e7476d4db3dbd9454fa4347500a633531c487e8174ffc0cfa76c3be6833111a9b8cd94446e37a76ee18bb21a7d6ea66b"; byte[] xpub = DeriveXpub.deriveXpub(Hex.decode(hxprv)); System.out.println("hxpub: " + Hex.toHexString(xpub)); }