Skip to content

sgns::crypto::Bip39Provider

Interface for creating BIP-39 entropy and seeds from mnemonic wordlists.

#include <bip39_provider.hpp>

Inherited by sgns::crypto::Bip39ProviderImpl

Public Functions

Name
virtual ~Bip39Provider() =default
virtual outcome::result< std::vector< uint8_t > > calculateEntropy(const std::vector< std::string > & word_list) =0
Calculates entropy from a mnemonic word list.
virtual outcome::result< bip39::Bip39Seed > makeSeed(gsl::span< const uint8_t > entropy, std::string_view password) =0
Derives a seed from entropy and an optional password.

Public Functions Documentation

function ~Bip39Provider

virtual ~Bip39Provider() =default

function calculateEntropy

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

Calculates entropy from a mnemonic word list.

Parameters:

  • word_list Mnemonic words in order.

Return: Entropy value.

Reimplemented by: sgns::crypto::Bip39ProviderImpl::calculateEntropy

function makeSeed

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

Derives a seed from entropy and an optional password.

Parameters:

  • entropy Entropy bytes.
  • password Optional passphrase used for seed derivation.

Return: Seed bytes.

Reimplemented by: sgns::crypto::Bip39ProviderImpl::makeSeed


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