Skip to content

Commit

Permalink
chore: Add Schnorr to management idl (#4086)
Browse files Browse the repository at this point in the history
* Add schnorr stuff to management idl

* Changelog
  • Loading branch information
fxgst authored Jan 29, 2025
1 parent 9f5907d commit 314fec1
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ Log visibility: controllers

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

### chore: Add Schnorr types and methods to management canister IDL

## Dependencies

### Frontend canister
Expand Down
37 changes: 37 additions & 0 deletions src/dfx/src/util/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ type ecdsa_curve = variant {
secp256k1;
};
type schnorr_algorithm = variant {
bip340secp256k1;
ed25519;
};
type satoshi = nat64;
type bitcoin_network = variant {
Expand Down Expand Up @@ -384,6 +389,34 @@ type sign_with_ecdsa_result = record {
signature : blob;
};
type schnorr_public_key_args = record {
canister_id : opt canister_id;
derivation_path : vec blob;
key_id : record { algorithm : schnorr_algorithm; name : text };
};
type schnorr_public_key_result = record {
public_key : blob;
chain_code : blob;
};
type schnorr_aux = variant {
bip341: record {
merkle_root_hash: blob;
}
};
type sign_with_schnorr_args = record {
message : blob;
derivation_path : vec blob;
key_id : record { algorithm : schnorr_algorithm; name : text };
aux: opt schnorr_aux;
};
type sign_with_schnorr_result = record {
signature : blob;
};
type node_metrics_history_args = record {
subnet_id : principal;
start_at_timestamp_nanos : nat64;
Expand Down Expand Up @@ -444,6 +477,10 @@ service ic : {
ecdsa_public_key : (ecdsa_public_key_args) -> (ecdsa_public_key_result);
sign_with_ecdsa : (sign_with_ecdsa_args) -> (sign_with_ecdsa_result);
// Threshold Schnorr signature
schnorr_public_key : (schnorr_public_key_args) -> (schnorr_public_key_result);
sign_with_schnorr : (sign_with_schnorr_args) -> (sign_with_schnorr_result);
// bitcoin interface
bitcoin_get_balance : (bitcoin_get_balance_args) -> (bitcoin_get_balance_result);
bitcoin_get_balance_query : (bitcoin_get_balance_query_args) -> (bitcoin_get_balance_query_result) query;
Expand Down

0 comments on commit 314fec1

Please sign in to comment.