test: eip1581
This commit is contained in:
parent
60f697a03a
commit
02b80a7db8
|
@ -1,7 +1,16 @@
|
|||
import ../../nim_status/lib/account
|
||||
import stew/[results]
|
||||
import secp256k1
|
||||
import eth/keys
|
||||
import byteutils
|
||||
|
||||
let seed = getSeed(Mnemonic "panda eyebrow bullet gorilla call smoke muffin taste mesh discover soft ostrich alcohol speed nation flash devote level hobby quick inner drive ghost inside")
|
||||
|
||||
|
||||
# This derivation path will generate a private key corresponding to wallet i=0
|
||||
assert $(derive(seed, KeyPath "m/44'/60'/0'/0/0").get()) == "ff1e68eb7bf2f48651c47ef0177eb815857322257c5894bb4cfd1176c9989314"
|
||||
|
||||
# This derivation path will generate a status public key
|
||||
let pk = derive(seed, KeyPath "m/43'/60'/1581'/0'/0").get()
|
||||
assert($pk == "38ac4da490b5c48a06d0a2fe7900c56b6639b88f6f71303590f28047411981c2")
|
||||
assert($pk.toPublicKey() == "04ac5a45f2a90052cee10b22b74832f2deb814d58e35aa3f01a249160615a238aef3a34ba86e1817fc8c5a6e93e3c5f159f6c46e922c85d47bafc4b78e07718279")
|
Loading…
Reference in New Issue