.NET SDK
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 IDfor client-side or frontend applications. - Use
Secret Keyfor server-side or backend applications where you can securely store and use the secret key. - A
Client IDshould be paired with aBundle IDfor non-web applications.
Always ensure that your secret keys are stored securely and not exposed in client-side code.