UNPKG

@casual-simulation/aux-common

Version:
37 lines 1.44 kB
/** * Formats the given user ID, session ID, connection ID, record name, inst, and hash into a token. * @param userId The ID of the user. * @param sessionId The ID of the session. * @param connectionId The ID of the connection. * @param recordName The name of the record that the connection is for. * @param inst The ID of the instance that the connection is for. * @param hash The hash that was generated. */ export declare function formatV1ConnectionToken(userId: string, sessionId: string, connectionId: string, recordName: string, inst: string, hash: string): string; /** * Parses the given connection token into a user ID, session ID, connection ID, inst, and hash array. * Returns null if the key cannot be parsed. * @param token The token to parse. */ export declare function parseConnectionToken(token: string | null): [ userId: string, sessionId: string, connectionId: string, recordName: string, inst: string, hash: string ]; /** * Parses the given connection token into a user ID, session ID, hash, connection ID, and device ID array. * Returns null if the key cannot be parsed or if it is not a V1 token. * @param token The token to parse. */ export declare function parseV1ConnectionToken(token: string): [ userId: string, sessionId: string, connectionId: string, recordName: string, inst: string, hash: string ]; //# sourceMappingURL=ConnectionToken.d.ts.map