1   // This file is autogenerated
2   #import "KBRObject.h"
3   #import "KBRRequest.h"
4   #import "KBRRequestParams.h"
5 
6 @interface KBRStringKVPair : KBRObject
7 @property NSString *key;
8 @property NSString *value;
9 @end
10 
11 @interface KBRStatus : KBRObject
12 @property NSInteger code;
13 @property NSString *name;
14 @property NSString *desc;
15 @property NSArray *fields; /*of KBRStringKVPair*/
16 @end
17 
18 @interface KBRText : KBRObject
19 @property NSString *data;
20 @property BOOL markup;
21 @end
22 
23 @interface KBRPGPIdentity : KBRObject
24 @property NSString *username;
25 @property NSString *comment;
26 @property NSString *email;
27 @end
28 
29 @interface KBRPublicKey : KBRObject
30 @property NSString *KID;
31 @property NSString *PGPFingerprint;
32 @property NSArray *PGPIdentities; /*of KBRPGPIdentity*/
33 @property BOOL isSibkey;
34 @property BOOL isEldest;
35 @property NSString *parentID;
36 @property NSString *deviceID;
37 @property NSString *deviceDescription;
38 @property NSString *deviceType;
39 @property int64_t cTime;
40 @property int64_t eTime;
41 @end
42 
43 @interface KBRKeybaseTime : KBRObject
44 @property int64_t unix;
45 @property NSInteger chain;
46 @end
47 
48 @interface KBRRevokedKey : KBRObject
49 @property KBRPublicKey *key;
50 @property KBRKeybaseTime *time;
51 @property NSString *by;
52 @end
53 
54 @interface KBRUser : KBRObject
55 @property NSString *uid;
56 @property NSString *username;
57 @end
58 
59 @interface KBRDevice : KBRObject
60 @property NSString *type;
61 @property NSString *name;
62 @property NSString *deviceID;
63 @property int64_t cTime;
64 @property int64_t mTime;
65 @property int64_t lastUsedTime;
66 @property NSString *encryptKey;
67 @property NSString *verifyKey;
68 @property NSInteger status;
69 @end
70 
71 typedef NS_ENUM (NSInteger, KBRDeviceType) {
72 	KBRDeviceTypeDesktop = 0,
73 	KBRDeviceTypeMobile = 1,
74 };
75 
76 @interface KBRStream : KBRObject
77 @property NSInteger fd;
78 @end
79 
80 typedef NS_ENUM (NSInteger, KBRLogLevel) {
81 	KBRLogLevelNone = 0,
82 	KBRLogLevelDebug = 1,
83 	KBRLogLevelInfo = 2,
84 	KBRLogLevelNotice = 3,
85 	KBRLogLevelWarn = 4,
86 	KBRLogLevelError = 5,
87 	KBRLogLevelCritical = 6,
88 	KBRLogLevelFatal = 7,
89 };
90 
91 typedef NS_ENUM (NSInteger, KBRClientType) {
92 	KBRClientTypeNone = 0,
93 	KBRClientTypeCli = 1,
94 	KBRClientTypeGui = 2,
95 	KBRClientTypeKbfs = 3,
96 };
97 
98 @interface KBRUserVersionVector : KBRObject
99 @property int64_t id;
100 @property NSInteger sigHints;
101 @property int64_t sigChain;
102 @property int64_t cachedAt;
103 @property int64_t lastIdentifiedAt;
104 @end
105 
106 @interface KBRUserPlusKeys : KBRObject
107 @property NSString *uid;
108 @property NSString *username;
109 @property NSArray *deviceKeys; /*of KBRPublicKey*/
110 @property NSArray *revokedDeviceKeys; /*of KBRRevokedKey*/
111 @property NSInteger pgpKeyCount;
112 @property KBRUserVersionVector *uvv;
113 @end
114 
115 @interface KBRRemoteTrack : KBRObject
116 @property NSString *username;
117 @property NSString *uid;
118 @property NSString *linkID;
119 @end
120 
121 @interface KBRUserPlusAllKeys : KBRObject
122 @property KBRUserPlusKeys *base;
123 @property NSArray *pgpKeys; /*of KBRPublicKey*/
124 @property NSArray *remoteTracks; /*of KBRRemoteTrack*/
125 @end
126 
127 typedef NS_ENUM (NSInteger, KBRMerkleTreeID) {
128 	KBRMerkleTreeIDMaster = 0,
129 	KBRMerkleTreeIDKbfsPublic = 1,
130 	KBRMerkleTreeIDKbfsPrivate = 2,
131 };
132 
133 @interface KBRSocialAssertion : KBRObject
134 @property NSString *user;
135 @property NSString *service;
136 @end
137 
138 @interface KBRUserResolution : KBRObject
139 @property KBRSocialAssertion *assertion;
140 @property NSString *userID;
141 @end
142 
143 typedef NS_ENUM (NSInteger, KBRProofState) {
144 	KBRProofStateNone = 0,
145 	KBRProofStateOk = 1,
146 	KBRProofStateTempFailure = 2,
147 	KBRProofStatePermFailure = 3,
148 	KBRProofStateLooking = 4,
149 	KBRProofStateSuperseded = 5,
150 	KBRProofStatePosted = 6,
151 	KBRProofStateRevoked = 7,
152 	KBRProofStateDeleted = 8,
153 };
154 
155 typedef NS_ENUM (NSInteger, KBRProofStatus) {
156 	KBRProofStatusNone = 0,
157 	KBRProofStatusOk = 1,
158 	KBRProofStatusLocal = 2,
159 	KBRProofStatusFound = 3,
160 	KBRProofStatusBaseError = 100,
161 	KBRProofStatusHostUnreachable = 101,
162 	KBRProofStatusPermissionDenied = 103,
163 	KBRProofStatusFailedParse = 106,
164 	KBRProofStatusDnsError = 107,
165 	KBRProofStatusAuthFailed = 108,
166 	KBRProofStatusHttp429 = 129,
167 	KBRProofStatusHttp500 = 150,
168 	KBRProofStatusTimeout = 160,
169 	KBRProofStatusInternalError = 170,
170 	KBRProofStatusBaseHardError = 200,
171 	KBRProofStatusNotFound = 201,
172 	KBRProofStatusContentFailure = 202,
173 	KBRProofStatusBadUsername = 203,
174 	KBRProofStatusBadRemoteId = 204,
175 	KBRProofStatusTextNotFound = 205,
176 	KBRProofStatusBadArgs = 206,
177 	KBRProofStatusContentMissing = 207,
178 	KBRProofStatusTitleNotFound = 208,
179 	KBRProofStatusServiceError = 209,
180 	KBRProofStatusTorSkipped = 210,
181 	KBRProofStatusTorIncompatible = 211,
182 	KBRProofStatusHttp300 = 230,
183 	KBRProofStatusHttp400 = 240,
184 	KBRProofStatusHttpOther = 260,
185 	KBRProofStatusEmptyJson = 270,
186 	KBRProofStatusDeleted = 301,
187 	KBRProofStatusServiceDead = 302,
188 	KBRProofStatusBadSignature = 303,
189 	KBRProofStatusBadApiUrl = 304,
190 	KBRProofStatusUnknownType = 305,
191 	KBRProofStatusNoHint = 306,
192 	KBRProofStatusBadHintText = 307,
193 	KBRProofStatusInvalidPvl = 308,
194 };
195 
196 typedef NS_ENUM (NSInteger, KBRProofType) {
197 	KBRProofTypeNone = 0,
198 	KBRProofTypeKeybase = 1,
199 	KBRProofTypeTwitter = 2,
200 	KBRProofTypeGithub = 3,
201 	KBRProofTypeReddit = 4,
202 	KBRProofTypeCoinbase = 5,
203 	KBRProofTypeHackernews = 6,
204 	KBRProofTypeFacebook = 8,
205 	KBRProofTypeGenericWebSite = 1000,
206 	KBRProofTypeDns = 1001,
207 	KBRProofTypePgp = 1002,
208 	KBRProofTypeRooter = 100001,
209 };
210 
211 typedef NS_ENUM (NSInteger, KBRTrackDiffType) {
212 	KBRTrackDiffTypeNone = 0,
213 	KBRTrackDiffTypeError = 1,
214 	KBRTrackDiffTypeClash = 2,
215 	KBRTrackDiffTypeRevoked = 3,
216 	KBRTrackDiffTypeUpgraded = 4,
217 	KBRTrackDiffTypeNew = 5,
218 	KBRTrackDiffTypeRemoteFail = 6,
219 	KBRTrackDiffTypeRemoteWorking = 7,
220 	KBRTrackDiffTypeRemoteChanged = 8,
221 	KBRTrackDiffTypeNewEldest = 9,
222 	KBRTrackDiffTypeNoneViaTemporary = 10,
223 };
224 
225 @interface KBRTrackDiff : KBRObject
226 @property KBRTrackDiffType type;
227 @property NSString *displayMarkup;
228 @end
229 
230 @interface KBRTrackSummary : KBRObject
231 @property NSString *username;
232 @property int64_t time;
233 @property BOOL isRemote;
234 @end
235 
236 typedef NS_ENUM (NSInteger, KBRTrackStatus) {
237 	KBRTrackStatusNewOk = 1,
238 	KBRTrackStatusNewZeroProofs = 2,
239 	KBRTrackStatusNewFailProofs = 3,
240 	KBRTrackStatusUpdateBrokenFailedProofs = 4,
241 	KBRTrackStatusUpdateNewProofs = 5,
242 	KBRTrackStatusUpdateOk = 6,
243 	KBRTrackStatusUpdateBrokenRevoked = 7,
244 };
245 
246 @interface KBRTrackOptions : KBRObject
247 @property BOOL localOnly;
248 @property BOOL bypassConfirm;
249 @property BOOL forceRetrack;
250 @property BOOL expiringLocal;
251 @property BOOL forPGPPull;
252 @end
253 
254 typedef NS_ENUM (NSInteger, KBRIdentifyReasonType) {
255 	KBRIdentifyReasonTypeNone = 0,
256 	KBRIdentifyReasonTypeId = 1,
257 	KBRIdentifyReasonTypeTrack = 2,
258 	KBRIdentifyReasonTypeEncrypt = 3,
259 	KBRIdentifyReasonTypeDecrypt = 4,
260 	KBRIdentifyReasonTypeVerify = 5,
261 	KBRIdentifyReasonTypeResource = 6,
262 	KBRIdentifyReasonTypeBackground = 7,
263 };
264 
265 @interface KBRIdentifyReason : KBRObject
266 @property KBRIdentifyReasonType type;
267 @property NSString *reason;
268 @property NSString *resource;
269 @end
270 
271 @interface KBRIdentifyOutcome : KBRObject
272 @property NSString *username;
273 @property KBRStatus *status;
274 @property NSArray *warnings; /*of string*/
275 @property KBRTrackSummary *trackUsed;
276 @property KBRTrackStatus trackStatus;
277 @property NSInteger numTrackFailures;
278 @property NSInteger numTrackChanges;
279 @property NSInteger numProofFailures;
280 @property NSInteger numRevoked;
281 @property NSInteger numProofSuccesses;
282 @property NSArray *revoked; /*of KBRTrackDiff*/
283 @property KBRTrackOptions *trackOptions;
284 @property BOOL forPGPPull;
285 @property KBRIdentifyReason *reason;
286 @end
287 
288 @interface KBRIdentifyRes : KBRObject
289 @property KBRUser *user;
290 @property NSArray *publicKeys; /*of KBRPublicKey*/
291 @property KBRIdentifyOutcome *outcome;
292 @property NSString *trackToken;
293 @end
294 
295 @interface KBRRemoteProof : KBRObject
296 @property KBRProofType proofType;
297 @property NSString *key;
298 @property NSString *value;
299 @property NSString *displayMarkup;
300 @property NSString *sigID;
301 @property int64_t mTime;
302 @end
303 
304 @interface KBRProofResult : KBRObject
305 @property KBRProofState state;
306 @property KBRProofStatus status;
307 @property NSString *desc;
308 @end
309 
310 @interface KBRIdentifyRow : KBRObject
311 @property NSInteger rowId;
312 @property KBRRemoteProof *proof;
313 @property KBRTrackDiff *trackDiff;
314 @end
315 
316 @interface KBRIdentifyKey : KBRObject
317 @property NSData *pgpFingerprint;
318 @property NSString *KID;
319 @property KBRTrackDiff *trackDiff;
320 @property BOOL breaksTracking;
321 @end
322 
323 @interface KBRCryptocurrency : KBRObject
324 @property NSInteger rowId;
325 @property NSData *pkhash;
326 @property NSString *address;
327 @property NSString *sigID;
328 @property NSString *type;
329 @property NSString *family;
330 @end
331 
332 @interface KBRRevokedProof : KBRObject
333 @property KBRRemoteProof *proof;
334 @property KBRTrackDiff *diff;
335 @end
336 
337 @interface KBRIdentity : KBRObject
338 @property KBRStatus *status;
339 @property int64_t whenLastTracked;
340 @property NSArray *proofs; /*of KBRIdentifyRow*/
341 @property NSArray *cryptocurrency; /*of KBRCryptocurrency*/
342 @property NSArray *revoked; /*of KBRTrackDiff*/
343 @property NSArray *revokedDetails; /*of KBRRevokedProof*/
344 @property BOOL breaksTracking;
345 @end
346 
347 @interface KBRSigHint : KBRObject
348 @property NSString *remoteId;
349 @property NSString *humanUrl;
350 @property NSString *apiUrl;
351 @property NSString *checkText;
352 @end
353 
354 typedef NS_ENUM (NSInteger, KBRCheckResultFreshness) {
355 	KBRCheckResultFreshnessFresh = 0,
356 	KBRCheckResultFreshnessAged = 1,
357 	KBRCheckResultFreshnessRancid = 2,
358 };
359 
360 @interface KBRCheckResult : KBRObject
361 @property KBRProofResult *proofResult;
362 @property int64_t time;
363 @property KBRCheckResultFreshness freshness;
364 @end
365 
366 @interface KBRLinkCheckResult : KBRObject
367 @property NSInteger proofId;
368 @property KBRProofResult *proofResult;
369 @property KBRProofResult *snoozedResult;
370 @property BOOL torWarning;
371 @property int64_t tmpTrackExpireTime;
372 @property KBRCheckResult *cached;
373 @property KBRTrackDiff *diff;
374 @property KBRTrackDiff *remoteDiff;
375 @property KBRSigHint *hint;
376 @property BOOL breaksTracking;
377 @end
378 
379 @interface KBRUserCard : KBRObject
380 @property NSInteger following;
381 @property NSInteger followers;
382 @property NSString *uid;
383 @property NSString *fullName;
384 @property NSString *location;
385 @property NSString *bio;
386 @property NSString *website;
387 @property NSString *twitter;
388 @property BOOL youFollowThem;
389 @property BOOL theyFollowYou;
390 @end
391 
392 @interface KBRConfirmResult : KBRObject
393 @property BOOL identityConfirmed;
394 @property BOOL remoteConfirmed;
395 @property BOOL expiringLocal;
396 @end
397 
398 typedef NS_ENUM (NSInteger, KBRDismissReasonType) {
399 	KBRDismissReasonTypeNone = 0,
400 	KBRDismissReasonTypeHandledElsewhere = 1,
401 };
402 
403 @interface KBRDismissReason : KBRObject
404 @property KBRDismissReasonType type;
405 @property NSString *reason;
406 @property NSString *resource;
407 @end
408 
409 typedef NS_ENUM (NSInteger, KBRSaltpackSenderType) {
410 	KBRSaltpackSenderTypeNotTracked = 0,
411 	KBRSaltpackSenderTypeUnknown = 1,
412 	KBRSaltpackSenderTypeAnonymous = 2,
413 	KBRSaltpackSenderTypeTrackingBroke = 3,
414 	KBRSaltpackSenderTypeTrackingOk = 4,
415 	KBRSaltpackSenderTypeSelf = 5,
416 };
417 
418 @interface KBRSaltpackSender : KBRObject
419 @property NSString *uid;
420 @property NSString *username;
421 @property KBRSaltpackSenderType senderType;
422 @end
423 
424 @interface KBRHasServerKeysRes : KBRObject
425 @property BOOL hasServerKeys;
426 @end
427 
428 @interface KBRAPIRes : KBRObject
429 @property NSString *status;
430 @property NSString *body;
431 @property NSInteger httpStatus;
432 @property NSString *appStatus;
433 @end
434 
435 @interface KBRBlockIdCombo : KBRObject
436 @property NSString *blockHash;
437 @property NSString *chargedTo;
438 @end
439 
440 @interface KBRChallengeInfo : KBRObject
441 @property int64_t now;
442 @property NSString *challenge;
443 @end
444 
445 @interface KBRGetBlockRes : KBRObject
446 @property NSString *blockKey;
447 @property NSData *buf;
448 @end
449 
450 @interface KBRBlockReference : KBRObject
451 @property KBRBlockIdCombo *bid;
452 @property NSData *nonce;
453 @property NSString *chargedTo;
454 @end
455 
456 @interface KBRBlockReferenceCount : KBRObject
457 @property KBRBlockReference *ref;
458 @property NSInteger liveCount;
459 @end
460 
461 @interface KBRDowngradeReferenceRes : KBRObject
462 @property NSArray *completed; /*of KBRBlockReferenceCount*/
463 @property KBRBlockReference *failed;
464 @end
465 
466 @interface KBRGetCurrentStatusRes : KBRObject
467 @property BOOL configured;
468 @property BOOL registered;
469 @property BOOL loggedIn;
470 @property BOOL sessionIsValid;
471 @property KBRUser *user;
472 @end
473 
474 @interface KBRSessionStatus : KBRObject
475 @property NSString *SessionFor;
476 @property BOOL Loaded;
477 @property BOOL Cleared;
478 @property BOOL SaltOnly;
479 @property BOOL Expired;
480 @end
481 
482 @interface KBRClientDetails : KBRObject
483 @property NSInteger pid;
484 @property KBRClientType clientType;
485 @property NSArray *argv; /*of string*/
486 @property NSString *desc;
487 @property NSString *version;
488 @end
489 
490 @interface KBRPlatformInfo : KBRObject
491 @property NSString *os;
492 @property NSString *osVersion;
493 @property NSString *arch;
494 @property NSString *goVersion;
495 @end
496 
497 @interface KBRLoadDeviceErr : KBRObject
498 @property NSString *where;
499 @property NSString *desc;
500 @end
501 
502 @interface KBRExtendedStatus : KBRObject
503 @property BOOL standalone;
504 @property BOOL passphraseStreamCached;
505 @property BOOL tsecCached;
506 @property BOOL deviceSigKeyCached;
507 @property BOOL deviceEncKeyCached;
508 @property BOOL paperSigKeyCached;
509 @property BOOL paperEncKeyCached;
510 @property BOOL storedSecret;
511 @property BOOL secretPromptSkip;
512 @property KBRDevice *device;
513 @property KBRLoadDeviceErr *deviceErr;
514 @property NSString *logDir;
515 @property KBRSessionStatus *session;
516 @property NSString *defaultUsername;
517 @property NSArray *provisionedUsernames; /*of string*/
518 @property NSArray *Clients; /*of KBRClientDetails*/
519 @property KBRPlatformInfo *platformInfo;
520 @property NSString *defaultDeviceID;
521 @end
522 
523 typedef NS_ENUM (NSInteger, KBRForkType) {
524 	KBRForkTypeNone = 0,
525 	KBRForkTypeAuto = 1,
526 	KBRForkTypeWatchdog = 2,
527 	KBRForkTypeLaunchd = 3,
528 };
529 
530 @interface KBRConfig : KBRObject
531 @property NSString *serverURI;
532 @property NSString *socketFile;
533 @property NSString *label;
534 @property NSString *runMode;
535 @property BOOL gpgExists;
536 @property NSString *gpgPath;
537 @property NSString *version;
538 @property NSString *path;
539 @property NSString *configPath;
540 @property NSString *versionShort;
541 @property NSString *versionFull;
542 @property BOOL isAutoForked;
543 @property KBRForkType forkType;
544 @end
545 
546 @interface KBRConfigValue : KBRObject
547 @property BOOL isNull;
548 @property BOOL b;
549 @property NSInteger i;
550 @property NSString *s;
551 @property NSString *o;
552 @end
553 
554 @interface KBROutOfDateInfo : KBRObject
555 @property NSString *upgradeTo;
556 @property NSString *upgradeURI;
557 @property NSString *customMessage;
558 @property int64_t criticalClockSkew;
559 @end
560 
561 typedef NS_ENUM (NSInteger, KBRStatusCode) {
562 	KBRStatusCodeScok = 0,
563 	KBRStatusCodeScinputerror = 100,
564 	KBRStatusCodeScloginrequired = 201,
565 	KBRStatusCodeScbadsession = 202,
566 	KBRStatusCodeScbadloginusernotfound = 203,
567 	KBRStatusCodeScbadloginpassword = 204,
568 	KBRStatusCodeScnotfound = 205,
569 	KBRStatusCodeScthrottlecontrol = 210,
570 	KBRStatusCodeScdeleted = 216,
571 	KBRStatusCodeScgeneric = 218,
572 	KBRStatusCodeScalreadyloggedin = 235,
573 	KBRStatusCodeScexists = 230,
574 	KBRStatusCodeSccanceled = 237,
575 	KBRStatusCodeScinputcanceled = 239,
576 	KBRStatusCodeScreloginrequired = 274,
577 	KBRStatusCodeScresolutionfailed = 275,
578 	KBRStatusCodeScprofilenotpublic = 276,
579 	KBRStatusCodeScidentifyfailed = 277,
580 	KBRStatusCodeSctrackingbroke = 278,
581 	KBRStatusCodeScwrongcryptoformat = 279,
582 	KBRStatusCodeScdecryptionerror = 280,
583 	KBRStatusCodeScinvalidaddress = 281,
584 	KBRStatusCodeScbademail = 472,
585 	KBRStatusCodeScbadsignupusernametaken = 701,
586 	KBRStatusCodeScbadinvitationcode = 707,
587 	KBRStatusCodeScmissingresult = 801,
588 	KBRStatusCodeSckeynotfound = 901,
589 	KBRStatusCodeSckeyinuse = 907,
590 	KBRStatusCodeSckeybadgen = 913,
591 	KBRStatusCodeSckeynosecret = 914,
592 	KBRStatusCodeSckeybaduids = 915,
593 	KBRStatusCodeSckeynoactive = 916,
594 	KBRStatusCodeSckeynosig = 917,
595 	KBRStatusCodeSckeybadsig = 918,
596 	KBRStatusCodeSckeybadeldest = 919,
597 	KBRStatusCodeSckeynoeldest = 920,
598 	KBRStatusCodeSckeyduplicateupdate = 921,
599 	KBRStatusCodeScsibkeyalreadyexists = 922,
600 	KBRStatusCodeScdecryptionkeynotfound = 924,
601 	KBRStatusCodeSckeynopgpencryption = 927,
602 	KBRStatusCodeSckeynonaclencryption = 928,
603 	KBRStatusCodeSckeysyncedpgpnotfound = 929,
604 	KBRStatusCodeSckeynomatchinggpg = 930,
605 	KBRStatusCodeSckeyrevoked = 931,
606 	KBRStatusCodeScbadtracksession = 1301,
607 	KBRStatusCodeScdevicebadname = 1404,
608 	KBRStatusCodeScdevicenameinuse = 1408,
609 	KBRStatusCodeScdevicenotfound = 1409,
610 	KBRStatusCodeScdevicemismatch = 1410,
611 	KBRStatusCodeScdevicerequired = 1411,
612 	KBRStatusCodeScdeviceprevprovisioned = 1413,
613 	KBRStatusCodeScdevicenoprovision = 1414,
614 	KBRStatusCodeScstreamexists = 1501,
615 	KBRStatusCodeScstreamnotfound = 1502,
616 	KBRStatusCodeScstreamwrongkind = 1503,
617 	KBRStatusCodeScstreameof = 1504,
618 	KBRStatusCodeScgenericapierror = 1600,
619 	KBRStatusCodeScapinetworkerror = 1601,
620 	KBRStatusCodeSctimeout = 1602,
621 	KBRStatusCodeScprooferror = 1701,
622 	KBRStatusCodeScidentificationexpired = 1702,
623 	KBRStatusCodeScselfnotfound = 1703,
624 	KBRStatusCodeScbadkexphrase = 1704,
625 	KBRStatusCodeScnouidelegation = 1705,
626 	KBRStatusCodeScnoui = 1706,
627 	KBRStatusCodeScgpgunavailable = 1707,
628 	KBRStatusCodeScinvalidversionerror = 1800,
629 	KBRStatusCodeScoldversionerror = 1801,
630 	KBRStatusCodeScinvalidlocationerror = 1802,
631 	KBRStatusCodeScservicestatuserror = 1803,
632 	KBRStatusCodeScinstallerror = 1804,
633 	KBRStatusCodeScchatinternal = 2500,
634 	KBRStatusCodeScchatratelimit = 2501,
635 	KBRStatusCodeScchatconvexists = 2502,
636 	KBRStatusCodeScchatunknowntlfid = 2503,
637 	KBRStatusCodeScchatnotinconv = 2504,
638 	KBRStatusCodeScchatbadmsg = 2505,
639 	KBRStatusCodeScchatbroadcast = 2506,
640 	KBRStatusCodeScchatalreadysuperseded = 2507,
641 	KBRStatusCodeScchatalreadydeleted = 2508,
642 	KBRStatusCodeScchattlffinalized = 2509,
643 	KBRStatusCodeScchatcollision = 2510,
644 };
645 
646 @interface KBRED25519SignatureInfo : KBRObject
647 @property NSData *sig;
648 @property NSData *publicKey;
649 @end
650 
651 @interface KBRCiphertextBundle : KBRObject
652 @property NSString *kid;
653 @property NSData *ciphertext;
654 @property NSData *nonce;
655 @property NSData *publicKey;
656 @end
657 
658 @interface KBRUnboxAnyRes : KBRObject
659 @property NSString *kid;
660 @property NSData *plaintext;
661 @property NSInteger index;
662 @end
663 
664 @interface KBRRegisterAddressRes : KBRObject
665 @property NSString *type;
666 @property NSString *family;
667 @end
668 
669 typedef NS_ENUM (NSInteger, KBRExitCode) {
670 	KBRExitCodeOk = 0,
671 	KBRExitCodeNotok = 2,
672 	KBRExitCodeRestart = 4,
673 };
674 
675 @interface KBRFirstStepResult : KBRObject
676 @property NSInteger valPlusTwo;
677 @end
678 
679 @interface KBRDeviceDetail : KBRObject
680 @property KBRDevice *device;
681 @property BOOL eldest;
682 @property KBRDevice *provisioner;
683 @property int64_t provisionedAt;
684 @property int64_t revokedAt;
685 @property NSString *revokedBy;
686 @property KBRDevice *revokedByDevice;
687 @property BOOL currentDevice;
688 @end
689 
690 @interface KBRFolder : KBRObject
691 @property NSString *name;
692 @property BOOL private;
693 @property BOOL notificationsOn;
694 @property BOOL created;
695 @end
696 
697 @interface KBRFavoritesResult : KBRObject
698 @property NSArray *favoriteFolders; /*of KBRFolder*/
699 @property NSArray *ignoredFolders; /*of KBRFolder*/
700 @property NSArray *foldersNew; /*of KBRFolder*/
701 @end
702 
703 @interface KBRFile : KBRObject
704 @property NSString *path;
705 @end
706 
707 @interface KBRListResult : KBRObject
708 @property NSArray *files; /*of KBRFile*/
709 @end
710 
711 @interface KBRGPGKey : KBRObject
712 @property NSString *algorithm;
713 @property NSString *keyID;
714 @property NSString *creation;
715 @property NSString *expiration;
716 @property NSArray *identities; /*of KBRPGPIdentity*/
717 @end
718 
719 @interface KBRSelectKeyRes : KBRObject
720 @property NSString *keyID;
721 @property BOOL doSecretPush;
722 @end
723 
724 @interface KBRIdentifyProofBreak : KBRObject
725 @property KBRRemoteProof *remoteProof;
726 @property KBRLinkCheckResult *lcr;
727 @end
728 
729 @interface KBRIdentifyTrackBreaks : KBRObject
730 @property NSArray *keys; /*of KBRIdentifyKey*/
731 @property NSArray *proofs; /*of KBRIdentifyProofBreak*/
732 @end
733 
734 @interface KBRIdentify2Res : KBRObject
735 @property KBRUserPlusKeys *upk;
736 @property KBRIdentifyTrackBreaks *trackBreaks;
737 @end
738 
739 typedef NS_ENUM (NSInteger, KBRInstallStatus) {
740 	KBRInstallStatusUnknown = 0,
741 	KBRInstallStatusError = 1,
742 	KBRInstallStatusNotInstalled = 2,
743 	KBRInstallStatusInstalled = 4,
744 };
745 
746 typedef NS_ENUM (NSInteger, KBRInstallAction) {
747 	KBRInstallActionUnknown = 0,
748 	KBRInstallActionNone = 1,
749 	KBRInstallActionUpgrade = 2,
750 	KBRInstallActionReinstall = 3,
751 	KBRInstallActionInstall = 4,
752 };
753 
754 @interface KBRServiceStatus : KBRObject
755 @property NSString *version;
756 @property NSString *label;
757 @property NSString *pid;
758 @property NSString *lastExitStatus;
759 @property NSString *bundleVersion;
760 @property KBRInstallStatus installStatus;
761 @property KBRInstallAction installAction;
762 @property KBRStatus *status;
763 @end
764 
765 @interface KBRServicesStatus : KBRObject
766 @property NSArray *service; /*of KBRServiceStatus*/
767 @property NSArray *kbfs; /*of KBRServiceStatus*/
768 @property NSArray *updater; /*of KBRServiceStatus*/
769 @end
770 
771 @interface KBRFuseMountInfo : KBRObject
772 @property NSString *path;
773 @property NSString *fstype;
774 @property NSString *output;
775 @end
776 
777 @interface KBRFuseStatus : KBRObject
778 @property NSString *version;
779 @property NSString *bundleVersion;
780 @property NSString *kextID;
781 @property NSString *path;
782 @property BOOL kextStarted;
783 @property KBRInstallStatus installStatus;
784 @property KBRInstallAction installAction;
785 @property NSArray *mountInfos; /*of KBRFuseMountInfo*/
786 @property KBRStatus *status;
787 @end
788 
789 @interface KBRComponentResult : KBRObject
790 @property NSString *name;
791 @property KBRStatus *status;
792 @end
793 
794 @interface KBRInstallResult : KBRObject
795 @property NSArray *componentResults; /*of KBRComponentResult*/
796 @property KBRStatus *status;
797 @property BOOL fatal;
798 @end
799 
800 @interface KBRUninstallResult : KBRObject
801 @property NSArray *componentResults; /*of KBRComponentResult*/
802 @property KBRStatus *status;
803 @end
804 
805 typedef NS_ENUM (NSInteger, KBRFSStatusCode) {
806 	KBRFSStatusCodeStart = 0,
807 	KBRFSStatusCodeFinish = 1,
808 	KBRFSStatusCodeError = 2,
809 };
810 
811 typedef NS_ENUM (NSInteger, KBRFSNotificationType) {
812 	KBRFSNotificationTypeEncrypting = 0,
813 	KBRFSNotificationTypeDecrypting = 1,
814 	KBRFSNotificationTypeSigning = 2,
815 	KBRFSNotificationTypeVerifying = 3,
816 	KBRFSNotificationTypeRekeying = 4,
817 	KBRFSNotificationTypeConnection = 5,
818 	KBRFSNotificationTypeMdReadSuccess = 6,
819 	KBRFSNotificationTypeFileCreated = 7,
820 	KBRFSNotificationTypeFileModified = 8,
821 	KBRFSNotificationTypeFileDeleted = 9,
822 	KBRFSNotificationTypeFileRenamed = 10,
823 };
824 
825 typedef NS_ENUM (NSInteger, KBRFSErrorType) {
826 	KBRFSErrorTypeAccessDenied = 0,
827 	KBRFSErrorTypeUserNotFound = 1,
828 	KBRFSErrorTypeRevokedDataDetected = 2,
829 	KBRFSErrorTypeNotLoggedIn = 3,
830 	KBRFSErrorTypeTimeout = 4,
831 	KBRFSErrorTypeRekeyNeeded = 5,
832 	KBRFSErrorTypeBadFolder = 6,
833 	KBRFSErrorTypeNotImplemented = 7,
834 	KBRFSErrorTypeOldVersion = 8,
835 	KBRFSErrorTypeOverQuota = 9,
836 	KBRFSErrorTypeNoSigChain = 10,
837 	KBRFSErrorTypeTooManyFolders = 11,
838 };
839 
840 @interface KBRFSNotification : KBRObject
841 @property BOOL publicTopLevelFolder;
842 @property NSString *filename;
843 @property NSString *status;
844 @property KBRFSStatusCode statusCode;
845 @property KBRFSNotificationType notificationType;
846 @property KBRFSErrorType errorType;
847 @property NSString *writerUid;
848 @property int64_t localTime;
849 @end
850 
851 @interface KBRFSEditListRequest : KBRObject
852 @property KBRFolder *folder;
853 @property NSInteger requestID;
854 @end
855 
856 @interface KBRFSSyncStatusRequest : KBRObject
857 @property NSInteger requestID;
858 @end
859 
860 @interface KBRFSPathSyncStatus : KBRObject
861 @property BOOL publicTopLevelFolder;
862 @property NSString *path;
863 @property int64_t syncingBytes;
864 @property int64_t syncingOps;
865 @property int64_t syncedBytes;
866 @end
867 
868 @interface KBRFSSyncStatus : KBRObject
869 @property int64_t totalSyncingBytes;
870 @property int64_t totalSyncingOps;
871 @property NSArray *pathStatuses; /*of KBRFSPathSyncStatus*/
872 @end
873 
874 @interface KBRPassphraseStream : KBRObject
875 @property NSData *passphraseStream;
876 @property NSInteger generation;
877 @end
878 
879 @interface KBRHello2Res : KBRObject
880 @property NSString *encryptionKey;
881 @property NSString *sigPayload;
882 @end
883 
884 @interface KBRConfiguredAccount : KBRObject
885 @property NSString *username;
886 @property BOOL hasStoredSecret;
887 @end
888 
889 @interface KBRKeyHalf : KBRObject
890 @property NSString *user;
891 @property NSString *deviceKID;
892 @property NSData *key;
893 @end
894 
895 @interface KBRMDBlock : KBRObject
896 @property NSInteger version;
897 @property int64_t timestamp;
898 @property NSData *block;
899 @end
900 
901 @interface KBRKeyBundle : KBRObject
902 @property NSInteger version;
903 @property NSData *bundle;
904 @end
905 
906 @interface KBRMetadataResponse : KBRObject
907 @property NSString *folderID;
908 @property NSArray *mdBlocks; /*of KBRMDBlock*/
909 @end
910 
911 @interface KBRMerkleRoot : KBRObject
912 @property NSInteger version;
913 @property NSData *root;
914 @end
915 
916 @interface KBRPingResponse : KBRObject
917 @property int64_t timestamp;
918 @end
919 
920 @interface KBRKeyBundleResponse : KBRObject
921 @property KBRKeyBundle *WriterBundle;
922 @property KBRKeyBundle *ReaderBundle;
923 @end
924 
925 @interface KBRBadgeState : KBRObject
926 @property NSInteger total;
927 @property NSInteger tlfsNew;
928 @property NSInteger rekeysNeeded;
929 @property NSInteger followersNew;
930 @property NSInteger unreadChatMessages;
931 @property NSInteger unreadChatConversations;
932 @property NSArray *conversations; /*of KBRBadgeConversationInfo*/
933 @end
934 
935 @interface KBRBadgeConversationInfo : KBRObject
936 @property NSData *convID;
937 @property NSInteger UnreadMessages;
938 @end
939 
940 @interface KBRNotificationChannels : KBRObject
941 @property BOOL session;
942 @property BOOL users;
943 @property BOOL kbfs;
944 @property BOOL tracking;
945 @property BOOL favorites;
946 @property BOOL paperkeys;
947 @property BOOL keyfamily;
948 @property BOOL service;
949 @property BOOL app;
950 @property BOOL chat;
951 @property BOOL pgp;
952 @property BOOL kbfsrequest;
953 @property BOOL badges;
954 @property BOOL reachability;
955 @end
956 
957 @interface KBRFeature : KBRObject
958 @property BOOL allow;
959 @property BOOL defaultValue;
960 @property BOOL readonly;
961 @property NSString *label;
962 @end
963 
964 @interface KBRGUIEntryFeatures : KBRObject
965 @property KBRFeature *showTyping;
966 @end
967 
968 typedef NS_ENUM (NSInteger, KBRPassphraseType) {
969 	KBRPassphraseTypeNone = 0,
970 	KBRPassphraseTypePaperKey = 1,
971 	KBRPassphraseTypePassPhrase = 2,
972 	KBRPassphraseTypeVerifyPassPhrase = 3,
973 };
974 
975 @interface KBRGUIEntryArg : KBRObject
976 @property NSString *windowTitle;
977 @property NSString *prompt;
978 @property NSString *username;
979 @property NSString *submitLabel;
980 @property NSString *cancelLabel;
981 @property NSString *retryLabel;
982 @property KBRPassphraseType type;
983 @property KBRGUIEntryFeatures *features;
984 @end
985 
986 @interface KBRGetPassphraseRes : KBRObject
987 @property NSString *passphrase;
988 @property BOOL storeSecret;
989 @end
990 
991 typedef NS_ENUM (NSInteger, KBRSignMode) {
992 	KBRSignModeAttached = 0,
993 	KBRSignModeDetached = 1,
994 	KBRSignModeClear = 2,
995 };
996 
997 @interface KBRPGPSignOptions : KBRObject
998 @property NSString *keyQuery;
999 @property KBRSignMode mode;
1000 @property BOOL binaryIn;
1001 @property BOOL binaryOut;
1002 @end
1003 
1004 @interface KBRPGPEncryptOptions : KBRObject
1005 @property NSArray *recipients; /*of string*/
1006 @property BOOL noSign;
1007 @property BOOL noSelf;
1008 @property BOOL binaryOut;
1009 @property NSString *keyQuery;
1010 @end
1011 
1012 @interface KBRPGPSigVerification : KBRObject
1013 @property BOOL isSigned;
1014 @property BOOL verified;
1015 @property KBRUser *signer;
1016 @property KBRPublicKey *signKey;
1017 @end
1018 
1019 @interface KBRPGPDecryptOptions : KBRObject
1020 @property BOOL assertSigned;
1021 @property NSString *signedBy;
1022 @end
1023 
1024 @interface KBRPGPVerifyOptions : KBRObject
1025 @property NSString *signedBy;
1026 @property NSData *signature;
1027 @end
1028 
1029 @interface KBRKeyInfo : KBRObject
1030 @property NSString *fingerprint;
1031 @property NSString *key;
1032 @property NSString *desc;
1033 @end
1034 
1035 @interface KBRPGPQuery : KBRObject
1036 @property BOOL secret;
1037 @property NSString *query;
1038 @property BOOL exactMatch;
1039 @end
1040 
1041 @interface KBRPGPCreateUids : KBRObject
1042 @property BOOL useDefault;
1043 @property NSArray *ids; /*of KBRPGPIdentity*/
1044 @end
1045 
1046 @interface KBRPGPPurgeRes : KBRObject
1047 @property NSArray *filenames; /*of string*/
1048 @end
1049 
1050 typedef NS_ENUM (NSInteger, KBRFileType) {
1051 	KBRFileTypeUnknown = 0,
1052 	KBRFileTypeDirectory = 1,
1053 	KBRFileTypeFile = 2,
1054 };
1055 
1056 @interface KBRFileDescriptor : KBRObject
1057 @property NSString *name;
1058 @property KBRFileType type;
1059 @end
1060 
1061 @interface KBRProcess : KBRObject
1062 @property NSString *pid;
1063 @property NSString *command;
1064 @property NSArray *fileDescriptors; /*of KBRFileDescriptor*/
1065 @end
1066 
1067 @interface KBRCheckProofStatus : KBRObject
1068 @property BOOL found;
1069 @property KBRProofStatus status;
1070 @property NSString *proofText;
1071 @property KBRProofState state;
1072 @end
1073 
1074 @interface KBRStartProofResult : KBRObject
1075 @property NSString *sigID;
1076 @end
1077 
1078 typedef NS_ENUM (NSInteger, KBRPromptOverwriteType) {
1079 	KBRPromptOverwriteTypeSocial = 0,
1080 	KBRPromptOverwriteTypeSite = 1,
1081 };
1082 
1083 typedef NS_ENUM (NSInteger, KBRProvisionMethod) {
1084 	KBRProvisionMethodDevice = 0,
1085 	KBRProvisionMethodPaperKey = 1,
1086 	KBRProvisionMethodPassphrase = 2,
1087 	KBRProvisionMethodGpgImport = 3,
1088 	KBRProvisionMethodGpgSign = 4,
1089 };
1090 
1091 typedef NS_ENUM (NSInteger, KBRGPGMethod) {
1092 	KBRGPGMethodGpgNone = 0,
1093 	KBRGPGMethodGpgImport = 1,
1094 	KBRGPGMethodGpgSign = 2,
1095 };
1096 
1097 typedef NS_ENUM (NSInteger, KBRChooseType) {
1098 	KBRChooseTypeExistingDevice = 0,
1099 	KBRChooseTypeNewDevice = 1,
1100 };
1101 
1102 @interface KBRSecretResponse : KBRObject
1103 @property NSData *secret;
1104 @property NSString *phrase;
1105 @end
1106 
1107 @interface KBRVerifySessionRes : KBRObject
1108 @property NSString *uid;
1109 @property NSString *sid;
1110 @property NSInteger generated;
1111 @property NSInteger lifetime;
1112 @end
1113 
1114 typedef NS_ENUM (NSInteger, KBRReachable) {
1115 	KBRReachableUnknown = 0,
1116 	KBRReachableYes = 1,
1117 	KBRReachableNo = 2,
1118 };
1119 
1120 @interface KBRReachability : KBRObject
1121 @property KBRReachable reachable;
1122 @end
1123 
1124 @interface KBRTLF : KBRObject
1125 @property NSString *id;
1126 @property NSString *name;
1127 @property NSArray *writers; /*of string*/
1128 @property NSArray *readers; /*of string*/
1129 @property BOOL isPrivate;
1130 @end
1131 
1132 @interface KBRProblemTLF : KBRObject
1133 @property KBRTLF *tlf;
1134 @property NSInteger score;
1135 @property NSArray *solution_kids; /*of NSString*/
1136 @end
1137 
1138 @interface KBRProblemSet : KBRObject
1139 @property KBRUser *user;
1140 @property NSString *kid;
1141 @property NSArray *tlfs; /*of KBRProblemTLF*/
1142 @end
1143 
1144 @interface KBRProblemSetDevices : KBRObject
1145 @property KBRProblemSet *problemSet;
1146 @property NSArray *devices; /*of KBRDevice*/
1147 @end
1148 
1149 typedef NS_ENUM (NSInteger, KBROutcome) {
1150 	KBROutcomeNone = 0,
1151 	KBROutcomeFixed = 1,
1152 	KBROutcomeIgnored = 2,
1153 };
1154 
1155 @interface KBRRevokeWarning : KBRObject
1156 @property NSArray *endangeredTLFs; /*of KBRTLF*/
1157 @end
1158 
1159 typedef NS_ENUM (NSInteger, KBRRekeyEventType) {
1160 	KBRRekeyEventTypeNone = 0,
1161 	KBRRekeyEventTypeNotLoggedIn = 1,
1162 	KBRRekeyEventTypeApiError = 2,
1163 	KBRRekeyEventTypeNoProblems = 3,
1164 	KBRRekeyEventTypeLoadMeError = 4,
1165 	KBRRekeyEventTypeCurrentDeviceCanRekey = 5,
1166 	KBRRekeyEventTypeDeviceLoadError = 6,
1167 	KBRRekeyEventTypeHarass = 7,
1168 	KBRRekeyEventTypeNoGregorMessages = 8,
1169 };
1170 
1171 @interface KBRRekeyEvent : KBRObject
1172 @property KBRRekeyEventType eventType;
1173 @property NSInteger interruptType;
1174 @end
1175 
1176 @interface KBRSaltpackEncryptOptions : KBRObject
1177 @property NSArray *recipients; /*of string*/
1178 @property BOOL hideSelf;
1179 @property BOOL noSelfEncrypt;
1180 @property BOOL binary;
1181 @property BOOL hideRecipients;
1182 @end
1183 
1184 @interface KBRSaltpackDecryptOptions : KBRObject
1185 @property BOOL interactive;
1186 @property BOOL forceRemoteCheck;
1187 @property BOOL usePaperKey;
1188 @end
1189 
1190 @interface KBRSaltpackSignOptions : KBRObject
1191 @property BOOL detached;
1192 @property BOOL binary;
1193 @end
1194 
1195 @interface KBRSaltpackVerifyOptions : KBRObject
1196 @property NSString *signedBy;
1197 @property NSData *signature;
1198 @end
1199 
1200 @interface KBRSaltpackEncryptedMessageInfo : KBRObject
1201 @property NSArray *devices; /*of KBRDevice*/
1202 @property NSInteger numAnonReceivers;
1203 @property BOOL receiverIsAnon;
1204 @property KBRSaltpackSender *sender;
1205 @end
1206 
1207 @interface KBRSecretEntryArg : KBRObject
1208 @property NSString *desc;
1209 @property NSString *prompt;
1210 @property NSString *err;
1211 @property NSString *cancel;
1212 @property NSString *ok;
1213 @property NSString *reason;
1214 @property BOOL showTyping;
1215 @end
1216 
1217 @interface KBRSecretEntryRes : KBRObject
1218 @property NSString *text;
1219 @property BOOL canceled;
1220 @property BOOL storeSecret;
1221 @end
1222 
1223 @interface KBRSecretKeys : KBRObject
1224 @property NSData *signing;
1225 @property NSData *encryption;
1226 @end
1227 
1228 @interface KBRSession : KBRObject
1229 @property NSString *uid;
1230 @property NSString *username;
1231 @property NSString *token;
1232 @property NSString *deviceSubkeyKid;
1233 @property NSString *deviceSibkeyKid;
1234 @end
1235 
1236 @interface KBRSignupRes : KBRObject
1237 @property BOOL passphraseOk;
1238 @property BOOL postOk;
1239 @property BOOL writeOk;
1240 @end
1241 
1242 @interface KBRSig : KBRObject
1243 @property NSInteger seqno;
1244 @property NSString *sigID;
1245 @property NSString *sigIDDisplay;
1246 @property NSString *type;
1247 @property int64_t cTime;
1248 @property BOOL revoked;
1249 @property BOOL active;
1250 @property NSString *key;
1251 @property NSString *body;
1252 @end
1253 
1254 @interface KBRSigTypes : KBRObject
1255 @property BOOL track;
1256 @property BOOL proof;
1257 @property BOOL cryptocurrency;
1258 @property BOOL isSelf;
1259 @end
1260 
1261 @interface KBRSigListArgs : KBRObject
1262 @property NSInteger sessionID;
1263 @property NSString *username;
1264 @property BOOL allKeys;
1265 @property KBRSigTypes *types;
1266 @property NSString *filterx;
1267 @property BOOL verbose;
1268 @property BOOL revoked;
1269 @end
1270 
1271 @interface KBRTest : KBRObject
1272 @property NSString *reply;
1273 @end
1274 
1275 typedef NS_ENUM (NSInteger, KBRTLFIdentifyBehavior) {
1276 	KBRTLFIdentifyBehaviorDefaultKbfs = 0,
1277 	KBRTLFIdentifyBehaviorChatCli = 1,
1278 	KBRTLFIdentifyBehaviorChatGui = 2,
1279 	KBRTLFIdentifyBehaviorChatGuiStrict = 3,
1280 };
1281 
1282 @interface KBRCryptKey : KBRObject
1283 @property NSInteger KeyGeneration;
1284 @property NSData *Key;
1285 @end
1286 
1287 @interface KBRTLFBreak : KBRObject
1288 @property NSArray *breaks; /*of KBRTLFIdentifyFailure*/
1289 @end
1290 
1291 @interface KBRTLFIdentifyFailure : KBRObject
1292 @property KBRUser *user;
1293 @property KBRIdentifyTrackBreaks *breaks;
1294 @end
1295 
1296 @interface KBRCanonicalTLFNameAndIDWithBreaks : KBRObject
1297 @property NSString *tlfID;
1298 @property NSString *CanonicalName;
1299 @property KBRTLFBreak *breaks;
1300 @end
1301 
1302 @interface KBRGetTLFCryptKeysRes : KBRObject
1303 @property KBRCanonicalTLFNameAndIDWithBreaks *nameIDBreaks;
1304 @property NSArray *CryptKeys; /*of KBRCryptKey*/
1305 @end
1306 
1307 @interface KBRTLFQuery : KBRObject
1308 @property NSString *tlfName;
1309 @property KBRTLFIdentifyBehavior identifyBehavior;
1310 @end
1311 
1312 typedef NS_ENUM (NSInteger, KBRPromptDefault) {
1313 	KBRPromptDefaultNone = 0,
1314 	KBRPromptDefaultYes = 1,
1315 	KBRPromptDefaultNo = 2,
1316 };
1317 
1318 @interface KBRTracker : KBRObject
1319 @property NSString *tracker;
1320 @property NSInteger status;
1321 @property int64_t mTime;
1322 @end
1323 
1324 @interface KBRTrackProof : KBRObject
1325 @property NSString *proofType;
1326 @property NSString *proofName;
1327 @property NSString *idString;
1328 @end
1329 
1330 @interface KBRWebProof : KBRObject
1331 @property NSString *hostname;
1332 @property NSArray *protocols; /*of string*/
1333 @end
1334 
1335 @interface KBRProofs : KBRObject
1336 @property NSArray *social; /*of KBRTrackProof*/
1337 @property NSArray *web; /*of KBRWebProof*/
1338 @property NSArray *publicKeys; /*of KBRPublicKey*/
1339 @end
1340 
1341 @interface KBRUserSummary : KBRObject
1342 @property NSString *uid;
1343 @property NSString *username;
1344 @property NSString *thumbnail;
1345 @property NSInteger idVersion;
1346 @property NSString *fullName;
1347 @property NSString *bio;
1348 @property KBRProofs *proofs;
1349 @property NSString *sigIDDisplay;
1350 @property int64_t trackTime;
1351 @end
1352 
1353 @interface KBREmail : KBRObject
1354 @property NSString *email;
1355 @property BOOL isVerified;
1356 @end
1357 
1358 @interface KBRUserSettings : KBRObject
1359 @property NSArray *emails; /*of KBREmail*/
1360 @end
1361 
1362 @interface KBRSearchComponent : KBRObject
1363 @property NSString *key;
1364 @property NSString *value;
1365 @property double score;
1366 @end
1367 
1368 @interface KBRSearchResult : KBRObject
1369 @property NSString *uid;
1370 @property NSString *username;
1371 @property NSArray *components; /*of KBRSearchComponent*/
1372 @property double score;
1373 @end
1374 
1375 @interface KBRUserSummary2 : KBRObject
1376 @property NSString *uid;
1377 @property NSString *username;
1378 @property NSString *thumbnail;
1379 @property NSString *fullName;
1380 @property BOOL isFollower;
1381 @property BOOL isFollowee;
1382 @end
1383 
1384 @interface KBRUserSummary2Set : KBRObject
1385 @property NSArray *users; /*of KBRUserSummary2*/
1386 @property int64_t time;
1387 @property NSInteger version;
1388 @end
1389 @interface KBRDisplayTLFCreateWithInviteRequestParams : KBRRequestParams
1390 @property NSInteger sessionID;
1391 @property NSString *folderName;
1392 @property BOOL isPrivate;
1393 @property NSString *assertion;
1394 @property KBRSocialAssertion *socialAssertion;
1395 @property NSString *inviteLink;
1396 @property BOOL throttled;
1397 @end
1398 @interface KBRStartRequestParams : KBRRequestParams
1399 @property NSInteger sessionID;
1400 @property NSString *username;
1401 @property KBRIdentifyReason *reason;
1402 @property BOOL forceDisplay;
1403 @end
1404 @interface KBRDisplayKeyRequestParams : KBRRequestParams
1405 @property NSInteger sessionID;
1406 @property KBRIdentifyKey *key;
1407 @end
1408 @interface KBRReportLastTrackRequestParams : KBRRequestParams
1409 @property NSInteger sessionID;
1410 @property KBRTrackSummary *track;
1411 @end
1412 @interface KBRLaunchNetworkChecksRequestParams : KBRRequestParams
1413 @property NSInteger sessionID;
1414 @property KBRIdentity *identity;
1415 @property KBRUser *user;
1416 @end
1417 @interface KBRDisplayTrackStatementRequestParams : KBRRequestParams
1418 @property NSInteger sessionID;
1419 @property NSString *stmt;
1420 @end
1421 @interface KBRFinishWebProofCheckRequestParams : KBRRequestParams
1422 @property NSInteger sessionID;
1423 @property KBRRemoteProof *rp;
1424 @property KBRLinkCheckResult *lcr;
1425 @end
1426 @interface KBRFinishSocialProofCheckRequestParams : KBRRequestParams
1427 @property NSInteger sessionID;
1428 @property KBRRemoteProof *rp;
1429 @property KBRLinkCheckResult *lcr;
1430 @end
1431 @interface KBRDisplayCryptocurrencyRequestParams : KBRRequestParams
1432 @property NSInteger sessionID;
1433 @property KBRCryptocurrency *c;
1434 @end
1435 @interface KBRReportTrackTokenRequestParams : KBRRequestParams
1436 @property NSInteger sessionID;
1437 @property NSString *trackToken;
1438 @end
1439 @interface KBRDisplayUserCardRequestParams : KBRRequestParams
1440 @property NSInteger sessionID;
1441 @property KBRUserCard *card;
1442 @end
1443 @interface KBRConfirmRequestParams : KBRRequestParams
1444 @property NSInteger sessionID;
1445 @property KBRIdentifyOutcome *outcome;
1446 @end
1447 @interface KBRCancelRequestParams : KBRRequestParams
1448 @property NSInteger sessionID;
1449 @end
1450 @interface KBRFinishRequestParams : KBRRequestParams
1451 @property NSInteger sessionID;
1452 @end
1453 @interface KBRDismissRequestParams : KBRRequestParams
1454 @property NSInteger sessionID;
1455 @property NSString *username;
1456 @property KBRDismissReason *reason;
1457 @end
1458 @interface KBRSaltpackPromptForDecryptRequestParams : KBRRequestParams
1459 @property NSInteger sessionID;
1460 @property KBRSaltpackSender *sender;
1461 @property BOOL usedDelegateUI;
1462 @end
1463 @interface KBRSaltpackVerifySuccessRequestParams : KBRRequestParams
1464 @property NSInteger sessionID;
1465 @property NSString *signingKID;
1466 @property KBRSaltpackSender *sender;
1467 @end
1468 @interface KBRPassphraseChangeRequestParams : KBRRequestParams
1469 @property NSInteger sessionID;
1470 @property NSString *oldPassphrase;
1471 @property NSString *passphrase;
1472 @property BOOL force;
1473 @end
1474 @interface KBRPassphrasePromptRequestParams : KBRRequestParams
1475 @property NSInteger sessionID;
1476 @property KBRGUIEntryArg *guiArg;
1477 @end
1478 @interface KBREmailChangeRequestParams : KBRRequestParams
1479 @property NSInteger sessionID;
1480 @property NSString *emailNew;
1481 @end
1482 @interface KBRHasServerKeysRequestParams : KBRRequestParams
1483 @property NSInteger sessionID;
1484 @end
1485 @interface KBRGetRequestParams : KBRRequestParams
1486 @property NSString *endpoint;
1487 @property NSArray *args;
1488 @property NSArray *httpStatus;
1489 @property NSArray *appStatusCode;
1490 @end
1491 @interface KBRPostRequestParams : KBRRequestParams
1492 @property NSString *endpoint;
1493 @property NSArray *args;
1494 @property NSArray *httpStatus;
1495 @property NSArray *appStatusCode;
1496 @end
1497 @interface KBRPostJSONRequestParams : KBRRequestParams
1498 @property NSString *endpoint;
1499 @property NSArray *args;
1500 @property NSArray *JSONPayload;
1501 @property NSArray *httpStatus;
1502 @property NSArray *appStatusCode;
1503 @end
1504 @interface KBRAuthenticateSessionRequestParams : KBRRequestParams
1505 @property NSString *signature;
1506 @end
1507 @interface KBRPutBlockRequestParams : KBRRequestParams
1508 @property KBRBlockIdCombo *bid;
1509 @property NSString *folder;
1510 @property NSString *blockKey;
1511 @property NSData *buf;
1512 @end
1513 @interface KBRGetBlockRequestParams : KBRRequestParams
1514 @property KBRBlockIdCombo *bid;
1515 @property NSString *folder;
1516 @end
1517 @interface KBRAddReferenceRequestParams : KBRRequestParams
1518 @property NSString *folder;
1519 @property KBRBlockReference *ref;
1520 @end
1521 @interface KBRDelReferenceRequestParams : KBRRequestParams
1522 @property NSString *folder;
1523 @property KBRBlockReference *ref;
1524 @end
1525 @interface KBRArchiveReferenceRequestParams : KBRRequestParams
1526 @property NSString *folder;
1527 @property NSArray *refs;
1528 @end
1529 @interface KBRDelReferenceWithCountRequestParams : KBRRequestParams
1530 @property NSString *folder;
1531 @property NSArray *refs;
1532 @end
1533 @interface KBRArchiveReferenceWithCountRequestParams : KBRRequestParams
1534 @property NSString *folder;
1535 @property NSArray *refs;
1536 @end
1537 @interface KBRRegisterBTCRequestParams : KBRRequestParams
1538 @property NSInteger sessionID;
1539 @property NSString *address;
1540 @property BOOL force;
1541 @end
1542 @interface KBRGetCurrentStatusRequestParams : KBRRequestParams
1543 @property NSInteger sessionID;
1544 @end
1545 @interface KBRGetExtendedStatusRequestParams : KBRRequestParams
1546 @property NSInteger sessionID;
1547 @end
1548 @interface KBRGetConfigRequestParams : KBRRequestParams
1549 @property NSInteger sessionID;
1550 @end
1551 @interface KBRSetUserConfigRequestParams : KBRRequestParams
1552 @property NSInteger sessionID;
1553 @property NSString *username;
1554 @property NSString *key;
1555 @property NSString *value;
1556 @end
1557 @interface KBRSetPathRequestParams : KBRRequestParams
1558 @property NSInteger sessionID;
1559 @property NSString *path;
1560 @end
1561 @interface KBRHelloIAmRequestParams : KBRRequestParams
1562 @property KBRClientDetails *details;
1563 @end
1564 @interface KBRSetValueRequestParams : KBRRequestParams
1565 @property NSString *path;
1566 @property KBRConfigValue *value;
1567 @end
1568 @interface KBRClearValueRequestParams : KBRRequestParams
1569 @property NSString *path;
1570 @end
1571 @interface KBRGetValueRequestParams : KBRRequestParams
1572 @property NSString *path;
1573 @end
1574 @interface KBRWaitForClientRequestParams : KBRRequestParams
1575 @property KBRClientType clientType;
1576 @property double timeout;
1577 @end
1578 @interface KBRSignED25519RequestParams : KBRRequestParams
1579 @property NSInteger sessionID;
1580 @property NSData *msg;
1581 @property NSString *reason;
1582 @end
1583 @interface KBRSignED25519ForKBFSRequestParams : KBRRequestParams
1584 @property NSInteger sessionID;
1585 @property NSData *msg;
1586 @property NSString *reason;
1587 @end
1588 @interface KBRSignToStringRequestParams : KBRRequestParams
1589 @property NSInteger sessionID;
1590 @property NSData *msg;
1591 @property NSString *reason;
1592 @end
1593 @interface KBRUnboxBytes32RequestParams : KBRRequestParams
1594 @property NSInteger sessionID;
1595 @property NSData *encryptedBytes32;
1596 @property NSData *nonce;
1597 @property NSData *peersPublicKey;
1598 @property NSString *reason;
1599 @end
1600 @interface KBRUnboxBytes32AnyRequestParams : KBRRequestParams
1601 @property NSInteger sessionID;
1602 @property NSArray *bundles;
1603 @property NSString *reason;
1604 @property BOOL promptPaper;
1605 @end
1606 @interface KBRRegisterAddressRequestParams : KBRRequestParams
1607 @property NSInteger sessionID;
1608 @property NSString *address;
1609 @property BOOL force;
1610 @property NSString *wantedFamily;
1611 @end
1612 @interface KBRStopRequestParams : KBRRequestParams
1613 @property NSInteger sessionID;
1614 @property KBRExitCode exitCode;
1615 @end
1616 @interface KBRLogRotateRequestParams : KBRRequestParams
1617 @property NSInteger sessionID;
1618 @end
1619 @interface KBRReloadRequestParams : KBRRequestParams
1620 @property NSInteger sessionID;
1621 @end
1622 @interface KBRDbNukeRequestParams : KBRRequestParams
1623 @property NSInteger sessionID;
1624 @end
1625 @interface KBRAppExitRequestParams : KBRRequestParams
1626 @property NSInteger sessionID;
1627 @end
1628 @interface KBRFirstStepRequestParams : KBRRequestParams
1629 @property NSInteger sessionID;
1630 @property NSInteger val;
1631 @end
1632 @interface KBRSecondStepRequestParams : KBRRequestParams
1633 @property NSInteger sessionID;
1634 @property NSInteger val;
1635 @end
1636 @interface KBRIncrementRequestParams : KBRRequestParams
1637 @property NSInteger sessionID;
1638 @property NSInteger val;
1639 @end
1640 @interface KBRDeviceListRequestParams : KBRRequestParams
1641 @property NSInteger sessionID;
1642 @end
1643 @interface KBRDeviceHistoryListRequestParams : KBRRequestParams
1644 @property NSInteger sessionID;
1645 @end
1646 @interface KBRDeviceAddRequestParams : KBRRequestParams
1647 @property NSInteger sessionID;
1648 @end
1649 @interface KBRCheckDeviceNameFormatRequestParams : KBRRequestParams
1650 @property NSInteger sessionID;
1651 @property NSString *name;
1652 @end
1653 @interface KBRCheckDeviceNameForUserRequestParams : KBRRequestParams
1654 @property NSInteger sessionID;
1655 @property NSString *username;
1656 @property NSString *devicename;
1657 @end
1658 @interface KBRFavoriteAddRequestParams : KBRRequestParams
1659 @property NSInteger sessionID;
1660 @property KBRFolder *folder;
1661 @end
1662 @interface KBRFavoriteIgnoreRequestParams : KBRRequestParams
1663 @property NSInteger sessionID;
1664 @property KBRFolder *folder;
1665 @end
1666 @interface KBRGetFavoritesRequestParams : KBRRequestParams
1667 @property NSInteger sessionID;
1668 @end
1669 @interface KBRListRequestParams : KBRRequestParams
1670 @property NSInteger sessionID;
1671 @property NSString *path;
1672 @end
1673 @interface KBRWantToAddGPGKeyRequestParams : KBRRequestParams
1674 @property NSInteger sessionID;
1675 @end
1676 @interface KBRConfirmDuplicateKeyChosenRequestParams : KBRRequestParams
1677 @property NSInteger sessionID;
1678 @end
1679 @interface KBRSelectKeyAndPushOptionRequestParams : KBRRequestParams
1680 @property NSInteger sessionID;
1681 @property NSArray *keys;
1682 @end
1683 @interface KBRSelectKeyRequestParams : KBRRequestParams
1684 @property NSInteger sessionID;
1685 @property NSArray *keys;
1686 @end
1687 @interface KBRSignRequestParams : KBRRequestParams
1688 @property NSData *msg;
1689 @property NSData *fingerprint;
1690 @end
1691 @interface KBRResolveRequestParams : KBRRequestParams
1692 @property NSString *assertion;
1693 @end
1694 @interface KBRResolve2RequestParams : KBRRequestParams
1695 @property NSString *assertion;
1696 @end
1697 @interface KBRIdentifyRequestParams : KBRRequestParams
1698 @property NSInteger sessionID;
1699 @property NSString *userAssertion;
1700 @property BOOL forceRemoteCheck;
1701 @property BOOL useDelegateUI;
1702 @property KBRIdentifyReason *reason;
1703 @property KBRClientType source;
1704 @end
1705 @interface KBRIdentify2RequestParams : KBRRequestParams
1706 @property NSInteger sessionID;
1707 @property NSString *uid;
1708 @property NSString *userAssertion;
1709 @property KBRIdentifyReason *reason;
1710 @property BOOL useDelegateUI;
1711 @property BOOL alwaysBlock;
1712 @property BOOL noErrorOnTrackFailure;
1713 @property BOOL forceRemoteCheck;
1714 @property BOOL needProofSet;
1715 @property BOOL allowEmptySelfID;
1716 @property BOOL noSkipSelf;
1717 @property BOOL canSuppressUI;
1718 @property BOOL chatGUIMode;
1719 @property BOOL forceDisplay;
1720 @end
1721 @interface KBRFSEventRequestParams : KBRRequestParams
1722 @property KBRFSNotification *event;
1723 @end
1724 @interface KBRFSEditListRequestParams : KBRRequestParams
1725 @property NSArray *edits;
1726 @property NSInteger requestID;
1727 @end
1728 @interface KBRFSSyncStatusRequestParams : KBRRequestParams
1729 @property KBRFSSyncStatus *status;
1730 @property NSInteger requestID;
1731 @end
1732 @interface KBRFSSyncEventRequestParams : KBRRequestParams
1733 @property KBRFSPathSyncStatus *event;
1734 @end
1735 @interface KBRSetCurrentMountDirRequestParams : KBRRequestParams
1736 @property NSString *dir;
1737 @end
1738 @interface KBRHelloRequestParams : KBRRequestParams
1739 @property NSString *uid;
1740 @property NSString *token;
1741 @property NSString *csrf;
1742 @property KBRPassphraseStream *pps;
1743 @property NSString *sigBody;
1744 @end
1745 @interface KBRDidCounterSignRequestParams : KBRRequestParams
1746 @property NSData *sig;
1747 @end
1748 @interface KBRHello2RequestParams : KBRRequestParams
1749 @property NSString *uid;
1750 @property NSString *token;
1751 @property NSString *csrf;
1752 @property NSString *sigBody;
1753 @end
1754 @interface KBRDidCounterSign2RequestParams : KBRRequestParams
1755 @property NSData *sig;
1756 @property NSString *ppsEncrypted;
1757 @end
1758 @interface KBRRegisterLoggerRequestParams : KBRRequestParams
1759 @property NSInteger sessionID;
1760 @property NSString *name;
1761 @property KBRLogLevel level;
1762 @end
1763 @interface KBRLogRequestParams : KBRRequestParams
1764 @property NSInteger sessionID;
1765 @property KBRLogLevel level;
1766 @property KBRText *text;
1767 @end
1768 @interface KBRGetConfiguredAccountsRequestParams : KBRRequestParams
1769 @property NSInteger sessionID;
1770 @end
1771 @interface KBRLoginRequestParams : KBRRequestParams
1772 @property NSInteger sessionID;
1773 @property NSString *deviceType;
1774 @property NSString *usernameOrEmail;
1775 @property KBRClientType clientType;
1776 @end
1777 @interface KBRClearStoredSecretRequestParams : KBRRequestParams
1778 @property NSInteger sessionID;
1779 @property NSString *username;
1780 @end
1781 @interface KBRLogoutRequestParams : KBRRequestParams
1782 @property NSInteger sessionID;
1783 @end
1784 @interface KBRDeprovisionRequestParams : KBRRequestParams
1785 @property NSInteger sessionID;
1786 @property NSString *username;
1787 @property BOOL doRevoke;
1788 @end
1789 @interface KBRRecoverAccountFromEmailAddressRequestParams : KBRRequestParams
1790 @property NSString *email;
1791 @end
1792 @interface KBRPaperKeyRequestParams : KBRRequestParams
1793 @property NSInteger sessionID;
1794 @end
1795 @interface KBRPaperKeySubmitRequestParams : KBRRequestParams
1796 @property NSInteger sessionID;
1797 @property NSString *paperPhrase;
1798 @end
1799 @interface KBRUnlockRequestParams : KBRRequestParams
1800 @property NSInteger sessionID;
1801 @end
1802 @interface KBRUnlockWithPassphraseRequestParams : KBRRequestParams
1803 @property NSInteger sessionID;
1804 @property NSString *passphrase;
1805 @end
1806 @interface KBRPgpProvisionRequestParams : KBRRequestParams
1807 @property NSInteger sessionID;
1808 @property NSString *username;
1809 @property NSString *passphrase;
1810 @property NSString *deviceName;
1811 @end
1812 @interface KBRAccountDeleteRequestParams : KBRRequestParams
1813 @property NSInteger sessionID;
1814 @end
1815 @interface KBRGetEmailOrUsernameRequestParams : KBRRequestParams
1816 @property NSInteger sessionID;
1817 @end
1818 @interface KBRPromptRevokePaperKeysRequestParams : KBRRequestParams
1819 @property NSInteger sessionID;
1820 @property KBRDevice *device;
1821 @property NSInteger index;
1822 @end
1823 @interface KBRDisplayPaperKeyPhraseRequestParams : KBRRequestParams
1824 @property NSInteger sessionID;
1825 @property NSString *phrase;
1826 @end
1827 @interface KBRDisplayPrimaryPaperKeyRequestParams : KBRRequestParams
1828 @property NSInteger sessionID;
1829 @property NSString *phrase;
1830 @end
1831 @interface KBRAuthenticateRequestParams : KBRRequestParams
1832 @property NSString *signature;
1833 @end
1834 @interface KBRPutMetadataRequestParams : KBRRequestParams
1835 @property KBRMDBlock *mdBlock;
1836 @property KBRKeyBundle *readerKeyBundle;
1837 @property KBRKeyBundle *writerKeyBundle;
1838 @property NSDictionary *logTags;
1839 @end
1840 @interface KBRGetMetadataRequestParams : KBRRequestParams
1841 @property NSString *folderID;
1842 @property NSData *folderHandle;
1843 @property NSString *branchID;
1844 @property BOOL unmerged;
1845 @property int64_t startRevision;
1846 @property int64_t stopRevision;
1847 @property NSDictionary *logTags;
1848 @end
1849 @interface KBRRegisterForUpdatesRequestParams : KBRRequestParams
1850 @property NSString *folderID;
1851 @property int64_t currRevision;
1852 @property NSDictionary *logTags;
1853 @end
1854 @interface KBRPruneBranchRequestParams : KBRRequestParams
1855 @property NSString *folderID;
1856 @property NSString *branchID;
1857 @property NSDictionary *logTags;
1858 @end
1859 @interface KBRPutKeysRequestParams : KBRRequestParams
1860 @property NSArray *keyHalves;
1861 @property NSDictionary *logTags;
1862 @end
1863 @interface KBRGetKeyRequestParams : KBRRequestParams
1864 @property NSData *keyHalfID;
1865 @property NSString *deviceKID;
1866 @property NSDictionary *logTags;
1867 @end
1868 @interface KBRDeleteKeyRequestParams : KBRRequestParams
1869 @property NSString *uid;
1870 @property NSString *deviceKID;
1871 @property NSData *keyHalfID;
1872 @property NSDictionary *logTags;
1873 @end
1874 @interface KBRTruncateLockRequestParams : KBRRequestParams
1875 @property NSString *folderID;
1876 @end
1877 @interface KBRTruncateUnlockRequestParams : KBRRequestParams
1878 @property NSString *folderID;
1879 @end
1880 @interface KBRGetFolderHandleRequestParams : KBRRequestParams
1881 @property NSString *folderID;
1882 @property NSString *signature;
1883 @property NSString *challenge;
1884 @end
1885 @interface KBRGetFoldersForRekeyRequestParams : KBRRequestParams
1886 @property NSString *deviceKID;
1887 @end
1888 @interface KBRGetLatestFolderHandleRequestParams : KBRRequestParams
1889 @property NSString *folderID;
1890 @end
1891 @interface KBRGetKeyBundlesRequestParams : KBRRequestParams
1892 @property NSString *folderID;
1893 @property NSString *writerBundleID;
1894 @property NSString *readerBundleID;
1895 @end
1896 @interface KBRGetMerkleRootRequestParams : KBRRequestParams
1897 @property KBRMerkleTreeID treeID;
1898 @property int64_t seqNo;
1899 @end
1900 @interface KBRGetMerkleRootLatestRequestParams : KBRRequestParams
1901 @property KBRMerkleTreeID treeID;
1902 @end
1903 @interface KBRGetMerkleRootSinceRequestParams : KBRRequestParams
1904 @property KBRMerkleTreeID treeID;
1905 @property int64_t when;
1906 @end
1907 @interface KBRGetMerkleNodeRequestParams : KBRRequestParams
1908 @property NSString *hash;
1909 @end
1910 @interface KBRMetadataUpdateRequestParams : KBRRequestParams
1911 @property NSString *folderID;
1912 @property int64_t revision;
1913 @end
1914 @interface KBRFolderNeedsRekeyRequestParams : KBRRequestParams
1915 @property NSString *folderID;
1916 @property int64_t revision;
1917 @end
1918 @interface KBRBadgeStateRequestParams : KBRRequestParams
1919 @property KBRBadgeState *badgeState;
1920 @end
1921 @interface KBRSetNotificationsRequestParams : KBRRequestParams
1922 @property KBRNotificationChannels *channels;
1923 @end
1924 @interface KBRFavoritesChangedRequestParams : KBRRequestParams
1925 @property NSString *uid;
1926 @end
1927 @interface KBRFSActivityRequestParams : KBRRequestParams
1928 @property KBRFSNotification *notification;
1929 @end
1930 @interface KBRFSSyncActivityRequestParams : KBRRequestParams
1931 @property KBRFSPathSyncStatus *status;
1932 @end
1933 @interface KBRFSEditListResponseRequestParams : KBRRequestParams
1934 @property NSArray *edits;
1935 @property NSInteger requestID;
1936 @end
1937 @interface KBRFSSyncStatusResponseRequestParams : KBRRequestParams
1938 @property KBRFSSyncStatus *status;
1939 @property NSInteger requestID;
1940 @end
1941 @interface KBRFSEditListRequestRequestParams : KBRRequestParams
1942 @property KBRFSEditListRequest *req;
1943 @end
1944 @interface KBRFSSyncStatusRequestRequestParams : KBRRequestParams
1945 @property KBRFSSyncStatusRequest *req;
1946 @end
1947 @interface KBRKeyfamilyChangedRequestParams : KBRRequestParams
1948 @property NSString *uid;
1949 @end
1950 @interface KBRPaperKeyCachedRequestParams : KBRRequestParams
1951 @property NSString *uid;
1952 @property NSString *encKID;
1953 @property NSString *sigKID;
1954 @end
1955 @interface KBRLoggedInRequestParams : KBRRequestParams
1956 @property NSString *username;
1957 @end
1958 @interface KBRClientOutOfDateRequestParams : KBRRequestParams
1959 @property NSString *upgradeTo;
1960 @property NSString *upgradeURI;
1961 @property NSString *upgradeMsg;
1962 @end
1963 @interface KBRTrackingChangedRequestParams : KBRRequestParams
1964 @property NSString *uid;
1965 @property NSString *username;
1966 @end
1967 @interface KBRUserChangedRequestParams : KBRRequestParams
1968 @property NSString *uid;
1969 @end
1970 @interface KBRPaperProvisionRequestParams : KBRRequestParams
1971 @property NSInteger sessionID;
1972 @property NSString *username;
1973 @property NSString *deviceName;
1974 @property NSString *paperKey;
1975 @end
1976 @interface KBRPgpSignRequestParams : KBRRequestParams
1977 @property NSInteger sessionID;
1978 @property KBRStream *source;
1979 @property KBRStream *sink;
1980 @property KBRPGPSignOptions *opts;
1981 @end
1982 @interface KBRPgpPullRequestParams : KBRRequestParams
1983 @property NSInteger sessionID;
1984 @property NSArray *userAsserts;
1985 @end
1986 @interface KBRPgpEncryptRequestParams : KBRRequestParams
1987 @property NSInteger sessionID;
1988 @property KBRStream *source;
1989 @property KBRStream *sink;
1990 @property KBRPGPEncryptOptions *opts;
1991 @end
1992 @interface KBRPgpDecryptRequestParams : KBRRequestParams
1993 @property NSInteger sessionID;
1994 @property KBRStream *source;
1995 @property KBRStream *sink;
1996 @property KBRPGPDecryptOptions *opts;
1997 @end
1998 @interface KBRPgpVerifyRequestParams : KBRRequestParams
1999 @property NSInteger sessionID;
2000 @property KBRStream *source;
2001 @property KBRPGPVerifyOptions *opts;
2002 @end
2003 @interface KBRPgpImportRequestParams : KBRRequestParams
2004 @property NSInteger sessionID;
2005 @property NSData *key;
2006 @property BOOL pushSecret;
2007 @end
2008 @interface KBRPgpExportRequestParams : KBRRequestParams
2009 @property NSInteger sessionID;
2010 @property KBRPGPQuery *options;
2011 @end
2012 @interface KBRPgpExportByFingerprintRequestParams : KBRRequestParams
2013 @property NSInteger sessionID;
2014 @property KBRPGPQuery *options;
2015 @end
2016 @interface KBRPgpExportByKIDRequestParams : KBRRequestParams
2017 @property NSInteger sessionID;
2018 @property KBRPGPQuery *options;
2019 @end
2020 @interface KBRPgpKeyGenRequestParams : KBRRequestParams
2021 @property NSInteger sessionID;
2022 @property NSInteger primaryBits;
2023 @property NSInteger subkeyBits;
2024 @property KBRPGPCreateUids *createUids;
2025 @property BOOL allowMulti;
2026 @property BOOL doExport;
2027 @property BOOL pushSecret;
2028 @end
2029 @interface KBRPgpKeyGenDefaultRequestParams : KBRRequestParams
2030 @property NSInteger sessionID;
2031 @property KBRPGPCreateUids *createUids;
2032 @end
2033 @interface KBRPgpDeletePrimaryRequestParams : KBRRequestParams
2034 @property NSInteger sessionID;
2035 @end
2036 @interface KBRPgpSelectRequestParams : KBRRequestParams
2037 @property NSInteger sessionID;
2038 @property NSString *fingerprintQuery;
2039 @property BOOL allowMulti;
2040 @property BOOL skipImport;
2041 @property BOOL onlyImport;
2042 @end
2043 @interface KBRPgpUpdateRequestParams : KBRRequestParams
2044 @property NSInteger sessionID;
2045 @property BOOL all;
2046 @property NSArray *fingerprints;
2047 @end
2048 @interface KBRPgpPurgeRequestParams : KBRRequestParams
2049 @property NSInteger sessionID;
2050 @property BOOL doPurge;
2051 @end
2052 @interface KBRPgpStorageDismissRequestParams : KBRRequestParams
2053 @property NSInteger sessionID;
2054 @end
2055 @interface KBROutputSignatureSuccessRequestParams : KBRRequestParams
2056 @property NSInteger sessionID;
2057 @property NSString *fingerprint;
2058 @property NSString *username;
2059 @property int64_t signedAt;
2060 @end
2061 @interface KBROutputSignatureSuccessNonKeybaseRequestParams : KBRRequestParams
2062 @property NSInteger sessionID;
2063 @property NSString *keyID;
2064 @property int64_t signedAt;
2065 @end
2066 @interface KBRKeyGeneratedRequestParams : KBRRequestParams
2067 @property NSInteger sessionID;
2068 @property NSString *kid;
2069 @property KBRKeyInfo *key;
2070 @end
2071 @interface KBRShouldPushPrivateRequestParams : KBRRequestParams
2072 @property NSInteger sessionID;
2073 @end
2074 @interface KBRFinishedRequestParams : KBRRequestParams
2075 @property NSInteger sessionID;
2076 @end
2077 @interface KBRStartProofRequestParams : KBRRequestParams
2078 @property NSInteger sessionID;
2079 @property NSString *service;
2080 @property NSString *username;
2081 @property BOOL force;
2082 @property BOOL promptPosted;
2083 @property BOOL automatic;
2084 @end
2085 @interface KBRCheckProofRequestParams : KBRRequestParams
2086 @property NSInteger sessionID;
2087 @property NSString *sigID;
2088 @end
2089 @interface KBRPromptOverwriteRequestParams : KBRRequestParams
2090 @property NSInteger sessionID;
2091 @property NSString *account;
2092 @property KBRPromptOverwriteType typ;
2093 @end
2094 @interface KBRPromptUsernameRequestParams : KBRRequestParams
2095 @property NSInteger sessionID;
2096 @property NSString *prompt;
2097 @property KBRStatus *prevError;
2098 @end
2099 @interface KBROutputPrechecksRequestParams : KBRRequestParams
2100 @property NSInteger sessionID;
2101 @property KBRText *text;
2102 @end
2103 @interface KBRPreProofWarningRequestParams : KBRRequestParams
2104 @property NSInteger sessionID;
2105 @property KBRText *text;
2106 @end
2107 @interface KBROutputInstructionsRequestParams : KBRRequestParams
2108 @property NSInteger sessionID;
2109 @property KBRText *instructions;
2110 @property NSString *proof;
2111 @end
2112 @interface KBROkToCheckRequestParams : KBRRequestParams
2113 @property NSInteger sessionID;
2114 @property NSString *name;
2115 @property NSInteger attempt;
2116 @end
2117 @interface KBRDisplayRecheckWarningRequestParams : KBRRequestParams
2118 @property NSInteger sessionID;
2119 @property KBRText *text;
2120 @end
2121 @interface KBRChooseProvisioningMethodRequestParams : KBRRequestParams
2122 @property NSInteger sessionID;
2123 @property BOOL gpgOption;
2124 @end
2125 @interface KBRChooseGPGMethodRequestParams : KBRRequestParams
2126 @property NSInteger sessionID;
2127 @property NSArray *keys;
2128 @end
2129 @interface KBRSwitchToGPGSignOKRequestParams : KBRRequestParams
2130 @property NSInteger sessionID;
2131 @property KBRGPGKey *key;
2132 @property NSString *importError;
2133 @end
2134 @interface KBRChooseDeviceRequestParams : KBRRequestParams
2135 @property NSInteger sessionID;
2136 @property NSArray *devices;
2137 @end
2138 @interface KBRChooseDeviceTypeRequestParams : KBRRequestParams
2139 @property NSInteger sessionID;
2140 @property KBRChooseType kind;
2141 @end
2142 @interface KBRDisplayAndPromptSecretRequestParams : KBRRequestParams
2143 @property NSInteger sessionID;
2144 @property NSData *secret;
2145 @property NSString *phrase;
2146 @property KBRDeviceType otherDeviceType;
2147 @end
2148 @interface KBRDisplaySecretExchangedRequestParams : KBRRequestParams
2149 @property NSInteger sessionID;
2150 @end
2151 @interface KBRPromptNewDeviceNameRequestParams : KBRRequestParams
2152 @property NSInteger sessionID;
2153 @property NSArray *existingDevices;
2154 @property NSString *errorMessage;
2155 @end
2156 @interface KBRProvisioneeSuccessRequestParams : KBRRequestParams
2157 @property NSInteger sessionID;
2158 @property NSString *username;
2159 @property NSString *deviceName;
2160 @end
2161 @interface KBRProvisionerSuccessRequestParams : KBRRequestParams
2162 @property NSInteger sessionID;
2163 @property NSString *deviceName;
2164 @property NSString *deviceType;
2165 @end
2166 @interface KBRVerifySessionRequestParams : KBRRequestParams
2167 @property NSString *session;
2168 @end
2169 @interface KBRReachabilityChangedRequestParams : KBRRequestParams
2170 @property KBRReachability *reachability;
2171 @end
2172 @interface KBRShowPendingRekeyStatusRequestParams : KBRRequestParams
2173 @property NSInteger sessionID;
2174 @end
2175 @interface KBRGetPendingRekeyStatusRequestParams : KBRRequestParams
2176 @property NSInteger sessionID;
2177 @end
2178 @interface KBRDebugShowRekeyStatusRequestParams : KBRRequestParams
2179 @property NSInteger sessionID;
2180 @end
2181 @interface KBRRekeyStatusFinishRequestParams : KBRRequestParams
2182 @property NSInteger sessionID;
2183 @end
2184 @interface KBRRekeySyncRequestParams : KBRRequestParams
2185 @property NSInteger sessionID;
2186 @property BOOL force;
2187 @end
2188 @interface KBRGetRevokeWarningRequestParams : KBRRequestParams
2189 @property NSInteger session;
2190 @property NSString *actingDevice;
2191 @property NSString *targetDevice;
2192 @end
2193 @interface KBRRefreshRequestParams : KBRRequestParams
2194 @property NSInteger sessionID;
2195 @property KBRProblemSetDevices *problemSetDevices;
2196 @end
2197 @interface KBRRekeySendEventRequestParams : KBRRequestParams
2198 @property NSInteger sessionID;
2199 @property KBRRekeyEvent *event;
2200 @end
2201 @interface KBRRevokeKeyRequestParams : KBRRequestParams
2202 @property NSInteger sessionID;
2203 @property NSString *keyID;
2204 @end
2205 @interface KBRRevokeDeviceRequestParams : KBRRequestParams
2206 @property NSInteger sessionID;
2207 @property NSString *deviceID;
2208 @property BOOL force;
2209 @end
2210 @interface KBRRevokeSigsRequestParams : KBRRequestParams
2211 @property NSInteger sessionID;
2212 @property NSArray *sigIDQueries;
2213 @end
2214 @interface KBRSaltpackEncryptRequestParams : KBRRequestParams
2215 @property NSInteger sessionID;
2216 @property KBRStream *source;
2217 @property KBRStream *sink;
2218 @property KBRSaltpackEncryptOptions *opts;
2219 @end
2220 @interface KBRSaltpackDecryptRequestParams : KBRRequestParams
2221 @property NSInteger sessionID;
2222 @property KBRStream *source;
2223 @property KBRStream *sink;
2224 @property KBRSaltpackDecryptOptions *opts;
2225 @end
2226 @interface KBRSaltpackSignRequestParams : KBRRequestParams
2227 @property NSInteger sessionID;
2228 @property KBRStream *source;
2229 @property KBRStream *sink;
2230 @property KBRSaltpackSignOptions *opts;
2231 @end
2232 @interface KBRSaltpackVerifyRequestParams : KBRRequestParams
2233 @property NSInteger sessionID;
2234 @property KBRStream *source;
2235 @property KBRStream *sink;
2236 @property KBRSaltpackVerifyOptions *opts;
2237 @end
2238 @interface KBRScanProofsRequestParams : KBRRequestParams
2239 @property NSInteger sessionID;
2240 @property NSString *infile;
2241 @property NSString *indices;
2242 @property NSString *sigid;
2243 @property NSInteger ratelimit;
2244 @property NSString *cachefile;
2245 @property NSString *ignorefile;
2246 @end
2247 @interface KBRGetPassphraseRequestParams : KBRRequestParams
2248 @property NSInteger sessionID;
2249 @property KBRGUIEntryArg *pinentry;
2250 @property KBRSecretEntryArg *terminal;
2251 @end
2252 @interface KBRGetSecretKeysRequestParams : KBRRequestParams
2253 @property NSInteger sessionID;
2254 @end
2255 @interface KBRCurrentSessionRequestParams : KBRRequestParams
2256 @property NSInteger sessionID;
2257 @end
2258 @interface KBRCheckUsernameAvailableRequestParams : KBRRequestParams
2259 @property NSInteger sessionID;
2260 @property NSString *username;
2261 @end
2262 @interface KBRSignupRequestParams : KBRRequestParams
2263 @property NSInteger sessionID;
2264 @property NSString *email;
2265 @property NSString *inviteCode;
2266 @property NSString *passphrase;
2267 @property NSString *username;
2268 @property NSString *deviceName;
2269 @property KBRDeviceType deviceType;
2270 @property BOOL storeSecret;
2271 @property BOOL skipMail;
2272 @property BOOL genPGPBatch;
2273 @end
2274 @interface KBRInviteRequestRequestParams : KBRRequestParams
2275 @property NSInteger sessionID;
2276 @property NSString *email;
2277 @property NSString *fullname;
2278 @property NSString *notes;
2279 @end
2280 @interface KBRCheckInvitationCodeRequestParams : KBRRequestParams
2281 @property NSInteger sessionID;
2282 @property NSString *invitationCode;
2283 @end
2284 @interface KBRSigListRequestParams : KBRRequestParams
2285 @property NSInteger sessionID;
2286 @property KBRSigListArgs *arg;
2287 @end
2288 @interface KBRSigListJSONRequestParams : KBRRequestParams
2289 @property NSInteger sessionID;
2290 @property KBRSigListArgs *arg;
2291 @end
2292 @interface KBRCloseRequestParams : KBRRequestParams
2293 @property NSInteger sessionID;
2294 @property KBRStream *s;
2295 @end
2296 @interface KBRReadRequestParams : KBRRequestParams
2297 @property NSInteger sessionID;
2298 @property KBRStream *s;
2299 @property NSInteger sz;
2300 @end
2301 @interface KBRResetRequestParams : KBRRequestParams
2302 @property NSInteger sessionID;
2303 @property KBRStream *s;
2304 @end
2305 @interface KBRWriteRequestParams : KBRRequestParams
2306 @property NSInteger sessionID;
2307 @property KBRStream *s;
2308 @property NSData *buf;
2309 @end
2310 @interface KBRTestRequestParams : KBRRequestParams
2311 @property NSInteger sessionID;
2312 @property NSString *name;
2313 @end
2314 @interface KBRTestCallbackRequestParams : KBRRequestParams
2315 @property NSInteger sessionID;
2316 @property NSString *name;
2317 @end
2318 @interface KBRPanicRequestParams : KBRRequestParams
2319 @property NSString *message;
2320 @end
2321 @interface KBRCryptKeysRequestParams : KBRRequestParams
2322 @property KBRTLFQuery *query;
2323 @end
2324 @interface KBRPublicCanonicalTLFNameAndIDRequestParams : KBRRequestParams
2325 @property KBRTLFQuery *query;
2326 @end
2327 @interface KBRCompleteAndCanonicalizePrivateTlfNameRequestParams : KBRRequestParams
2328 @property KBRTLFQuery *query;
2329 @end
2330 @interface KBRGetTLFCryptKeysRequestParams : KBRRequestParams
2331 @property KBRTLFQuery *query;
2332 @end
2333 @interface KBRGetPublicCanonicalTLFNameAndIDRequestParams : KBRRequestParams
2334 @property KBRTLFQuery *query;
2335 @end
2336 @interface KBRTrackRequestParams : KBRRequestParams
2337 @property NSInteger sessionID;
2338 @property NSString *userAssertion;
2339 @property KBRTrackOptions *options;
2340 @property BOOL forceRemoteCheck;
2341 @end
2342 @interface KBRTrackWithTokenRequestParams : KBRRequestParams
2343 @property NSInteger sessionID;
2344 @property NSString *trackToken;
2345 @property KBRTrackOptions *options;
2346 @end
2347 @interface KBRDismissWithTokenRequestParams : KBRRequestParams
2348 @property NSInteger sessionID;
2349 @property NSString *trackToken;
2350 @end
2351 @interface KBRUntrackRequestParams : KBRRequestParams
2352 @property NSInteger sessionID;
2353 @property NSString *username;
2354 @end
2355 @interface KBRCheckTrackingRequestParams : KBRRequestParams
2356 @property NSInteger sessionID;
2357 @end
2358 @interface KBRFakeTrackingChangedRequestParams : KBRRequestParams
2359 @property NSInteger sessionID;
2360 @property NSString *username;
2361 @end
2362 @interface KBRPromptYesNoRequestParams : KBRRequestParams
2363 @property NSInteger sessionID;
2364 @property KBRText *text;
2365 @property KBRPromptDefault promptDefault;
2366 @end
2367 @interface KBRListTrackersRequestParams : KBRRequestParams
2368 @property NSInteger sessionID;
2369 @property NSString *uid;
2370 @end
2371 @interface KBRListTrackersByNameRequestParams : KBRRequestParams
2372 @property NSInteger sessionID;
2373 @property NSString *username;
2374 @end
2375 @interface KBRListTrackersSelfRequestParams : KBRRequestParams
2376 @property NSInteger sessionID;
2377 @end
2378 @interface KBRLoadUncheckedUserSummariesRequestParams : KBRRequestParams
2379 @property NSInteger sessionID;
2380 @property NSArray *uids;
2381 @end
2382 @interface KBRLoadUserRequestParams : KBRRequestParams
2383 @property NSInteger sessionID;
2384 @property NSString *uid;
2385 @end
2386 @interface KBRLoadUserByNameRequestParams : KBRRequestParams
2387 @property NSInteger sessionID;
2388 @property NSString *username;
2389 @end
2390 @interface KBRLoadUserPlusKeysRequestParams : KBRRequestParams
2391 @property NSInteger sessionID;
2392 @property NSString *uid;
2393 @end
2394 @interface KBRLoadPublicKeysRequestParams : KBRRequestParams
2395 @property NSInteger sessionID;
2396 @property NSString *uid;
2397 @end
2398 @interface KBRLoadMyPublicKeysRequestParams : KBRRequestParams
2399 @property NSInteger sessionID;
2400 @end
2401 @interface KBRLoadMySettingsRequestParams : KBRRequestParams
2402 @property NSInteger sessionID;
2403 @end
2404 @interface KBRListTrackingRequestParams : KBRRequestParams
2405 @property NSInteger sessionID;
2406 @property NSString *filter;
2407 @property NSString *assertion;
2408 @end
2409 @interface KBRListTrackingJSONRequestParams : KBRRequestParams
2410 @property NSInteger sessionID;
2411 @property NSString *filter;
2412 @property BOOL verbose;
2413 @property NSString *assertion;
2414 @end
2415 @interface KBRSearchRequestParams : KBRRequestParams
2416 @property NSInteger sessionID;
2417 @property NSString *query;
2418 @end
2419 @interface KBRLoadAllPublicKeysUnverifiedRequestParams : KBRRequestParams
2420 @property NSInteger sessionID;
2421 @property NSString *uid;
2422 @end
2423 @interface KBRListTrackers2RequestParams : KBRRequestParams
2424 @property NSInteger sessionID;
2425 @property NSString *assertion;
2426 @property BOOL reverse;
2427 @end@interface KBRCommonRequest : KBRRequest
2428 
2429 @end
2430 
2431 @interface KBRProveCommonRequest : KBRRequest
2432 
2433 @end
2434 
2435 @interface KBRIdentifyCommonRequest : KBRRequest
2436 
2437 @end
2438 
2439 @interface KBRIdentifyUiRequest : KBRRequest
2440 
2441 - (void)displayTLFCreateWithInvite:(KBRDisplayTLFCreateWithInviteRequestParams *)params completion:(void (^)(NSError *error))completion;
2442 
2443 - (void)displayTLFCreateWithInviteWithFolderName:(NSString *)folderName isPrivate:(BOOL)isPrivate assertion:(NSString *)assertion socialAssertion:(KBRSocialAssertion *)socialAssertion inviteLink:(NSString *)inviteLink throttled:(BOOL)throttled completion:(void (^)(NSError *error))completion;
2444 
2445 - (void)delegateIdentifyUI:(void (^)(NSError *error, NSInteger n))completion;
2446 
2447 - (void)start:(KBRStartRequestParams *)params completion:(void (^)(NSError *error))completion;
2448 
2449 - (void)startWithUsername:(NSString *)username reason:(KBRIdentifyReason *)reason forceDisplay:(BOOL)forceDisplay completion:(void (^)(NSError *error))completion;
2450 
2451 - (void)displayKey:(KBRDisplayKeyRequestParams *)params completion:(void (^)(NSError *error))completion;
2452 
2453 - (void)displayKeyWithKey:(KBRIdentifyKey *)key completion:(void (^)(NSError *error))completion;
2454 
2455 - (void)reportLastTrack:(KBRReportLastTrackRequestParams *)params completion:(void (^)(NSError *error))completion;
2456 
2457 - (void)reportLastTrackWithTrack:(KBRTrackSummary *)track completion:(void (^)(NSError *error))completion;
2458 
2459 - (void)launchNetworkChecks:(KBRLaunchNetworkChecksRequestParams *)params completion:(void (^)(NSError *error))completion;
2460 
2461 - (void)launchNetworkChecksWithIdentity:(KBRIdentity *)identity user:(KBRUser *)user completion:(void (^)(NSError *error))completion;
2462 
2463 - (void)displayTrackStatement:(KBRDisplayTrackStatementRequestParams *)params completion:(void (^)(NSError *error))completion;
2464 
2465 - (void)displayTrackStatementWithStmt:(NSString *)stmt completion:(void (^)(NSError *error))completion;
2466 
2467 - (void)finishWebProofCheck:(KBRFinishWebProofCheckRequestParams *)params completion:(void (^)(NSError *error))completion;
2468 
2469 - (void)finishWebProofCheckWithRp:(KBRRemoteProof *)rp lcr:(KBRLinkCheckResult *)lcr completion:(void (^)(NSError *error))completion;
2470 
2471 - (void)finishSocialProofCheck:(KBRFinishSocialProofCheckRequestParams *)params completion:(void (^)(NSError *error))completion;
2472 
2473 - (void)finishSocialProofCheckWithRp:(KBRRemoteProof *)rp lcr:(KBRLinkCheckResult *)lcr completion:(void (^)(NSError *error))completion;
2474 
2475 - (void)displayCryptocurrency:(KBRDisplayCryptocurrencyRequestParams *)params completion:(void (^)(NSError *error))completion;
2476 
2477 - (void)displayCryptocurrencyWithC:(KBRCryptocurrency *)c completion:(void (^)(NSError *error))completion;
2478 
2479 - (void)reportTrackToken:(KBRReportTrackTokenRequestParams *)params completion:(void (^)(NSError *error))completion;
2480 
2481 - (void)reportTrackTokenWithTrackToken:(NSString *)trackToken completion:(void (^)(NSError *error))completion;
2482 
2483 - (void)displayUserCard:(KBRDisplayUserCardRequestParams *)params completion:(void (^)(NSError *error))completion;
2484 
2485 - (void)displayUserCardWithCard:(KBRUserCard *)card completion:(void (^)(NSError *error))completion;
2486 
2487 - (void)confirm:(KBRConfirmRequestParams *)params completion:(void (^)(NSError *error, KBRConfirmResult *confirmResult))completion;
2488 
2489 - (void)confirmWithOutcome:(KBRIdentifyOutcome *)outcome completion:(void (^)(NSError *error, KBRConfirmResult *confirmResult))completion;
2490 
2491 - (void)cancel:(void (^)(NSError *error))completion;
2492 
2493 - (void)finish:(void (^)(NSError *error))completion;
2494 
2495 - (void)dismiss:(KBRDismissRequestParams *)params completion:(void (^)(NSError *error))completion;
2496 
2497 - (void)dismissWithUsername:(NSString *)username reason:(KBRDismissReason *)reason completion:(void (^)(NSError *error))completion;
2498 
2499 @end
2500 
2501 @interface KBRSaltpackUiRequest : KBRRequest
2502 
2503 - (void)saltpackPromptForDecrypt:(KBRSaltpackPromptForDecryptRequestParams *)params completion:(void (^)(NSError *error))completion;
2504 
2505 - (void)saltpackPromptForDecryptWithSender:(KBRSaltpackSender *)sender usedDelegateUI:(BOOL)usedDelegateUI completion:(void (^)(NSError *error))completion;
2506 
2507 - (void)saltpackVerifySuccess:(KBRSaltpackVerifySuccessRequestParams *)params completion:(void (^)(NSError *error))completion;
2508 
2509 - (void)saltpackVerifySuccessWithSigningKID:(NSString *)signingKID sender:(KBRSaltpackSender *)sender completion:(void (^)(NSError *error))completion;
2510 
2511 @end
2512 
2513 @interface KBRAccountRequest : KBRRequest
2514 
2515 /*!
2516  Change the passphrase from old to new. If old isn't set, and force is false,
2517  then prompt at the UI for it. If old isn't set and force is true, then we'll
2518  try to force a passphrase change.
2519  */
2520 - (void)passphraseChange:(KBRPassphraseChangeRequestParams *)params completion:(void (^)(NSError *error))completion;
2521 
2522 - (void)passphraseChangeWithOldPassphrase:(NSString *)oldPassphrase passphrase:(NSString *)passphrase force:(BOOL)force completion:(void (^)(NSError *error))completion;
2523 
2524 - (void)passphrasePrompt:(KBRPassphrasePromptRequestParams *)params completion:(void (^)(NSError *error, KBRGetPassphraseRes *getPassphraseRes))completion;
2525 
2526 - (void)passphrasePromptWithGuiArg:(KBRGUIEntryArg *)guiArg completion:(void (^)(NSError *error, KBRGetPassphraseRes *getPassphraseRes))completion;
2527 
2528 /*!
2529  * change email to the new given email by signing a statement.
2530  */
2531 - (void)emailChange:(KBREmailChangeRequestParams *)params completion:(void (^)(NSError *error))completion;
2532 
2533 - (void)emailChangeWithEmailNew:(NSString *)emailNew completion:(void (^)(NSError *error))completion;
2534 
2535 /*!
2536  * Whether the logged-in user has uploaded private keys
2537  * Will error if not logged in.
2538  */
2539 - (void)hasServerKeys:(void (^)(NSError *error, KBRHasServerKeysRes *hasServerKeysRes))completion;
2540 
2541 @end
2542 
2543 @interface KBRApiserverRequest : KBRRequest
2544 
2545 - (void)get:(KBRGetRequestParams *)params completion:(void (^)(NSError *error, KBRAPIRes *aPIRes))completion;
2546 
2547 - (void)getWithEndpoint:(NSString *)endpoint args:(NSArray *)args httpStatus:(NSArray *)httpStatus appStatusCode:(NSArray *)appStatusCode completion:(void (^)(NSError *error, KBRAPIRes *aPIRes))completion;
2548 
2549 - (void)post:(KBRPostRequestParams *)params completion:(void (^)(NSError *error, KBRAPIRes *aPIRes))completion;
2550 
2551 - (void)postWithEndpoint:(NSString *)endpoint args:(NSArray *)args httpStatus:(NSArray *)httpStatus appStatusCode:(NSArray *)appStatusCode completion:(void (^)(NSError *error, KBRAPIRes *aPIRes))completion;
2552 
2553 - (void)postJSON:(KBRPostJSONRequestParams *)params completion:(void (^)(NSError *error, KBRAPIRes *aPIRes))completion;
2554 
2555 - (void)postJSONWithEndpoint:(NSString *)endpoint args:(NSArray *)args JSONPayload:(NSArray *)JSONPayload httpStatus:(NSArray *)httpStatus appStatusCode:(NSArray *)appStatusCode completion:(void (^)(NSError *error, KBRAPIRes *aPIRes))completion;
2556 
2557 @end
2558 
2559 @interface KBRBackendCommonRequest : KBRRequest
2560 
2561 @end
2562 
2563 @interface KBRBlockRequest : KBRRequest
2564 
2565 - (void)getSessionChallenge:(void (^)(NSError *error, KBRChallengeInfo *challengeInfo))completion;
2566 
2567 - (void)authenticateSession:(KBRAuthenticateSessionRequestParams *)params completion:(void (^)(NSError *error))completion;
2568 
2569 - (void)authenticateSessionWithSignature:(NSString *)signature completion:(void (^)(NSError *error))completion;
2570 
2571 - (void)putBlock:(KBRPutBlockRequestParams *)params completion:(void (^)(NSError *error))completion;
2572 
2573 - (void)putBlockWithBid:(KBRBlockIdCombo *)bid folder:(NSString *)folder blockKey:(NSString *)blockKey buf:(NSData *)buf completion:(void (^)(NSError *error))completion;
2574 
2575 - (void)getBlock:(KBRGetBlockRequestParams *)params completion:(void (^)(NSError *error, KBRGetBlockRes *getBlockRes))completion;
2576 
2577 - (void)getBlockWithBid:(KBRBlockIdCombo *)bid folder:(NSString *)folder completion:(void (^)(NSError *error, KBRGetBlockRes *getBlockRes))completion;
2578 
2579 - (void)addReference:(KBRAddReferenceRequestParams *)params completion:(void (^)(NSError *error))completion;
2580 
2581 - (void)addReferenceWithFolder:(NSString *)folder ref:(KBRBlockReference *)ref completion:(void (^)(NSError *error))completion;
2582 
2583 - (void)delReference:(KBRDelReferenceRequestParams *)params completion:(void (^)(NSError *error))completion;
2584 
2585 - (void)delReferenceWithFolder:(NSString *)folder ref:(KBRBlockReference *)ref completion:(void (^)(NSError *error))completion;
2586 
2587 - (void)archiveReference:(KBRArchiveReferenceRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
2588 
2589 - (void)archiveReferenceWithFolder:(NSString *)folder refs:(NSArray *)refs completion:(void (^)(NSError *error, NSArray *items))completion;
2590 
2591 - (void)delReferenceWithCount:(KBRDelReferenceWithCountRequestParams *)params completion:(void (^)(NSError *error, KBRDowngradeReferenceRes *downgradeReferenceRes))completion;
2592 
2593 - (void)delReferenceWithCountWithFolder:(NSString *)folder refs:(NSArray *)refs completion:(void (^)(NSError *error, KBRDowngradeReferenceRes *downgradeReferenceRes))completion;
2594 
2595 - (void)archiveReferenceWithCount:(KBRArchiveReferenceWithCountRequestParams *)params completion:(void (^)(NSError *error, KBRDowngradeReferenceRes *downgradeReferenceRes))completion;
2596 
2597 - (void)archiveReferenceWithCountWithFolder:(NSString *)folder refs:(NSArray *)refs completion:(void (^)(NSError *error, KBRDowngradeReferenceRes *downgradeReferenceRes))completion;
2598 
2599 - (void)getUserQuotaInfo:(void (^)(NSError *error, NSData *bytes))completion;
2600 
2601 @end
2602 
2603 @interface KBRBTCRequest : KBRRequest
2604 
2605 - (void)registerBTC:(KBRRegisterBTCRequestParams *)params completion:(void (^)(NSError *error))completion;
2606 
2607 - (void)registerBTCWithAddress:(NSString *)address force:(BOOL)force completion:(void (^)(NSError *error))completion;
2608 
2609 @end
2610 
2611 @interface KBRConfigRequest : KBRRequest
2612 
2613 - (void)getCurrentStatus:(void (^)(NSError *error, KBRGetCurrentStatusRes *getCurrentStatusRes))completion;
2614 
2615 - (void)getExtendedStatus:(void (^)(NSError *error, KBRExtendedStatus *extendedStatus))completion;
2616 
2617 - (void)getConfig:(void (^)(NSError *error, KBRConfig *config))completion;
2618 
2619 /*!
2620  Change user config.
2621  For example, to update primary picture source:
2622  key=picture.source, value=twitter (or github)
2623  */
2624 - (void)setUserConfig:(KBRSetUserConfigRequestParams *)params completion:(void (^)(NSError *error))completion;
2625 
2626 - (void)setUserConfigWithUsername:(NSString *)username key:(NSString *)key value:(NSString *)value completion:(void (^)(NSError *error))completion;
2627 
2628 - (void)setPath:(KBRSetPathRequestParams *)params completion:(void (^)(NSError *error))completion;
2629 
2630 - (void)setPathWithPath:(NSString *)path completion:(void (^)(NSError *error))completion;
2631 
2632 - (void)helloIAm:(KBRHelloIAmRequestParams *)params completion:(void (^)(NSError *error))completion;
2633 
2634 - (void)helloIAmWithDetails:(KBRClientDetails *)details completion:(void (^)(NSError *error))completion;
2635 
2636 - (void)setValue:(KBRSetValueRequestParams *)params completion:(void (^)(NSError *error))completion;
2637 
2638 - (void)setValueWithPath:(NSString *)path value:(KBRConfigValue *)value completion:(void (^)(NSError *error))completion;
2639 
2640 - (void)clearValue:(KBRClearValueRequestParams *)params completion:(void (^)(NSError *error))completion;
2641 
2642 - (void)clearValueWithPath:(NSString *)path completion:(void (^)(NSError *error))completion;
2643 
2644 - (void)getValue:(KBRGetValueRequestParams *)params completion:(void (^)(NSError *error, KBRConfigValue *configValue))completion;
2645 
2646 - (void)getValueWithPath:(NSString *)path completion:(void (^)(NSError *error, KBRConfigValue *configValue))completion;
2647 
2648 /*!
2649  Check whether the API server has told us we're out of date.
2650  */
2651 - (void)checkAPIServerOutOfDateWarning:(void (^)(NSError *error, KBROutOfDateInfo *outOfDateInfo))completion;
2652 
2653 /*!
2654  Wait for client type to connect to service.
2655  */
2656 - (void)waitForClient:(KBRWaitForClientRequestParams *)params completion:(void (^)(NSError *error, BOOL b))completion;
2657 
2658 - (void)waitForClientWithClientType:(KBRClientType)clientType timeout:(double)timeout completion:(void (^)(NSError *error, BOOL b))completion;
2659 
2660 @end
2661 
2662 @interface KBRConstantsRequest : KBRRequest
2663 
2664 @end
2665 
2666 @interface KBRCryptoRequest : KBRRequest
2667 
2668 /*!
2669  Sign the given message (which should be small) using the device's private
2670  signing ED25519 key, and return the signature as well as the corresponding
2671  public key that can be used to verify the signature. The 'reason' parameter
2672  is used as part of the SecretEntryArg object passed into
2673  secretUi.getSecret().
2674  */
2675 - (void)signED25519:(KBRSignED25519RequestParams *)params completion:(void (^)(NSError *error, KBRED25519SignatureInfo *eD25519SignatureInfo))completion;
2676 
2677 - (void)signED25519WithMsg:(NSData *)msg reason:(NSString *)reason completion:(void (^)(NSError *error, KBRED25519SignatureInfo *eD25519SignatureInfo))completion;
2678 
2679 /*!
2680  Same as the above except a KBFS-specific prefix is added to the payload to be signed.
2681  */
2682 - (void)signED25519ForKBFS:(KBRSignED25519ForKBFSRequestParams *)params completion:(void (^)(NSError *error, KBRED25519SignatureInfo *eD25519SignatureInfo))completion;
2683 
2684 - (void)signED25519ForKBFSWithMsg:(NSData *)msg reason:(NSString *)reason completion:(void (^)(NSError *error, KBRED25519SignatureInfo *eD25519SignatureInfo))completion;
2685 
2686 /*!
2687  Same as the above except the full marsheled and encoded NaclSigInfo.
2688  */
2689 - (void)signToString:(KBRSignToStringRequestParams *)params completion:(void (^)(NSError *error, NSString *str))completion;
2690 
2691 - (void)signToStringWithMsg:(NSData *)msg reason:(NSString *)reason completion:(void (^)(NSError *error, NSString *str))completion;
2692 
2693 /*!
2694  Decrypt exactly 32 bytes using nacl/box with the given nonce, the given
2695  peer's public key, and the device's private encryption key, and return the
2696  decrypted data. The 'reason' parameter is used as part of the
2697  SecretEntryArg object passed into secretUi.getSecret().
2698  */
2699 - (void)unboxBytes32:(KBRUnboxBytes32RequestParams *)params completion:(void (^)(NSError *error, NSData *bytes32))completion;
2700 
2701 - (void)unboxBytes32WithEncryptedBytes32:(NSData *)encryptedBytes32 nonce:(NSData *)nonce peersPublicKey:(NSData *)peersPublicKey reason:(NSString *)reason completion:(void (^)(NSError *error, NSData *bytes32))completion;
2702 
2703 - (void)unboxBytes32Any:(KBRUnboxBytes32AnyRequestParams *)params completion:(void (^)(NSError *error, KBRUnboxAnyRes *unboxAnyRes))completion;
2704 
2705 - (void)unboxBytes32AnyWithBundles:(NSArray *)bundles reason:(NSString *)reason promptPaper:(BOOL)promptPaper completion:(void (^)(NSError *error, KBRUnboxAnyRes *unboxAnyRes))completion;
2706 
2707 @end
2708 
2709 @interface KBRCryptocurrencyRequest : KBRRequest
2710 
2711 - (void)registerAddress:(KBRRegisterAddressRequestParams *)params completion:(void (^)(NSError *error, KBRRegisterAddressRes *registerAddressRes))completion;
2712 
2713 - (void)registerAddressWithAddress:(NSString *)address force:(BOOL)force wantedFamily:(NSString *)wantedFamily completion:(void (^)(NSError *error, KBRRegisterAddressRes *registerAddressRes))completion;
2714 
2715 @end
2716 
2717 @interface KBRCtlRequest : KBRRequest
2718 
2719 - (void)stop:(KBRStopRequestParams *)params completion:(void (^)(NSError *error))completion;
2720 
2721 - (void)stopWithExitCode:(KBRExitCode)exitCode completion:(void (^)(NSError *error))completion;
2722 
2723 - (void)logRotate:(void (^)(NSError *error))completion;
2724 
2725 - (void)reload:(void (^)(NSError *error))completion;
2726 
2727 - (void)dbNuke:(void (^)(NSError *error))completion;
2728 
2729 - (void)appExit:(void (^)(NSError *error))completion;
2730 
2731 @end
2732 
2733 @interface KBRDebuggingRequest : KBRRequest
2734 
2735 - (void)firstStep:(KBRFirstStepRequestParams *)params completion:(void (^)(NSError *error, KBRFirstStepResult *firstStepResult))completion;
2736 
2737 - (void)firstStepWithVal:(NSInteger)val completion:(void (^)(NSError *error, KBRFirstStepResult *firstStepResult))completion;
2738 
2739 - (void)secondStep:(KBRSecondStepRequestParams *)params completion:(void (^)(NSError *error, NSInteger n))completion;
2740 
2741 - (void)secondStepWithVal:(NSInteger)val completion:(void (^)(NSError *error, NSInteger n))completion;
2742 
2743 - (void)increment:(KBRIncrementRequestParams *)params completion:(void (^)(NSError *error, NSInteger n))completion;
2744 
2745 - (void)incrementWithVal:(NSInteger)val completion:(void (^)(NSError *error, NSInteger n))completion;
2746 
2747 @end
2748 
2749 @interface KBRDelegateUiCtlRequest : KBRRequest
2750 
2751 - (void)registerIdentifyUI:(void (^)(NSError *error))completion;
2752 
2753 - (void)registerSecretUI:(void (^)(NSError *error))completion;
2754 
2755 - (void)registerUpdateUI:(void (^)(NSError *error))completion;
2756 
2757 - (void)registerRekeyUI:(void (^)(NSError *error))completion;
2758 
2759 - (void)registerGregorFirehose:(void (^)(NSError *error))completion;
2760 
2761 @end
2762 
2763 @interface KBRDeviceRequest : KBRRequest
2764 
2765 /*!
2766  List devices for the user.
2767  */
2768 - (void)deviceList:(void (^)(NSError *error, NSArray *items))completion;
2769 
2770 /*!
2771  List all devices with detailed history and status information.
2772  */
2773 - (void)deviceHistoryList:(void (^)(NSError *error, NSArray *items))completion;
2774 
2775 /*!
2776  Starts the process of adding a new device using an existing
2777  device. It is called on the existing device.
2778  This is for kex2.
2779  */
2780 - (void)deviceAdd:(void (^)(NSError *error))completion;
2781 
2782 /*!
2783  Checks the device name format.
2784  */
2785 - (void)checkDeviceNameFormat:(KBRCheckDeviceNameFormatRequestParams *)params completion:(void (^)(NSError *error, BOOL b))completion;
2786 
2787 - (void)checkDeviceNameFormatWithName:(NSString *)name completion:(void (^)(NSError *error, BOOL b))completion;
2788 
2789 /*!
2790  Checks a given device against all of user's past devices,
2791  including those that predate a reset. It will also check a device name
2792  for proper formatting. Return null error on success, and a non-null
2793  error otherwise.
2794  */
2795 - (void)checkDeviceNameForUser:(KBRCheckDeviceNameForUserRequestParams *)params completion:(void (^)(NSError *error))completion;
2796 
2797 - (void)checkDeviceNameForUserWithUsername:(NSString *)username devicename:(NSString *)devicename completion:(void (^)(NSError *error))completion;
2798 
2799 @end
2800 
2801 @interface KBRFavoriteRequest : KBRRequest
2802 
2803 /*!
2804  Adds a folder to a user's list of favorite folders.
2805  */
2806 - (void)favoriteAdd:(KBRFavoriteAddRequestParams *)params completion:(void (^)(NSError *error))completion;
2807 
2808 - (void)favoriteAddWithFolder:(KBRFolder *)folder completion:(void (^)(NSError *error))completion;
2809 
2810 /*!
2811  Removes a folder from a user's list of favorite folders.
2812  */
2813 - (void)favoriteIgnore:(KBRFavoriteIgnoreRequestParams *)params completion:(void (^)(NSError *error))completion;
2814 
2815 - (void)favoriteIgnoreWithFolder:(KBRFolder *)folder completion:(void (^)(NSError *error))completion;
2816 
2817 /*!
2818  Returns all of a user's favorite folders.
2819  */
2820 - (void)getFavorites:(void (^)(NSError *error, KBRFavoritesResult *favoritesResult))completion;
2821 
2822 @end
2823 
2824 @interface KBRFsRequest : KBRRequest
2825 
2826 /*!
2827  List files in a path. Implemented by KBFS service.
2828  */
2829 - (void)list:(KBRListRequestParams *)params completion:(void (^)(NSError *error, KBRListResult *listResult))completion;
2830 
2831 - (void)listWithPath:(NSString *)path completion:(void (^)(NSError *error, KBRListResult *listResult))completion;
2832 
2833 @end
2834 
2835 @interface KBRGpgCommonRequest : KBRRequest
2836 
2837 @end
2838 
2839 @interface KBRGpgUiRequest : KBRRequest
2840 
2841 - (void)wantToAddGPGKey:(void (^)(NSError *error, BOOL b))completion;
2842 
2843 - (void)confirmDuplicateKeyChosen:(void (^)(NSError *error, BOOL b))completion;
2844 
2845 - (void)selectKeyAndPushOption:(KBRSelectKeyAndPushOptionRequestParams *)params completion:(void (^)(NSError *error, KBRSelectKeyRes *selectKeyRes))completion;
2846 
2847 - (void)selectKeyAndPushOptionWithKeys:(NSArray *)keys completion:(void (^)(NSError *error, KBRSelectKeyRes *selectKeyRes))completion;
2848 
2849 - (void)selectKey:(KBRSelectKeyRequestParams *)params completion:(void (^)(NSError *error, NSString *str))completion;
2850 
2851 - (void)selectKeyWithKeys:(NSArray *)keys completion:(void (^)(NSError *error, NSString *str))completion;
2852 
2853 - (void)sign:(KBRSignRequestParams *)params completion:(void (^)(NSError *error, NSString *str))completion;
2854 
2855 - (void)signWithMsg:(NSData *)msg fingerprint:(NSData *)fingerprint completion:(void (^)(NSError *error, NSString *str))completion;
2856 
2857 - (void)getTTY:(void (^)(NSError *error, NSString *str))completion;
2858 
2859 @end
2860 
2861 @interface KBRIdentifyRequest : KBRRequest
2862 
2863 /*!
2864  Resolve an assertion to a UID. On failure, resolves to an empty UID and returns
2865  an error.
2866  */
2867 - (void)resolve:(KBRResolveRequestParams *)params completion:(void (^)(NSError *error, NSString *uID))completion;
2868 
2869 - (void)resolveWithAssertion:(NSString *)assertion completion:(void (^)(NSError *error, NSString *uID))completion;
2870 
2871 /*!
2872  Resolve an assertion to a (UID,username). On failure, returns an error.
2873  */
2874 - (void)resolve2:(KBRResolve2RequestParams *)params completion:(void (^)(NSError *error, KBRUser *user))completion;
2875 
2876 - (void)resolve2WithAssertion:(NSString *)assertion completion:(void (^)(NSError *error, KBRUser *user))completion;
2877 
2878 /*!
2879  DEPRECATED: use identify2
2880 
2881  Identify a user from a username or assertion (e.g. kbuser, twuser@twitter).
2882  If forceRemoteCheck is true, we force all remote proofs to be checked (otherwise a cache is used).
2883  */
2884 - (void)identify:(KBRIdentifyRequestParams *)params completion:(void (^)(NSError *error, KBRIdentifyRes *identifyRes))completion;
2885 
2886 - (void)identifyWithUserAssertion:(NSString *)userAssertion forceRemoteCheck:(BOOL)forceRemoteCheck useDelegateUI:(BOOL)useDelegateUI reason:(KBRIdentifyReason *)reason source:(KBRClientType)source completion:(void (^)(NSError *error, KBRIdentifyRes *identifyRes))completion;
2887 
2888 - (void)identify2:(KBRIdentify2RequestParams *)params completion:(void (^)(NSError *error, KBRIdentify2Res *identify2Res))completion;
2889 
2890 - (void)identify2WithUid:(NSString *)uid userAssertion:(NSString *)userAssertion reason:(KBRIdentifyReason *)reason useDelegateUI:(BOOL)useDelegateUI alwaysBlock:(BOOL)alwaysBlock noErrorOnTrackFailure:(BOOL)noErrorOnTrackFailure forceRemoteCheck:(BOOL)forceRemoteCheck needProofSet:(BOOL)needProofSet allowEmptySelfID:(BOOL)allowEmptySelfID noSkipSelf:(BOOL)noSkipSelf canSuppressUI:(BOOL)canSuppressUI chatGUIMode:(BOOL)chatGUIMode forceDisplay:(BOOL)forceDisplay completion:(void (^)(NSError *error, KBRIdentify2Res *identify2Res))completion;
2891 
2892 @end
2893 
2894 @interface KBRInstallRequest : KBRRequest
2895 
2896 @end
2897 
2898 @interface KBRKbfsRequest : KBRRequest
2899 
2900 /*!
2901  Idea is that kbfs would call the function below whenever these actions are
2902  performed on a file.
2903 
2904  Note that this list/interface is very temporary and highly likely to change
2905  significantly.
2906 
2907  It is just a starting point to get kbfs notifications through the daemon to
2908  the clients.
2909  */
2910 - (void)fSEvent:(KBRFSEventRequestParams *)params completion:(void (^)(NSError *error))completion;
2911 
2912 - (void)fSEventWithEvent:(KBRFSNotification *)event completion:(void (^)(NSError *error))completion;
2913 
2914 /*!
2915  kbfs calls this as a response to receiving an FSEditListRequest with a
2916  given requestID.
2917  */
2918 - (void)fSEditList:(KBRFSEditListRequestParams *)params completion:(void (^)(NSError *error))completion;
2919 
2920 - (void)fSEditListWithEdits:(NSArray *)edits requestID:(NSInteger)requestID completion:(void (^)(NSError *error))completion;
2921 
2922 /*!
2923  FSSyncStatus is called by KBFS as a response to receiving an
2924  FSSyncStatusRequest with a given requestID.
2925  */
2926 - (void)fSSyncStatus:(KBRFSSyncStatusRequestParams *)params completion:(void (^)(NSError *error))completion;
2927 
2928 - (void)fSSyncStatusWithStatus:(KBRFSSyncStatus *)status requestID:(NSInteger)requestID completion:(void (^)(NSError *error))completion;
2929 
2930 /*!
2931  FSSyncEvent is called by KBFS when the sync status of an individual path
2932  changes.
2933  */
2934 - (void)fSSyncEvent:(KBRFSSyncEventRequestParams *)params completion:(void (^)(NSError *error))completion;
2935 
2936 - (void)fSSyncEventWithEvent:(KBRFSPathSyncStatus *)event completion:(void (^)(NSError *error))completion;
2937 
2938 @end
2939 
2940 @interface KBRKbfsCommonRequest : KBRRequest
2941 
2942 @end
2943 
2944 @interface KBRKbfsMountRequest : KBRRequest
2945 
2946 - (void)getCurrentMountDir:(void (^)(NSError *error, NSString *str))completion;
2947 
2948 - (void)getAllAvailableMountDirs:(void (^)(NSError *error, NSArray *items))completion;
2949 
2950 - (void)setCurrentMountDir:(KBRSetCurrentMountDirRequestParams *)params completion:(void (^)(NSError *error))completion;
2951 
2952 - (void)setCurrentMountDirWithDir:(NSString *)dir completion:(void (^)(NSError *error))completion;
2953 
2954 @end
2955 
2956 @interface KBRKex2ProvisioneeRequest : KBRRequest
2957 
2958 - (void)hello:(KBRHelloRequestParams *)params completion:(void (^)(NSError *error, NSString *helloRes))completion;
2959 
2960 - (void)helloWithUid:(NSString *)uid token:(NSString *)token csrf:(NSString *)csrf pps:(KBRPassphraseStream *)pps sigBody:(NSString *)sigBody completion:(void (^)(NSError *error, NSString *helloRes))completion;
2961 
2962 - (void)didCounterSign:(KBRDidCounterSignRequestParams *)params completion:(void (^)(NSError *error))completion;
2963 
2964 - (void)didCounterSignWithSig:(NSData *)sig completion:(void (^)(NSError *error))completion;
2965 
2966 @end
2967 
2968 @interface KBRKex2Provisionee2Request : KBRRequest
2969 
2970 - (void)hello2:(KBRHello2RequestParams *)params completion:(void (^)(NSError *error, KBRHello2Res *hello2Res))completion;
2971 
2972 - (void)hello2WithUid:(NSString *)uid token:(NSString *)token csrf:(NSString *)csrf sigBody:(NSString *)sigBody completion:(void (^)(NSError *error, KBRHello2Res *hello2Res))completion;
2973 
2974 - (void)didCounterSign2:(KBRDidCounterSign2RequestParams *)params completion:(void (^)(NSError *error))completion;
2975 
2976 - (void)didCounterSign2WithSig:(NSData *)sig ppsEncrypted:(NSString *)ppsEncrypted completion:(void (^)(NSError *error))completion;
2977 
2978 @end
2979 
2980 @interface KBRKex2ProvisionerRequest : KBRRequest
2981 
2982 - (void)kexStart:(void (^)(NSError *error))completion;
2983 
2984 @end
2985 
2986 @interface KBRLogRequest : KBRRequest
2987 
2988 - (void)registerLogger:(KBRRegisterLoggerRequestParams *)params completion:(void (^)(NSError *error))completion;
2989 
2990 - (void)registerLoggerWithName:(NSString *)name level:(KBRLogLevel)level completion:(void (^)(NSError *error))completion;
2991 
2992 @end
2993 
2994 @interface KBRLogUiRequest : KBRRequest
2995 
2996 - (void)log:(KBRLogRequestParams *)params completion:(void (^)(NSError *error))completion;
2997 
2998 - (void)logWithLevel:(KBRLogLevel)level text:(KBRText *)text completion:(void (^)(NSError *error))completion;
2999 
3000 @end
3001 
3002 @interface KBRLoginRequest : KBRRequest
3003 
3004 /*!
3005  Returns an array of information about accounts configured on the local
3006  machine. Currently configured accounts are defined as those that have stored
3007  secrets, but this definition may be expanded in the future.
3008  */
3009 - (void)getConfiguredAccounts:(void (^)(NSError *error, NSArray *items))completion;
3010 
3011 /*!
3012  Performs login. deviceType should be keybase1.DeviceTypeV2_DESKTOP
3013  or keybase1.DeviceTypeV2_MOBILE. usernameOrEmail is optional.
3014  If the current device isn't provisioned, this function will
3015  provision it.
3016 
3017  Note that if usernameOrEmail is an email address, only provisioning
3018  will be attempted. If the device is already provisioned, login
3019  via email address does not work.
3020  */
3021 - (void)login:(KBRLoginRequestParams *)params completion:(void (^)(NSError *error))completion;
3022 
3023 - (void)loginWithDeviceType:(NSString *)deviceType usernameOrEmail:(NSString *)usernameOrEmail clientType:(KBRClientType)clientType completion:(void (^)(NSError *error))completion;
3024 
3025 /*!
3026  Removes any existing stored secret for the given username.
3027  loginWithStoredSecret(_, username) will fail after this is called.
3028  */
3029 - (void)clearStoredSecret:(KBRClearStoredSecretRequestParams *)params completion:(void (^)(NSError *error))completion;
3030 
3031 - (void)clearStoredSecretWithUsername:(NSString *)username completion:(void (^)(NSError *error))completion;
3032 
3033 - (void)logout:(void (^)(NSError *error))completion;
3034 
3035 - (void)deprovision:(KBRDeprovisionRequestParams *)params completion:(void (^)(NSError *error))completion;
3036 
3037 - (void)deprovisionWithUsername:(NSString *)username doRevoke:(BOOL)doRevoke completion:(void (^)(NSError *error))completion;
3038 
3039 - (void)recoverAccountFromEmailAddress:(KBRRecoverAccountFromEmailAddressRequestParams *)params completion:(void (^)(NSError *error))completion;
3040 
3041 - (void)recoverAccountFromEmailAddressWithEmail:(NSString *)email completion:(void (^)(NSError *error))completion;
3042 
3043 /*!
3044  PaperKey generates paper backup keys for restoring an account.
3045  It calls login_ui.displayPaperKeyPhrase with the phrase.
3046  */
3047 - (void)paperKey:(void (^)(NSError *error))completion;
3048 
3049 /*!
3050  paperKeySubmit checks that paperPhrase is a valid paper key
3051  for the logged in user, caches the keys, and sends a notification.
3052  */
3053 - (void)paperKeySubmit:(KBRPaperKeySubmitRequestParams *)params completion:(void (^)(NSError *error))completion;
3054 
3055 - (void)paperKeySubmitWithPaperPhrase:(NSString *)paperPhrase completion:(void (^)(NSError *error))completion;
3056 
3057 /*!
3058  Unlock restores access to local key store by priming passphrase stream cache.
3059  */
3060 - (void)unlock:(void (^)(NSError *error))completion;
3061 
3062 - (void)unlockWithPassphrase:(KBRUnlockWithPassphraseRequestParams *)params completion:(void (^)(NSError *error))completion;
3063 
3064 - (void)unlockWithPassphraseWithPassphrase:(NSString *)passphrase completion:(void (^)(NSError *error))completion;
3065 
3066 /*!
3067  pgpProvision is for devel/testing to provision a device via pgp using CLI
3068  with no user interaction.
3069  */
3070 - (void)pgpProvision:(KBRPgpProvisionRequestParams *)params completion:(void (^)(NSError *error))completion;
3071 
3072 - (void)pgpProvisionWithUsername:(NSString *)username passphrase:(NSString *)passphrase deviceName:(NSString *)deviceName completion:(void (^)(NSError *error))completion;
3073 
3074 /*!
3075  accountDelete is for devel/testing to delete the current user's account.
3076  */
3077 - (void)accountDelete:(void (^)(NSError *error))completion;
3078 
3079 @end
3080 
3081 @interface KBRLoginUiRequest : KBRRequest
3082 
3083 - (void)getEmailOrUsername:(void (^)(NSError *error, NSString *str))completion;
3084 
3085 - (void)promptRevokePaperKeys:(KBRPromptRevokePaperKeysRequestParams *)params completion:(void (^)(NSError *error, BOOL b))completion;
3086 
3087 - (void)promptRevokePaperKeysWithDevice:(KBRDevice *)device index:(NSInteger)index completion:(void (^)(NSError *error, BOOL b))completion;
3088 
3089 - (void)displayPaperKeyPhrase:(KBRDisplayPaperKeyPhraseRequestParams *)params completion:(void (^)(NSError *error))completion;
3090 
3091 - (void)displayPaperKeyPhraseWithPhrase:(NSString *)phrase completion:(void (^)(NSError *error))completion;
3092 
3093 - (void)displayPrimaryPaperKey:(KBRDisplayPrimaryPaperKeyRequestParams *)params completion:(void (^)(NSError *error))completion;
3094 
3095 - (void)displayPrimaryPaperKeyWithPhrase:(NSString *)phrase completion:(void (^)(NSError *error))completion;
3096 
3097 @end
3098 
3099 @interface KBRMetadataRequest : KBRRequest
3100 
3101 - (void)getChallenge:(void (^)(NSError *error, KBRChallengeInfo *challengeInfo))completion;
3102 
3103 - (void)authenticate:(KBRAuthenticateRequestParams *)params completion:(void (^)(NSError *error, NSInteger n))completion;
3104 
3105 - (void)authenticateWithSignature:(NSString *)signature completion:(void (^)(NSError *error, NSInteger n))completion;
3106 
3107 - (void)putMetadata:(KBRPutMetadataRequestParams *)params completion:(void (^)(NSError *error))completion;
3108 
3109 - (void)putMetadataWithMdBlock:(KBRMDBlock *)mdBlock readerKeyBundle:(KBRKeyBundle *)readerKeyBundle writerKeyBundle:(KBRKeyBundle *)writerKeyBundle logTags:(NSDictionary *)logTags completion:(void (^)(NSError *error))completion;
3110 
3111 - (void)getMetadata:(KBRGetMetadataRequestParams *)params completion:(void (^)(NSError *error, KBRMetadataResponse *metadataResponse))completion;
3112 
3113 - (void)getMetadataWithFolderID:(NSString *)folderID folderHandle:(NSData *)folderHandle branchID:(NSString *)branchID unmerged:(BOOL)unmerged startRevision:(int64_t)startRevision stopRevision:(int64_t)stopRevision logTags:(NSDictionary *)logTags completion:(void (^)(NSError *error, KBRMetadataResponse *metadataResponse))completion;
3114 
3115 - (void)registerForUpdates:(KBRRegisterForUpdatesRequestParams *)params completion:(void (^)(NSError *error))completion;
3116 
3117 - (void)registerForUpdatesWithFolderID:(NSString *)folderID currRevision:(int64_t)currRevision logTags:(NSDictionary *)logTags completion:(void (^)(NSError *error))completion;
3118 
3119 - (void)pruneBranch:(KBRPruneBranchRequestParams *)params completion:(void (^)(NSError *error))completion;
3120 
3121 - (void)pruneBranchWithFolderID:(NSString *)folderID branchID:(NSString *)branchID logTags:(NSDictionary *)logTags completion:(void (^)(NSError *error))completion;
3122 
3123 - (void)putKeys:(KBRPutKeysRequestParams *)params completion:(void (^)(NSError *error))completion;
3124 
3125 - (void)putKeysWithKeyHalves:(NSArray *)keyHalves logTags:(NSDictionary *)logTags completion:(void (^)(NSError *error))completion;
3126 
3127 - (void)getKey:(KBRGetKeyRequestParams *)params completion:(void (^)(NSError *error, NSData *bytes))completion;
3128 
3129 - (void)getKeyWithKeyHalfID:(NSData *)keyHalfID deviceKID:(NSString *)deviceKID logTags:(NSDictionary *)logTags completion:(void (^)(NSError *error, NSData *bytes))completion;
3130 
3131 - (void)deleteKey:(KBRDeleteKeyRequestParams *)params completion:(void (^)(NSError *error))completion;
3132 
3133 - (void)deleteKeyWithUid:(NSString *)uid deviceKID:(NSString *)deviceKID keyHalfID:(NSData *)keyHalfID logTags:(NSDictionary *)logTags completion:(void (^)(NSError *error))completion;
3134 
3135 - (void)truncateLock:(KBRTruncateLockRequestParams *)params completion:(void (^)(NSError *error, BOOL b))completion;
3136 
3137 - (void)truncateLockWithFolderID:(NSString *)folderID completion:(void (^)(NSError *error, BOOL b))completion;
3138 
3139 - (void)truncateUnlock:(KBRTruncateUnlockRequestParams *)params completion:(void (^)(NSError *error, BOOL b))completion;
3140 
3141 - (void)truncateUnlockWithFolderID:(NSString *)folderID completion:(void (^)(NSError *error, BOOL b))completion;
3142 
3143 - (void)getFolderHandle:(KBRGetFolderHandleRequestParams *)params completion:(void (^)(NSError *error, NSData *bytes))completion;
3144 
3145 - (void)getFolderHandleWithFolderID:(NSString *)folderID signature:(NSString *)signature challenge:(NSString *)challenge completion:(void (^)(NSError *error, NSData *bytes))completion;
3146 
3147 - (void)getFoldersForRekey:(KBRGetFoldersForRekeyRequestParams *)params completion:(void (^)(NSError *error))completion;
3148 
3149 - (void)getFoldersForRekeyWithDeviceKID:(NSString *)deviceKID completion:(void (^)(NSError *error))completion;
3150 
3151 - (void)ping:(void (^)(NSError *error))completion;
3152 
3153 - (void)ping2:(void (^)(NSError *error, KBRPingResponse *pingResponse))completion;
3154 
3155 - (void)getLatestFolderHandle:(KBRGetLatestFolderHandleRequestParams *)params completion:(void (^)(NSError *error, NSData *bytes))completion;
3156 
3157 - (void)getLatestFolderHandleWithFolderID:(NSString *)folderID completion:(void (^)(NSError *error, NSData *bytes))completion;
3158 
3159 - (void)getKeyBundles:(KBRGetKeyBundlesRequestParams *)params completion:(void (^)(NSError *error, KBRKeyBundleResponse *keyBundleResponse))completion;
3160 
3161 - (void)getKeyBundlesWithFolderID:(NSString *)folderID writerBundleID:(NSString *)writerBundleID readerBundleID:(NSString *)readerBundleID completion:(void (^)(NSError *error, KBRKeyBundleResponse *keyBundleResponse))completion;
3162 
3163 - (void)getMerkleRoot:(KBRGetMerkleRootRequestParams *)params completion:(void (^)(NSError *error, KBRMerkleRoot *merkleRoot))completion;
3164 
3165 - (void)getMerkleRootWithTreeID:(KBRMerkleTreeID)treeID seqNo:(int64_t)seqNo completion:(void (^)(NSError *error, KBRMerkleRoot *merkleRoot))completion;
3166 
3167 - (void)getMerkleRootLatest:(KBRGetMerkleRootLatestRequestParams *)params completion:(void (^)(NSError *error, KBRMerkleRoot *merkleRoot))completion;
3168 
3169 - (void)getMerkleRootLatestWithTreeID:(KBRMerkleTreeID)treeID completion:(void (^)(NSError *error, KBRMerkleRoot *merkleRoot))completion;
3170 
3171 - (void)getMerkleRootSince:(KBRGetMerkleRootSinceRequestParams *)params completion:(void (^)(NSError *error, KBRMerkleRoot *merkleRoot))completion;
3172 
3173 - (void)getMerkleRootSinceWithTreeID:(KBRMerkleTreeID)treeID when:(int64_t)when completion:(void (^)(NSError *error, KBRMerkleRoot *merkleRoot))completion;
3174 
3175 - (void)getMerkleNode:(KBRGetMerkleNodeRequestParams *)params completion:(void (^)(NSError *error, NSData *bytes))completion;
3176 
3177 - (void)getMerkleNodeWithHash:(NSString *)hash completion:(void (^)(NSError *error, NSData *bytes))completion;
3178 
3179 @end
3180 
3181 @interface KBRMetadataUpdateRequest : KBRRequest
3182 
3183 - (void)metadataUpdate:(KBRMetadataUpdateRequestParams *)params completion:(void (^)(NSError *error))completion;
3184 
3185 - (void)metadataUpdateWithFolderID:(NSString *)folderID revision:(int64_t)revision completion:(void (^)(NSError *error))completion;
3186 
3187 - (void)folderNeedsRekey:(KBRFolderNeedsRekeyRequestParams *)params completion:(void (^)(NSError *error))completion;
3188 
3189 - (void)folderNeedsRekeyWithFolderID:(NSString *)folderID revision:(int64_t)revision completion:(void (^)(NSError *error))completion;
3190 
3191 @end
3192 
3193 @interface KBRNotifyAppRequest : KBRRequest
3194 
3195 - (void)exit:(void (^)(NSError *error))completion;
3196 
3197 @end
3198 
3199 @interface KBRNotifyBadgesRequest : KBRRequest
3200 
3201 - (void)badgeState:(KBRBadgeStateRequestParams *)params completion:(void (^)(NSError *error))completion;
3202 
3203 - (void)badgeStateWithBadgeState:(KBRBadgeState *)badgeState completion:(void (^)(NSError *error))completion;
3204 
3205 @end
3206 
3207 @interface KBRNotifyCtlRequest : KBRRequest
3208 
3209 - (void)setNotifications:(KBRSetNotificationsRequestParams *)params completion:(void (^)(NSError *error))completion;
3210 
3211 - (void)setNotificationsWithChannels:(KBRNotificationChannels *)channels completion:(void (^)(NSError *error))completion;
3212 
3213 @end
3214 
3215 @interface KBRNotifyFavoritesRequest : KBRRequest
3216 
3217 - (void)favoritesChanged:(KBRFavoritesChangedRequestParams *)params completion:(void (^)(NSError *error))completion;
3218 
3219 - (void)favoritesChangedWithUid:(NSString *)uid completion:(void (^)(NSError *error))completion;
3220 
3221 @end
3222 
3223 @interface KBRNotifyFSRequest : KBRRequest
3224 
3225 - (void)fSActivity:(KBRFSActivityRequestParams *)params completion:(void (^)(NSError *error))completion;
3226 
3227 - (void)fSActivityWithNotification:(KBRFSNotification *)notification completion:(void (^)(NSError *error))completion;
3228 
3229 - (void)fSSyncActivity:(KBRFSSyncActivityRequestParams *)params completion:(void (^)(NSError *error))completion;
3230 
3231 - (void)fSSyncActivityWithStatus:(KBRFSPathSyncStatus *)status completion:(void (^)(NSError *error))completion;
3232 
3233 - (void)fSEditListResponse:(KBRFSEditListResponseRequestParams *)params completion:(void (^)(NSError *error))completion;
3234 
3235 - (void)fSEditListResponseWithEdits:(NSArray *)edits requestID:(NSInteger)requestID completion:(void (^)(NSError *error))completion;
3236 
3237 - (void)fSSyncStatusResponse:(KBRFSSyncStatusResponseRequestParams *)params completion:(void (^)(NSError *error))completion;
3238 
3239 - (void)fSSyncStatusResponseWithStatus:(KBRFSSyncStatus *)status requestID:(NSInteger)requestID completion:(void (^)(NSError *error))completion;
3240 
3241 @end
3242 
3243 @interface KBRNotifyFSRequestRequest : KBRRequest
3244 
3245 - (void)fSEditListRequest:(KBRFSEditListRequestRequestParams *)params completion:(void (^)(NSError *error))completion;
3246 
3247 - (void)fSEditListRequestWithReq:(KBRFSEditListRequest *)req completion:(void (^)(NSError *error))completion;
3248 
3249 - (void)fSSyncStatusRequest:(KBRFSSyncStatusRequestRequestParams *)params completion:(void (^)(NSError *error))completion;
3250 
3251 - (void)fSSyncStatusRequestWithReq:(KBRFSSyncStatusRequest *)req completion:(void (^)(NSError *error))completion;
3252 
3253 @end
3254 
3255 @interface KBRNotifyKeyfamilyRequest : KBRRequest
3256 
3257 - (void)keyfamilyChanged:(KBRKeyfamilyChangedRequestParams *)params completion:(void (^)(NSError *error))completion;
3258 
3259 - (void)keyfamilyChangedWithUid:(NSString *)uid completion:(void (^)(NSError *error))completion;
3260 
3261 @end
3262 
3263 @interface KBRNotifyPaperKeyRequest : KBRRequest
3264 
3265 - (void)paperKeyCached:(KBRPaperKeyCachedRequestParams *)params completion:(void (^)(NSError *error))completion;
3266 
3267 - (void)paperKeyCachedWithUid:(NSString *)uid encKID:(NSString *)encKID sigKID:(NSString *)sigKID completion:(void (^)(NSError *error))completion;
3268 
3269 @end
3270 
3271 @interface KBRNotifyPGPRequest : KBRRequest
3272 
3273 - (void)pgpKeyInSecretStoreFile:(void (^)(NSError *error))completion;
3274 
3275 @end
3276 
3277 @interface KBRNotifyServiceRequest : KBRRequest
3278 
3279 - (void)shutdown:(void (^)(NSError *error))completion;
3280 
3281 @end
3282 
3283 @interface KBRNotifySessionRequest : KBRRequest
3284 
3285 - (void)loggedOut:(void (^)(NSError *error))completion;
3286 
3287 - (void)loggedIn:(KBRLoggedInRequestParams *)params completion:(void (^)(NSError *error))completion;
3288 
3289 - (void)loggedInWithUsername:(NSString *)username completion:(void (^)(NSError *error))completion;
3290 
3291 - (void)clientOutOfDate:(KBRClientOutOfDateRequestParams *)params completion:(void (^)(NSError *error))completion;
3292 
3293 - (void)clientOutOfDateWithUpgradeTo:(NSString *)upgradeTo upgradeURI:(NSString *)upgradeURI upgradeMsg:(NSString *)upgradeMsg completion:(void (^)(NSError *error))completion;
3294 
3295 @end
3296 
3297 @interface KBRNotifyTrackingRequest : KBRRequest
3298 
3299 - (void)trackingChanged:(KBRTrackingChangedRequestParams *)params completion:(void (^)(NSError *error))completion;
3300 
3301 - (void)trackingChangedWithUid:(NSString *)uid username:(NSString *)username completion:(void (^)(NSError *error))completion;
3302 
3303 @end
3304 
3305 @interface KBRNotifyUsersRequest : KBRRequest
3306 
3307 - (void)userChanged:(KBRUserChangedRequestParams *)params completion:(void (^)(NSError *error))completion;
3308 
3309 - (void)userChangedWithUid:(NSString *)uid completion:(void (^)(NSError *error))completion;
3310 
3311 @end
3312 
3313 @interface KBRPaperprovisionRequest : KBRRequest
3314 
3315 /*!
3316  Performs paper provision.
3317  If the current device isn't provisioned, this function will
3318  provision it.
3319  */
3320 - (void)paperProvision:(KBRPaperProvisionRequestParams *)params completion:(void (^)(NSError *error))completion;
3321 
3322 - (void)paperProvisionWithUsername:(NSString *)username deviceName:(NSString *)deviceName paperKey:(NSString *)paperKey completion:(void (^)(NSError *error))completion;
3323 
3324 @end
3325 
3326 @interface KBRPassphraseCommonRequest : KBRRequest
3327 
3328 @end
3329 
3330 @interface KBRPgpRequest : KBRRequest
3331 
3332 - (void)pgpSign:(KBRPgpSignRequestParams *)params completion:(void (^)(NSError *error))completion;
3333 
3334 - (void)pgpSignWithSource:(KBRStream *)source sink:(KBRStream *)sink opts:(KBRPGPSignOptions *)opts completion:(void (^)(NSError *error))completion;
3335 
3336 /*!
3337  Download PGP keys for tracked users and update the local GPG keyring.
3338  If usernames is nonempty, update only those users.
3339  */
3340 - (void)pgpPull:(KBRPgpPullRequestParams *)params completion:(void (^)(NSError *error))completion;
3341 
3342 - (void)pgpPullWithUserAsserts:(NSArray *)userAsserts completion:(void (^)(NSError *error))completion;
3343 
3344 - (void)pgpEncrypt:(KBRPgpEncryptRequestParams *)params completion:(void (^)(NSError *error))completion;
3345 
3346 - (void)pgpEncryptWithSource:(KBRStream *)source sink:(KBRStream *)sink opts:(KBRPGPEncryptOptions *)opts completion:(void (^)(NSError *error))completion;
3347 
3348 - (void)pgpDecrypt:(KBRPgpDecryptRequestParams *)params completion:(void (^)(NSError *error, KBRPGPSigVerification *pGPSigVerification))completion;
3349 
3350 - (void)pgpDecryptWithSource:(KBRStream *)source sink:(KBRStream *)sink opts:(KBRPGPDecryptOptions *)opts completion:(void (^)(NSError *error, KBRPGPSigVerification *pGPSigVerification))completion;
3351 
3352 - (void)pgpVerify:(KBRPgpVerifyRequestParams *)params completion:(void (^)(NSError *error, KBRPGPSigVerification *pGPSigVerification))completion;
3353 
3354 - (void)pgpVerifyWithSource:(KBRStream *)source opts:(KBRPGPVerifyOptions *)opts completion:(void (^)(NSError *error, KBRPGPSigVerification *pGPSigVerification))completion;
3355 
3356 - (void)pgpImport:(KBRPgpImportRequestParams *)params completion:(void (^)(NSError *error))completion;
3357 
3358 - (void)pgpImportWithKey:(NSData *)key pushSecret:(BOOL)pushSecret completion:(void (^)(NSError *error))completion;
3359 
3360 /*!
3361  Exports active PGP keys. Only allows armored export.
3362  */
3363 - (void)pgpExport:(KBRPgpExportRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3364 
3365 - (void)pgpExportWithOptions:(KBRPGPQuery *)options completion:(void (^)(NSError *error, NSArray *items))completion;
3366 
3367 - (void)pgpExportByFingerprint:(KBRPgpExportByFingerprintRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3368 
3369 - (void)pgpExportByFingerprintWithOptions:(KBRPGPQuery *)options completion:(void (^)(NSError *error, NSArray *items))completion;
3370 
3371 - (void)pgpExportByKID:(KBRPgpExportByKIDRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3372 
3373 - (void)pgpExportByKIDWithOptions:(KBRPGPQuery *)options completion:(void (^)(NSError *error, NSArray *items))completion;
3374 
3375 - (void)pgpKeyGen:(KBRPgpKeyGenRequestParams *)params completion:(void (^)(NSError *error))completion;
3376 
3377 - (void)pgpKeyGenWithPrimaryBits:(NSInteger)primaryBits subkeyBits:(NSInteger)subkeyBits createUids:(KBRPGPCreateUids *)createUids allowMulti:(BOOL)allowMulti doExport:(BOOL)doExport pushSecret:(BOOL)pushSecret completion:(void (^)(NSError *error))completion;
3378 
3379 - (void)pgpKeyGenDefault:(KBRPgpKeyGenDefaultRequestParams *)params completion:(void (^)(NSError *error))completion;
3380 
3381 - (void)pgpKeyGenDefaultWithCreateUids:(KBRPGPCreateUids *)createUids completion:(void (^)(NSError *error))completion;
3382 
3383 - (void)pgpDeletePrimary:(void (^)(NSError *error))completion;
3384 
3385 /*!
3386  Select an existing key and add to Keybase.
3387  */
3388 - (void)pgpSelect:(KBRPgpSelectRequestParams *)params completion:(void (^)(NSError *error))completion;
3389 
3390 - (void)pgpSelectWithFingerprintQuery:(NSString *)fingerprintQuery allowMulti:(BOOL)allowMulti skipImport:(BOOL)skipImport onlyImport:(BOOL)onlyImport completion:(void (^)(NSError *error))completion;
3391 
3392 /*!
3393  Push updated key(s) to the server.
3394  */
3395 - (void)pgpUpdate:(KBRPgpUpdateRequestParams *)params completion:(void (^)(NSError *error))completion;
3396 
3397 - (void)pgpUpdateWithAll:(BOOL)all fingerprints:(NSArray *)fingerprints completion:(void (^)(NSError *error))completion;
3398 
3399 - (void)pgpPurge:(KBRPgpPurgeRequestParams *)params completion:(void (^)(NSError *error, KBRPGPPurgeRes *pGPPurgeRes))completion;
3400 
3401 - (void)pgpPurgeWithDoPurge:(BOOL)doPurge completion:(void (^)(NSError *error, KBRPGPPurgeRes *pGPPurgeRes))completion;
3402 
3403 /*!
3404  Dismiss the PGP unlock via secret_store_file notification.
3405  */
3406 - (void)pgpStorageDismiss:(void (^)(NSError *error))completion;
3407 
3408 @end
3409 
3410 @interface KBRPgpUiRequest : KBRRequest
3411 
3412 - (void)outputSignatureSuccess:(KBROutputSignatureSuccessRequestParams *)params completion:(void (^)(NSError *error))completion;
3413 
3414 - (void)outputSignatureSuccessWithFingerprint:(NSString *)fingerprint username:(NSString *)username signedAt:(int64_t)signedAt completion:(void (^)(NSError *error))completion;
3415 
3416 - (void)outputSignatureSuccessNonKeybase:(KBROutputSignatureSuccessNonKeybaseRequestParams *)params completion:(void (^)(NSError *error))completion;
3417 
3418 - (void)outputSignatureSuccessNonKeybaseWithKeyID:(NSString *)keyID signedAt:(int64_t)signedAt completion:(void (^)(NSError *error))completion;
3419 
3420 - (void)keyGenerated:(KBRKeyGeneratedRequestParams *)params completion:(void (^)(NSError *error))completion;
3421 
3422 - (void)keyGeneratedWithKid:(NSString *)kid key:(KBRKeyInfo *)key completion:(void (^)(NSError *error))completion;
3423 
3424 - (void)shouldPushPrivate:(void (^)(NSError *error, BOOL b))completion;
3425 
3426 - (void)finished:(void (^)(NSError *error))completion;
3427 
3428 @end
3429 
3430 @interface KBRProcessRequest : KBRRequest
3431 
3432 @end
3433 
3434 @interface KBRProveRequest : KBRRequest
3435 
3436 - (void)startProof:(KBRStartProofRequestParams *)params completion:(void (^)(NSError *error, KBRStartProofResult *startProofResult))completion;
3437 
3438 - (void)startProofWithService:(NSString *)service username:(NSString *)username force:(BOOL)force promptPosted:(BOOL)promptPosted automatic:(BOOL)automatic completion:(void (^)(NSError *error, KBRStartProofResult *startProofResult))completion;
3439 
3440 - (void)checkProof:(KBRCheckProofRequestParams *)params completion:(void (^)(NSError *error, KBRCheckProofStatus *checkProofStatus))completion;
3441 
3442 - (void)checkProofWithSigID:(NSString *)sigID completion:(void (^)(NSError *error, KBRCheckProofStatus *checkProofStatus))completion;
3443 
3444 @end
3445 
3446 @interface KBRProveUiRequest : KBRRequest
3447 
3448 - (void)promptOverwrite:(KBRPromptOverwriteRequestParams *)params completion:(void (^)(NSError *error, BOOL b))completion;
3449 
3450 - (void)promptOverwriteWithAccount:(NSString *)account typ:(KBRPromptOverwriteType)typ completion:(void (^)(NSError *error, BOOL b))completion;
3451 
3452 - (void)promptUsername:(KBRPromptUsernameRequestParams *)params completion:(void (^)(NSError *error, NSString *str))completion;
3453 
3454 - (void)promptUsernameWithPrompt:(NSString *)prompt prevError:(KBRStatus *)prevError completion:(void (^)(NSError *error, NSString *str))completion;
3455 
3456 - (void)outputPrechecks:(KBROutputPrechecksRequestParams *)params completion:(void (^)(NSError *error))completion;
3457 
3458 - (void)outputPrechecksWithText:(KBRText *)text completion:(void (^)(NSError *error))completion;
3459 
3460 - (void)preProofWarning:(KBRPreProofWarningRequestParams *)params completion:(void (^)(NSError *error, BOOL b))completion;
3461 
3462 - (void)preProofWarningWithText:(KBRText *)text completion:(void (^)(NSError *error, BOOL b))completion;
3463 
3464 - (void)outputInstructions:(KBROutputInstructionsRequestParams *)params completion:(void (^)(NSError *error))completion;
3465 
3466 - (void)outputInstructionsWithInstructions:(KBRText *)instructions proof:(NSString *)proof completion:(void (^)(NSError *error))completion;
3467 
3468 - (void)okToCheck:(KBROkToCheckRequestParams *)params completion:(void (^)(NSError *error, BOOL b))completion;
3469 
3470 - (void)okToCheckWithName:(NSString *)name attempt:(NSInteger)attempt completion:(void (^)(NSError *error, BOOL b))completion;
3471 
3472 - (void)displayRecheckWarning:(KBRDisplayRecheckWarningRequestParams *)params completion:(void (^)(NSError *error))completion;
3473 
3474 - (void)displayRecheckWarningWithText:(KBRText *)text completion:(void (^)(NSError *error))completion;
3475 
3476 @end
3477 
3478 @interface KBRProvisionUiRequest : KBRRequest
3479 
3480 /*!
3481  DEPRECATED:
3482  Called during device provisioning for the user to select a
3483  method for provisioning. gpgOption will be true if GPG
3484  should be offered as an option.
3485  */
3486 - (void)chooseProvisioningMethod:(KBRChooseProvisioningMethodRequestParams *)params completion:(void (^)(NSError *error, KBRProvisionMethod provisionMethod))completion;
3487 
3488 - (void)chooseProvisioningMethodWithGpgOption:(BOOL)gpgOption completion:(void (^)(NSError *error, KBRProvisionMethod provisionMethod))completion;
3489 
3490 /*!
3491  Called during device provisioning for the user to select a
3492  GPG method, either import the key into keybase's local keyring
3493  or use GPG to sign a provisioning statement.
3494 
3495  The keys are provided for display purposes, so the UI can
3496  do something like "We found the following GPG keys on this
3497  machine. How would you like to use one of them to provision
3498  this device?"
3499 
3500  After this, gpg_ui.selectKey will be called (if there are
3501  multiple keys available).
3502  */
3503 - (void)chooseGPGMethod:(KBRChooseGPGMethodRequestParams *)params completion:(void (^)(NSError *error, KBRGPGMethod gPGMethod))completion;
3504 
3505 - (void)chooseGPGMethodWithKeys:(NSArray *)keys completion:(void (^)(NSError *error, KBRGPGMethod gPGMethod))completion;
3506 
3507 /*!
3508  If there was an error importing a gpg key into the local
3509  keyring, tell the user and offer to switch to GPG signing
3510  with this key. Return true to switch to GPG signing,
3511  false to abort provisioning.
3512  */
3513 - (void)switchToGPGSignOK:(KBRSwitchToGPGSignOKRequestParams *)params completion:(void (^)(NSError *error, BOOL b))completion;
3514 
3515 - (void)switchToGPGSignOKWithKey:(KBRGPGKey *)key importError:(NSString *)importError completion:(void (^)(NSError *error, BOOL b))completion;
3516 
3517 - (void)chooseDevice:(KBRChooseDeviceRequestParams *)params completion:(void (^)(NSError *error, NSString *deviceID))completion;
3518 
3519 - (void)chooseDeviceWithDevices:(NSArray *)devices completion:(void (^)(NSError *error, NSString *deviceID))completion;
3520 
3521 /*!
3522  If provisioning via device, this will be called so user can select the provisioner/provisionee device type: desktop or mobile.
3523  If selecting the existing device type, set kind to EXISTING_DEVICE_0.
3524  If selecting the new device type, set kind to NEW_DEVICE_1.
3525  */
3526 - (void)chooseDeviceType:(KBRChooseDeviceTypeRequestParams *)params completion:(void (^)(NSError *error, KBRDeviceType deviceType))completion;
3527 
3528 - (void)chooseDeviceTypeWithKind:(KBRChooseType)kind completion:(void (^)(NSError *error, KBRDeviceType deviceType))completion;
3529 
3530 /*!
3531  DisplayAndPromptSecret displays a secret that the user can enter into the other device.
3532  It also can return a secret that the user enters into this device (from the other device).
3533  If it does not return a secret, it will be canceled when this device receives the secret via kex2.
3534  */
3535 - (void)displayAndPromptSecret:(KBRDisplayAndPromptSecretRequestParams *)params completion:(void (^)(NSError *error, KBRSecretResponse *secretResponse))completion;
3536 
3537 - (void)displayAndPromptSecretWithSecret:(NSData *)secret phrase:(NSString *)phrase otherDeviceType:(KBRDeviceType)otherDeviceType completion:(void (^)(NSError *error, KBRSecretResponse *secretResponse))completion;
3538 
3539 /*!
3540  DisplaySecretExchanged is called when the kex2 secret has successfully been exchanged by the two
3541  devices.
3542  */
3543 - (void)displaySecretExchanged:(void (^)(NSError *error))completion;
3544 
3545 /*!
3546  PromptNewDeviceName is called when the device provisioning process needs a name for the new device.
3547  To help the clients not send a duplicate name, existingDevices is populated with the current device
3548  names for the user. If the device name returned to the service is invalid or already
3549  taken, it will call this again with an error message in errorMessage.
3550  */
3551 - (void)promptNewDeviceName:(KBRPromptNewDeviceNameRequestParams *)params completion:(void (^)(NSError *error, NSString *str))completion;
3552 
3553 - (void)promptNewDeviceNameWithExistingDevices:(NSArray *)existingDevices errorMessage:(NSString *)errorMessage completion:(void (^)(NSError *error, NSString *str))completion;
3554 
3555 /*!
3556  ProvisioneeSuccess is called on provisionee when it is successfully provisioned.
3557  */
3558 - (void)provisioneeSuccess:(KBRProvisioneeSuccessRequestParams *)params completion:(void (^)(NSError *error))completion;
3559 
3560 - (void)provisioneeSuccessWithUsername:(NSString *)username deviceName:(NSString *)deviceName completion:(void (^)(NSError *error))completion;
3561 
3562 /*!
3563  ProvisionerSuccess is called on provisioner when it successfully provisions another device.
3564  */
3565 - (void)provisionerSuccess:(KBRProvisionerSuccessRequestParams *)params completion:(void (^)(NSError *error))completion;
3566 
3567 - (void)provisionerSuccessWithDeviceName:(NSString *)deviceName deviceType:(NSString *)deviceType completion:(void (^)(NSError *error))completion;
3568 
3569 @end
3570 
3571 @interface KBRQuotaRequest : KBRRequest
3572 
3573 - (void)verifySession:(KBRVerifySessionRequestParams *)params completion:(void (^)(NSError *error, KBRVerifySessionRes *verifySessionRes))completion;
3574 
3575 - (void)verifySessionWithSession:(NSString *)session completion:(void (^)(NSError *error, KBRVerifySessionRes *verifySessionRes))completion;
3576 
3577 @end
3578 
3579 @interface KBRReachabilityRequest : KBRRequest
3580 
3581 - (void)reachabilityChanged:(KBRReachabilityChangedRequestParams *)params completion:(void (^)(NSError *error))completion;
3582 
3583 - (void)reachabilityChangedWithReachability:(KBRReachability *)reachability completion:(void (^)(NSError *error))completion;
3584 
3585 /*!
3586  Start reachability checks and return current status, which
3587  may be cached.
3588  */
3589 - (void)startReachability:(void (^)(NSError *error, KBRReachability *reachability))completion;
3590 
3591 /*!
3592  Performs a reachability check. This is not a cached response.
3593  */
3594 - (void)checkReachability:(void (^)(NSError *error, KBRReachability *reachability))completion;
3595 
3596 @end
3597 
3598 @interface KBRRekeyRequest : KBRRequest
3599 
3600 /*!
3601  ShowPendingRekeyStatus shows either pending gregor-initiated rekey harassments
3602  or nothing if none were pending.
3603  */
3604 - (void)showPendingRekeyStatus:(void (^)(NSError *error))completion;
3605 
3606 /*!
3607  GetPendingRekeyStatus returns the pending ProblemSetDevices.
3608  */
3609 - (void)getPendingRekeyStatus:(void (^)(NSError *error, KBRProblemSetDevices *problemSetDevices))completion;
3610 
3611 /*!
3612  DebugShowRekeyStatus is used by the CLI to kick off a "ShowRekeyStatus" window for
3613  the current user.
3614  */
3615 - (void)debugShowRekeyStatus:(void (^)(NSError *error))completion;
3616 
3617 /*!
3618  RekeyStatusFinish is called when work is completed on a given RekeyStatus window. The Outcome
3619  can be Fixed or Ignored.
3620  */
3621 - (void)rekeyStatusFinish:(void (^)(NSError *error, KBROutcome outcome))completion;
3622 
3623 /*!
3624  RekeySync flushes the current rekey loop and gets to a good stopping point
3625  to assert state. Good for race-free testing, not very useful in production.
3626  Force overrides a long-snooze.
3627  */
3628 - (void)rekeySync:(KBRRekeySyncRequestParams *)params completion:(void (^)(NSError *error))completion;
3629 
3630 - (void)rekeySyncWithForce:(BOOL)force completion:(void (^)(NSError *error))completion;
3631 
3632 /*!
3633  GetRevokeWarning computes the TLFs that will be endangered if actingDevice
3634  revokes targetDevice.
3635  */
3636 - (void)getRevokeWarning:(KBRGetRevokeWarningRequestParams *)params completion:(void (^)(NSError *error, KBRRevokeWarning *revokeWarning))completion;
3637 
3638 - (void)getRevokeWarningWithSession:(NSInteger)session actingDevice:(NSString *)actingDevice targetDevice:(NSString *)targetDevice completion:(void (^)(NSError *error, KBRRevokeWarning *revokeWarning))completion;
3639 
3640 @end
3641 
3642 @interface KBRRekeyUIRequest : KBRRequest
3643 
3644 - (void)delegateRekeyUI:(void (^)(NSError *error, NSInteger n))completion;
3645 
3646 /*!
3647  Refresh is called whenever Electron should refresh the UI, either
3648  because a change came in, or because there was a timeout poll.
3649  */
3650 - (void)refresh:(KBRRefreshRequestParams *)params completion:(void (^)(NSError *error))completion;
3651 
3652 - (void)refreshWithProblemSetDevices:(KBRProblemSetDevices *)problemSetDevices completion:(void (^)(NSError *error))completion;
3653 
3654 /*!
3655  RekeySendEvent sends updates as to what's going on in the rekey
3656  thread. This is mainly useful in testing.
3657  */
3658 - (void)rekeySendEvent:(KBRRekeySendEventRequestParams *)params completion:(void (^)(NSError *error))completion;
3659 
3660 - (void)rekeySendEventWithEvent:(KBRRekeyEvent *)event completion:(void (^)(NSError *error))completion;
3661 
3662 @end
3663 
3664 @interface KBRRevokeRequest : KBRRequest
3665 
3666 - (void)revokeKey:(KBRRevokeKeyRequestParams *)params completion:(void (^)(NSError *error))completion;
3667 
3668 - (void)revokeKeyWithKeyID:(NSString *)keyID completion:(void (^)(NSError *error))completion;
3669 
3670 - (void)revokeDevice:(KBRRevokeDeviceRequestParams *)params completion:(void (^)(NSError *error))completion;
3671 
3672 - (void)revokeDeviceWithDeviceID:(NSString *)deviceID force:(BOOL)force completion:(void (^)(NSError *error))completion;
3673 
3674 - (void)revokeSigs:(KBRRevokeSigsRequestParams *)params completion:(void (^)(NSError *error))completion;
3675 
3676 - (void)revokeSigsWithSigIDQueries:(NSArray *)sigIDQueries completion:(void (^)(NSError *error))completion;
3677 
3678 @end
3679 
3680 @interface KBRSaltpackRequest : KBRRequest
3681 
3682 - (void)saltpackEncrypt:(KBRSaltpackEncryptRequestParams *)params completion:(void (^)(NSError *error))completion;
3683 
3684 - (void)saltpackEncryptWithSource:(KBRStream *)source sink:(KBRStream *)sink opts:(KBRSaltpackEncryptOptions *)opts completion:(void (^)(NSError *error))completion;
3685 
3686 - (void)saltpackDecrypt:(KBRSaltpackDecryptRequestParams *)params completion:(void (^)(NSError *error, KBRSaltpackEncryptedMessageInfo *saltpackEncryptedMessageInfo))completion;
3687 
3688 - (void)saltpackDecryptWithSource:(KBRStream *)source sink:(KBRStream *)sink opts:(KBRSaltpackDecryptOptions *)opts completion:(void (^)(NSError *error, KBRSaltpackEncryptedMessageInfo *saltpackEncryptedMessageInfo))completion;
3689 
3690 - (void)saltpackSign:(KBRSaltpackSignRequestParams *)params completion:(void (^)(NSError *error))completion;
3691 
3692 - (void)saltpackSignWithSource:(KBRStream *)source sink:(KBRStream *)sink opts:(KBRSaltpackSignOptions *)opts completion:(void (^)(NSError *error))completion;
3693 
3694 - (void)saltpackVerify:(KBRSaltpackVerifyRequestParams *)params completion:(void (^)(NSError *error))completion;
3695 
3696 - (void)saltpackVerifyWithSource:(KBRStream *)source sink:(KBRStream *)sink opts:(KBRSaltpackVerifyOptions *)opts completion:(void (^)(NSError *error))completion;
3697 
3698 @end
3699 
3700 @interface KBRScanProofsRequest : KBRRequest
3701 
3702 - (void)scanProofs:(KBRScanProofsRequestParams *)params completion:(void (^)(NSError *error))completion;
3703 
3704 - (void)scanProofsWithInfile:(NSString *)infile indices:(NSString *)indices sigid:(NSString *)sigid ratelimit:(NSInteger)ratelimit cachefile:(NSString *)cachefile ignorefile:(NSString *)ignorefile completion:(void (^)(NSError *error))completion;
3705 
3706 @end
3707 
3708 @interface KBRSecretUiRequest : KBRRequest
3709 
3710 - (void)getPassphrase:(KBRGetPassphraseRequestParams *)params completion:(void (^)(NSError *error, KBRGetPassphraseRes *getPassphraseRes))completion;
3711 
3712 - (void)getPassphraseWithPinentry:(KBRGUIEntryArg *)pinentry terminal:(KBRSecretEntryArg *)terminal completion:(void (^)(NSError *error, KBRGetPassphraseRes *getPassphraseRes))completion;
3713 
3714 @end
3715 
3716 @interface KBRSecretKeysRequest : KBRRequest
3717 
3718 - (void)getSecretKeys:(void (^)(NSError *error, KBRSecretKeys *secretKeys))completion;
3719 
3720 @end
3721 
3722 @interface KBRSessionRequest : KBRRequest
3723 
3724 - (void)currentSession:(void (^)(NSError *error, KBRSession *session))completion;
3725 
3726 - (void)sessionPing:(void (^)(NSError *error))completion;
3727 
3728 @end
3729 
3730 @interface KBRSignupRequest : KBRRequest
3731 
3732 - (void)checkUsernameAvailable:(KBRCheckUsernameAvailableRequestParams *)params completion:(void (^)(NSError *error))completion;
3733 
3734 - (void)checkUsernameAvailableWithUsername:(NSString *)username completion:(void (^)(NSError *error))completion;
3735 
3736 - (void)signup:(KBRSignupRequestParams *)params completion:(void (^)(NSError *error, KBRSignupRes *signupRes))completion;
3737 
3738 - (void)signupWithEmail:(NSString *)email inviteCode:(NSString *)inviteCode passphrase:(NSString *)passphrase username:(NSString *)username deviceName:(NSString *)deviceName deviceType:(KBRDeviceType)deviceType storeSecret:(BOOL)storeSecret skipMail:(BOOL)skipMail genPGPBatch:(BOOL)genPGPBatch completion:(void (^)(NSError *error, KBRSignupRes *signupRes))completion;
3739 
3740 - (void)inviteRequest:(KBRInviteRequestRequestParams *)params completion:(void (^)(NSError *error))completion;
3741 
3742 - (void)inviteRequestWithEmail:(NSString *)email fullname:(NSString *)fullname notes:(NSString *)notes completion:(void (^)(NSError *error))completion;
3743 
3744 - (void)checkInvitationCode:(KBRCheckInvitationCodeRequestParams *)params completion:(void (^)(NSError *error))completion;
3745 
3746 - (void)checkInvitationCodeWithInvitationCode:(NSString *)invitationCode completion:(void (^)(NSError *error))completion;
3747 
3748 @end
3749 
3750 @interface KBRSigsRequest : KBRRequest
3751 
3752 - (void)sigList:(KBRSigListRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3753 
3754 - (void)sigListWithArg:(KBRSigListArgs *)arg completion:(void (^)(NSError *error, NSArray *items))completion;
3755 
3756 - (void)sigListJSON:(KBRSigListJSONRequestParams *)params completion:(void (^)(NSError *error, NSString *str))completion;
3757 
3758 - (void)sigListJSONWithArg:(KBRSigListArgs *)arg completion:(void (^)(NSError *error, NSString *str))completion;
3759 
3760 @end
3761 
3762 @interface KBRStreamUiRequest : KBRRequest
3763 
3764 - (void)close:(KBRCloseRequestParams *)params completion:(void (^)(NSError *error))completion;
3765 
3766 - (void)closeWithS:(KBRStream *)s completion:(void (^)(NSError *error))completion;
3767 
3768 - (void)read:(KBRReadRequestParams *)params completion:(void (^)(NSError *error, NSData *bytes))completion;
3769 
3770 - (void)readWithS:(KBRStream *)s sz:(NSInteger)sz completion:(void (^)(NSError *error, NSData *bytes))completion;
3771 
3772 - (void)reset:(KBRResetRequestParams *)params completion:(void (^)(NSError *error))completion;
3773 
3774 - (void)resetWithS:(KBRStream *)s completion:(void (^)(NSError *error))completion;
3775 
3776 - (void)write:(KBRWriteRequestParams *)params completion:(void (^)(NSError *error, NSInteger n))completion;
3777 
3778 - (void)writeWithS:(KBRStream *)s buf:(NSData *)buf completion:(void (^)(NSError *error, NSInteger n))completion;
3779 
3780 @end
3781 
3782 @interface KBRTestRequest : KBRRequest
3783 
3784 /*!
3785  Call test method.
3786  Will trigger the testCallback method, whose result will be set in the
3787  returned Test object, reply property.
3788  */
3789 - (void)test:(KBRTestRequestParams *)params completion:(void (^)(NSError *error, KBRTest *test))completion;
3790 
3791 - (void)testWithName:(NSString *)name completion:(void (^)(NSError *error, KBRTest *test))completion;
3792 
3793 /*!
3794  This is a service callback triggered from test(..).
3795  The name param is what was passed into test.
3796  */
3797 - (void)testCallback:(KBRTestCallbackRequestParams *)params completion:(void (^)(NSError *error, NSString *str))completion;
3798 
3799 - (void)testCallbackWithName:(NSString *)name completion:(void (^)(NSError *error, NSString *str))completion;
3800 
3801 /*!
3802  For testing crashes.
3803  */
3804 - (void)panic:(KBRPanicRequestParams *)params completion:(void (^)(NSError *error))completion;
3805 
3806 - (void)panicWithMessage:(NSString *)message completion:(void (^)(NSError *error))completion;
3807 
3808 @end
3809 
3810 @interface KBRTlfRequest : KBRRequest
3811 
3812 /*!
3813  CryptKeys returns TLF crypt keys from all generations.
3814  */
3815 - (void)cryptKeys:(KBRCryptKeysRequestParams *)params completion:(void (^)(NSError *error, KBRGetTLFCryptKeysRes *getTLFCryptKeysRes))completion;
3816 
3817 - (void)cryptKeysWithQuery:(KBRTLFQuery *)query completion:(void (^)(NSError *error, KBRGetTLFCryptKeysRes *getTLFCryptKeysRes))completion;
3818 
3819 /*!
3820  * tlfCanonicalID returns the canonical name and TLFID for tlfName.
3821  * TLFID should not be cached or stored persistently.
3822  */
3823 - (void)publicCanonicalTLFNameAndID:(KBRPublicCanonicalTLFNameAndIDRequestParams *)params completion:(void (^)(NSError *error, KBRCanonicalTLFNameAndIDWithBreaks *canonicalTLFNameAndIDWithBreaks))completion;
3824 
3825 - (void)publicCanonicalTLFNameAndIDWithQuery:(KBRTLFQuery *)query completion:(void (^)(NSError *error, KBRCanonicalTLFNameAndIDWithBreaks *canonicalTLFNameAndIDWithBreaks))completion;
3826 
3827 - (void)completeAndCanonicalizePrivateTlfName:(KBRCompleteAndCanonicalizePrivateTlfNameRequestParams *)params completion:(void (^)(NSError *error, KBRCanonicalTLFNameAndIDWithBreaks *canonicalTLFNameAndIDWithBreaks))completion;
3828 
3829 - (void)completeAndCanonicalizePrivateTlfNameWithQuery:(KBRTLFQuery *)query completion:(void (^)(NSError *error, KBRCanonicalTLFNameAndIDWithBreaks *canonicalTLFNameAndIDWithBreaks))completion;
3830 
3831 @end
3832 
3833 @interface KBRTlfKeysRequest : KBRRequest
3834 
3835 /*!
3836  getTLFCryptKeys returns TLF crypt keys from all generations and the TLF ID.
3837  TLF ID should not be cached or stored persistently.
3838  */
3839 - (void)getTLFCryptKeys:(KBRGetTLFCryptKeysRequestParams *)params completion:(void (^)(NSError *error, KBRGetTLFCryptKeysRes *getTLFCryptKeysRes))completion;
3840 
3841 - (void)getTLFCryptKeysWithQuery:(KBRTLFQuery *)query completion:(void (^)(NSError *error, KBRGetTLFCryptKeysRes *getTLFCryptKeysRes))completion;
3842 
3843 /*!
3844  getPublicCanonicalTLFNameAndID return the canonical name and TLFID for tlfName.
3845  TLF ID should not be cached or stored persistently.
3846  */
3847 - (void)getPublicCanonicalTLFNameAndID:(KBRGetPublicCanonicalTLFNameAndIDRequestParams *)params completion:(void (^)(NSError *error, KBRCanonicalTLFNameAndIDWithBreaks *canonicalTLFNameAndIDWithBreaks))completion;
3848 
3849 - (void)getPublicCanonicalTLFNameAndIDWithQuery:(KBRTLFQuery *)query completion:(void (^)(NSError *error, KBRCanonicalTLFNameAndIDWithBreaks *canonicalTLFNameAndIDWithBreaks))completion;
3850 
3851 @end
3852 
3853 @interface KBRTrackRequest : KBRRequest
3854 
3855 /*!
3856  This will perform identify and track.
3857  If forceRemoteCheck is true, we force all remote proofs to be checked
3858  (otherwise a cache is used).
3859  */
3860 - (void)track:(KBRTrackRequestParams *)params completion:(void (^)(NSError *error))completion;
3861 
3862 - (void)trackWithUserAssertion:(NSString *)userAssertion options:(KBRTrackOptions *)options forceRemoteCheck:(BOOL)forceRemoteCheck completion:(void (^)(NSError *error))completion;
3863 
3864 /*!
3865  Track with token returned from identify.
3866  */
3867 - (void)trackWithToken:(KBRTrackWithTokenRequestParams *)params completion:(void (^)(NSError *error))completion;
3868 
3869 - (void)trackWithTokenWithTrackToken:(NSString *)trackToken options:(KBRTrackOptions *)options completion:(void (^)(NSError *error))completion;
3870 
3871 /*!
3872  Called by the UI when the user decides *not* to track, to e.g. dismiss gregor items.
3873  */
3874 - (void)dismissWithToken:(KBRDismissWithTokenRequestParams *)params completion:(void (^)(NSError *error))completion;
3875 
3876 - (void)dismissWithTokenWithTrackToken:(NSString *)trackToken completion:(void (^)(NSError *error))completion;
3877 
3878 - (void)untrack:(KBRUntrackRequestParams *)params completion:(void (^)(NSError *error))completion;
3879 
3880 - (void)untrackWithUsername:(NSString *)username completion:(void (^)(NSError *error))completion;
3881 
3882 - (void)checkTracking:(void (^)(NSError *error))completion;
3883 
3884 - (void)fakeTrackingChanged:(KBRFakeTrackingChangedRequestParams *)params completion:(void (^)(NSError *error))completion;
3885 
3886 - (void)fakeTrackingChangedWithUsername:(NSString *)username completion:(void (^)(NSError *error))completion;
3887 
3888 @end
3889 
3890 @interface KBRUiRequest : KBRRequest
3891 
3892 - (void)promptYesNo:(KBRPromptYesNoRequestParams *)params completion:(void (^)(NSError *error, BOOL b))completion;
3893 
3894 - (void)promptYesNoWithText:(KBRText *)text promptDefault:(KBRPromptDefault)promptDefault completion:(void (^)(NSError *error, BOOL b))completion;
3895 
3896 @end
3897 
3898 @interface KBRUserRequest : KBRRequest
3899 
3900 - (void)listTrackers:(KBRListTrackersRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3901 
3902 - (void)listTrackersWithUid:(NSString *)uid completion:(void (^)(NSError *error, NSArray *items))completion;
3903 
3904 - (void)listTrackersByName:(KBRListTrackersByNameRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3905 
3906 - (void)listTrackersByNameWithUsername:(NSString *)username completion:(void (^)(NSError *error, NSArray *items))completion;
3907 
3908 - (void)listTrackersSelf:(void (^)(NSError *error, NSArray *items))completion;
3909 
3910 /*!
3911  Load user summaries for the supplied uids.
3912  They are "unchecked" in that the client is not verifying the info from the server.
3913  If len(uids) > 500, the first 500 will be returned.
3914  */
3915 - (void)loadUncheckedUserSummaries:(KBRLoadUncheckedUserSummariesRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3916 
3917 - (void)loadUncheckedUserSummariesWithUids:(NSArray *)uids completion:(void (^)(NSError *error, NSArray *items))completion;
3918 
3919 /*!
3920  Load a user from the server.
3921  */
3922 - (void)loadUser:(KBRLoadUserRequestParams *)params completion:(void (^)(NSError *error, KBRUser *user))completion;
3923 
3924 - (void)loadUserWithUid:(NSString *)uid completion:(void (^)(NSError *error, KBRUser *user))completion;
3925 
3926 - (void)loadUserByName:(KBRLoadUserByNameRequestParams *)params completion:(void (^)(NSError *error, KBRUser *user))completion;
3927 
3928 - (void)loadUserByNameWithUsername:(NSString *)username completion:(void (^)(NSError *error, KBRUser *user))completion;
3929 
3930 /*!
3931  Load a user + device keys from the server.
3932  */
3933 - (void)loadUserPlusKeys:(KBRLoadUserPlusKeysRequestParams *)params completion:(void (^)(NSError *error, KBRUserPlusKeys *userPlusKeys))completion;
3934 
3935 - (void)loadUserPlusKeysWithUid:(NSString *)uid completion:(void (^)(NSError *error, KBRUserPlusKeys *userPlusKeys))completion;
3936 
3937 /*!
3938  Load public keys for a user.
3939  */
3940 - (void)loadPublicKeys:(KBRLoadPublicKeysRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3941 
3942 - (void)loadPublicKeysWithUid:(NSString *)uid completion:(void (^)(NSError *error, NSArray *items))completion;
3943 
3944 /*!
3945  Load my public keys (for logged in user).
3946  */
3947 - (void)loadMyPublicKeys:(void (^)(NSError *error, NSArray *items))completion;
3948 
3949 /*!
3950  Load user settings (for logged in user).
3951  */
3952 - (void)loadMySettings:(void (^)(NSError *error, KBRUserSettings *userSettings))completion;
3953 
3954 /*!
3955  The list-tracking functions get verified data from the tracking statements
3956  in the user's sigchain.
3957 
3958  If assertion is empty, it will use the current logged in user.
3959  */
3960 - (void)listTracking:(KBRListTrackingRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3961 
3962 - (void)listTrackingWithFilter:(NSString *)filter assertion:(NSString *)assertion completion:(void (^)(NSError *error, NSArray *items))completion;
3963 
3964 - (void)listTrackingJSON:(KBRListTrackingJSONRequestParams *)params completion:(void (^)(NSError *error, NSString *str))completion;
3965 
3966 - (void)listTrackingJSONWithFilter:(NSString *)filter verbose:(BOOL)verbose assertion:(NSString *)assertion completion:(void (^)(NSError *error, NSString *str))completion;
3967 
3968 /*!
3969  Search for users who match a given query.
3970  */
3971 - (void)search:(KBRSearchRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3972 
3973 - (void)searchWithQuery:(NSString *)query completion:(void (^)(NSError *error, NSArray *items))completion;
3974 
3975 /*!
3976  Load all the user's public keys (even those in reset key families)
3977  from the server with no verification
3978  */
3979 - (void)loadAllPublicKeysUnverified:(KBRLoadAllPublicKeysUnverifiedRequestParams *)params completion:(void (^)(NSError *error, NSArray *items))completion;
3980 
3981 - (void)loadAllPublicKeysUnverifiedWithUid:(NSString *)uid completion:(void (^)(NSError *error, NSArray *items))completion;
3982 
3983 - (void)listTrackers2:(KBRListTrackers2RequestParams *)params completion:(void (^)(NSError *error, KBRUserSummary2Set *userSummary2Set))completion;
3984 
3985 - (void)listTrackers2WithAssertion:(NSString *)assertion reverse:(BOOL)reverse completion:(void (^)(NSError *error, KBRUserSummary2Set *userSummary2Set))completion;
3986 
3987 @end
3988