PrivateKeyWallet.Create
Instantiate a PrivateKeyWallet
with a given private key. This wallet is capable of signing transactions and messages, interacting with smart contracts, and performing other blockchain operations. This wallet type is intended for backend applications only, due to the sensitive nature of private keys.
Usage
Example
Here is an example of creating a PrivateKeyWallet to sign a simple message. This example assumes you have a ThirdwebClient instance already created:
Note: The PrivateKeyWallet
is intended for use in secure, backend environments. Ensure private keys are never exposed or hard-coded in client-side applications. Use InAppWallet
and SmartWallet
for client-side applications.