From 4f44b98f159e3b7b1659cf42c469a9c0b4822170 Mon Sep 17 00:00:00 2001 From: Kent Bull Date: Mon, 13 May 2024 11:28:52 -0600 Subject: [PATCH] test: working multisig join script --- scripts/demo/basic/multisig-join.sh | 104 +++- .../basic/multisig-rotate-three-stooges.sh | 213 ++++++++ scripts/demo/basic/script-utils.sh | 22 + scripts/demo/basic/stooges-join-rotate.sh | 509 ++++++++++++++++++ scripts/demo/data/multisig-join-sample.json | 7 +- scripts/demo/data/multisig-stooge.json | 10 + scripts/demo/data/multisig-three-aids.json | 16 + scripts/demo/data/multisig-three-stooges.json | 12 + scripts/demo/data/multisig-two-stooges.json | 11 + .../stooges-start-with-one-then-join.json | 14 + src/keri/app/cli/commands/multisig/join.py | 4 +- 11 files changed, 896 insertions(+), 26 deletions(-) create mode 100755 scripts/demo/basic/multisig-rotate-three-stooges.sh create mode 100644 scripts/demo/basic/script-utils.sh create mode 100755 scripts/demo/basic/stooges-join-rotate.sh create mode 100644 scripts/demo/data/multisig-stooge.json create mode 100644 scripts/demo/data/multisig-three-aids.json create mode 100644 scripts/demo/data/multisig-three-stooges.json create mode 100644 scripts/demo/data/multisig-two-stooges.json create mode 100644 scripts/demo/data/stooges-start-with-one-then-join.json diff --git a/scripts/demo/basic/multisig-join.sh b/scripts/demo/basic/multisig-join.sh index dc32a4bb3..42e0bdfc5 100755 --- a/scripts/demo/basic/multisig-join.sh +++ b/scripts/demo/basic/multisig-join.sh @@ -4,58 +4,120 @@ # To run the following scripts, open another console window and run: # $ kli witness demo -kli init --name multisigj1 --salt 0ACDEyMzQ1Njc4OWxtbm9aBc --nopasscode --config-dir "${KERI_SCRIPT_DIR}" --config-file demo-witness-oobis -kli incept --name multisigj1 --alias multisigj1 --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-1-sample.json - -kli init --name multisigj2 --salt 0ACDEyMzQ1Njc4OWdoaWpsaw --nopasscode --config-dir "${KERI_SCRIPT_DIR}" --config-file demo-witness-oobis -kli incept --name multisigj2 --alias multisigj2 --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-2-sample.json - -kli oobi resolve --name multisigj1 --oobi-alias multisigj2 --oobi http://127.0.0.1:5642/oobi/EKJ6tNVUGbdaiwx2nWDCFXG-_PY_AzESOcoKlm0kRNP3/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha -kli oobi resolve --name multisigj2 --oobi-alias multisigj1 --oobi http://127.0.0.1:5642/oobi/EFY7MixHb0so4WFFHw6btOPc5qeeWfPm7v5MJWcdcbyG/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha +# EFY7MixHb0so4WFFHw6btOPc5qeeWfPm7v5MJWcdcbyG +MS1=EFY7MixHb0so4WFFHw6btOPc5qeeWfPm7v5MJWcdcbyG +kli init --name multisigj1 --salt 0ACDEyMzQ1Njc4OWxtbm9aBc \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --config-dir "${KERI_SCRIPT_DIR}" --config-file demo-witness-oobis +kli incept --name multisigj1 --alias multisigj1 \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-1-sample.json + +# EKJ6tNVUGbdaiwx2nWDCFXG-_PY_AzESOcoKlm0kRNP3 +MS2=EKJ6tNVUGbdaiwx2nWDCFXG-_PY_AzESOcoKlm0kRNP3 +kli init --name multisigj2 --salt 0ACDEyMzQ1Njc4OWdoaWpsaw \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --config-dir "${KERI_SCRIPT_DIR}" --config-file demo-witness-oobis +kli incept --name multisigj2 --alias multisigj2 \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-2-sample.json + +# EKxxKVNmC3M_u3eDF6Nw6MjRlRx1s_9Y-DV234UtkqAF +MS3=EKxxKVNmC3M_u3eDF6Nw6MjRlRx1s_9Y-DV234UtkqAF +kli init --name multisigj3 --salt 0ADR4R9kW_3ZvbwWGnA5YVah \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --config-dir "${KERI_SCRIPT_DIR}" --config-file demo-witness-oobis +kli incept --name multisigj3 --alias multisigj3\ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-3-sample.json + +kli oobi resolve --name multisigj1 --oobi-alias multisigj2 \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$MS2/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha +kli oobi resolve --name multisigj1 --oobi-alias multisigj3 \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$MS3/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha +kli oobi resolve --name multisigj2 --oobi-alias multisigj1 \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$MS1/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha +kli oobi resolve --name multisigj2 --oobi-alias multisigj3 \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$MS3/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha +kli oobi resolve --name multisigj3 --oobi-alias multisigj2 \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$MS2/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha +kli oobi resolve --name multisigj3 --oobi-alias multisigj1 \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$MS1/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha PID_LIST="" -kli multisig incept --name multisigj1 --alias multisigj1 --group multisig --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-join-sample.json & +kli multisig incept --name multisigj1 --alias multisigj1 --group multisig \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-join-sample.json & +pid=$! +PID_LIST+=" $pid" + +kli multisig join --name multisigj2 --passcode "DoB26Fj4x9LboAFWJra17O" --auto & pid=$! PID_LIST+=" $pid" -kli multisig join --name multisigj2 --auto & +kli multisig join --name multisigj3 --passcode "DoB26Fj4x9LboAFWJra17O" --auto & pid=$! PID_LIST+=" $pid" wait $PID_LIST -kli status --name multisigj1 --alias multisig +kli status --name multisigj1 --alias multisig --passcode "DoB26Fj4x9LboAFWJra17O" + +kli rotate --name multisigj1 --alias multisigj1 --passcode "DoB26Fj4x9LboAFWJra17O" +kli rotate --name multisigj2 --alias multisigj2 --passcode "DoB26Fj4x9LboAFWJra17O" +kli rotate --name multisigj3 --alias multisigj3 --passcode "DoB26Fj4x9LboAFWJra17O" -kli rotate --name multisigj1 --alias multisigj1 -kli query --name multisigj2 --alias multisigj2 --prefix EFY7MixHb0so4WFFHw6btOPc5qeeWfPm7v5MJWcdcbyG -kli rotate --name multisigj2 --alias multisigj2 -kli query --name multisigj1 --alias multisigj1 --prefix EKJ6tNVUGbdaiwx2nWDCFXG-_PY_AzESOcoKlm0kRNP3 +kli query --name multisigj1 --alias multisigj1 --prefix $MS2 --passcode "DoB26Fj4x9LboAFWJra17O" +kli query --name multisigj1 --alias multisigj1 --prefix $MS3 --passcode "DoB26Fj4x9LboAFWJra17O" +kli query --name multisigj2 --alias multisigj2 --prefix $MS1 --passcode "DoB26Fj4x9LboAFWJra17O" +kli query --name multisigj2 --alias multisigj2 --prefix $MS3 --passcode "DoB26Fj4x9LboAFWJra17O" +kli query --name multisigj3 --alias multisigj3 --prefix $MS1 --passcode "DoB26Fj4x9LboAFWJra17O" +kli query --name multisigj3 --alias multisigj3 --prefix $MS2 --passcode "DoB26Fj4x9LboAFWJra17O" PID_LIST="" -kli multisig rotate --name multisigj1 --alias multisig --smids EKJ6tNVUGbdaiwx2nWDCFXG-_PY_AzESOcoKlm0kRNP3 --smids EFY7MixHb0so4WFFHw6btOPc5qeeWfPm7v5MJWcdcbyG --isith '["1/2", "1/2"]' --nsith '["1/2", "1/2"]' --rmids EKJ6tNVUGbdaiwx2nWDCFXG-_PY_AzESOcoKlm0kRNP3 --rmids EFY7MixHb0so4WFFHw6btOPc5qeeWfPm7v5MJWcdcbyG & +kli multisig rotate --name multisigj1 --alias multisig \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --smids $MS2 --smids $MS1 --smids $MS3 \ + --isith '["1/2", "1/2", "1/2"]' \ + --nsith '["1/2", "1/2", "1/2"]' \ + --rmids $MS2 --rmids $MS1 --rmids $MS3 & pid=$! PID_LIST+=" $pid" -kli multisig join --name multisigj2 --auto & +kli multisig join --name multisigj2 --passcode "DoB26Fj4x9LboAFWJra17O" --auto & +pid=$! +PID_LIST+=" $pid" + +kli multisig join --name multisigj3 --passcode "DoB26Fj4x9LboAFWJra17O" --auto & pid=$! PID_LIST+=" $pid" wait $PID_LIST -kli status --name multisigj1 --alias multisig +kli status --name multisigj1 --alias multisig --passcode "DoB26Fj4x9LboAFWJra17O" PID_LIST="" -kli multisig interact --name multisigj1 --alias multisig --data '{"d": "potato"}' & +kli multisig interact --name multisigj1 --alias multisig --passcode "DoB26Fj4x9LboAFWJra17O" --data '{"d": "potato"}' & +pid=$! +PID_LIST+=" $pid" + +kli multisig join --name multisigj2 --passcode "DoB26Fj4x9LboAFWJra17O" --auto & pid=$! PID_LIST+=" $pid" -kli multisig join --name multisigj2 --auto & +kli multisig join --name multisigj3 --passcode "DoB26Fj4x9LboAFWJra17O" --auto & pid=$! PID_LIST+=" $pid" wait $PID_LIST -kli status --name multisigj1 --alias multisig +kli status --name multisigj1 --alias multisig --passcode "DoB26Fj4x9LboAFWJra17O" diff --git a/scripts/demo/basic/multisig-rotate-three-stooges.sh b/scripts/demo/basic/multisig-rotate-three-stooges.sh new file mode 100755 index 000000000..7d2dbb931 --- /dev/null +++ b/scripts/demo/basic/multisig-rotate-three-stooges.sh @@ -0,0 +1,213 @@ +#!/bin/bash +# three stooges + +source ${KERI_SCRIPT_DIR}/demo/basic/script-utils.sh + +# WITNESSES +# To run the following scripts, open another console window and run: +# $ kli witness demo + +print_yellow "Multisig rotation with three AIDs" +echo + +kli init --name larry \ + --salt 0ACDEyMzQ1Njc4OWxtbm9aBc \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --config-dir "${KERI_SCRIPT_DIR}" \ + --config-file demo-witness-oobis +# Prefix EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U +kli incept --name larry --alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-1-sample.json + +kli init --name moe \ + --salt 0ACDEyMzQ1Njc4OWdoaWpsaw \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --config-dir "${KERI_SCRIPT_DIR}" \ + --config-file demo-witness-oobis +# Prefix ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW +kli incept --name moe --alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-2-sample.json + +kli init --name curly \ + --salt 0ACDEyMzQ1Njc4OWdoaWpsaw \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --config-dir "${KERI_SCRIPT_DIR}" \ + --config-file demo-witness-oobis +# Prefix EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu +kli incept --name curly --alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-3-sample.json + +# OOBI resolution does the initial discovery of key state +echo +print_yellow "Resolve OOBIs" +kli oobi resolve --name larry --oobi-alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha +kli oobi resolve --name larry --oobi-alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha + +kli oobi resolve --name moe --oobi-alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha +kli oobi resolve --name moe --oobi-alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha + +kli oobi resolve --name curly --oobi-alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha +kli oobi resolve --name curly --oobi-alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha + +# Multisig Inception +echo +print_yellow "Multisig Inception" +# Follow commands run in parallel +kli multisig incept --name larry --alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --group multisig \ + --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-three-aids.json & +pid=$! +PID_LIST+=" $pid" +kli multisig incept --name moe --alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --group multisig \ + --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-three-aids.json & +pid=$! +PID_LIST+=" $pid" +kli multisig incept --name curly --alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --group multisig \ + --file ${KERI_DEMO_SCRIPT_DIR}/data/multisig-three-aids.json & +pid=$! +PID_LIST+=" $pid" + +echo +print_yellow "Multisig Inception - wait" +wait $PID_LIST + +echo +print_green "Multisig Inception - status" +kli status --name larry --alias multisig --passcode "DoB26Fj4x9LboAFWJra17O" + +# Rotate keys for each multisig - required before rotating the multisig +echo +print_yellow "Rotate keys for each multisig" +kli rotate --name larry --alias larry --passcode "DoB26Fj4x9LboAFWJra17O" +kli rotate --name moe --alias moe --passcode "DoB26Fj4x9LboAFWJra17O" +kli rotate --name curly --alias curly --passcode "DoB26Fj4x9LboAFWJra17O" + +# Pull key state in from other multisig group participant identifiers so they have the next digest +echo +print_yellow "Pull key state in from other multisig group participant identifiers" +# 2 about 1 +kli query --name moe --alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U +# 2 about 3 +kli query --name moe --alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu +# 1 about 2 +kli query --name larry --alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW +# 1 about 3 +kli query --name larry --alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu +# 3 about 1 +kli query --name curly --alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U +# 3 about 2 +kli query --name curly --alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW + + +echo +print_yellow "Multisig rotation" + +PID_LIST="" + +kli multisig rotate --name larry --alias multisig \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --isith '["1/3", "1/3", "1/3"]' \ + --smids EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U \ + --smids ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW \ + --smids EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu \ + --nsith '["1/2", "1/2", "1/2"]' \ + --rmids EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U \ + --rmids ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW \ + --rmids EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu & +pid=$! +PID_LIST+=" $pid" +kli multisig rotate --name moe --alias multisig \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --isith '["1/3", "1/3", "1/3"]' \ + --smids EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U \ + --smids ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW \ + --smids EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu \ + --nsith '["1/2", "1/2", "1/2"]' \ + --rmids EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U \ + --rmids ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW \ + --rmids EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu & +pid=$! +PID_LIST+=" $pid" +kli multisig rotate --name curly --alias multisig \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --isith '["1/3", "1/3", "1/3"]' \ + --smids EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U \ + --smids ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW \ + --smids EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu \ + --nsith '["1/2", "1/2", "1/2"]' \ + --rmids EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U \ + --rmids ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW \ + --rmids EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu & +pid=$! +PID_LIST+=" $pid" + +echo +print_yellow "Multisig rotation - wait" +wait $PID_LIST + +echo +print_green "Multisig rotation - status" +kli status --name larry --alias multisig --passcode "DoB26Fj4x9LboAFWJra17O" + +echo +print_yellow "Multisig interact" + +PID_LIST="" + +kli multisig interact --name larry --alias multisig \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --data "{\"tagline\":\"three lost souls\"}" & +pid=$! +PID_LIST+=" $pid" +kli multisig interact --name moe --alias multisig \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --data "{\"tagline\":\"three lost souls\"}" & +pid=$! +PID_LIST+=" $pid" +kli multisig interact --name curly --alias multisig \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --data "{\"tagline\":\"three lost souls\"}" & +pid=$! +PID_LIST+=" $pid" + +echo +print_yellow "Multisig interact - wait" +wait $PID_LIST + +echo +print_green "Multisig interact - status" +kli status --name larry --alias multisig --passcode "DoB26Fj4x9LboAFWJra17O" +print_lcyan "Multisig rotate three stooges - done." + diff --git a/scripts/demo/basic/script-utils.sh b/scripts/demo/basic/script-utils.sh new file mode 100644 index 000000000..f0585afdc --- /dev/null +++ b/scripts/demo/basic/script-utils.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Utility functions +print_green() { + text=$1 + printf "\e[32m${text}\e[0m\n" +} + +print_yellow(){ + text=$1 + printf "\e[33m${text}\e[0m\n" +} + +print_red() { + text=$1 + printf "\e[31m${text}\e[0m\n" +} + +print_lcyan() { + text=$1 + printf "\e[96m${text}\e[0m\n" +} \ No newline at end of file diff --git a/scripts/demo/basic/stooges-join-rotate.sh b/scripts/demo/basic/stooges-join-rotate.sh new file mode 100755 index 000000000..c990ab6e3 --- /dev/null +++ b/scripts/demo/basic/stooges-join-rotate.sh @@ -0,0 +1,509 @@ +#!/bin/bash +# three stooges join a multisig rotate + +source "${KERI_SCRIPT_DIR}"/demo/basic/script-utils.sh + +# WITNESSES +# To run the following scripts, open another console window and run: +# $ kli witness demo + +# create keystores and AIDs for larry, moe, and curly +LARRY=EKZYoeLcSpoBn7DdD0Rugk3xGy6in8zJvhJpMhZ23ETe +MOE=EJ__4LOcMfGRU0V65ywo9GgczMkqTZtgjmCKWU06MDQR +CURLY=EItXS2M_iaQvYRex9swUaCWLETsxFdQbQD0XZmbukKOV + +members_incept() { + INCEPT_CONFIG_FILE=$1 + echo + print_yellow "Individual AID creation with file: ${INCEPT_CONFIG_FILE}" + # Larry Prefix EKZYoeLcSpoBn7DdD0Rugk3xGy6in8zJvhJpMhZ23ETe + kli init --name larry \ + --salt 0ACDEyMzQ1Njc4OWxtbm9aBc \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --config-dir "${KERI_SCRIPT_DIR}" \ + --config-file demo-witness-oobis + kli incept --name larry --alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file "$INCEPT_CONFIG_FILE" + + # Moe Prefix EJ__4LOcMfGRU0V65ywo9GgczMkqTZtgjmCKWU06MDQR + kli init --name moe \ + --salt 0ACDEyMzQ1Njc4OWdoaWpsaw \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --config-dir "${KERI_SCRIPT_DIR}" \ + --config-file demo-witness-oobis + kli incept --name moe --alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file "$INCEPT_CONFIG_FILE" + + # Curly Prefix EItXS2M_iaQvYRex9swUaCWLETsxFdQbQD0XZmbukKOV + kli init --name curly \ + --salt 0ACDEyMzQ1Njc4OWdoaWpsaw \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --config-dir "${KERI_SCRIPT_DIR}" \ + --config-file demo-witness-oobis + kli incept --name curly --alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file "$INCEPT_CONFIG_FILE" + echo +} + +# OOBI resolution does the initial discovery of key state +members_oobi_resolve() { + echo + print_yellow "Resolve OOBIs" + kli oobi resolve --name larry --oobi-alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$MOE/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha + kli oobi resolve --name larry --oobi-alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$CURLY/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha + + kli oobi resolve --name moe --oobi-alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$LARRY/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha + kli oobi resolve --name moe --oobi-alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$CURLY/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha + + kli oobi resolve --name curly --oobi-alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$LARRY/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha + kli oobi resolve --name curly --oobi-alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --oobi http://127.0.0.1:5642/oobi/$MOE/witness/BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha + echo +} + +# Multisig Inception +multisig_incept() { + MULTISIG_ALIAS=${1:-"default alias"} + MULTISIG_ICP_CONFIG_FILE=$2 + echo + print_yellow "Multisig Inception for alias: ${MULTISIG_ALIAS}" + print_yellow "Multisig Inception with file: ${MULTISIG_ICP_CONFIG_FILE}" + # Follow commands run in parallel + kli multisig incept --name larry --alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --group "${MULTISIG_ALIAS}" \ + --file "${MULTISIG_ICP_CONFIG_FILE}" & + pid=$! + PID_LIST+=" $pid" + kli multisig incept --name moe --alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --group "${MULTISIG_ALIAS}" \ + --file "${MULTISIG_ICP_CONFIG_FILE}" & + pid=$! + PID_LIST+=" $pid" + kli multisig incept --name curly --alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --group "${MULTISIG_ALIAS}" \ + --file "${MULTISIG_ICP_CONFIG_FILE}" & + pid=$! + PID_LIST+=" $pid" + + echo + print_yellow "Multisig Inception - wait" + echo + wait $PID_LIST +} + +multisig_incept_join() { + MULTISIG_ALIAS=${1:-"default alias"} + MULTISIG_ICP_CONFIG_FILE=$2 + echo + print_yellow "Multisig Inception with join for alias: ${MULTISIG_ALIAS}" + print_yellow "Multisig Inception with file: ${MULTISIG_ICP_CONFIG_FILE}" + kli multisig incept --name larry --alias larry --group "$MULTISIG_ALIAS" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file "${MULTISIG_ICP_CONFIG_FILE}" & + + pid=$! + PID_LIST+=" $pid" + + kli multisig join --name moe --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + kli multisig join --name curly --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + + echo + print_yellow "Multisig Inception with join - wait" + wait $PID_LIST + echo +} + +multisig_incept_join_two() { + MULTISIG_ALIAS=${1:-"default alias"} + MULTISIG_ICP_CONFIG_FILE=$2 + echo + print_yellow "Multisig Inception with join for alias: ${MULTISIG_ALIAS}" + print_yellow "Multisig Inception with file: ${MULTISIG_ICP_CONFIG_FILE}" + kli multisig incept --name larry --alias larry --group "$MULTISIG_ALIAS" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --file "${MULTISIG_ICP_CONFIG_FILE}" & + + pid=$! + PID_LIST+=" $pid" + + kli multisig join --name moe --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + + echo + print_yellow "Multisig Inception with join - wait" + wait $PID_LIST + echo +} + +# Multisig Inception - status +multisig_status() { + KEYSTORE=$1 + MULTISIG_ALIAS=$2 + echo + print_green "Multisig status for ${KEYSTORE} on alias: ${MULTISIG_ALIAS}" + kli status --name "${KEYSTORE}" --alias "${MULTISIG_ALIAS}" --passcode "DoB26Fj4x9LboAFWJra17O" + echo +} + +# Rotate keys for each multisig - required before rotating the multisig +rotate_individual_keys() { + echo + print_yellow "Rotate keys for each multisig" + kli rotate --name larry --alias larry --passcode "DoB26Fj4x9LboAFWJra17O" + kli rotate --name moe --alias moe --passcode "DoB26Fj4x9LboAFWJra17O" + kli rotate --name curly --alias curly --passcode "DoB26Fj4x9LboAFWJra17O" + echo +} + +# Pull key state in from other multisig group participant identifiers so they have the next digest +query_individual_keystate() { + echo + print_yellow "Pull key state in from other multisig group participant identifiers" + # 1 about 2 + print_yellow "Larry queries Moe" + kli query --name larry --alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix $MOE + # 1 about 3 + print_yellow "Larry queries Curly" + kli query --name larry --alias larry \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix $CURLY + # 2 about 1 + print_yellow "Moe queries Larry" + kli query --name moe --alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix $LARRY + # 2 about 3 + print_yellow "Moe queries Curly" + kli query --name moe --alias moe \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix $CURLY + # 3 about 1 + print_yellow "Curly queries Larry" + kli query --name curly --alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix $LARRY + # 3 about 2 + print_yellow "Curly queries Moe" + kli query --name curly --alias curly \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --prefix $MOE + echo +} + +# Does a multisig rotate where all members prepare the same rotation event +multisig_rotate_three() { + MULTISIG_ALIAS=${1:-"default alias"} + echo + print_yellow "Multisig rotation with alias: ${MULTISIG_ALIAS}" + + PID_LIST="" + + kli multisig rotate --name larry --alias "${MULTISIG_ALIAS}" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --isith '["1/3", "1/3", "1/3"]' \ + --smids $LARRY \ + --smids $MOE \ + --smids $CURLY \ + --nsith '["1/3", "1/3", "1/3"]' \ + --rmids $LARRY \ + --rmids $MOE \ + --rmids $CURLY & + pid=$! + PID_LIST+=" $pid" + kli multisig rotate --name moe --alias "${MULTISIG_ALIAS}" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --isith '["1/3", "1/3", "1/3"]' \ + --smids $LARRY \ + --smids $MOE \ + --smids $CURLY \ + --nsith '["1/3", "1/3", "1/3"]' \ + --rmids $LARRY \ + --rmids $MOE \ + --rmids $CURLY & + pid=$! + PID_LIST+=" $pid" + kli multisig rotate --name curly --alias "${MULTISIG_ALIAS}" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --isith '["1/3", "1/3", "1/3"]' \ + --smids $LARRY \ + --smids $MOE \ + --smids $CURLY \ + --nsith '["1/3", "1/3", "1/3"]' \ + --rmids $LARRY \ + --rmids $MOE \ + --rmids $CURLY & + pid=$! + PID_LIST+=" $pid" + + echo + print_yellow "Multisig rotation ${ALIAS} - wait" + wait $PID_LIST +} + +# Does a multisig rotate where one member prepares the rotation event and sends it to the others +# to which they respond through multisig join +multisig_rotate_join_three() { + MULTISIG_ALIAS=${1:-"default alias"} + echo + print_yellow "Multisig rotation" + + PID_LIST="" + + kli multisig rotate --name larry --alias "${MULTISIG_ALIAS}" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --smids $LARRY \ + --smids $MOE \ + --smids $CURLY \ + --isith '["1/3", "1/3", "1/3"]' \ + --rmids $LARRY \ + --rmids $MOE \ + --rmids $CURLY \ + --nsith '["1/3", "1/3", "1/3"]' & + pid=$! + PID_LIST+=" $pid" + + kli multisig join --name moe --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + + kli multisig join --name curly --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + + echo + print_yellow "Multisig rotation - wait" + wait $PID_LIST +} + +multisig_rotate_join_two() { + MULTISIG_ALIAS=${1:-"default alias"} + echo + print_yellow "Multisig rotation" + + PID_LIST="" + + kli multisig rotate --name larry --alias "${MULTISIG_ALIAS}" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --smids $LARRY \ + --smids $MOE \ + --isith '["1/2", "1/2"]' \ + --rmids $LARRY \ + --rmids $MOE \ + --rmids $CURLY \ + --nsith '["1/3", "1/3", "1/3"]' & +# --nsith '["1/2", "1/2"]' & + pid=$! + PID_LIST+=" $pid" + + kli multisig join --name moe --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + + kli multisig join --name curly --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + + echo + print_yellow "Multisig rotation - wait" + wait $PID_LIST +} + +multisig_interact() { + MULTISIG_ALIAS=${1:-"default alias"} + data=$2 + echo + print_yellow "Multisig interact" + + PID_LIST="" + + kli multisig interact --name larry --alias "${MULTISIG_ALIAS}" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --data "$data" & + pid=$! + PID_LIST+=" $pid" + kli multisig interact --name moe --alias "${MULTISIG_ALIAS}" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --data "$data" & + pid=$! + PID_LIST+=" $pid" + kli multisig interact --name curly --alias "${MULTISIG_ALIAS}" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --data "$data" & + pid=$! + PID_LIST+=" $pid" + + echo + print_yellow "Multisig interact - wait" + wait $PID_LIST + +} + +multisig_interact_join() { + MULTISIG_ALIAS=${1:-"default alias"} + DATA=$2 + echo + print_yellow "Multisig interact with join" + + PID_LIST="" + + kli multisig interact --name larry --alias "${MULTISIG_ALIAS}" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --data "${DATA}" & + pid=$! + PID_LIST+=" $pid" + + kli multisig join --name moe --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + + kli multisig join --name curly --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + + echo + print_yellow "Multisig interact with join - waiting on group" + wait $PID_LIST +} + +rotate_larry_out() { + MULTISIG_ALIAS=${1:-"default alias"} + echo + print_yellow "Multisig Rotate - Larry out - alias: ${MULTISIG_ALIAS}" + + PID_LIST="" + + kli multisig rotate --name larry --alias "${MULTISIG_ALIAS}" \ + --passcode "DoB26Fj4x9LboAFWJra17O" \ + --smids $LARRY \ + --smids $MOE \ + --smids $CURLY \ + --isith '["1/3", "1/3", "1/3"]' \ + --rmids $MOE \ + --rmids $CURLY \ + --nsith '["1/2", "1/2"]' & +# kli multisig rotate --name moe --alias "${MULTISIG_ALIAS}" \ +# --passcode "DoB26Fj4x9LboAFWJra17O" \ +# --smids $MOE \ +# --smids $CURLY \ +# --isith '["1/2", "1/2"]' \ +# --rmids $MOE \ +# --rmids $CURLY \ +# --rmids $LARRY \ +# --nsith '["1/3", "1/3", "1/3"]' & + pid=$! + PID_LIST+=" $pid" + + kli multisig join --name moe --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + + kli multisig join --name curly --passcode "DoB26Fj4x9LboAFWJra17O" --auto & + pid=$! + PID_LIST+=" $pid" + + echo + print_yellow "Multisig rotation - Larry out - alias: ${MULTISIG_ALIAS} - wait" + wait $PID_LIST +} + +main_three_stooges() { + print_yellow "Multisig rotation via join with three AIDs, one to start, two join later" + MULTISIG_ALIAS="multisig" + # Setup members + members_incept "${KERI_DEMO_SCRIPT_DIR}/data/multisig-stooge.json" + members_oobi_resolve + + # Setup multisig + # multisig_incept "${MULTISIG_ALIAS}" "${KERI_DEMO_SCRIPT_DIR}/data/multisig-three-stooges.json" + multisig_incept_join "${MULTISIG_ALIAS}" "${KERI_DEMO_SCRIPT_DIR}/data/multisig-three-stooges.json" + multisig_status larry "${MULTISIG_ALIAS}" + + # Prepare individual AIDs for multisig rotation + rotate_individual_keys + query_individual_keystate + + # Rotate Multisig with join + # multisig_rotate "${MULTISIG_ALIAS}" + multisig_rotate_join_three "${MULTISIG_ALIAS}" + multisig_status larry "${MULTISIG_ALIAS}" + + # Interact with multisig + # multisig_interact "${MULTISIG_ALIAS}" "{\"tagline\":\"three lost souls\"}" + multisig_interact_join "${MULTISIG_ALIAS}" "{\"tagline\":\"three lost souls\"}" + multisig_status larry "${MULTISIG_ALIAS}" + + # rotate individual keys again, query key state, prep for rotation + rotate_individual_keys + query_individual_keystate + + multisig_status larry "${MULTISIG_ALIAS}" + + print_green "Ready for citadel rotation" + print_lcyan "Multisig rotate three stooges - done." +} + +main_two_stooges_rotate_in_and_out() { + print_yellow "Multisig rotation via join with three AIDs, two to start, one joins later" + MULTISIG_ALIAS="multisig" + # Setup members + members_incept "${KERI_DEMO_SCRIPT_DIR}/data/multisig-stooge.json" + members_oobi_resolve + + # Setup multisig + multisig_incept_join_two \ + "${MULTISIG_ALIAS}" \ + "${KERI_DEMO_SCRIPT_DIR}/data/multisig-two-stooges.json" + multisig_status larry "${MULTISIG_ALIAS}" + + # Prepare individual AIDs for multisig rotation + rotate_individual_keys + query_individual_keystate + + print_green "Exiting early" + exit 0 + + # Rotate Multisig with join + multisig_rotate_join_two "${MULTISIG_ALIAS}" + multisig_status larry "${MULTISIG_ALIAS}" + + # Interact with multisig +# multisig_interact_join "${MULTISIG_ALIAS}" "{\"tagline\":\"three lost souls\"}" +# multisig_status larry "${MULTISIG_ALIAS}" + +# rotate individual keys again, query keystate, prep for rotation + rotate_individual_keys + query_individual_keystate + + rotate_larry_out ${MULTISIG_ALIAS} + multisig_status larry "${MULTISIG_ALIAS}" + multisig_status moe "test alias" + + print_green "Ready for citadel rotation" + print_lcyan "Multisig rotate three stooges - done." +} +#main_three_stooges +main_two_stooges_rotate_in_and_out \ No newline at end of file diff --git a/scripts/demo/data/multisig-join-sample.json b/scripts/demo/data/multisig-join-sample.json index 1e9201cf4..576d61e6d 100644 --- a/scripts/demo/data/multisig-join-sample.json +++ b/scripts/demo/data/multisig-join-sample.json @@ -1,7 +1,8 @@ { "aids": [ + "EFY7MixHb0so4WFFHw6btOPc5qeeWfPm7v5MJWcdcbyG", "EKJ6tNVUGbdaiwx2nWDCFXG-_PY_AzESOcoKlm0kRNP3", - "EFY7MixHb0so4WFFHw6btOPc5qeeWfPm7v5MJWcdcbyG" + "EKxxKVNmC3M_u3eDF6Nw6MjRlRx1s_9Y-DV234UtkqAF" ], "transferable": true, "wits": [ @@ -10,6 +11,6 @@ "BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX" ], "toad": 2, - "isith": "2", - "nsith": "2" + "isith": "3", + "nsith": "3" } diff --git a/scripts/demo/data/multisig-stooge.json b/scripts/demo/data/multisig-stooge.json new file mode 100644 index 000000000..823fc8d86 --- /dev/null +++ b/scripts/demo/data/multisig-stooge.json @@ -0,0 +1,10 @@ +{ + "transferable": true, + "wits": ["BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha"], + "toad": 1, + "icount": 1, + "ncount": 1, + "isith": "1", + "nsith": "1" +} + diff --git a/scripts/demo/data/multisig-three-aids.json b/scripts/demo/data/multisig-three-aids.json new file mode 100644 index 000000000..0e32072dd --- /dev/null +++ b/scripts/demo/data/multisig-three-aids.json @@ -0,0 +1,16 @@ +{ + "aids": [ + "EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U", + "ED7yk9oUIe5qRh8ILfTuT_sNHidrxwJ9Bl-tLPoAXbqW", + "EEHyoLseuHa0nuhDj9tBv6N6nU1PILwv4jTt5x8A8uLu" + ], + "transferable": true, + "wits": [ + "BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha", + "BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM", + "BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX" + ], + "toad": 3, + "isith": "3", + "nsith": "3" +} \ No newline at end of file diff --git a/scripts/demo/data/multisig-three-stooges.json b/scripts/demo/data/multisig-three-stooges.json new file mode 100644 index 000000000..ae00751ca --- /dev/null +++ b/scripts/demo/data/multisig-three-stooges.json @@ -0,0 +1,12 @@ +{ + "aids": [ + "EKZYoeLcSpoBn7DdD0Rugk3xGy6in8zJvhJpMhZ23ETe", + "EJ__4LOcMfGRU0V65ywo9GgczMkqTZtgjmCKWU06MDQR", + "EItXS2M_iaQvYRex9swUaCWLETsxFdQbQD0XZmbukKOV" + ], + "transferable": true, + "wits": ["BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha"], + "toad": 1, + "isith": "3", + "nsith": "3" +} \ No newline at end of file diff --git a/scripts/demo/data/multisig-two-stooges.json b/scripts/demo/data/multisig-two-stooges.json new file mode 100644 index 000000000..41716726c --- /dev/null +++ b/scripts/demo/data/multisig-two-stooges.json @@ -0,0 +1,11 @@ +{ + "aids": [ + "EKZYoeLcSpoBn7DdD0Rugk3xGy6in8zJvhJpMhZ23ETe", + "EJ__4LOcMfGRU0V65ywo9GgczMkqTZtgjmCKWU06MDQR" + ], + "transferable": true, + "wits": ["BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha"], + "toad": 1, + "isith": "2", + "nsith": "2" +} \ No newline at end of file diff --git a/scripts/demo/data/stooges-start-with-one-then-join.json b/scripts/demo/data/stooges-start-with-one-then-join.json new file mode 100644 index 000000000..415c4cb8d --- /dev/null +++ b/scripts/demo/data/stooges-start-with-one-then-join.json @@ -0,0 +1,14 @@ +{ + "aids": [ + "EA5g3RMwkjcr_M4fI3k2ShCYlQMpgk3HD9mHhx7ZJs4U" + ], + "transferable": true, + "wits": [ + "BBilc4-L3tFUnfM_wJr4S4OJanAv_VmF_dJNN6vkf2Ha", + "BLskRTInXnMxWaGqcpSyMgo0nYbalW99cGZESrz3zapM", + "BIKKuvBwpmDVA4Ds-EpL5bt9OqPzWPja2LigFYZN2YfX" + ], + "toad": 3, + "isith": "1", + "nsith": "1" +} \ No newline at end of file diff --git a/src/keri/app/cli/commands/multisig/join.py b/src/keri/app/cli/commands/multisig/join.py index 94b1e058e..908f92fe2 100644 --- a/src/keri/app/cli/commands/multisig/join.py +++ b/src/keri/app/cli/commands/multisig/join.py @@ -196,7 +196,7 @@ def incept(self, attrs): if approve: if self.auto: - alias = "test alias" + alias = "multisig" else: while True: alias = input(f"\nEnter alias for new AID: ") @@ -393,7 +393,7 @@ def rotate(self, attrs): ghab = self.hby.habs[pre] else: if self.auto: - alias = "test alias" + alias = "multisig" else: while True: alias = input(f"\nEnter alias for new AID: ")