Skip to content

APTOS SwitchNet

SwitchNet Example

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


async function connect() {
  const web3Kit = new Web3Kit();
  const serRes: IConnectRes = await web3Kit.request({
    chainType: ChainType.APTOS,
    methodName: "switchNetwork",
    params: {
      type:'testnet',
    },
  });
}

Request Parameters

typescript
{
  chainType: ChainType.APTOS,
  methodName: "switchNetwork",
  params: {
    type: 'testnet',
  },
};

Return Value

typescript
null