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@~0.8.1bash
npm install accounts@~0.8.1bash
yarn add accounts@~0.8.1bash
bun add accounts@~0.8.1Usage
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.