@dulcetlabs/hunch-wallet
v0.1.3
Published
Non-custodial embedded EVM wallet SDK — built for any app, open for everyone.
Maintainers
Readme
@dulcetlabs/hunch-wallet
A wallet that belongs to your users. Not you.
@dulcetlabs/hunch-wallet is an open-source EVM wallet SDK built for apps that want to give users real ownership — without asking them to install anything, copy a seed phrase on signup, or trust a third party with their keys.
Keys are generated on-device. The seed phrase goes straight to the user. Hunch never sees it.
What it does
- Generates self-custody EVM wallets in any JavaScript environment
- Supports 12 chains out of the box — Arbitrum, Base, Ethereum, and more
- Handles token approvals, transaction signing, and broadcasting
- Optionally wraps any wallet in a smart account for gasless transactions via Alchemy
Install
yarn add @dulcetlabs/hunch-wallet viemFor gasless smart accounts, also add:
yarn add @alchemy/aa-core @account-kit/infra @account-kit/wallet-clientThe basics
import { HunchWallet } from '@dulcetlabs/hunch-wallet'
const sdk = HunchWallet.init({ chains: ['arbitrum'] })
// Create a new wallet
const wallet = sdk.create()
// Restore one from a seed phrase
const wallet = sdk.fromMnemonic('word1 word2 ... word12')
// Or load a server-side key directly
const wallet = sdk.fromPrivateKey(process.env.PRIVATE_KEY)Every wallet comes with an address, a seed phrase (or null for key-based wallets), and a full set of methods for signing and sending — all chain-guarded so nothing goes to the wrong network by accident.
Gasless transactions
Wrap any wallet in a smart account and Alchemy handles the gas. Users pay nothing.
import { HunchWallet, HunchWalletAA } from '@dulcetlabs/hunch-wallet'
const wallet = HunchWallet.init({ chains: ['arbitrum'] }).fromPrivateKey(pk)
const aa = new HunchWalletAA({
walletClient: wallet.getViemWalletClient({ chain: 'arbitrum' }),
alchemyApiKey: process.env.ALCHEMY_API_KEY,
paymasterPolicyId: process.env.PAYMASTER_POLICY_ID,
chain: 'arbitrum',
})
const address = await aa.connect()
await aa.sendTransaction({ to: '0x...', data: '0x...' })The address returned by connect() is the smart account — that's what users fund. The underlying EOA is never shown.
Supported chains
Arbitrum · Base · Ethereum · Optimism · Polygon · Zora · Blast · Scroll · Linea · BNB · Avalanche · Arbitrum Nova
Gasless smart accounts are available on all chains except BNB, Avalanche, and Arbitrum Nova.
Documentation
Full API reference and integration guides in DOCS.md.
License
MIT
