@@ -167,6 +167,11 @@ type ecdsa_curve = variant {
167167 secp256k1;
168168};
169169
170+ type schnorr_algorithm = variant {
171+ bip340secp256k1;
172+ ed25519;
173+ };
174+
170175type satoshi = nat64;
171176
172177type bitcoin_network = variant {
@@ -384,6 +389,34 @@ type sign_with_ecdsa_result = record {
384389 signature : blob;
385390};
386391
392+ type schnorr_public_key_args = record {
393+ canister_id : opt canister_id;
394+ derivation_path : vec blob;
395+ key_id : record { algorithm : schnorr_algorithm; name : text };
396+ };
397+
398+ type schnorr_public_key_result = record {
399+ public_key : blob;
400+ chain_code : blob;
401+ };
402+
403+ type schnorr_aux = variant {
404+ bip341: record {
405+ merkle_root_hash: blob;
406+ }
407+ };
408+
409+ type sign_with_schnorr_args = record {
410+ message : blob;
411+ derivation_path : vec blob;
412+ key_id : record { algorithm : schnorr_algorithm; name : text };
413+ aux: opt schnorr_aux;
414+ };
415+
416+ type sign_with_schnorr_result = record {
417+ signature : blob;
418+ };
419+
387420type node_metrics_history_args = record {
388421 subnet_id : principal;
389422 start_at_timestamp_nanos : nat64;
@@ -444,6 +477,10 @@ service ic : {
444477 ecdsa_public_key : (ecdsa_public_key_args) -> (ecdsa_public_key_result);
445478 sign_with_ecdsa : (sign_with_ecdsa_args) -> (sign_with_ecdsa_result);
446479
480+ // Threshold Schnorr signature
481+ schnorr_public_key : (schnorr_public_key_args) -> (schnorr_public_key_result);
482+ sign_with_schnorr : (sign_with_schnorr_args) -> (sign_with_schnorr_result);
483+
447484 // bitcoin interface
448485 bitcoin_get_balance : (bitcoin_get_balance_args) -> (bitcoin_get_balance_result);
449486 bitcoin_get_balance_query : (bitcoin_get_balance_query_args) -> (bitcoin_get_balance_query_result) query;
0 commit comments