{"id":46638260,"url":"https://github.com/tetherto/pearpass-lib-vault-core","last_synced_at":"2026-03-08T02:13:21.236Z","repository":{"id":330136296,"uuid":"1113288564","full_name":"tetherto/pearpass-lib-vault-core","owner":"tetherto","description":"PearPass is an open-source, privacy-first password manager with peer-to-peer syncing and end-to-end encryption. This repository contains shared core components used across the PearPass apps.","archived":false,"fork":false,"pushed_at":"2026-02-16T15:58:42.000Z","size":332,"stargazers_count":2,"open_issues_count":2,"forks_count":9,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-16T23:31:42.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pass.pears.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tetherto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-09T19:15:31.000Z","updated_at":"2026-02-16T15:58:46.000Z","dependencies_parsed_at":"2026-02-16T18:03:56.255Z","dependency_job_id":null,"html_url":"https://github.com/tetherto/pearpass-lib-vault-core","commit_stats":null,"previous_names":["tetherto/pearpass-lib-vault-core"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tetherto/pearpass-lib-vault-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetherto%2Fpearpass-lib-vault-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetherto%2Fpearpass-lib-vault-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetherto%2Fpearpass-lib-vault-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetherto%2Fpearpass-lib-vault-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tetherto","download_url":"https://codeload.github.com/tetherto/pearpass-lib-vault-core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetherto%2Fpearpass-lib-vault-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30242406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-08T02:13:20.614Z","updated_at":"2026-03-08T02:13:21.220Z","avatar_url":"https://github.com/tetherto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pearpass-lib-vault-core\n\nA bare runtime focused library for managing encrypted password vaults for Pearpass. This library provides a secure way to store, encrypt, and manage password vaults.\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage Examples](#usage-examples)\n- [Dependencies](#dependencies)\n- [Related Projects](#related-projects)\n\n## Features\n\n- Secure password vault creation and management\n- Local encryption and decryption\n- Event-based updates\n- Vault sharing via invite codes\n- Debug mode for development\n\n## Installation\n\n```bash\nnpm install pearpass-lib-vault-core\n```\n\n## Usage Examples\n\n### Initialize a vault client\n```javascript\nimport { createPearpassVaultClient } from 'pearpass-lib-vault-core';\n\n// Create a new client with a storage path\nconst client = createPearpassVaultClient('/path/to/storage', {\n    debugMode: false // Set to true for verbose logging\n});\n```\n\n### Encryption for vault key\n```javascript\nconst password = 'my-secure-password';\n\n// hashing the password \nconst { hashedPassword, salt } = await client.hashPassword(password);\n\n// Generate a random encryption key\nconst { ciphertext, nonce } = await client.encryptVaultKeyWithHashedPassword(hashedPassword);\n\n// Encrypt existing vault key \nconst { ciphertext, nonce } = await client.encryptVaultWithKey(hashedPassword, key);\n```\n\n### Decryption for vault key\n```javascript\n// Get hashed password from user input\nconst hashedPassword = await client.getDecryptionKey({salt, password});\n\n// Decrypt the vault key\nconst key = await client.decryptVaultKey({ciphertext, nonce, hashedPassword});\n```\n\n### Working with vaults\n```javascript\n// Initialize encryption\nawait client.encryptionInit();\n\n// Initialize vaults storage\nawait client.vaultsInit();\n\n\n// Store vault info\nawait client.vaultsAdd('vault/my-vault', {\n    id: 'my-vault',\n    name: 'My Password Vault',\n    hashedPassword,\n    ciphertext,\n    nonce,\n    salt,\n});\n\n// Initialize active vault\nawait client.activeVaultInit({\n    id: vaultId,\n    encryptionKey: key\n});\n\n// Add an entry to the vault\nawait client.activeVaultAdd(`record/${vaultId}`, {\n    name: 'GitHub',\n    username: 'user@example.com',\n    password: 'secure-password'\n});\n\n// Retrieve passwords\nconst github = await client.activeVaultGet(`vault/${vaultId}`);\nconsole.log(githubPassword);\n\n// Close connections when done\nawait client.closeAllInstances();\n```\n\n## Depended Submodules\n\nThe following sibling submodules must be present in the workspace (they are not declared as npm dependencies):\n\n- [`pearpass-utils-password-check`](../pearpass-utils-password-check)\n- [`pear-apps-utils-validator`](../pear-apps-utils-validator)\n- [`tether-dev-docs`](../tether-dev-docs)\n\n## Dependencies\n\n- [Autopass](https://github.com/holepunchto/autopass)\n- [Corestore](https://github.com/holepunchto/corestore)\n- [Bare Crypto](https://github.com/holepunchto/bare-crypto)\n- [Bare FS](https://github.com/holepunchto/bare-fs)\n- [Bare Path](https://github.com/holepunchto/bare-path)\n- [Bare RPC](https://github.com/holepunchto/bare-rpc)\n- [Sodium Native](https://github.com/sodium-friends/sodium-native)\n- [UDX Native](https://github.com/holepunchto/udx-native)\n- Node.js Events\n\n## Related Projects\n\n- [pearpass-app-mobile](https://github.com/tetherto/pearpass-app-mobile) - A mobile app for PearPass, a password manager\n- [pearpass-app-desktop](https://github.com/tetherto/pearpass-app-desktop) - A desktop app for PearPass, a password manager\n- [pearpass-lib-vault](https://github.com/tetherto/pearpass-lib-desktop) - Library for managing encrypted vaults in applications\n- [pearpass-lib-vault-desktop](https://github.com/tetherto/pearpass-lib-desktop) - Client implementation for desktop applications\n- [tether-dev-docs](https://github.com/tetherto/tether-dev-docs) - Documentations and guides for developers\n\n## License\n\nThis project is licensed under the Apache License, Version 2.0. See the [LICENSE](./LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftetherto%2Fpearpass-lib-vault-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftetherto%2Fpearpass-lib-vault-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftetherto%2Fpearpass-lib-vault-core/lists"}