diff --git a/src/store/auth/types.ts b/src/store/auth/types.ts index b441c54..6466302 100644 --- a/src/store/auth/types.ts +++ b/src/store/auth/types.ts @@ -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 } diff --git a/src/types/core.ts b/src/types/core.ts index 8583d4a..3324ed5 100644 --- a/src/types/core.ts +++ b/src/types/core.ts @@ -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 { diff --git a/src/utils/nostr.ts b/src/utils/nostr.ts index 8699ae9..fb96186 100644 --- a/src/utils/nostr.ts +++ b/src/utils/nostr.ts @@ -426,7 +426,6 @@ export const getUsersAppData = async (): Promise => { // 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)