Skip to content

Commit

Permalink
Add Polish word list (BIP39 style)
Browse files Browse the repository at this point in the history
  • Loading branch information
teghnet committed Mar 27, 2024
1 parent 6346cd1 commit 3519ad9
Show file tree
Hide file tree
Showing 2 changed files with 2,074 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pkg/hdwallet/wl/polish.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package wl

import (
_ "embed"
"fmt"
"hash/crc32"
"strings"
)

func init() {
// Ensure word list is correct
// $ wget -o hdwallet/wl/polish.txt https://raw.githubusercontent.com/p2w34/blog/master/2019-03-25-polish-word-list-bip0039/polish.txt
// $ crc32 hdwallet/wl/polish.txt
// d574dc8c
checksum := crc32.ChecksumIEEE([]byte(polish))
if fmt.Sprintf("%x", checksum) != "d574dc8c" {
panic("polish checksum invalid")
}
}

// Polish is a slice of mnemonic words taken from:
// https://github.com/p2w34/blog/blob/master/2019-03-25-polish-word-list-bip0039/polish-word-list-bip0039.md
var Polish = strings.Split(strings.TrimSpace(polish), "\n")

//go:embed polish.txt
var polish string
Loading

0 comments on commit 3519ad9

Please sign in to comment.