dangerous_secp256k1
Connector for a Secp256k1 EOA.
WARNING
NOT RECOMMENDED FOR PRODUCTION USAGE. This connector stores private keys in clear text, and are bound to the session length of the storage used. Instead, use this connector for testing workflows, like end-to-end tests.
Install
bash
pnpm add accounts@catalog:bash
npm install accounts@catalog:bash
yarn add accounts@catalog:bash
bun add accounts@catalog:Usage
ts
import { createConfig, http } from 'wagmi'
import { tempo } from 'wagmi/chains'
import { dangerous_secp256k1 } from 'wagmi/tempo'
export const config = createConfig({
connectors: [dangerous_secp256k1()],
chains: [tempo],
multiInjectedProviderDiscovery: false,
transports: {
[tempo.id]: http(),
},
})dangerous_secp256k1 is a thin wagmi wrapper around the root accounts package.
Parameters
privateKey
- Type:
Hex
Optional fixed private key to expose through the connector. If omitted, the connector generates and persists one for you.