bitauth / libauth

An ultra-lightweight, zero-dependency TypeScript library for Bitcoin Cash, Bitcoin, and Bitauth applications.
https://libauth.org
MIT License
274 stars 53 forks source link

V2.1.1 - Wordlists changed to v3.0.0 wordlists #141

Open harvmaster opened 1 month ago

harvmaster commented 1 month ago

The JSON mnemonic word lists in LibAuth V2.1 use import someWordList from wordListFile assert { type: 'json' } which was an experimental JS feature. Recent versions of Rollup (which Vite uses) will no longer build with this syntax (causes unexpected token error).

This PR just updates the mnemonic word lists to the word list files used in V3.0.0 and updates the imports in bip39.ts accordingly.

This creates a very large diff (for each of the word files). It might just be easier to run the below commands to copy over on top of what I have in this PR to ensure no changes to the word lists relative to V3.0.0.

cd src/lib/key/word-lists

curl -o bip39.chinese-simplified.ts https://raw.githubusercontent.com/bitauth/libauth/v3.0.0/src/lib/key/word-lists/bip39.chinese-simplified.ts

curl -o bip39.chinese-traditional.ts https://raw.githubusercontent.com/bitauth/libauth/v3.0.0/src/lib/key/word-lists/bip39.chinese-traditional.ts

curl -o bip39.czech.ts https://raw.githubusercontent.com/bitauth/libauth/v3.0.0/src/lib/key/word-lists/bip39.czech.ts

curl -o bip39.english.ts https://raw.githubusercontent.com/bitauth/libauth/v3.0.0/src/lib/key/word-lists/bip39.english.ts

curl -o bip39.french.ts https://raw.githubusercontent.com/bitauth/libauth/v3.0.0/src/lib/key/word-lists/bip39.french.ts

curl -o bip39.italian.ts https://raw.githubusercontent.com/bitauth/libauth/v3.0.0/src/lib/key/word-lists/bip39.italian.ts

curl -o bip39.japanese.ts https://raw.githubusercontent.com/bitauth/libauth/v3.0.0/src/lib/key/word-lists/bip39.japanese.ts

curl -o bip39.korean.ts https://raw.githubusercontent.com/bitauth/libauth/v3.0.0/src/lib/key/word-lists/bip39.korean.ts

curl -o bip39.portuguese.ts https://raw.githubusercontent.com/bitauth/libauth/v3.0.0/src/lib/key/word-lists/bip39.portuguese.ts

curl -o bip39.spanish.ts https://raw.githubusercontent.com/bitauth/libauth/v3.0.0/src/lib/key/word-lists/bip39.spanish.ts
changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: 518d9a31f82cd2c2181f738551e81b8de765320b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

jimtendo commented 1 month ago

On the framework side, the assert { type: 'json' } issue on V2.1 impacts Quasar (which uses Vite and rollup for its build command).