refactor: add comments
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 32s
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 32s
This commit is contained in:
parent
f09d9b2378
commit
3a507246ca
@ -23,8 +23,20 @@ export interface Keys {
|
||||
export interface AuthState {
|
||||
loggedIn: boolean
|
||||
usersPubkey?: string
|
||||
/**
|
||||
* sigit login {@link LoginMethod methods }
|
||||
* @see {@link LoginMethod}
|
||||
*/
|
||||
loginMethod?: LoginMethod
|
||||
/**
|
||||
* nostr-login package specific {@link NostrLoginAuthMethod method }
|
||||
* @see {@link NostrLoginAuthMethod}
|
||||
*/
|
||||
nostrLoginAuthMethod?: NostrLoginAuthMethod
|
||||
/**
|
||||
* {@link Keys keyPair} for user auth (usually only public is available)
|
||||
* @see {@link Keys}
|
||||
*/
|
||||
keyPair?: Keys
|
||||
}
|
||||
|
||||
|
@ -40,10 +40,24 @@ export interface Sigit {
|
||||
}
|
||||
|
||||
export interface UserAppData {
|
||||
sigits: { [key: string]: Meta } // key will be id of create signature
|
||||
processedGiftWraps: string[] // an array of ids of processed gift wrapped events
|
||||
keyPair?: Keys // this key pair is used for blossom requests authentication
|
||||
blossomUrls: string[] // array for storing Urls for the files that stores all the sigits and processedGiftWraps on blossom
|
||||
/**
|
||||
* Key will be id of create signature
|
||||
*/
|
||||
sigits: { [key: string]: Meta }
|
||||
/**
|
||||
* An array of ids of processed gift wrapped events
|
||||
*/
|
||||
processedGiftWraps: string[]
|
||||
/**
|
||||
* Generated ephemeral key pair (https://docs.sigit.io/#/technical?id=storing-app-data).
|
||||
* This {@link Keys key pair} is used for blossom requests authentication.
|
||||
* @see {@link Keys}
|
||||
*/
|
||||
keyPair?: Keys
|
||||
/**
|
||||
* Array for storing Urls for the files that stores all the sigits and processedGiftWraps on blossom.
|
||||
*/
|
||||
blossomUrls: string[]
|
||||
}
|
||||
|
||||
export interface DocSignatureEvent extends Event {
|
||||
|
@ -426,7 +426,6 @@ export const getUsersAppData = async (): Promise<UserAppData | null> => {
|
||||
// Handle case where the encrypted content is an empty object
|
||||
if (encryptedContent === '{}') {
|
||||
// Generate ephemeral key pair
|
||||
// https://docs.sigit.io/#/technical?id=storing-app-data
|
||||
const secret = generateSecretKey()
|
||||
const pubKey = getPublicKey(secret)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user