Skip to main content

ThirdwebSDK.fromSigner() method

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Get an instance of the thirdweb SDK based on an existing ethers signer


// get a signer from somewhere (createRandom is being used purely for example purposes)
const signer = ethers.Wallet.createRandom();

// get an instance of the SDK with the signer already setup
const sdk = ThirdwebSDK.fromSigner(signer, "mainnet");


static fromSigner(signer: Signer, network?: ChainOrRpc, options?: SDKOptions, storage?: ThirdwebStorage): ThirdwebSDK;


signerSignera ethers Signer to be used for transactions
networkChainOrRpc(Optional) the network (chain) to connect to (e.g. "mainnet", "rinkeby", "polygon", "mumbai"...) or a fully formed RPC url
optionsSDKOptions(Optional) the SDK options to use
storageThirdwebStorage(Optional) optional storage implementation to use



an instance of the SDK