syntax = "proto3"; option go_package = "tofnd;tofnd"; package tofnd; import "common.proto"; // import key presence request/response service Multisig { rpc KeyPresence(KeyPresenceRequest) returns (KeyPresenceResponse); rpc Keygen(KeygenRequest) returns (KeygenResponse); rpc Sign(SignRequest) returns (SignResponse); } message KeygenRequest { string key_uid = 1; string party_uid = 2; // used only for logging Algorithm algorithm = 3; } message KeygenResponse { oneof keygen_response { bytes pub_key = 1; // SEC1-encoded compressed curve point string error = 2; // reply with an error message if keygen fails } } message SignRequest { string key_uid = 1; bytes msg_to_sign = 2; // 32-byte pre-hashed message digest string party_uid = 3; // used only for logging bytes pub_key = 4; // SEC1-encoded compressed pub key bytes to find the right mnemonic. Latest is used, if empty. Algorithm algorithm = 5; } message SignResponse { oneof sign_response { bytes signature = 1; // ASN.1 DER-encoded ECDSA signature string error = 2; // reply with an error message if sign fails } }