{"id":22756586,"url":"https://github.com/bitcoinerlab/farvault-lib","last_synced_at":"2025-04-14T16:43:40.845Z","repository":{"id":61479321,"uuid":"475522298","full_name":"bitcoinerlab/farvault-lib","owner":"bitcoinerlab","description":"A javascript Bitcoin cold storage time-lock wallet library.","archived":false,"fork":false,"pushed_at":"2022-12-28T15:19:17.000Z","size":3285,"stargazers_count":8,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T05:24:54.889Z","etag":null,"topics":["bitcoin","bitcoinjs-lib","javascript","ledgerjs","script","vault","wallet"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitcoinerlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-29T16:11:59.000Z","updated_at":"2024-03-02T19:15:58.000Z","dependencies_parsed_at":"2023-01-31T06:45:38.962Z","dependency_job_id":null,"html_url":"https://github.com/bitcoinerlab/farvault-lib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinerlab%2Ffarvault-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinerlab%2Ffarvault-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinerlab%2Ffarvault-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcoinerlab%2Ffarvault-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitcoinerlab","download_url":"https://codeload.github.com/bitcoinerlab/farvault-lib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248918344,"owners_count":21183171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bitcoin","bitcoinjs-lib","javascript","ledgerjs","script","vault","wallet"],"created_at":"2024-12-11T07:14:24.224Z","updated_at":"2025-04-14T16:43:40.799Z","avatar_url":"https://github.com/bitcoinerlab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"A javascript Bitcoin cold storage time-lock wallet for Node.js, browsers and React-Native compatible.\n\nThis is the complementary cryptographic library for the FarVault App (iOS/Android/Macos/Win/Linux) [@farvault/FarVault](https://github.com/farvault/FarVault) (private until alpha).\n\n## Can I use it?\n\nAt your own risk. We've not cut a release version yet and the API can change anytime so you should not consider it stable. You're basically looking at a development branch. It's functional but may contain bugs.\n\n## How does it work?\n\nFarVault helps protect Bitcoiners against extortion and coin theft. Stolen or extorted coins can be canceled for a week. And the cancellation can be delegated to third parties without risk.\n\nPre-signed transactions are stored, not keys. Keys are deleted. Pre-signed transactions are relative-time-locked. They are cancellable for a week -or whatever the user chooses-, and freely spendable by the wallet key after a week.\n\nCancellation is another pre-signed transaction that can be safely given to 3rd parties. The cancellation transaction immediately sends the compromised coins to very cold storage. For example a BIP39 plate stored in bank vault in a different country or somewhere really annoying to get since this is a very low probability event.\n\nA FarVault script looks like this:\n\n```\n \u003cMATURED_PUB\u003e\n OP_CHECKSIG\n OP_NOTIF\n \u003cRUSHED_PUB\u003e\n OP_CHECKSIG\n OP_ELSE\n \u003cENCODED_LOCKTIME\u003e\n OP_CHECKSEQUENCEVERIFY\n OP_ENDIF\n```\nwhere `\u003cMATURED_PUB\u003e` corresponds to a pubKey controlled by the user's hot wallet and `\u003cRUSHED_PUB\u003e` is the pubKey where the user (or a delegated person) can send funs in case of an emergency (in case coins are stolen/extorted).\n\n## Feature Set\n\n- Supports creating transactions covering multiple accounts from the same BIP32 seed. This can be useful in case a user wants to protect all funds under the seed.\n- Supports creating transactions mixing different input types: P2PKH, P2WPKH, P2SH-P2WPKH and P2SH/P2WSH/P2SW-P2WSH (FarVarvault scripts).\n- It has a plugin-like interface to make it easy to add different HW wallet support.\n- It currently has support for the Ledger Nano signing device. The Ledger device can sign FarVault P2SH/P2WSH scripts even when combined with other inputs.\n- A fair amount of tests but DO NOT TRUST, VERIFY!\n\n## Usage\n\nSee [this integration test](./test/integration/farvault.test.js) to learn how to init a BIP32 signing device, scan the blockchain for utxos and create transactions (including FarVault vaults).\n\nNote that this is the core crypto library of the FarVault App which will also be open sourced when it reaches an alpha state.\n\n## Tests\n\nSee [the testing environment](./testing_environment) for details.\n\n`npm run test`\n\n## API Documentation\n\n`npm run docs`\n\nOr visit the latest rendered version:\n[https://farvault.github.io/docs](https://farvault.github.io/docs)\n\n## Acknowledgments\n\nThe initial idea of this project was outlined by [Adam Back](https://en.wikipedia.org/wiki/Adam_Back) in the btc_pro Telegram group as a response to the [author of this library](https://github.com/landabaso) who was looking for interesting ideas that could be build for Bitcoin.\n\nThis library is heavily based on the excellent [bitcoinjs](https://github.com/bitcoinjs) umbrella of Bitcoin libraries. Thanks to [Jonathan Underwood](https://github.com/junderw) for all the work put in there.\n\n[Salvatore Ingala](https://github.com/bigspider) helped find a better script that saves some bytes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinerlab%2Ffarvault-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcoinerlab%2Ffarvault-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcoinerlab%2Ffarvault-lib/lists"}