test_class.file: tx-signer/src/test/java/io/bytom/offline/common/DeriveXpubTest.java
test_class.identifier: DeriveXpubTest
test_case.body: @Test
      public void testDeriveXpub() {
          String hxprv = "10fdbc41a4d3b8e5a0f50dd3905c1660e7476d4db3dbd9454fa4347500a633531c487e8174ffc0cfa76c3be6833111a9b8cd94446e37a76ee18bb21a7d6ea66b";
          byte[] xpub = DeriveXpub.deriveXpub(Hex.decode(hxprv));
          System.out.println("hxpub: " + Hex.toHexString(xpub));
          //expected: d9c7b41f030a398dada343096040c675be48278046623849977cb0fd01d395a51c487e8174ffc0cfa76c3be6833111a9b8cd94446e37a76ee18bb21a7d6ea66b
          //          d9c7b41f030a398dada343096040c675be48278046623849977cb0fd01d395a51c487e8174ffc0cfa76c3be6833111a9b8cd94446e37a76ee18bb21a7d6ea66b
      }
test_case.class_method_signature: DeriveXpubTest.testDeriveXpub()
test_case.full_signature: @Test public void testDeriveXpub()
test_case.identifier: testDeriveXpub
test_case.invocations: deriveXpub decode println toHexString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDeriveXpub()
focal_class.file: tx-signer/src/main/java/io/bytom/offline/common/DeriveXpub.java
focal_class.identifier: DeriveXpub
focal_class.class_method_signature: DeriveXpub.deriveXpub(byte[] xprv)
focal_class.full_signature: public static byte[] deriveXpub(byte[] xprv)
focal_class.identifier: deriveXpub
focal_class.modifiers: public static
focal_class.parameters: (byte[] xprv)
focal_class.return: byte[]
focal_class.signature: byte[] deriveXpub(byte[] xprv)
focal_method.body: 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;
      }
focal_method.class_method_signature: DeriveXpub.deriveXpub(byte[] xprv)
focal_method.full_signature: public static byte[] deriveXpub(byte[] xprv)
focal_method.identifier: deriveXpub
focal_method.invocations: arraycopy scalarMultWithBaseToBytes arraycopy arraycopy
focal_method.modifiers: public static
focal_method.parameters: (byte[] xprv)
focal_method.return: byte[]
focal_method.signature: byte[] deriveXpub(byte[] xprv)