{"id":13566696,"url":"https://github.com/AudiusProject/hedgehog","last_synced_at":"2025-04-04T00:31:54.417Z","repository":{"id":35062663,"uuid":"180880747","full_name":"AudiusProject/hedgehog","owner":"AudiusProject","description":"🦔 Build DApps like Apps -- A Metamask alternative that empowers you to build good UX","archived":false,"fork":false,"pushed_at":"2024-06-26T16:36:23.000Z","size":728,"stargazers_count":443,"open_issues_count":3,"forks_count":61,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-28T20:11:19.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hedgehog.audius.co","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AudiusProject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2019-04-11T21:29:18.000Z","updated_at":"2025-03-04T16:08:47.000Z","dependencies_parsed_at":"2024-01-15T00:16:23.740Z","dependency_job_id":"e24f68f6-5efa-4160-8d25-40948e72c937","html_url":"https://github.com/AudiusProject/hedgehog","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/AudiusProject%2Fhedgehog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AudiusProject%2Fhedgehog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AudiusProject%2Fhedgehog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AudiusProject%2Fhedgehog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AudiusProject","download_url":"https://codeload.github.com/AudiusProject/hedgehog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247103290,"owners_count":20884023,"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":[],"created_at":"2024-08-01T13:02:14.844Z","updated_at":"2025-04-04T00:31:54.116Z","avatar_url":"https://github.com/AudiusProject.png","language":"TypeScript","funding_links":[],"categories":["JavaScript","TypeScript"],"sub_categories":[],"readme":"\u003cbr /\u003e\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/2731362/58195666-5cba9a00-7c7d-11e9-8409-5aa34b780ea2.png\" width=\"240\" /\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n**Hedgehog** is alternative to Metamask that manages a user's private key and wallet on the browser. It exposes a simple API to allow you to create an authentication scheme to let users sign up and login to their wallet across multiple browsers and devices. [hedgehog.audius.co](https://hedgehog.audius.co).\n\nWith Hedgehog:\n\n* 😍 Users can make accounts in your DApp with a username + password.\n* 😱 Users don't have to worry about private keys, no mnemonics.\n* 🔏 You can build systems that fund users' wallets, sign transactions, but never control those wallets directly.\n* 🌇 You can focus on building your business logic, rather than managing wallets.\n\n[![npm version](https://badge.fury.io/js/%40audius%2Fhedgehog.svg)](https://badge.fury.io/js/%40audius%2Fhedgehog) [![CircleCI](https://circleci.com/gh/AudiusProject/hedgehog.svg?style=svg\u0026circle-token=dc1943e26d04e05beca719fb45baaab93fe04bce)](https://circleci.com/gh/AudiusProject/audius-hedgehog)\n\n## Installation\n\n```\nnpm i --save @audius/hedgehog\n```\n\n## Docs \u0026\u0026 Examples\n\nCheck out our full technical [docs](http://audiusproject.github.io/hedgehog-docs) and [api how-to](http://audiusproject.github.io/hedgehog-docs#how-to).\n\nFor a quick browser-side demo, [look no further](https://codesandbox.io/embed/pp9zzv2n00). For a full end-to-end auth demonstration, see our [demo repo](https://github.com/AudiusProject/audius-hedgehog-demo).\n\n## Why Use This?\n\n### Not All Transactions Are Created Equal\nCurrently available wallets treat every transaction as if it were moving around your life’s savings. Hedgehog was built for use-cases involving low-to-no financial value.\n\n**NOTE**: The primary improvement to end-user experience is by hiding wallet complexity and not forcing users to constantly confirm transactions - The opposite of what you’d want when moving significant money around.\n\n### Is Hedgehog Right for your DApp?\nHedgehog isn’t right for every DApp. Massive improvements in user experience are only possible through tradeoffs. As a general rule Hedgehog should not be used for apps involving significant sums of money. As a bridge, one could start users on Hedgehog and suggest migrating to a more secure wallet if their stored value increases beyond a certain threshold; the Hedgehog paradigm is interoperable with existing web3 providers too.\n\n*[Good use cases]*\n\n* **Signing data**: If you’re building decentralized applications that rely on user signed data (eg. via EIP-712-esque signing schemes), Hedgehog could help simplify the experience if the stakes are low enough.\n* **Gaming DApp**: Nothing ruins fun as much as signing transactions. If you’re building a gaming DApp that doesn’t use significant financial assets, improving UX is key.\n* **Decentralized Music Player**: If you’re building consumer-facing DApps, Hedgehog will dramatically improve user experience and significantly increase your potential userbase. \n\n*[Bad use cases]*\n\nIf your DApp involves moving around significant sums of money, then the tradeoff in security is most likely not worth it. Hedgehog’s primary improvement to end-user experience is by hiding the wallet and not forcing users to confirm transactions - The opposite of what you’d want when moving money around. We absolutely don’t recommend using Hedgehog in situations like these:\n\n* **Banking DApp**\n* **Decentralized Lending**\n* **Prediction Markets**\n\n\n## A Closer Look \n\nHedgehog is a package that lives in your front end application to create and manage a user's entropy (from which a private key is derived). Hedgehog relies on a username and password to create auth artifacts, so it's able to simulate a familiar authentication system that allows users to sign up or login from multiple browsers or devices and retrieve their entropy. Those artifacts, through hedgehog, are persisted to a backend of your choosing.\n\n**NOTE**: A private key is only computed and available client side and is never transmitted or stored anywhere besides the user's browser.\n\n```javascript\n// Provide getFn, setAuthFn, setUserFn as requests to your database/backend service (more details in docs).\nconst hedgehog = new Hedgehog(getFn, setAuthFn, setUserFn)\nlet wallet\nif (hedgehog.isLoggedIn()) {\n  wallet = hedgehog.getWallet()\n} else {\n  wallet = await hedgehog.login('username', 'password')\n  // or\n  wallet = await hedgehog.signUp('username', 'password')\n}\n\n```\n\nAfter creating or retrieving a user's wallet, you can either **fund their wallet directly** to pay transaction fees or **relay their transactions through a EIP-712 relayer**.\n\nMore details in the [docs](http://audiusproject.github.io/hedgehog-docs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAudiusProject%2Fhedgehog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAudiusProject%2Fhedgehog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAudiusProject%2Fhedgehog/lists"}