UNPKG

@thirdweb-dev/wallets

Version:

<p align="center"> <br /> <a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/legacy_packages/sdk/logo.svg?raw=true" width="200" alt=""/></a> <br /> </p> <h1 align="center">thirdweb Wallet SDK</h1> <p align="center"> <a h

38 lines 1.27 kB
import { AbstractWallet } from "./abstract"; import { ethers } from "ethers"; import { ChainOrRpcUrl } from "@thirdweb-dev/sdk"; /** * Wallet interface to connect using a Private Key * * @example * ```ts * import { PrivateKeyWallet } from "@thirdweb-dev/wallets"; * * // can be any ethers.js signer * const privateKey = process.env.PRIVATE_KEY; * const wallet = new PrivateKeyWallet(privateKey); * ``` * * @wallet */ export declare class PrivateKeyWallet extends AbstractWallet { private _signer; /** * Create instance of `PrivateKeyWallet` * * @param privateKey - The private key to use for signing transactions. * * @param chain - The chain or rpc url to connect to when querying the blockchain directly through this wallet. * * @param secretKey - * Provide `secretKey` to use the thirdweb RPCs for given `chain` * * You can create a secret key from [thirdweb dashboard](https://thirdweb.com/create-api-key). */ constructor(privateKey: string, chain?: ChainOrRpcUrl, secretKey?: string); /** * Get the [ethers.js signer](https://docs.ethers.io/v5/api/signer/) object used by the wallet */ getSigner(): Promise<ethers.Signer>; } //# sourceMappingURL=private-key.d.ts.map