UNPKG

@stacks/auth

Version:

Authentication for Stacks apps.

13 lines (12 loc) 1.05 kB
import { AuthScope } from './constants'; type AuthMetadata = { email?: string; profileUrl?: string; }; export declare function generateTransitKey(): string; export declare const makeAuthRequest: typeof makeAuthRequestToken; export declare function makeAuthRequestToken(transitPrivateKey: string, redirectURI?: string, manifestURI?: string, scopes?: (AuthScope | string)[], appDomain?: string, expiresAt?: number, extraParams?: any): string; export declare function encryptPrivateKey(publicKey: string, privateKey: string): Promise<string>; export declare function decryptPrivateKey(privateKey: string, hexedEncrypted: string): Promise<string | null>; export declare function makeAuthResponse(privateKey: string, profile: {} | undefined, metadata: AuthMetadata | null, coreToken?: string | null, appPrivateKey?: string | null, expiresAt?: number, transitPublicKey?: string | null, hubUrl?: string | null, blockstackAPIUrl?: string | null, associationToken?: string | null, appPrivateKeyFromWalletSalt?: string | null): Promise<string>; export {};