Config

Config Module

This module contains a config function that sets up the Ethereum network session configuration.

Functions

config({ signer, autoLogin }: { signer?: SessionSigner; autoLogin?: boolean; })

This function accepts a configuration object with the following properties:

  • signer (optional): An instance of SessionSigner.

  • autoLogin (optional, default is true): A boolean indicating whether to enable automatic login.

The function sets the autoLogin value in the session, sets the signer, and initiates a connection.

Example:

import { config } from './configModule';
import { SessionSigner } from 'ethers';

const signer = new SessionSigner(/*...*/);
const autoLogin = false;

await config({ signer, autoLogin });

Last updated