feat: add extension scaffolding
Manifest, package.json, tsconfig, webpack config, popup HTML shell, WASM type declarations, and .gitignore entries for the Chrome MV3 extension. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
24
extension/src/wasm.d.ts
vendored
Normal file
24
extension/src/wasm.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/// Type declarations for the idfoto WASM module produced by wasm-pack.
|
||||
|
||||
// Ambient module declarations for the WASM glue code.
|
||||
// The module specifier must exactly match what's used in import statements.
|
||||
|
||||
declare module 'idfoto-wasm' {
|
||||
export default function init(input?: string | URL): Promise<void>;
|
||||
export function derive_master_key(
|
||||
passphrase: string,
|
||||
image_secret: Uint8Array,
|
||||
salt: Uint8Array,
|
||||
params_json: string,
|
||||
): Uint8Array;
|
||||
export function encrypt(plaintext: Uint8Array, key: Uint8Array): Uint8Array;
|
||||
export function decrypt(ciphertext: Uint8Array, key: Uint8Array): Uint8Array;
|
||||
export function extract_image_secret(jpeg_bytes: Uint8Array): Uint8Array;
|
||||
export function encrypt_entry(entry_json: string, key: Uint8Array): Uint8Array;
|
||||
export function decrypt_entry(ciphertext: Uint8Array, key: Uint8Array): string;
|
||||
export function encrypt_manifest(manifest_json: string, key: Uint8Array): Uint8Array;
|
||||
export function decrypt_manifest(ciphertext: Uint8Array, key: Uint8Array): string;
|
||||
export function generate_totp(secret_base32: string, timestamp_secs: bigint): string;
|
||||
export function generate_password(length: number): string;
|
||||
export function generate_entry_id(): string;
|
||||
}
|
||||
Reference in New Issue
Block a user