@@ -42,14 +42,37 @@ export const VaultPermission = t.keyof(
4242/** An ordered [userKeyId, backupKeyId, bitgoKeyId] triplet — same shape/order as wallet.keys[]. */
4343export const RootKeyTriplet = t . tuple ( [ t . string , t . string , t . string ] , 'RootKeyTriplet' ) ;
4444
45- /** The 12 static root key ids, by (curve, scheme). */
46- export const VaultRootKeys = t . type (
45+ /** The 12 root key ids for a single custody model, keyed by (curve, scheme). */
46+ export const RootKeysByType = t . type (
4747 {
4848 secp256k1Multisig : RootKeyTriplet ,
4949 ecdsaMpc : RootKeyTriplet ,
5050 eddsaMpc : RootKeyTriplet ,
5151 ed25519Multisig : RootKeyTriplet ,
5252 } ,
53+ 'RootKeysByType'
54+ ) ;
55+
56+ /** Custody models a vault's roots can be created under. v1 implements `hot` only. */
57+ export const VaultCustodyType = t . keyof (
58+ {
59+ hot : null ,
60+ cold : null ,
61+ custodial : null ,
62+ } ,
63+ 'VaultCustodyType'
64+ ) ;
65+
66+ /**
67+ * A vault's root keys grouped by custody model — each model holds its own set of 4 (curve, scheme)
68+ * root triplets. Only `hot` is populated in v1; `cold`/`custodial` are reserved for later phases.
69+ */
70+ export const VaultRootKeys = t . partial (
71+ {
72+ hot : RootKeysByType ,
73+ cold : RootKeysByType ,
74+ custodial : RootKeysByType ,
75+ } ,
5376 'VaultRootKeys'
5477) ;
5578
@@ -100,7 +123,6 @@ export const VaultData = t.intersection(
100123 id : t . string ,
101124 enterpriseId : t . string ,
102125 label : t . string ,
103- // freeze is NOT a status — a frozen vault stays 'active' with the freeze field set (wallet precedent)
104126 status : VaultStatus ,
105127 creator : t . string ,
106128 users : t . array ( VaultMembershipData ) ,
@@ -174,5 +196,5 @@ export const InitializeVaultBody = t.type({ label: t.string }, 'InitializeVaultB
174196/** POST /enterprise/:eId/vaults/:vId/finalize — the 12 key ids as 4 ordered triplets. */
175197export const FinalizeVaultBody = t . type ( { rootKeys : VaultRootKeys } , 'FinalizeVaultBody' ) ;
176198
177- /** POST/DELETE /enterprise/:eId/vaults/:vId/freeze */
199+ /** POST /enterprise/:eId/vaults/:vId/freeze */
178200export const FreezeVaultBody = t . partial ( { duration : t . number } , 'FreezeVaultBody' ) ;
0 commit comments