|
1 | | -use candid::{CandidType, Principal}; |
| 1 | +use candid::CandidType; |
2 | 2 | use serde::{Deserialize, Serialize}; |
3 | 3 | use serde_bytes::{ByteArray, ByteBuf}; |
4 | 4 | use std::collections::BTreeMap; |
@@ -51,34 +51,10 @@ pub struct ECDHOutput<T> { |
51 | 51 | pub public_key: ByteArray<32>, // server side ECDH public key |
52 | 52 | } |
53 | 53 |
|
54 | | -#[derive(CandidType, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] |
55 | | -pub struct Delegation { |
56 | | - pub pubkey: ByteBuf, |
57 | | - pub expiration: u64, |
58 | | - pub targets: Option<Vec<Principal>>, |
59 | | -} |
60 | | - |
61 | | -#[derive(CandidType, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] |
62 | | -pub struct SignedDelegation { |
63 | | - pub delegation: Delegation, |
64 | | - pub signature: ByteBuf, |
65 | | -} |
66 | | - |
67 | 54 | #[derive(CandidType, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] |
68 | 55 | pub struct SignDelegationInput { |
69 | 56 | pub ns: String, |
70 | 57 | pub name: String, |
71 | 58 | pub pubkey: ByteBuf, |
72 | 59 | pub sig: ByteBuf, |
73 | 60 | } |
74 | | - |
75 | | -#[derive(CandidType, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] |
76 | | -pub struct SignDelegationOutput { |
77 | | - /// The session expiration time in nanoseconds since the UNIX epoch. This is the time at which |
78 | | - /// the delegation will no longer be valid. |
79 | | - pub expiration: u64, |
80 | | - /// The user canister public key. This key is used to derive the user principal. |
81 | | - pub user_key: ByteBuf, |
82 | | - /// seed is a part of the user_key |
83 | | - pub seed: ByteBuf, |
84 | | -} |
0 commit comments