thirdweb-dev/docs

Mismatch between code example and type information

funwarioisii opened this issue · 1 comments

About

const sdk = ThirdwebSDK.fromSigner(signer, {
clientId: "YOUR_CLIENT_ID", // Use client id if using on the client side, get it from dashboard settings
secretKey: "YOUR_SECRET_KEY", // Use secret key if using on the server, get it from dashboard settings
});

In this example, the second argument passes an object containing the clientId and secretKey.

However, the following type information shows that no object containing those two is passed.
The documentation needs to be corrected.

https://github.com/thirdweb-dev/js/blob/ec36b13a30e0071548df0b7a6eb5299e2e65e4f9/packages/sdk/src/evm/core/sdk.ts#L181-L186

https://github.com/thirdweb-dev/js/blob/ec36b13a30e0071548df0b7a6eb5299e2e65e4f9/packages/chains/src/types.ts#L15-L46

the options paramter is of type SDKOptions which includes clientID & secretKey - they are required to instantiate the SDK. Hope this solves your concern