Files
prysm/third_party/go-bip39/wordlists/chinese_simplified.go
Preston Van Loon 2302ef918a Vendored github.com/tyler-smith/go-bip39 (#16015)
* Vendor go-bip39 dependency locally to third_party/

The github.com/tyler-smith/go-bip39 repository has been deleted from GitHub 
but is still needed for BIP-39 mnemonic functionality in the validator wallet 
system. This change vendors v1.1.0 of the library into third_party/go-bip39/ 
to ensure continued availability.

Changes:
- Copy go-bip39 v1.1.0 source from Go module cache to third_party/go-bip39/
- Create BUILD.bazel files for main package and wordlists subpackage
- Update 5 BUILD.bazel files to reference local vendored version instead of external dependency
- Remove go-bip39 from go.mod and deps.bzl
- All builds and tests pass successfully

The vendored package includes all 9 language wordlists (English, Chinese Simplified/Traditional, 
Czech, French, Italian, Japanese, Korean, Spanish) and maintains the original import paths for 
compatibility.

* Changelog fraagment

* use go mod replace for vendored lib

* Run gazelle

---------

Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
2025-11-14 17:58:44 +00:00

2072 lines
8.7 KiB
Go

package wordlists
import (
"fmt"
"hash/crc32"
"strings"
)
func init() {
// Ensure word list is correct
// $ wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/chinese_simplified.txt
// $ crc32 chinese_simplified.txt
// e3721bbf
checksum := crc32.ChecksumIEEE([]byte(chineseSimplified))
if fmt.Sprintf("%x", checksum) != "e3721bbf" {
panic("chineseSimplified checksum invalid")
}
}
// ChineseSimplified is a slice of mnemonic words taken from the bip39 specification
// https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/chinese_simplified.txt
var ChineseSimplified = strings.Split(strings.TrimSpace(chineseSimplified), "\n")
var chineseSimplified = `
使
线
西
广
便
穿
绿
沿
怀
湿
访
退
齿
亿
仿
寿
稿
鸿
姿
耀
宿
殿
饿
`