Skip to content

src/crypto/bip39/mnemonic.hpp

Namespaces

Name
sgns
sgns::crypto
sgns::crypto::bip39

Classes

Name
struct sgns::crypto::bip39::Mnemonic

Types

Name
enum class MnemonicError

Functions

Name
OUTCOME_HPP_DECLARE_ERROR_2(sgns::crypto::bip39 , MnemonicError )

Types Documentation

enum MnemonicError

Enumerator Value Description
INVALID_MNEMONIC 1

Functions Documentation

function OUTCOME_HPP_DECLARE_ERROR_2

OUTCOME_HPP_DECLARE_ERROR_2(
    sgns::crypto::bip39 ,
    MnemonicError 
)

Source code

#ifndef SUPERGENIUS_CRYPTO_BIP39_MNEMONIC_HPP
#define SUPERGENIUS_CRYPTO_BIP39_MNEMONIC_HPP

#include <string>
#include <vector>

#include "outcome/outcome.hpp"

namespace sgns::crypto::bip39 {
  enum class MnemonicError {
    INVALID_MNEMONIC = 1,
  };

  struct Mnemonic {
    std::vector<std::string> words;
    std::string password;
    static outcome::result<Mnemonic> parse(std::string_view phrase);
  };
}  // namespace sgns::crypto::bip39

OUTCOME_HPP_DECLARE_ERROR_2(sgns::crypto::bip39, MnemonicError);

#endif  // SUPERGENIUS_CRYPTO_BIP39_MNEMONIC_HPP

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