Tookey is assets and access management protocol for web3. We build secure environment to interact with crypto without risk of disclose the private key.
Services in docker-compose.yaml
store state in memory, to reset state restart all containers.
Threshold is amount of participants required for sign process. In backend request should be i
, in console cli i - 1
.
Room values in Running
are from postman collections default values.
To develop backend:
- Run
make start_services
in one terminal - Run
make start_dev
in other terminal
- Start docker containers (
make start_services
andmake start_dev
) - Open 3 terminals and run:
docker exec 2k_relay cargo run --bin keygen -- -t 1 -n 3 -i 1 --output keys/key1.json
docker exec 2k_relay cargo run --bin keygen -- -t 1 -n 3 -i 2 --output keys/key2.json
docker exec 2k_relay cargo run --bin keygen -- -t 1 -n 3 -i 3 --output keys/key3.json
- Ensure you passed key Generation
- Start docker containers (
make start_services
andmake start_dev
) - Open 2 terminals and run:
docker exec 2k_relay cargo run --bin sign -- -p 1,2 -h "0xbd621a5652a421f0b853d2a56609bfd26ae965709070708a34f7607f1ce97a60" -l keys/key1.json
docker exec 2k_relay cargo run --bin sign -- -p 1,2 -h "0xbd621a5652a421f0b853d2a56609bfd26ae965709070708a34f7607f1ce97a60" -l keys/key2.json
- Start docker containers (
make start_services
andmake start_dev
) - Start backend (
cd backend && yarn run start:dev
) - Sign up with
POST /api/sign_up
- Start key generation with
POST /api/public_keys
- Verify key state with
GET /api/key
- Join wallet key generation with command in
terminal
docker exec 2k_relay cargo run --bin keygen -- -t 1 -n 3 -i 2 --room '31694e3c-d98b-474d-a336-25243f3c8ce9' --output keys/key2.json
- Join backup key generation with command in
terminal
docker exec 2k_relay cargo run --bin keygen -- -t 1 -n 3 -i 3 --room '31694e3c-d98b-474d-a336-25243f3c8ce9' --output keys/key3.json
- Generation commands should successfully exit and create files in
keys
folder - Verify key state with 'GET /api/key'
On key generation errors try restarting docker containers
- Start docker containers (
make start_services
andmake start_dev
) - Start backend (
cd backend && yarn run start:dev
) - Complete key generation
- Verify key state with
GET /api/key
- Start sign process with
POST /api/sign
- Join sign process with command in
terminal
docker exec 2k_relay cargo run --bin sign -- -p 1,2 -h "0xbd621a5652a421f0b853d2a56609bfd26ae965709070708a34f7607f1ce97a60" --room 'a8b451fe-5e4e-4ace-aaba-683d1467d9a5' -l keys/key2.json
- Sign commands should successfully exit and output result in console
- Verify sign state with 'GET /api/key' (sign should have status: finished and output in output field)
On sign errors try restarting docker containers, verify correct threshold numbers