Skip to content

Commit 314fec1

Browse files
authored
chore: Add Schnorr to management idl (#4086)
* Add schnorr stuff to management idl * Changelog
1 parent 9f5907d commit 314fec1

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ Log visibility: controllers
166166

167167
### feat!: Print error traces only in verbose (`-v`) mode or if no proper error message is available
168168

169+
### chore: Add Schnorr types and methods to management canister IDL
170+
169171
## Dependencies
170172

171173
### Frontend canister

src/dfx/src/util/assets.rs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ type ecdsa_curve = variant {
167167
secp256k1;
168168
};
169169
170+
type schnorr_algorithm = variant {
171+
bip340secp256k1;
172+
ed25519;
173+
};
174+
170175
type satoshi = nat64;
171176
172177
type 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+
387420
type 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

Comments
 (0)