///
/// HybridNativeUtilsSpec.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © 2025 Marc Rousavy @ Margelo
///

#pragma once

#if __has_include(<NitroModules/HybridObject.hpp>)
#include <NitroModules/HybridObject.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif

// Forward declaration of `ArrayBuffer` to properly resolve imports.
namespace NitroModules { class ArrayBuffer; }

#include <NitroModules/ArrayBuffer.hpp>
#include <string>

namespace margelo::nitro::metamask_nativeutils {

  using namespace margelo::nitro;

  /**
   * An abstract base class for `NativeUtils`
   * Inherit this class to create instances of `HybridNativeUtilsSpec` in C++.
   * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
   * @example
   * ```cpp
   * class HybridNativeUtils: public HybridNativeUtilsSpec {
   * public:
   *   HybridNativeUtils(...): HybridObject(TAG) { ... }
   *   // ...
   * };
   * ```
   */
  class HybridNativeUtilsSpec: public virtual HybridObject {
    public:
      // Constructor
      explicit HybridNativeUtilsSpec(): HybridObject(TAG) { }

      // Destructor
      ~HybridNativeUtilsSpec() override = default;

    public:
      // Properties
      

    public:
      // Methods
      virtual double multiply(double a, double b) = 0;
      virtual std::shared_ptr<ArrayBuffer> toPublicKey(const std::string& privateKey, bool isCompressed) = 0;
      virtual std::shared_ptr<ArrayBuffer> toPublicKeyFromBytes(const std::shared_ptr<ArrayBuffer>& privateKey, bool isCompressed) = 0;
      virtual std::shared_ptr<ArrayBuffer> getPublicKeyEd25519(const std::string& privateKey) = 0;
      virtual std::shared_ptr<ArrayBuffer> getPublicKeyEd25519FromBytes(const std::shared_ptr<ArrayBuffer>& privateKey) = 0;
      virtual std::shared_ptr<ArrayBuffer> keccak256(const std::string& data) = 0;
      virtual std::shared_ptr<ArrayBuffer> keccak256FromBytes(const std::shared_ptr<ArrayBuffer>& data) = 0;
      virtual std::shared_ptr<ArrayBuffer> pubToAddress(const std::shared_ptr<ArrayBuffer>& pubKey, bool sanitize) = 0;
      virtual std::shared_ptr<ArrayBuffer> hmacSha512(const std::shared_ptr<ArrayBuffer>& key, const std::shared_ptr<ArrayBuffer>& data) = 0;

    protected:
      // Hybrid Setup
      void loadHybridMethods() override;

    protected:
      // Tag for logging
      static constexpr auto TAG = "NativeUtils";
  };

} // namespace margelo::nitro::metamask_nativeutils
