Files
zeekay fcb7acd636 decomplect: retire pqcrypto bundle (0x9003) — standalone mldsa/mlkem/slhdsa is the one way
Network reboot, no backward compat: delete the AI-slop pqcrypto bundle + every
gate pinning it (pqcryptoConfig genesis activation, relaunch-safety test pin).
ML-KEM stays via standalone mlkem (0x012201). pqcryptoConfig removed from all
upgrade.json/yaml; 0x9003 retired, never reuse.
2026-06-27 16:08:48 -07:00

46 lines
1.4 KiB
Go

package main
import (
"bufio"
"encoding/hex"
"fmt"
"os"
"strings"
"github.com/luxfi/crypto"
bip32 "github.com/luxfi/go-bip32"
bip39 "github.com/luxfi/go-bip39"
)
func deriveEVM(mnemonic string, coin, i uint32) (string, string) {
seed := bip39.NewSeed(mnemonic, "")
m, err := bip32.NewMasterKey(seed)
if err != nil { return "", "" }
p, _ := m.NewChildKey(bip32.FirstHardenedChild + 44)
c, _ := p.NewChildKey(bip32.FirstHardenedChild + coin)
a, _ := c.NewChildKey(bip32.FirstHardenedChild + 0)
ch, _ := a.NewChildKey(0)
child, err := ch.NewChildKey(i)
if err != nil { return "", "" }
ek, err := crypto.ToECDSA(child.Key)
if err != nil { return "", "" }
return strings.ToLower(crypto.PubkeyToAddress(ek.PublicKey).Hex()), hex.EncodeToString(child.Key)
}
func main() {
funded := map[string]bool{}
f, _ := os.Open("/tmp/funded.txt")
sc := bufio.NewScanner(f)
for sc.Scan() { funded[strings.ToLower(strings.TrimSpace(sc.Text()))] = true }
for _, mn := range []string{"light light light light light light light light light light light energy"} {
for _, coin := range []uint32{60, 9000} {
hits := 0; var first string
for i := uint32(0); i < 200; i++ {
addr, priv := deriveEVM(mn, coin, i)
if funded[addr] { hits++; if first=="" { first=fmt.Sprintf("idx=%d addr=%s priv=%s", i, addr, priv) } }
}
fmt.Printf("coin=%d hits=%d/%d first: %s\n", coin, hits, len(funded), first)
}
}
}