https://github.com/protolambda/bls12-381-hd
BLS12-381 hierarchical key derivation in Go - ERC-2333 & ERC-2334
https://github.com/protolambda/bls12-381-hd
Last synced: 14 days ago
JSON representation
BLS12-381 hierarchical key derivation in Go - ERC-2333 & ERC-2334
- Host: GitHub
- URL: https://github.com/protolambda/bls12-381-hd
- Owner: protolambda
- License: mit
- Created: 2024-02-19T06:50:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-19T08:05:51.000Z (over 1 year ago)
- Last Synced: 2025-03-31T16:59:27.494Z (about 2 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bls12-381-hd
Hierarchical Key Derivation for BLS12-381, implemented in Go.
Following [ERC-2333](https://eips.ethereum.org/EIPS/eip-2333) and [ERC-2334](https://eips.ethereum.org/EIPS/eip-2334).
With no dependencies other than `golang.org/x/crypto`.
Full disclaimer: use this code at your own risk. The code is not audited.
## Usage
```go
package mainimport (
"fmt"hd "github.com/protolambda/bls12-381-hd"
"github.com/tyler-smith/go-bip39"
)func main() {
m := "test test test test test test test test test test test junk"
seed := bip39.NewSeed(m, "")
key, err := hd.SecretKeyFromHD(seed, "m/12381/3600/0/0/0")
if err != nil {
panic(err)
}
fmt.Printf("derived key: %x\n", key[:])
}
```## License
MIT, see [`LICENSE`](./LICENSE) file.