Skip to content

Commit

Permalink
Temp
Browse files Browse the repository at this point in the history
  • Loading branch information
mxaddict committed Apr 19, 2024
1 parent 1d1f275 commit 36a338f
Show file tree
Hide file tree
Showing 4 changed files with 20,601 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/mnemonic/language.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) 2023-2023 The Navcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_MNEMONIC_LANGUAGE_H
#define BITCOIN_MNEMONIC_LANGUAGE_H

namespace mnemonic {

typedef enum class language
{
en,
es,
it,
fr,
cs,
pt,
ja,
ko,
zh_Hans,
zh_Hant,
none
} language;

} // namespace mnemonic

#endif // BITCOIN_MNEMONIC_LANGUAGE_H
9 changes: 9 additions & 0 deletions src/mnemonic/lexicon.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) 2023-2023 The Navcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <mnemonic/lexicon.h>

namespace mnemonic {

} // namespace mnemonic
33 changes: 33 additions & 0 deletions src/mnemonic/lexicon.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (c) 2023-2023 The Navcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_MNEMONIC_LEXICON_H
#define BITCOIN_MNEMONIC_LEXICON_H

#include <array>

#include <mnemonic/language.h>

namespace mnemonic {

template <std::size_t Size>
class lexicon final
{
public:
typedef std::array<const char*, Size> words;

private:
// This dictionary creates only this one word of state.
const language identifier_;

// Arrays of words are declared statically and held by reference here.
// The array type is POD, so no words are copied into the array. Only
// this wrapper dictionary object is created for each word list, for
// each dictionaries object constructed by various mnemonic classes.
const words& words_;
};

} // namespace mnemonic

#endif // BITCOIN_MNEMONIC_LEXICON_H
Loading

0 comments on commit 36a338f

Please sign in to comment.