You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/keri/app/controller.ts
+79-18Lines changed: 79 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -89,17 +89,67 @@ export class Agent {
89
89
* signing key represents the Account for the client on the agent
90
90
*/
91
91
exportclassController{
92
+
/*
93
+
The bran is the combination of the first 21 characters of the passcode passed in prefixed with 'A' and '0A'.
94
+
Looks like: '0A' + 'A' + 'thisismysecretkeyseed'
95
+
Or: "0AAthisismysecretkeyseed"
96
+
97
+
This is interpreted as encoded Base64URLSafe characters when used as the salt for key generation.
98
+
*/
92
99
privatebran: string;
100
+
/**
101
+
* The stem is the prefix for the stretched input bytes the controller's cryptographic
102
+
* key pairs are derived from.
103
+
*/
93
104
publicstem: string;
105
+
/**
106
+
* The security tier for the identifiers created by this Controller.
107
+
*/
94
108
publictier: Tier;
109
+
/**
110
+
* The rotation index used during key generation by this Controller.
111
+
*/
95
112
publicridx: number;
113
+
/**
114
+
* The salter is a cryptographic salt used to derive the controller's cryptographic key pairs
115
+
* and is deterministically derived from the bran and the security tier.
116
+
*/
96
117
publicsalter: any;
118
+
/**
119
+
* The current signing key used to sign requests for this controller.
120
+
*/
97
121
publicsigner: any;
122
+
/**
123
+
* The next signing key of which a digest is committed to in an establishment event (inception or rotation) to become the
124
+
* signing key after the next rotation.
125
+
* @private
126
+
*/
98
127
privatensigner: any;
128
+
/**
129
+
* Either the current establishment event, inception or rotation, or the interaction event used for delegation approval.
130
+
*/
99
131
publicserder: Serder;
132
+
/**
133
+
* Current public keys formatted in fully-qualified Base64.
134
+
* @private
135
+
*/
100
136
privatekeys: string[];
137
+
/**
138
+
* Digests of the next public keys formatted in fully-qualified Base64.
139
+
*/
101
140
publicndigs: string[];
102
141
142
+
/**
143
+
* Creates a Signify Controller starting at key index 0 that generates keys in
144
+
* memory based on the provided seed, or bran, the tier, and the rotation index.
145
+
*
146
+
* The rotation index is used as follows:
147
+
*
148
+
* @param bran
149
+
* @param tier
150
+
* @param ridx
151
+
* @param state
152
+
*/
103
153
constructor(
104
154
bran: string,
105
155
tier: Tier,
@@ -110,6 +160,13 @@ export class Controller {
110
160
this.stem='signify:controller';
111
161
this.tier=tier;
112
162
this.ridx=ridx;
163
+
constcodes=undefined;// Defines the types of seeds that the SaltyCreator will create. Defaults to undefined.
164
+
constkeyCount=1;// The number of keys to create. Defaults to 1.
165
+
consttransferable=true;// Whether the keys are transferable. Defaults to true.
166
+
constcode=MtrDex.Ed25519_Seed;// The type cryptographic seed to create by default when not overiddeen by "codes".
167
+
constpidx=0;// The index of this identifier prefix of all managed identifiers created for this SignifyClient Controller. Defaults to 0.
168
+
constkidx=0;// The overall starting key index for the first key this rotation set of keys. This is not a local index to this set of keys but an index in the overall set of keys for all keys in this sequence.
169
+
// Defaults to 0. Multiply rotation index (ridx) times key count to get the overall key index.
0 commit comments