class ExtractPublicKeyFromExtendedPublicKey extends NativeMethod {

    @Override
    public Object execute(Object[] arguments) {
        if (arguments == null) {
            throw new NativeContractIllegalArgumentException(String.format(INVALID_EXTENDED_PUBLIC_KEY, null));
        }
        String xpub = (String) arguments[0];

        NetworkParameters params = helper.validateAndExtractNetworkFromExtendedPublicKey(xpub);
        DeterministicKey key;
        try {
            key = DeterministicKey.deserializeB58(xpub, params);
        } catch (IllegalArgumentException e) {
            throw new NativeContractIllegalArgumentException(String.format(INVALID_EXTENDED_PUBLIC_KEY, xpub), e);
        }

        return key.getPubKeyPoint().getEncoded(true);
    }

    public  ExtractPublicKeyFromExtendedPublicKey(ExecutionEnvironment executionEnvironment, HDWalletUtilsHelper helper);

}