Initializing a Thirdweb Client
The ThirdwebClient
class is the main entry point for interacting with the Thirdweb SDK.
You can pass the client to other methods to interact with wallets and smart contracts.
One client unlocks all thirdweb infrastructure services by default.
To start interacting with a deployed smart contract using the Thirdweb .NET SDK, first create a ThirdwebClient
instance. You can create a client using either a secretKey
for backend applications or a clientId
for frontend applications. If your application is not web-based (has no origin), you should also provide a bundleId
.
Choosing between clientId and secretKey
- Use
Client ID
for client-side or frontend applications. - Use
Secret Key
for server-side or backend applications where you can securely store and use the secret key. - A
Client ID
should be paired with aBundle ID
for non-web applications.
Always ensure that your secret keys are stored securely and not exposed in client-side code.