-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·36 lines (26 loc) · 1.53 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# First check that Leo is installed.
if ! command -v leo &> /dev/null
then
echo "leo is not installed."
exit
fi
# create 5 shares for secret "77777", with a thresdhold of 3, seed of 8391471947992374 and 5 addresses.
leo run create_shares "77777field" "3u8" "8391471947992374field" "[aleo1gz527q3dt4axqjj2a5zfxattf8djh38dql79tvrn69pja93njc9qxhavjj, aleo1gz527q3dt4axqjj2a5zfxattf8djh38dql79tvrn69pja93njc9qxhavjj, aleo1q8lpp29mtp8hzwlvzqf2qzkweyn0gk92x98ujddztkug32e6cyxqhya349, aleo1q8lpp29mtp8hzwlvzqf2qzkweyn0gk92x98ujddztkug32e6cyxqhya349, aleo1mqdnfnjxnpfdkyzewqsup45sw37g3ssyndxg7nt7hgssm7zx3vxslknm3p]"
# restore the secret (77777) from 3 shares. The number of shares provided is passed as a first argument.
leo run restore_secret_from_n_shares \
"3u8" \
"[ \
{x: 1field, y: 922309144816301324502543109173820703316407336830053895717015341727054907705field }, \
{x: 2field, y: 6845343146619967649889744972728947308153161740629396538520498078005765457140field }, \
{x: 3field, y: 880178506554258127663955713102286751758464541089900272539981297001313248000field }, \
{x: 0field, y: 0field }, \
{x: 0field, y: 0field } \
]"
# leo run restore_secret_from_shares \
# "{x: 1field, \
# y: 922309144816301324502543109173820703316407336830053895717015341727054907705field }" \
# "{x: 2field, \
# y: 6845343146619967649889744972728947308153161740629396538520498078005765457140field }" \
# "{x: 3field, \
# y: 880178506554258127663955713102286751758464541089900272539981297001313248000field }"