1- type ChainArgs = variant { Upgrade : UpgradeArgs; Init : InitArgs };
21type CreateNamespaceInput = record {
2+ session_expires_in_ms : opt nat64;
33 managers : vec principal;
44 desc : opt text;
55 name : text;
@@ -20,6 +20,11 @@ type CreateSettingOutput = record {
2020 created_at : nat64;
2121 version : nat32;
2222};
23+ type Delegation = record {
24+ pubkey : blob;
25+ targets : opt vec principal;
26+ expiration : nat64;
27+ };
2328type ECDHInput = record { public_key : blob; nonce : blob };
2429type ECDHOutput = record { public_key : blob; payload : blob };
2530type InitArgs = record {
@@ -32,18 +37,24 @@ type InitArgs = record {
3237 subnet_size : nat64;
3338 vetkd_key_name : text;
3439};
40+ type InstallArgs = variant { Upgrade : UpgradeArgs; Init : InitArgs };
41+ type NamespaceDelegatorsInput = record {
42+ ns : text;
43+ delegators : vec principal;
44+ name : text;
45+ };
3546type NamespaceInfo = record {
3647 status : int8;
3748 updated_at : nat64;
49+ session_expires_in_ms : nat64;
3850 managers : vec principal;
3951 payload_bytes_total : nat64;
4052 desc : text;
4153 name : text;
4254 max_payload_size : nat64;
4355 created_at : nat64;
4456 auditors : vec principal;
45- settings_total : nat64;
46- user_settings_total : nat64;
57+ fixed_id_names : vec record { text; vec principal };
4758 users : vec principal;
4859 visibility : nat8;
4960 gas_balance : nat;
@@ -52,16 +63,22 @@ type PublicKeyInput = record { ns : text; derivation_path : vec blob };
5263type PublicKeyOutput = record { public_key : blob; chain_code : blob };
5364type Result = variant { Ok; Err : text };
5465type Result_1 = variant { Ok : NamespaceInfo; Err : text };
55- type Result_10 = variant { Ok : StateInfo; Err : text };
56- type Result_11 = variant { Ok : text; Err : text };
66+ type Result_10 = variant { Ok : vec record { principal; blob }; Err : text };
67+ type Result_11 = variant { Ok : SignInResponse; Err : text };
68+ type Result_12 = variant { Ok : nat; Err : text };
69+ type Result_13 = variant { Ok : CreateSettingOutput; Err : text };
70+ type Result_14 = variant { Ok : SettingInfo; Err : text };
71+ type Result_15 = variant { Ok : SettingArchivedPayload; Err : text };
72+ type Result_16 = variant { Ok : StateInfo; Err : text };
73+ type Result_17 = variant { Ok : text; Err : text };
5774type Result_2 = variant { Ok : vec NamespaceInfo; Err : text };
5875type Result_3 = variant { Ok : ECDHOutput; Err : text };
5976type Result_4 = variant { Ok : PublicKeyOutput; Err : text };
6077type Result_5 = variant { Ok : blob; Err : text };
61- type Result_6 = variant { Ok : nat ; Err : text };
62- type Result_7 = variant { Ok : CreateSettingOutput ; Err : text };
63- type Result_8 = variant { Ok : SettingInfo ; Err : text };
64- type Result_9 = variant { Ok : SettingArchivedPayload ; Err : text };
78+ type Result_6 = variant { Ok : SignedDelegation ; Err : text };
79+ type Result_7 = variant { Ok : vec principal ; Err : text };
80+ type Result_8 = variant { Ok : principal ; Err : text };
81+ type Result_9 = variant { Ok : bool ; Err : text };
6582type SchnorrAlgorithm = variant { ed25519; bip340secp256k1 };
6683type SettingArchivedPayload = record {
6784 dek : opt blob;
@@ -90,16 +107,29 @@ type SettingPath = record {
90107 version : nat32;
91108 user_owned : bool;
92109};
110+ type SignDelegationInput = record {
111+ ns : text;
112+ sig : blob;
113+ name : text;
114+ pubkey : blob;
115+ };
93116type SignIdentityInput = record { ns : text; audience : text };
117+ type SignInResponse = record {
118+ user_key : blob;
119+ seed : blob;
120+ expiration : nat64;
121+ };
94122type SignInput = record {
95123 ns : text;
96124 derivation_path : vec blob;
97125 message : blob;
98126};
127+ type SignedDelegation = record { signature : blob; delegation : Delegation };
99128type StateInfo = record {
100129 freezing_threshold : nat64;
101130 ecdsa_key_name : text;
102131 managers : vec principal;
132+ governance_canister : opt principal;
103133 name : text;
104134 auditors : vec principal;
105135 schnorr_secp256k1_public_key : opt PublicKeyOutput;
@@ -113,6 +143,7 @@ type StateInfo = record {
113143};
114144type UpdateNamespaceInput = record {
115145 status : opt int8;
146+ session_expires_in_ms : opt nat64;
116147 desc : opt text;
117148 name : text;
118149 max_payload_size : opt nat64;
@@ -134,8 +165,9 @@ type UpgradeArgs = record {
134165 governance_canister : opt principal;
135166 name : opt text;
136167 subnet_size : opt nat64;
168+ vetkd_key_name : opt text;
137169};
138- service : (opt ChainArgs ) -> {
170+ service : (opt InstallArgs ) -> {
139171 admin_add_allowed_apis : (vec text) -> (Result);
140172 admin_add_auditors : (vec principal) -> (Result);
141173 admin_add_managers : (vec principal) -> (Result);
@@ -144,40 +176,54 @@ service : (opt ChainArgs) -> {
144176 admin_remove_allowed_apis : (vec text) -> (Result);
145177 admin_remove_auditors : (vec principal) -> (Result);
146178 admin_remove_managers : (vec principal) -> (Result);
179+ // ecdh_encrypted_cose_key returns a permanent partial KEK encrypted with ECDH.
180+ // It should be used with a local partial key to derive a full KEK.
147181 ecdh_cose_encrypted_key : (SettingPath, ECDHInput) -> (Result_3);
148182 ecdsa_public_key : (opt PublicKeyInput) -> (Result_4) query;
149183 ecdsa_sign : (SignInput) -> (Result_5);
184+ get_delegation : (blob, blob, nat64) -> (Result_6) query;
150185 namespace_add_auditors : (text, vec principal) -> (Result);
186+ namespace_add_delegator : (NamespaceDelegatorsInput) -> (Result_7);
151187 namespace_add_managers : (text, vec principal) -> (Result);
152188 namespace_add_users : (text, vec principal) -> (Result);
189+ namespace_delete : (text) -> (Result);
190+ namespace_get_delegators : (text, text) -> (Result_7) query;
191+ namespace_get_fixed_identity : (text, text) -> (Result_8) query;
153192 namespace_get_info : (text) -> (Result_1) query;
193+ namespace_is_member : (text, text, principal) -> (Result_9) query;
194+ namespace_list_setting_keys : (text, bool, opt principal) -> (
195+ Result_10,
196+ ) query;
154197 namespace_remove_auditors : (text, vec principal) -> (Result);
198+ namespace_remove_delegator : (NamespaceDelegatorsInput) -> (Result);
155199 namespace_remove_managers : (text, vec principal) -> (Result);
156200 namespace_remove_users : (text, vec principal) -> (Result);
157- namespace_top_up : (text, nat) -> (Result_6);
201+ namespace_sign_delegation : (SignDelegationInput) -> (Result_11);
202+ namespace_top_up : (text, nat) -> (Result_12);
158203 namespace_update_info : (UpdateNamespaceInput) -> (Result);
159204 schnorr_public_key : (SchnorrAlgorithm, opt PublicKeyInput) -> (
160205 Result_4,
161206 ) query;
162207 schnorr_sign : (SchnorrAlgorithm, SignInput) -> (Result_5);
163208 schnorr_sign_identity : (SchnorrAlgorithm, SignIdentityInput) -> (Result_5);
164209 setting_add_readers : (SettingPath, vec principal) -> (Result);
165- setting_create : (SettingPath, CreateSettingInput) -> (Result_7);
166- setting_get : (SettingPath) -> (Result_8) query;
167- setting_get_archived_payload : (SettingPath) -> (Result_9) query;
168- setting_get_info : (SettingPath) -> (Result_8) query;
210+ setting_create : (SettingPath, CreateSettingInput) -> (Result_13);
211+ setting_delete : (SettingPath) -> (Result);
212+ setting_get : (SettingPath) -> (Result_14) query;
213+ setting_get_archived_payload : (SettingPath) -> (Result_15) query;
214+ setting_get_info : (SettingPath) -> (Result_14) query;
169215 setting_remove_readers : (SettingPath, vec principal) -> (Result);
170- setting_update_info : (SettingPath, UpdateSettingInfoInput) -> (Result_7 );
216+ setting_update_info : (SettingPath, UpdateSettingInfoInput) -> (Result_13 );
171217 setting_update_payload : (SettingPath, UpdateSettingPayloadInput) -> (
172- Result_7 ,
218+ Result_13 ,
173219 );
174- state_get_info : () -> (Result_10 ) query;
175- validate2_admin_add_allowed_apis : (vec text) -> (Result_11 );
176- validate2_admin_add_auditors : (vec principal) -> (Result_11 );
177- validate2_admin_add_managers : (vec principal) -> (Result_11 );
178- validate2_admin_remove_allowed_apis : (vec text) -> (Result_11 );
179- validate2_admin_remove_auditors : (vec principal) -> (Result_11 );
180- validate2_admin_remove_managers : (vec principal) -> (Result_11 );
220+ state_get_info : () -> (Result_16 ) query;
221+ validate2_admin_add_allowed_apis : (vec text) -> (Result_17 );
222+ validate2_admin_add_auditors : (vec principal) -> (Result_17 );
223+ validate2_admin_add_managers : (vec principal) -> (Result_17 );
224+ validate2_admin_remove_allowed_apis : (vec text) -> (Result_17 );
225+ validate2_admin_remove_auditors : (vec principal) -> (Result_17 );
226+ validate2_admin_remove_managers : (vec principal) -> (Result_17 );
181227 validate_admin_add_allowed_apis : (vec text) -> (Result);
182228 validate_admin_add_auditors : (vec principal) -> (Result);
183229 validate_admin_add_managers : (vec principal) -> (Result);
0 commit comments