dart-bitcoin / bip39 Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
bip39.mnemonicToSeed block UI
Hi.
I am wondering when the null-safety will be updated.
plz, update
pointycastle: ^2.0.0
hex: ^0.1.2
Thanks.
mnemonicToSeed freeze UI
Hey!
Project maintenance would be nice. People appreciate your work and are willing to spend some time with your project. But you need to update the pub.dev package as well!
Hey, I am using this library to derive accounts from the deprivation path of m/44'/60'/0'/0/0
which works fine, but when I derive path with m/44'/60'/0'/0/1
it is inconsistent with what we get from metamask or other applications.
I am using this mnemonic company loud estate century olive gun tribe pulse bread play addict amount
0th address if fine which is 0x2Ee331840018465bD7Fe74aA4E442b9EA407fBBE
from 1st address it gives different account then expected, it should give 0x97F5aE30eEdd5C3c531C97E41386618b1831Cb7b
but its giving 0xeeed912ce027042b94ea6288001c27541d2cc59b
You can check accounts with this site https://iancoleman.io/bip39/
I am using this snippet to derive account
final root = bip32.BIP32.fromSeed(HEX.decode(seed));
final child1 = root.derivePath("m/44'/60'/0'/0/1");
final privateKey = HEX.encode(child1.privateKey);
final private = EthPrivateKey.fromHex(privateKey);
final address = await private.extractAddress();```
bip39.generateMnemonic
uses the Random.secure() CSPRNG from the dart:math
library to generate entropy for the mnemonic in _randomBytes
.
Lines 40 to 47 in 3633daa
Here _SIZE_BYTE
is defined as 255 (on line 10). Since the nextInt
method generates integers in the half-open interval [0, max)
for a given upper bound max
, the value 255 will never be generated. This means that the generated entropy will not be uniformly random. This is an issue if the library is used to generate private keys (e.g. using BIP32).
Like BIP32 for example, could you migrate the project with the compatibility with platform web please
var seedBytes = bip39.mnemonicToSeed(bip39.generateMnemonic());
String mnemonic = bip39.seedToMnemonic(seedBytes); // <----- is this possible at all?
pointycastle: ^3.6.0
crypto: ^3.0.2
I am currently facing an issue converting Chinese mnemonics to hex. The returned string does not match the intended result. Everything works fine when attempting on English. Thanks in advance.
String plainText = "成 山 何 阀 臣 愈 梅 握 厂 坑 磷 正 熊 紧 簧";
String seedHex = bip39.mnemonicToSeedHex(plainText);
// result: f9efae87296519949ddecfb4fecf59beec3a1bb71ecfd3452aa653c5d9d9af9cfe017916a000151527b22ee79a86b0a24836b024696534fa2a8c0ca403540533
// intended result:
41656441c5621160d8d67aa48a99818e1bb0ef9668d20f22b6129662e14a7ad8b8ed2125c66516bbb3bc96ce109cd919a69c60c7263c6eafb1fb9032d6749556
How check its unvalid for which substring?
Line 13 in 78b7dee
any harm in bumping this to ^3.0.0 for compatability reasons?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.