BIP39 Studio
Справочник клиентского API
Браузерный API (window.BIP39Studio) — мнемоника. REST API на https://bip39-generator.com/api/v1/ — seed, деривация и приватные ключи.
Вариант A
При загрузке приложения доступен window.BIP39Studio — только мнемоника (генерация, проверка, entropy). Без seed и приватных ключей.
const m = BIP39Studio.generateMnemonic();
Вариант B
Внутри этого проекта импортируйте чистые функции прямо из модуля @/lib/crypto.
// Browser / UI: mnemonic, addresses, xpub only
import { generateMnemonic, deriveRows, mnemonicToSeed } from "@/lib/crypto";
const m = generateMnemonic(12, "english");
const { seed } = mnemonicToSeed(m);
const rows = deriveRows(seed, networkById("btc-84"), 0, 0, 0, 5);
// rows include private keys in memory — UI does not display them
// Seed & private keys for export: POST https://bip39-generator.com/api/v1/seed, /derive, …Консоль браузера (F12) — только мнемоника:
// Browser console (F12) — mnemonic helpers only const m = BIP39Studio.generateMnemonic(12, "english"); BIP39Studio.validateMnemonic(m); BIP39Studio.mnemonicToEntropy(m);
HTTP API (bip39-generator.com) — seed и приватные ключи:
# Seed and private keys — HTTP API at https://bip39-generator.com
curl -s https://bip39-generator.com/api/v1/seed \
-H "Content-Type: application/json" \
-d '{"mnemonic":"abandon ... about","passphrase":""}'
curl -s https://bip39-generator.com/api/v1/derive \
-H "Content-Type: application/json" \
-d '{
"mnemonic": "abandon abandon ... about",
"network": "btc-84",
"count": 5
}'Базовый URL: https://bip39-generator.com/api/v1/ · эндпоинты ниже. Rate limit: 60/мин на IP.
npm run build && npm run start # API → https://bip39-generator.com/api/v1/
Эндпоинты
GET /api/v1/info POST /api/v1/mnemonic/generate POST /api/v1/mnemonic/validate POST /api/v1/mnemonic/entropy POST /api/v1/mnemonic/from-entropy POST /api/v1/seed POST /api/v1/derive POST /api/v1/account-keys POST /api/v1/keys/random
Сгенерировать мнемонику
curl -s https://bip39-generator.com/api/v1/mnemonic/generate \
-H "Content-Type: application/json" \
-d '{"words":12,"lang":"english"}'BIP39 seed
curl -s https://bip39-generator.com/api/v1/seed \
-H "Content-Type: application/json" \
-d '{"mnemonic":"abandon ... about","passphrase":""}'Деривация адресов + ключи
curl -s https://bip39-generator.com/api/v1/derive \
-H "Content-Type: application/json" \
-d '{
"mnemonic": "abandon abandon ... about",
"network": "btc-84",
"count": 5
}'Случайные ключи
curl -s https://bip39-generator.com/api/v1/keys/random \
-H "Content-Type: application/json" \
-d '{"network":"eth-44","count":3}'Синхронно, в браузере — только мнемоника
versionlanguageswordCountsnetworksgenerateMnemonicvalidateMnemonicmnemonicToEntropyentropyToMnemonicBIP39Studio.version: stringSemantic version of the public API surface.
Пример
BIP39Studio.version
Результат
"1.0.0"
languages(): string[]Ids of every supported BIP39 wordlist language.
Пример
BIP39Studio.languages()
Результат
[ "english", "spanish", "french", "italian", "portuguese", "czech", "japanese", "korean", "chinese_simplified", "chinese_traditional" ]
wordCounts(): number[]Supported mnemonic lengths. More words = more entropy (12 → 128 bits, 24 → 256 bits).
Пример
BIP39Studio.wordCounts()
Результат
[12, 15, 18, 21, 24]
networks(): { id: string; coin: string; symbol: string; label: string }[]Lists every supported network / address standard. Use id as the network option below.
Пример
BIP39Studio.networks()
Результат
[
{
id: "btc-84",
coin: "Bitcoin",
symbol: "BTC",
label: "Native SegWit · bech32 (BIP84)"
},
… 9 more
]generateMnemonic(words = 12, lang = "english"): stringGenerates a fresh random mnemonic using the browser CSPRNG. Unknown word counts fall back to 12, unknown languages to english.
Пример
BIP39Studio.generateMnemonic(12, "english")
Результат
"legal winner thank year wave sausage worth useful legal winner thank yellow"
validateMnemonic(mnemonic, lang = "english"): booleanVerifies the BIP39 checksum and that every word belongs to the given wordlist.
Пример
BIP39Studio.validateMnemonic(m, "english")
Результат
true
mnemonicToEntropy(mnemonic, lang = "english"): string | nullRecovers the underlying entropy as a hex string, or null when the mnemonic is invalid.
Пример
BIP39Studio.mnemonicToEntropy(m)
Результат
"7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f"
entropyToMnemonic(hex, lang = "english"): stringRebuilds a mnemonic from entropy hex. A leading 0x and whitespace are accepted.
Пример
BIP39Studio.entropyToMnemonic("ffffffffffffffffffffffffffffffff")Результат
"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong"
POST на /api/v1/* · rate limit: 60/мин на IP, 15/мин на тяжёлые эндпоинты
POST /api/v1/seedDerives the 64-byte BIP39 seed (PBKDF2-HMAC-SHA512) and returns it as hex. The optional passphrase acts as a 25th word. Server-side only — POST to https://bip39-generator.com.
Пример
curl -s https://bip39-generator.com/api/v1/seed \
-H "Content-Type: application/json" \
-d '{"mnemonic":"abandon ... about","passphrase":""}'Результат
{ "seed": "2e8905819b8723fe2c1d161860e5ee18…" }POST /api/v1/deriveDerives a page of HD addresses and keys (including privateKeyHex and WIF). Defaults: network "btc-84", account 0, change 0, start 0, count 5.
Пример
curl -s https://bip39-generator.com/api/v1/derive \
-H "Content-Type: application/json" \
-d '{
"mnemonic": "abandon abandon ... about",
"network": "btc-84",
"count": 5
}'Результат
{ "addresses": [
{
"index": 0,
"path": "m/84'/0'/0'/0/0",
"address": "bc1q…",
"publicKeyHex": "02…",
"privateKeyHex": "…",
"wif": "L…"
}
] }POST /api/v1/account-keysReturns the account-level extended keys (xpub/xprv). Defaults: network "btc-84", account 0.
Пример
curl -s https://bip39-generator.com/api/v1/account-keys \
-H "Content-Type: application/json" \
-d '{"mnemonic":"abandon ... about","network":"btc-84"}'Результат
{ "keys": {
"accountPath": "m/84'/0'/0'",
"xpub": "zpub6r…",
"xprv": "zprv…"
} }POST /api/v1/keys/randomGenerates standalone random private keys and their addresses. Defaults: network "btc-84", count 1.
Пример
curl -s https://bip39-generator.com/api/v1/keys/random \
-H "Content-Type: application/json" \
-d '{"network":"eth-44","count":3}'Результат
{ "keys": [
{
"index": 0,
"address": "0xAb…",
"publicKeyHex": "02…",
"privateKeyHex": "0x…"
}
] }DerivedRow
interface DerivedRow {
index: number;
path: string; // e.g. "m/84'/0'/0'/0/0"
address: string;
publicKeyHex: string;
privateKeyHex: string; // "0x…" for EVM coins
wif: string | null; // null for ETH / TRON
}AccountKeys
interface AccountKeys {
accountPath: string;
xpub: string;
xprv: string;
xpubLabel: string; // "xpub" | "ypub" | "zpub"
xprvLabel: string; // "xprv" | "yprv" | "zprv"
}Передайте один из этих id в параметр network.
btc-84BTC · Native SegWit · bech32 (BIP84)btc-49BTC · Nested SegWit · P2SH (BIP49)btc-44BTC · Legacy · P2PKH (BIP44)eth-44ETH · Standard · EVM (BIP44)bnb-evmBNB · Standard · EVM (BIP44)matic-evmPOL · Standard · EVM (BIP44)avax-evmAVAX · C-Chain · EVM (BIP44)arb-evmARB · Standard · EVM (BIP44)op-evmOP · Standard · EVM (BIP44)base-evmBASE · Standard · EVM (BIP44)ltc-84LTC · Native SegWit · bech32 (BIP84)ltc-44LTC · Legacy · P2PKH (BIP44)doge-44DOGE · Legacy · P2PKH (BIP44)dash-44DASH · Legacy · P2PKH (BIP44)rvn-44RVN · Legacy · P2PKH (BIP44)trx-44TRX · Standard (BIP44)Id языков словаря, принимаемые в параметре lang.
englishEnglishspanishEspañolfrenchFrançaisitalianItalianoportuguesePortuguêsczechČeštinajapanese日本語korean한국어chinese_simplified简体中文chinese_traditional繁體中文Количество слов
1215182124