Skip to content

src/crypto/bip39/bip39_provider.hpp

Namespaces

Name
sgns
sgns::crypto

Classes

Name
class sgns::crypto::Bip39Provider
Interface for creating BIP-39 entropy and seeds from mnemonic wordlists.

Source code

#ifndef SUPERGENIUS_BIP39_PROVIDER_HPP
#define SUPERGENIUS_BIP39_PROVIDER_HPP

#include "crypto/bip39/bip39_types.hpp"

namespace sgns::crypto {

  class Bip39Provider {
   public:
    virtual ~Bip39Provider() = default;

    virtual outcome::result<std::vector<uint8_t>> calculateEntropy(
        const std::vector<std::string> &word_list) = 0;

    virtual outcome::result<bip39::Bip39Seed> makeSeed(
        gsl::span<const uint8_t> entropy, std::string_view password) = 0;
  };

}  // namespace sgns::crypto

#endif

Updated on 2026-03-04 at 13:10:44 -0800