Download the PHP package xiaohuasheng0x1/bip39-php without Composer
On this page you can find all versions of the php package xiaohuasheng0x1/bip39-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xiaohuasheng0x1/bip39-php
More information about xiaohuasheng0x1/bip39-php
Files in xiaohuasheng0x1/bip39-php
Package bip39-php
Short Description BIP39 Mnemonics implementation in PHP
License MIT
Informations about the package bip39-php
BIP39 Mnemonic
Mnemonic BIP39 implementation in PHP
Installation
Prerequisite
- PHP ^8.1
- ext-mbstring (MultiByte string PHP ext. for non-english wordlist)
Composer
composer require xiaohuasheng0x1/bip39-php
Mnemonic Object
This lib will create this Mnemonic object as a result:
Prop | Data | Description |
---|---|---|
entropy | string | Hexadecimal representation of binary Entropy bits |
wordsCount | int | Number of words (12, 15,18, 21 or 24) |
wordsIndex | array | Indexed array (of integers) indexes from wordlist |
words | array | Indexed array of mnemonic codes |
rawBinaryChunks | array | Indexed array of binary bits (1s and 0s) each containing 11 bits according to BIP39 Spec |
Generate Mnemonic Codes (12, 15, 18, 21 or 24 words)
Generate mnemonic of 12, 15, 18, 21 or 24 words using an entropy driven from cryptographically secure pseudo-random bytes.
Generate Mnemonic using specified Entropy
Specify your own entropy to generate mnemonic codes:
Reverse (Mnemonic to Entropy)
Use mnemonic codes to find entropy. By default, lib will cross-check checksum therefore not using valid mnemonic codes will throw an exception.
Generate non-english mnemonic codes
Mnemonic codes may be generated in ALL languages supported in BIP39 spec. This example generates 12 mnemonic codes in Spanish language as an example, and it may be replaced with other any other language with wordlists in BIP39 spec, check here.
Test Vectors
- [29-01-2023]: Test vectors mentioned
in official BIP-0039 specification
are tested and included in package. Execute
tests/test_a.php
to re-run following tests.bip39-php
bip39-php
All versions of bip39-php with dependencies
ext-mbstring Version *