For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Secp256k1 private key

To retrieve the secp256k1 private key of the user, use the getPrivateKey method. The method returns an EVM compatible private key which can be used to sign transactions on EVM compatible chains.

The method returns an empty string if the user isn't authenticated, so you can use it to check for an existing session after initialize.

Usage​

final privateKey = await Web3AuthFlutter.getPrivateKey();
note

Web3Auth supports two widely used cryptographic curves, Secp256k1 and Ed25519, making it chain-agnostic and compatible with multiple blockchain networks. Learn more about how to connect different blockchains.

On this page