Skip to content

Instantly share code, notes, and snippets.

View aldoborrero's full-sized avatar

Aldo aldoborrero

View GitHub Profile
@aldoborrero
aldoborrero / main.go
Created September 14, 2023 10:36
hd-wallet-generator
package main
import (
"crypto/rand"
"encoding/hex"
"encoding/json"
"fmt"
"github.com/alecthomas/kong"
"github.com/ethereum/go-ethereum/crypto"
"github.com/pelletier/go-toml"
# Function to ensure a dir exists
ensure_directory_exists() {
local dir="${1}"
if [ ! -d "${dir}" ]; then
mkdir -p "${dir}"
fi
}
# Function to use nix flakes if exists
use_flake_if_nix_installed() {