Skip to content

Commit 500fa11

Browse files
committed
refactor: change key state interface names and add docs
1 parent b654a0f commit 500fa11

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/keri/core/keyState.ts

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ export interface EstablishmentState {
3232
export interface IdentifierManagerState {}
3333

3434
/**
35-
* Interface defining configuration parameters for a SaltyIdentifierManager
35+
* Interface defining configuration parameters for a specified, deterministic salt of an IdentifierManager.
3636
*/
37-
export interface SaltyState extends IdentifierManagerState {
37+
export interface SaltyKeyState extends IdentifierManagerState {
3838
/**
3939
* Encrypted
4040
*/
@@ -49,32 +49,44 @@ export interface SaltyState extends IdentifierManagerState {
4949
transferable: boolean;
5050
}
5151

52-
export interface RandyState extends IdentifierManagerState {
52+
/**
53+
* Interface defining configuration parameters for a random seed identifier manager.
54+
*/
55+
export interface RandyKeyState extends IdentifierManagerState {
5356
prxs: string[];
5457
nxts: string[];
5558
}
5659

57-
export interface GroupState extends IdentifierManagerState {
60+
/**
61+
* Interface defining properties a multi-signature group identifier manager.
62+
*/
63+
export interface GroupKeyState extends IdentifierManagerState {
5864
mhab: HabState;
5965
keys: string[];
6066
ndigs: string[];
6167
}
6268

69+
/**
70+
* Interface defining properties for an external module identifier manager that uses externally managed keys such as in an HSM or a KMS system.
71+
*/
6372
export interface ExternState extends IdentifierManagerState {
6473
extern_type: string;
6574
pidx: number;
6675
[key: string]: unknown;
6776
}
6877

78+
/**
79+
* Interface defining properties of an identifier habitat, know as a Hab in KERIpy.
80+
*/
6981
export interface HabState {
7082
name: string;
7183
prefix: string;
7284
transferable: boolean;
7385
state: KeyState;
7486
windexes: unknown[];
7587
icp_dt: string;
76-
[Algos.salty]?: SaltyState;
77-
[Algos.randy]?: RandyState;
78-
[Algos.group]?: GroupState;
88+
[Algos.salty]?: SaltyKeyState;
89+
[Algos.randy]?: RandyKeyState;
90+
[Algos.group]?: GroupKeyState;
7991
[Algos.extern]?: ExternState;
8092
}

0 commit comments

Comments
 (0)