Skip to main content

Private key

Connect to your app with a private key.

Usage

import { PrivateKeyWallet } from "@thirdweb-dev/wallets";

// can be any ethers.js signer
const privateKey = process.env.PRIVATE_KEY;
const wallet = new PrivateKeyWallet(privateKey);

Configuration

privateKey

The private key to use for signing transactions.

chain (optional)

The chain or rpc url to connect to when querying the blockchain directly through this wallet.

secretKey (recommended)

Provide secretKey to use the thirdweb RPCs for given chain

You can create a secret key from thirdweb dashboard.

Methods

Inherits all the public methods from the AbstractWallet class.