Initialize ProticoAuthCore

To initialize your supported providers, start by initializing ProticoAuthCore :

const auth = new ProticoAuthCore({
        chainId: "0x1", // eth mainnnet (optional)
        enableLogging: true, // console logging (optional)
        adapterConfigs: {
          [SUPPORTED_ADAPTERS.METAMASK]: { ... }, 
          [SUPPORTED_ADAPTERS.WALLET_CONNECT_V2]: { ... },
          [SUPPORTED_ADAPTERS.OPENLOGIN]: { ... },
        },
      });

Parameters description

Parameter
Description
Optional

chainId

EVM Chain ID (0x1 for Ethereum Mainnet)

No

enableLogging

Show SDK logs

Yes Default : false

adaptersConfig

Enable and configure different Web3 providers

Yes

Adapters Config

You can initialize several Web3 providers to propose different login methods to your users. You will decide which one is used later on, at the time of login.

Read the following sections for implementation details for Metamask, WalletConnect v2, and Web3Auth's Open Login.

Last updated