Created
November 19, 2022 06:21
-
-
Save kimsk/c2ea7a18fdc289df13d1d03acef7473e to your computer and use it in GitHub Desktop.
Given synthetic public key and fingerprint, output the synthetic secret key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fp = 3855208971 | |
$synthetic_pk = "93c8a14b74d0cfe62cf451200eb42f3f2fe5c581f5153d308b10c43f40fba9d49a812204e0f970b2f83e23c59eb22e09" | |
$index = chia keys derive -f $fp child-key -t wallet -n 20 | | |
% { $_ -replace "^Wallet public key (\d{1,}): ", "" } | | |
% { cdv inspect keys --synthetic -pk $_ | select -first 1 } | | |
% { $idx =0 } { [pscustomobject]@{ index = $idx; sythetic_public_key = $_.Substring(12, 96)}; $idx++ } | | |
? { $_.sythetic_public_key -eq $synthetic_pk } | | |
% { $_.index } | |
chia keys derive -f $fp child-key -t wallet -i $index -s | | |
select -skip 1 | | |
% { $_ -replace "^Wallet private key (\d{1,}): ", "" } | | |
% { cdv inspect keys --synthetic -sk $_ | select -first 1 } |
Author
kimsk
commented
Nov 19, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment