Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Web3Auth #37

Closed
Tracked by #13
manuelbarbas opened this issue Nov 27, 2023 · 1 comment
Closed
Tracked by #13

Using Web3Auth #37

manuelbarbas opened this issue Nov 27, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@manuelbarbas
Copy link
Collaborator

manuelbarbas commented Nov 27, 2023

WITH BUG: Can't connect to SKALE Chains. Need to check

Web3Auth

Pluggable wallet infrastructure for Web3 wallets and applications. It streamlines the onboarding of both mainstream and crypto native users in under a minute by providing experiences that they're most comfortable with.

Web3Auth's MPC-based wallet management infrastructure provides secure, non-custodial wallet management, where users maintain control of their cryptographic key pair. The login service only accesses a single share, preventing the provider from retrieving the user's wallet independently.

Implementation Example

NPM Packages

npm install --save @web3auth/modal

Client ID
Get your client ID under https://dashboard.web3auth.io/

Implementation code

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: "sFUEL",
    tickerName: "sFUEL",
  },
});
await web3auth.initModal();

const web3authProvider = await web3auth.connect();

const web3 = new Web3(web3authProvider);

Integration Errors

In case of encountering polyfill related issues check the Web3auth troubleshooting page about this topic

@manuelbarbas
Copy link
Collaborator Author

What is: Wallet
Language: Javascript, Typescript, C#, Kotlin, Swift, Flutter
Target: Web, Mobile (Android and IOS), Unity, Unreal

@manuelbarbas manuelbarbas added the documentation Improvements or additions to documentation label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant