Skip to content

Commit 3f5cfc5

Browse files
authored
cmd/geth: add example for geth bls account generate-proof (#2938)
1 parent df771dc commit 3f5cfc5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cmd/geth/testdata/bls-account-usage-demo.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ ${workspace}/build/bin/geth bls account list --blspassword ./bls-password.txt -
2323

2424
echo "4. import a bls account by passing a keystore file------------------------------------------"
2525
keystoreFile=`ls bls1/bls/keystore`
26-
${workspace}/build/bin/geth bls account import --importedaccountpassword ./bls-password1.txt --blspassword ./bls-password.txt --datadir ./bls ./bls1/bls/keystore/${keystoreFile}
27-
${workspace}/build/bin/geth bls account list --blspassword ./bls-password.txt --datadir ./bls
26+
${workspace}/build/bin/geth bls account import --importedaccountpassword ./bls-password1.txt --blspassword ./bls-password.txt --datadir ./bls ./bls1/bls/keystore/${keystoreFile}
27+
publicKey=`${workspace}/build/bin/geth bls account list --blspassword ./bls-password.txt --datadir ./bls |grep public | tail -1 | awk '{print $NF}'`
28+
29+
echo "5. generate ownership proof for the selected BLS account from the BLS wallet----------------"
30+
${workspace}/build/bin/geth bls account generate-proof --blspassword ./bls-password.txt --datadir ./bls --chain-id 56 0x04d63aBCd2b9b1baa327f2Dda0f873F197ccd186 ${publicKey}
2831

29-
echo "5. clearup----------------------------------------------------------------------------------"
32+
echo "6. clearup----------------------------------------------------------------------------------"
3033
rm -rf bls
3134
rm -rf bls1
3235
rm -rf bls-password.txt

0 commit comments

Comments
 (0)