From 30b807d60102ad6ad8377d4f2a4dac7fe161db60 Mon Sep 17 00:00:00 2001 From: Maharshi Mishra Date: Fri, 20 Oct 2023 11:42:53 +0530 Subject: [PATCH] Added zKatana and Skale --- docs/connect-blockchain/new.mdx | 1066 ++++++++++++++ docs/connect-blockchain/skale.mdx | 2024 +++++++++++++++++++++++++++ docs/connect-blockchain/temp.mdx | 212 +++ docs/connect-blockchain/zkatana.mdx | 316 +++++ sidebars.js | 2 + 5 files changed, 3620 insertions(+) create mode 100644 docs/connect-blockchain/new.mdx create mode 100644 docs/connect-blockchain/skale.mdx create mode 100644 docs/connect-blockchain/temp.mdx create mode 100644 docs/connect-blockchain/zkatana.mdx diff --git a/docs/connect-blockchain/new.mdx b/docs/connect-blockchain/new.mdx new file mode 100644 index 000000000..2bb92071a --- /dev/null +++ b/docs/connect-blockchain/new.mdx @@ -0,0 +1,1066 @@ +### Testnet + +#### SKALE Europa Hub Testnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Calypso NFT Hub Testnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Nebula Gaming Hub Testnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Titan Community Hub + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Chaos Testnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + diff --git a/docs/connect-blockchain/skale.mdx b/docs/connect-blockchain/skale.mdx new file mode 100644 index 000000000..510a5257d --- /dev/null +++ b/docs/connect-blockchain/skale.mdx @@ -0,0 +1,2024 @@ +--- +title: Integrate Web3Auth with the Skale Blockchain +sidebar_label: Skale +image: "content-hub/guides/banners/optimism.png" +displayed_sidebar: docs +keywords: [skale, blockchain, web3auth] +description: "Integrate Web3Auth with the Skale Blockchain | Documentation - Web3Auth" +--- + +import InstallationSnippet from "@site/src/common/docs/_evm-installation.mdx"; +import GetUserInfoSnippet from "@site/src/common/docs/_get-userinfo.mdx"; +import GetAccountAndBalanceSnippet from "@site/src/common/docs/_evm-get-account-n-balance.mdx"; +import SendTransactionSnippet from "@site/src/common/docs/_evm-send-transaction.mdx"; +import SignTransactionSnippet from "@site/src/common/docs/_evm-sign-transaction.mdx"; +import SignPersonalMessageSnippet from "@site/src/common/docs/_evm-sign-message-personal-sign.mdx"; +import SignTypedDataV1Snippet from "@site/src/common/docs/_evm-sign-message-v1.mdx"; +import SignTypedDataV3Snippet from "@site/src/common/docs/_evm-sign-message-v3.mdx"; +import SignTypedDataV4Snippet from "@site/src/common/docs/_evm-sign-message-v4.mdx"; +import SmartContractSoliditySnippet from "@site/src/common/docs/_smart-contract-solidity.mdx"; +import DeployContractSolidityDeploySnippet from "@site/src/common/docs/_smart-contract-solidity-deploy.mdx"; +import DeployContractSolidityReadSnippet from "@site/src/common/docs/_smart-contract-solidity-read.mdx"; +import DeployContractSolidityWriteSnippet from "@site/src/common/docs/_smart-contract-solidity-write.mdx"; +import FetchUserPrivateKeySnippet from "@site/src/common/docs/_evm-fetch-user-private-key.mdx"; +import TabItem from "@theme/TabItem"; +import Tabs from "@theme/Tabs"; + +While using the Web3Auth Web SDK, you get a [`EIP1193`](https://eips.ethereum.org/EIPS/eip-1193) provider, similar to the +[Metamask Provider](https://docs.metamask.io/guide/ethereum-provider.html). This provider can be used with libraries like +[`web3.js`](https://web3js.readthedocs.io/en/v1.2.8/getting-started.html), [`ethers.js`](https://docs.ethers.io/v5/getting-started/) etc. to make +[Skale](https://skale.space/) blockchain calls like getting the user's `account`, fetching `balance`, `sign transaction`, `send transaction`, `read` +from and `write` to the smart contract, etc. We have highlighted a few here to get you started quickly on that. + +:::info + +This reference is for the `Web`, however, you can use Optimism on `Android`, `iOS`, `React Native`, `Flutter`, & `Unity` as well. Please follow our +reference for [Ethereum](/connect-blockchain/ethereum/), and change the RPC Provider URL & configurations corresponding to Optimism. + +::: + +## Installation + +To interact with the Optimism blockchain, you can use either [web3.js](https://web3js.readthedocs.io/en/v1.2.8/getting-started.html) or +[ethers.js](https://docs.ethers.io/v5/getting-started/) libraries with Web3Auth. + + + +## Initializing Provider (Skale) + +### Mainnet + +#### SKALE Europa Hub + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x79f99296", + rpcTarget: "https://mainnet.skalenodes.com/v1/elated-tan-skat", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Mainnet", + blockExplorer: "https://elated-tan-skat.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x79f99296", + rpcTarget: "https://mainnet.skalenodes.com/v1/elated-tan-skat", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Mainnet", + blockExplorer: "https://elated-tan-skat.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x79f99296", + rpcTarget: "https://mainnet.skalenodes.com/v1/elated-tan-skat", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Mainnet", + blockExplorer: "https://elated-tan-skat.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x79f99296", + rpcTarget: "https://mainnet.skalenodes.com/v1/elated-tan-skat", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Mainnet", + blockExplorer: "https://elated-tan-skat.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x79f99296", + rpcTarget: "https://mainnet.skalenodes.com/v1/elated-tan-skat", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Mainnet", + blockExplorer: "https://elated-tan-skat.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x79f99296", + rpcTarget: "https://mainnet.skalenodes.com/v1/elated-tan-skat", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Mainnet", + blockExplorer: "https://elated-tan-skat.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Calypso NFT Hub Mainnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5d456c62", + rpcTarget: "https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Mainnet", + blockExplorer: "https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5d456c62", + rpcTarget: "https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Mainnet", + blockExplorer: "https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5d456c62", + rpcTarget: "https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Mainnet", + blockExplorer: "https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5d456c62", + rpcTarget: "https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Mainnet", + blockExplorer: "https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5d456c62", + rpcTarget: "https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Mainnet", + blockExplorer: "https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5d456c62", + rpcTarget: "https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Mainnet", + blockExplorer: "https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Nebula Gaming Hub Mainnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x585eb4b1", + rpcTarget: "https://mainnet.skalenodes.com/v1/green-giddy-denebola", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Mainnet", + blockExplorer: "https://green-giddy-denebola.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x585eb4b1", + rpcTarget: "https://mainnet.skalenodes.com/v1/green-giddy-denebola", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Mainnet", + blockExplorer: "https://green-giddy-denebola.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x585eb4b1", + rpcTarget: "https://mainnet.skalenodes.com/v1/green-giddy-denebola", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Mainnet", + blockExplorer: "https://green-giddy-denebola.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x585eb4b1", + rpcTarget: "https://mainnet.skalenodes.com/v1/green-giddy-denebola", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Mainnet", + blockExplorer: "https://green-giddy-denebola.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x585eb4b1", + rpcTarget: "https://mainnet.skalenodes.com/v1/green-giddy-denebola", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Mainnet", + blockExplorer: "https://green-giddy-denebola.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x585eb4b1", + rpcTarget: "https://mainnet.skalenodes.com/v1/green-giddy-denebola", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Mainnet", + blockExplorer: "https://green-giddy-denebola.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Titan Community Hub Mainnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x507aaa2a", + rpcTarget: "https://mainnet.skalenodes.com/v1/parallel-stormy-spica", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Mainnet", + blockExplorer: "https://parallel-stormy-spica.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x507aaa2a", + rpcTarget: "https://mainnet.skalenodes.com/v1/parallel-stormy-spica", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Mainnet", + blockExplorer: "https://parallel-stormy-spica.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x507aaa2a", + rpcTarget: "https://mainnet.skalenodes.com/v1/parallel-stormy-spica", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Mainnet", + blockExplorer: "https://parallel-stormy-spica.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x507aaa2a", + rpcTarget: "https://mainnet.skalenodes.com/v1/parallel-stormy-spica", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Mainnet", + blockExplorer: "https://parallel-stormy-spica.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x507aaa2a", + rpcTarget: "https://mainnet.skalenodes.com/v1/parallel-stormy-spica", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Mainnet", + blockExplorer: "https://parallel-stormy-spica.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x507aaa2a", + rpcTarget: "https://mainnet.skalenodes.com/v1/parallel-stormy-spica", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Mainnet", + blockExplorer: "https://parallel-stormy-spica.explorer.mainnet.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +### Testnet + +### Testnet + +#### SKALE Europa Hub Testnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1c6199cc", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Europa Hub Testnet", + blockExplorer: "https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Calypso NFT Hub Testnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1482a7b2", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Calypso NFT Hub Testnet", + blockExplorer: "https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com/ ", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Nebula Gaming Hub Testnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x1dfd2731", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Nebula Gaming Hub Testnet", + blockExplorer: "https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Titan Community Hub + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x5a79c44e", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Titan Community Hub Testnet", + blockExplorer: "https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +#### SKALE Chaos Testnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +## Get User Info + + + +## Get Account and Balance + + + +## Send Transaction + + + +## Sign Transaction + + + +## Sign Message + +### Personal Sign + + + +### Sign Typed Data v1 + + + +### Sign Typed Data v3 + + + +### Sign Typed Data v4 + + + +## Smart Contract + + + +### Deploy Contract + + + +### Read From Contract + + + +### Write to Contract + + + +## Fetch User's Private Key + + diff --git a/docs/connect-blockchain/temp.mdx b/docs/connect-blockchain/temp.mdx new file mode 100644 index 000000000..374f35811 --- /dev/null +++ b/docs/connect-blockchain/temp.mdx @@ -0,0 +1,212 @@ +#### SKALE Chaos Testnet + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x50877ed6", + rpcTarget: "https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "SKALE Chaos Testnet", + blockExplorer: "https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com/", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + diff --git a/docs/connect-blockchain/zkatana.mdx b/docs/connect-blockchain/zkatana.mdx new file mode 100644 index 000000000..8b644852e --- /dev/null +++ b/docs/connect-blockchain/zkatana.mdx @@ -0,0 +1,316 @@ +--- +title: Integrate Web3Auth with the zKatana Blockchain +sidebar_label: zKatana +image: "content-hub/guides/banners/optimism.png" +displayed_sidebar: docs +keywords: [zkatana, blockchain, web3auth] +description: "Integrate Web3Auth with the zKatana Blockchain | Documentation - Web3Auth" +--- + +import InstallationSnippet from "@site/src/common/docs/_evm-installation.mdx"; +import GetUserInfoSnippet from "@site/src/common/docs/_get-userinfo.mdx"; +import GetAccountAndBalanceSnippet from "@site/src/common/docs/_evm-get-account-n-balance.mdx"; +import SendTransactionSnippet from "@site/src/common/docs/_evm-send-transaction.mdx"; +import SignTransactionSnippet from "@site/src/common/docs/_evm-sign-transaction.mdx"; +import SignPersonalMessageSnippet from "@site/src/common/docs/_evm-sign-message-personal-sign.mdx"; +import SignTypedDataV1Snippet from "@site/src/common/docs/_evm-sign-message-v1.mdx"; +import SignTypedDataV3Snippet from "@site/src/common/docs/_evm-sign-message-v3.mdx"; +import SignTypedDataV4Snippet from "@site/src/common/docs/_evm-sign-message-v4.mdx"; +import SmartContractSoliditySnippet from "@site/src/common/docs/_smart-contract-solidity.mdx"; +import DeployContractSolidityDeploySnippet from "@site/src/common/docs/_smart-contract-solidity-deploy.mdx"; +import DeployContractSolidityReadSnippet from "@site/src/common/docs/_smart-contract-solidity-read.mdx"; +import DeployContractSolidityWriteSnippet from "@site/src/common/docs/_smart-contract-solidity-write.mdx"; +import FetchUserPrivateKeySnippet from "@site/src/common/docs/_evm-fetch-user-private-key.mdx"; +import TabItem from "@theme/TabItem"; +import Tabs from "@theme/Tabs"; + +While using the Web3Auth Web SDK, you get a [`EIP1193`](https://eips.ethereum.org/EIPS/eip-1193) provider, similar to the +[Metamask Provider](https://docs.metamask.io/guide/ethereum-provider.html). This provider can be used with libraries like +[`web3.js`](https://web3js.readthedocs.io/en/v1.2.8/getting-started.html), [`ethers.js`](https://docs.ethers.io/v5/getting-started/) etc. to make +[zKatana](https://astar.network/) blockchain calls like getting the user's `account`, fetching `balance`, `sign transaction`, `send transaction`, +`read` from and `write` to the smart contract, etc. We have highlighted a few here to get you started quickly on that. + +:::info + +This reference is for the `Web`, however, you can use zKatana on `Android`, `iOS`, `React Native`, `Flutter`, & `Unity` as well. Please follow our +reference for [Ethereum](/connect-blockchain/ethereum/), and change the RPC Provider URL & configurations corresponding to zKatana. + +::: + +## Installation + +To interact with the zKatana blockchain, you can use either [web3.js](https://web3js.readthedocs.io/en/v1.2.8/getting-started.html) or +[ethers.js](https://docs.ethers.io/v5/getting-started/) libraries with Web3Auth. + + + +## Initializing Provider (zKatana) + +### Testnet + +Testnet Block Explorer URL: https://zkatana.blockscout.com + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x133120", // hex of 1261120 + rpcTarget: "https://rpc.zkatana.gelato.digital", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "zKatana Testnet", + blockExplorer: "https://zkatana.blockscout.com", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import Web3 from "web3"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x133120", // hex of 1261120 + rpcTarget: "https://rpc.zkatana.gelato.digital", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "zKatana Testnet", + blockExplorer: "https://zkatana.blockscout.com", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const Web3 = require("web3"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x133120", // hex of 1261120 + rpcTarget: "https://rpc.zkatana.gelato.digital", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "zKatana Testnet", + blockExplorer: "https://zkatana.blockscout.com", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const web3 = new Web3(web3authProvider); // web3auth.provider +``` + + + + + + + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x133120", // hex of 1261120 + rpcTarget: "https://rpc.zkatana.gelato.digital", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "zKatana Testnet", + blockExplorer: "https://zkatana.blockscout.com", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +import { Web3Auth } from "@web3auth/modal"; +import { CHAIN_NAMESPACES } from "@web3auth/base"; +import { ethers } from "ethers"; + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x133120", // hex of 1261120 + rpcTarget: "https://rpc.zkatana.gelato.digital", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "zKatana Testnet", + blockExplorer: "https://zkatana.blockscout.com", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + +```tsx +const { Web3Auth } = require("@web3auth/modal"); +const ethers = require("ethers"); + +const web3auth = new Web3Auth({ + clientId: "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ", // get it from Web3Auth Dashboard + web3AuthNetwork: "sapphire_mainnet", + chainConfig: { + chainNamespace: "eip155", + chainId: "0x133120", // hex of 1261120 + rpcTarget: "https://rpc.zkatana.gelato.digital", + // Avoid using public rpcTarget in production. + // Use services like Infura, Quicknode etc + displayName: "zKatana Testnet", + blockExplorer: "https://zkatana.blockscout.com", + ticker: "ETH", + tickerName: "ETH", + }, +}); +await web3auth.initModal(); + +const web3authProvider = await web3auth.connect(); + +const provider = new ethers.providers.Web3Provider(web3authProvider); // web3auth.provider +``` + + + + + + + +## Get User Info + + + +## Get Account and Balance + + + +## Send Transaction + + + +## Sign Transaction + + + +## Sign Message + +### Personal Sign + + + +### Sign Typed Data v1 + + + +### Sign Typed Data v3 + + + +### Sign Typed Data v4 + + + +## Smart Contract + + + +### Deploy Contract + + + +### Read From Contract + + + +### Write to Contract + + + +## Fetch User's Private Key + + diff --git a/sidebars.js b/sidebars.js index 0a4faa336..0f1612fd8 100644 --- a/sidebars.js +++ b/sidebars.js @@ -235,6 +235,8 @@ module.exports = { "connect-blockchain/klaytn", "connect-blockchain/flare", "connect-blockchain/songbird", + "connect-blockchain/zkatana", + "connect-blockchain/skale", ], collapsible: true, collapsed: false,