forked from domwoe/schnorr_canister
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschnorr_canister.did
31 lines (31 loc) · 994 Bytes
/
schnorr_canister.did
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
type HttpRequest = record {
url : text;
method : text;
body : blob;
headers : vec record { text; text };
certificate_version : opt nat16;
};
type HttpResponse = record {
body : blob;
headers : vec record { text; text };
status_code : nat16;
};
type SchnorrAlgorithm = variant { ed25519; bip340secp256k1 };
type SchnorrKeyId = record { algorithm : SchnorrAlgorithm; name : text };
type SchnorrPublicKeyArgs = record {
key_id : SchnorrKeyId;
canister_id : opt principal;
derivation_path : vec blob;
};
type SchnorrPublicKeyResult = record { public_key : blob; chain_code : blob };
type SignWithSchnorrArgs = record {
key_id : SchnorrKeyId;
derivation_path : vec blob;
message : blob;
};
type SignWithSchnorrResult = record { signature : blob };
service : () -> {
http_request : (HttpRequest) -> (HttpResponse) query;
schnorr_public_key : (SchnorrPublicKeyArgs) -> (SchnorrPublicKeyResult);
sign_with_schnorr : (SignWithSchnorrArgs) -> (SignWithSchnorrResult);
}