Skip to content

PUT SwitchNet

SwitchNet Example

typescript
import { Web3Kit, ChainType, PutNetType } from "@web3jskit/dapp";

interface IConnectRes {
  address: string;
}

async function connect() {
  const web3Kit = new Web3Kit();
  const serRes: IConnectRes = await web3Kit.request({
    chainType: ChainType.PUT,
    methodName: "switchNet",
    params: {
      type: PutNetType.MAIN,
    },
  });
}

Request Parameters

typescript
{
  chainType: ChainType.PUT,
  methodName: "switchNet",
  params: {
    type: PutNetType.MAIN,
  },
};

Return Value

typescript
null