Skip to content
ํ”„๋กœ์ ํŠธ

์†Œ๊ฐœ

๐Ÿฆ” Build DApps like Apps -- A Metamask alternative that empowers you to build good UX

๊ฐœ๋ฐœ ๋„๊ตฌ

์ด ์ˆ˜์น˜๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•

์ธก์ •๋œ ์Šคํƒ€ ์ฆ๊ฐ€

in 24h
0
in 7 days
0
in 15 days
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘
in 1 month
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘

์„œ๋กœ ๊ฒน์น˜๋Š” ๊ธฐ๊ฐ„์˜ ์ˆœ์ฆ๊ฐ€๋Ÿ‰์ด๋ฉฐ ์ผ๋ณ„ ํ•ฉ๊ณ„๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ์ธก์ •๊ฐ’์ด ์—†์œผ๋ฉด ๋น„์›Œ ๋‘ก๋‹ˆ๋‹ค. ์Šคํƒ€๋Š” ๊ด€์‹ฌ๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ ํ’ˆ์งˆ์„ ๋ณด์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

README.md

Original




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.

With Hedgehog:

  • ๐Ÿ˜ Users can make accounts in your DApp with a username + password.
  • ๐Ÿ˜ฑ Users don't have to worry about private keys, no mnemonics.
  • ๐Ÿ” You can build systems that fund users' wallets, sign transactions, but never control those wallets directly.
  • ๐ŸŒ‡ You can focus on building your business logic, rather than managing wallets.

npm version CircleCI

Installation

npm i --save @audius/hedgehog

Docs && Examples

Check out our full technical docs and api how-to.

For a quick browser-side demo, look no further. For a full end-to-end auth demonstration, see our demo repo.

Why Use This?

Not All Transactions Are Created Equal

Currently 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.

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.

Is Hedgehog Right for your DApp?

Hedgehog 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.

[Good use cases]

  • 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.
  • 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.
  • Decentralized Music Player: If youโ€™re building consumer-facing DApps, Hedgehog will dramatically improve user experience and significantly increase your potential userbase.

[Bad use cases]

If 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:

  • Banking DApp
  • Decentralized Lending
  • Prediction Markets

A Closer Look

Hedgehog 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.

NOTE: A private key is only computed and available client side and is never transmitted or stored anywhere besides the user's browser.

// Provide getFn, setAuthFn, setUserFn as requests to your database/backend service (more details in docs).
const hedgehog = new Hedgehog(getFn, setAuthFn, setUserFn)
let wallet
if (hedgehog.isLoggedIn()) {
  wallet = hedgehog.getWallet()
} else {
  wallet = await hedgehog.login('username', 'password')
  // or
  wallet = await hedgehog.signUp('username', 'password')
}

After 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.

More details in the docs.

๊ด€๋ จ ํ”„๋กœ์ ํŠธ ์‚ดํŽด๋ณด๊ธฐ

๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘โ€ฆ