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.

When useSFAKey is set to true in Web3AuthOptions, this method returns the SFA (Single Factor Auth) key instead of the standard private key.

Usage

let privateKey = web3Auth.getPrivateKey()
On this page