Skip to content

How to get signer and provider #13

Open
@wispyco

Description

@wispyco

I am trying to integrate Third Webs React SDK and I don't know where to get the signer and provider details from my signed in user. Here is an example from the third webs docs.

Any idea of what myProvider or mySigner would be?

import { ChainId, ThirdwebSDKProvider } from "@thirdweb-dev/react";

// This is the chainId your dApp will work on.
const activeChainId = ChainId.Mainnet;

function MyApp({ Component, pageProps }) {
  // If you want to use any custom provider or signer, add it here.
  const myProvider = ...;
  const mySigner = ...;


  return (
    <ThirdwebSDKProvider
      desiredChainId={activeChainId}
      signer={mySigner}
      provider={myProvider}
    >
      {/* Your App Goes Here */}
    </ThirdwebSDKProvider>
  );
}

export default MyApp;

I think I may only need the signer, but I am not sure if it is an derived object or just the signed in wallet address?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions