How to use other chains apart from the default listed Eth, Solana, Starkware with web3auth

Can web3auth support other chains?



Originally posted by: YZhenY

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/323

Yes, Web3Auth is chain agnostic. Web3Auth always returns an app scoped private key in ED25519 format for the Solana chain and in Secp251k1 format for all other chains. By default web3auth provides blockchain connection providers for all evm and solana chains. For others chains you can build you own connection providers by feeding your private key in chain specific library.

For ex: Let say you want to build for Tezos chain:-

const tezos = new TezosToolkit("https://ithacanet.ecadinfra.com");

// Web3Auth returns you a provider.
const privateKey = await web3authProvider.request({ method: "private_key" });

// derive the Tezos Key Pair from the private key
const keyPair = tezosCrypto.utils.seedToKeyPair(hex2buf(privateKey));

// keyPair.pkh is the account address.
const account = keyPair?.pkh;

// get balance of the account
const balance = await tezos.tz.getBalance(account);



Originally posted by: himanshuchawla009