### In web
```html
-<script src="https://unpkg.com/nanocurrency-web@1.4.2" type="text/javascript"></script>
+<script src="https://unpkg.com/nanocurrency-web@1.4.3" type="text/javascript"></script>
<script type="text/javascript">
NanocurrencyWeb.wallet.generate(...);
</script>
static createWallet = (entropy: string, password: string): MnemonicSeed => {
if (entropy) {
if (entropy.length !== 64) {
- throw new Error('Invalid entropy length, must be a 64 byte hexadecimal string')
+ throw new Error('Invalid entropy length, must be a 32 bit hexadecimal string')
}
if (!/^[0-9a-fA-F]+$/i.test(entropy)) {
throw new Error('Entopy is not a valid hexadecimal string')
}
if (!entropy) {
- entropy = this.randomHex(64)
+ entropy = this.randomHex(32)
}
const mnemonic = this.deriveMnemonic(entropy)
static createLegacyWallet = (seed?: string): MnemonicSeed => {
if (seed) {
if (seed.length !== 64) {
- throw new Error('Invalid entropy length, must be a 64 byte hexadecimal string')
+ throw new Error('Invalid entropy length, must be a 32 bit hexadecimal string')
}
if (!/^[0-9a-fA-F]+$/i.test(seed)) {
throw new Error('Entopy is not a valid hexadecimal string')
{
"name": "nanocurrency-web",
- "version": "1.4.2",
+ "version": "1.4.3",
"description": "Toolkit for Nano cryptocurrency client side offline integrations",
"author": "Miro Metsänheimo <miro@metsanheimo.fi>",
"license": "MIT",