repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/vite-env.d.ts | custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/components/sendTransaction.tsx | custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/components/sendTransaction.tsx | import { FormEvent } from "react";
import { useWaitForTransactionReceipt, useSendTransaction, BaseError } from "wagmi";
import { Hex, parseEther } from "viem";
export function SendTransaction() {
const { data: hash, error, isPending, sendTransaction } = useSendTransaction()
async function submit(e: FormEvent<HTML... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/components/getBalance.tsx | custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/components/getBalance.tsx | import { useAccount, useBalance } from "wagmi";
import { formatUnits } from "viem";
export function Balance() {
const { address } = useAccount()
const { data, isLoading, error } = useBalance({ address })
return (
<div>
<h2>Balance</h2>
<div>{data?.value !== undefined && `${formatUnits(data.valu... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/components/switchNetwork.tsx | custom-authentication/grouped-connection/auth0-google-jwt-grouped-example/src/components/switchNetwork.tsx | import { useChainId, useSwitchChain } from 'wagmi'
export function SwitchChain() {
const chainId = useChainId()
const { chains, switchChain, error } = useSwitchChain()
return (
<div>
<h2>Switch Chain</h2>
<h3>Connected to {chainId}</h3>
{chains.map((chain) => (
<button
di... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/vite.config.ts | react-playground/vite.config.ts |
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// alias are only to be added when absolutely necessary, these modules are already present in the browser environment
// resolve: {
// alias: {
// c... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/App.tsx | react-playground/src/App.tsx | // import "./App.css";
import { Web3AuthProvider } from "@web3auth/modal/react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import Contract from "./pages/Contract";
import HomePage from "./pages/HomePage";
// import NFT from "./pages/NFT";
import ServerSideVerification from "./pages/ServerSideVe... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/index.tsx | react-playground/src/index.tsx | import "./index.css";
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
// Ensure dark mode is enabled
document.documentElement.classList.add('dark');
const root = ReactDOM.createRoot(document.getElementById("root") as HTMLElement);
root.render(
<React.StrictMode>
<A... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/vite-env.d.ts | react-playground/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/services/web3authContext.tsx | react-playground/src/services/web3authContext.tsx | import { WALLET_CONNECTORS, WEB3AUTH_NETWORK } from "@web3auth/modal";
import { Web3AuthContextConfig } from "@web3auth/modal/react";
const clientId = "BHgArYmWwSeq21czpcarYh0EVq2WWOzflX-NTK-tY1-1pauPzHKRRLgpABkmYiIV_og9jAvoIxQ8L3Smrwe04Lw"; // get from https://dashboard.web3auth.io
const web3AuthContextConfig: Web3A... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/services/evmProvider.ts | react-playground/src/services/evmProvider.ts | import type { IProvider } from "@web3auth/modal";
import { ContractFactory, ethers } from "ethers";
// import { json } from "stream/consumers";
import { IWalletProvider } from "./walletProvider";
const ethersWeb3Provider = (provider: IProvider | null, uiConsole: (...args: unknown[]) => void): IWalletProvider => {
c... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/services/walletProvider.ts | react-playground/src/services/walletProvider.ts | import { IProvider } from "@web3auth/modal";
import evmProvider from "./evmProvider";
export interface IWalletProvider {
getPublicKey: () => Promise<string>;
getAddress: () => Promise<string>;
getBalance: () => Promise<string>;
getChainId: () => Promise<string>;
getSignature: (message: string) => Promise<st... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/services/playground.tsx | react-playground/src/services/playground.tsx | import { CONNECTOR_STATUS, type CustomChainConfig, type IProvider, WALLET_CONNECTORS } from "@web3auth/modal";
import { useIdentityToken, useSwitchChain, useWeb3Auth, useWeb3AuthConnect, useWeb3AuthUser } from "@web3auth/modal/react";
import * as jose from "jose";
import React, { createContext, ReactNode, useCallback, ... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/pages/HomePage.tsx | react-playground/src/pages/HomePage.tsx | import { useWeb3AuthConnect } from "@web3auth/modal/react";
import React from "react";
import AccountDetails from "../components/AccountDetails";
import Console from "../components/Console";
import Header from "../components/Header";
import NotConnectedPage from "../components/NotConnectedPage";
import Sidebar from ".... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/pages/ServerSideVerification.tsx | react-playground/src/pages/ServerSideVerification.tsx | import { useWeb3AuthConnect } from "@web3auth/modal/react";
import React, { useState } from "react";
import Console from "../components/Console";
import Form from "../components/Form";
import Header from "../components/Header";
import NotConnectedPage from "../components/NotConnectedPage";
import Sidebar from "../comp... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/pages/Contract.tsx | react-playground/src/pages/Contract.tsx | import { useWeb3AuthConnect } from "@web3auth/modal/react";
import React, { useState } from "react";
import Console from "../components/Console";
import Form from "../components/Form";
import Header from "../components/Header";
import NotConnectedPage from "../components/NotConnectedPage";
import Sidebar from "../comp... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/pages/Transaction.tsx | react-playground/src/pages/Transaction.tsx | import { useWeb3AuthConnect } from "@web3auth/modal/react";
import React, { useState } from "react";
import Console from "../components/Console";
import Form from "../components/Form";
import Header from "../components/Header";
import NotConnectedPage from "../components/NotConnectedPage";
import Sidebar from "../comp... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/DisconnectWeb3AuthButton.tsx | react-playground/src/components/DisconnectWeb3AuthButton.tsx | import { useWeb3AuthConnect, useWeb3AuthDisconnect } from "@web3auth/modal/react";
import React from "react";
import web3AuthLogoWhite from "../assets/web3authLogoWhite.svg";
const DisconnectWeb3AuthButton = () => {
const { isConnected } = useWeb3AuthConnect();
const { disconnect } = useWeb3AuthDisconnect();
i... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/ConnectWeb3AuthButton.tsx | react-playground/src/components/ConnectWeb3AuthButton.tsx | import { useWeb3AuthConnect } from "@web3auth/modal/react";
import React from "react";
import web3AuthLogoWhite from "../assets/web3authLogoWhite.svg";
const ConnectWeb3AuthButton = () => {
const { connect, isConnected } = useWeb3AuthConnect();
if (isConnected) {
return null;
}
return (
<button onCl... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/AccountDetails.tsx | react-playground/src/components/AccountDetails.tsx | import { CustomChainConfig, WALLET_CONNECTORS } from "@web3auth/modal";
import { useWeb3AuthConnect, useWeb3AuthUser } from "@web3auth/modal/react";
import React, { JSX, useEffect, useState } from "react";
import Dropdown from "../components/DropDown";
import { usePlayground } from "../services/playground";
interface... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/Drawer.tsx | react-playground/src/components/Drawer.tsx | import { WALLET_CONNECTORS } from "@web3auth/modal";
import { useWeb3AuthConnect, useWeb3AuthDisconnect } from "@web3auth/modal/react";
import React from "react";
import { useLocation, useNavigate } from "react-router-dom";
import UserProfile from "../components/UserProfile";
import { usePlayground } from "../services... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/UserProfile.tsx | react-playground/src/components/UserProfile.tsx | import { WALLET_CONNECTORS } from "@web3auth/modal";
import { useWeb3AuthConnect, useWeb3AuthUser } from "@web3auth/modal/react";
import React from "react";
interface UserProfileProps {
className?: string;
}
function UserProfile({ className }: UserProfileProps) {
const { userInfo } = useWeb3AuthUser();
const { ... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/Console.tsx | react-playground/src/components/Console.tsx | import React from "react";
import { usePlayground } from "../services/playground";
const Console = () => {
const { playgroundConsole } = usePlayground();
return (
<div className="w-full px-4 sm:px-6 lg:px-8 flex flex-col mb-6">
<div className="flex items-center justify-between mb-3">
<div class... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/Tabs.tsx | react-playground/src/components/Tabs.tsx | import React from "react";
interface TabsProps {
tabData: { tabName: string; onClick?: any; active?: boolean }[];
}
function renderTab(tabName: string, onClick?: any, active?: boolean) {
if (active) {
return (
<a onClick={onClick} className="p-4 text-lg font-bold -mb-px border-b-2 border-current text-pr... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/DropDown.tsx | react-playground/src/components/DropDown.tsx | import React, { FC, useState } from "react";
interface DropdownProps {
options: string[];
displayOptions?: string[];
rounded?: boolean;
label?: string;
selectedOption?: string;
onChange?: (value: string) => void;
}
const Dropdown: FC<DropdownProps> = ({ options, displayOptions, rounded, label, onChange, s... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/NotConnectedPage.tsx | react-playground/src/components/NotConnectedPage.tsx | import React from "react";
import { usePlayground } from "../services/playground";
import ConnectWeb3AuthButton from "./ConnectWeb3AuthButton";
import SourceCode from "./SourceCode";
const NotConnectedPage = () => {
const { isLoading } = usePlayground();
return (
<div className="flex flex-col justify-center ... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/Sidebar.tsx | react-playground/src/components/Sidebar.tsx | import { WALLET_CONNECTORS } from "@web3auth/modal";
import { useWeb3AuthConnect } from "@web3auth/modal/react";
import React from "react";
import { useLocation, useNavigate } from "react-router-dom";
import { usePlayground } from "../services/playground";
import UserProfile from "./UserProfile";
const Sidebar = () =... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/Header.tsx | react-playground/src/components/Header.tsx | import { useWeb3AuthConnect } from "@web3auth/modal/react";
import Hamburger from "hamburger-react";
import { useState } from "react";
import { useNavigate } from "react-router-dom";
import web3authLogo from "../assets/web3authLogoBlue.svg";
import DisconnectWeb3AuthButton from "./DisconnectWeb3AuthButton";
import Dra... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/MultiForm.tsx | react-playground/src/components/MultiForm.tsx | import React, { JSX } from "react";
interface FormProps {
heading?: string;
headingCenter?: boolean;
formDetails: {
label: string;
input: string;
readOnly?: boolean;
onChange?: any;
}[];
children?: JSX.Element | JSX.Element[];
}
function MultiForm({ heading, headingCenter, formDetails, child... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/Form.tsx | react-playground/src/components/Form.tsx | import React, { JSX } from "react";
interface FormProps {
heading?: string;
headingCenter?: boolean;
formDetails: {
label: string;
input: string;
readOnly?: boolean;
onChange?: any;
}[];
children?: JSX.Element | JSX.Element[];
}
function Form({ heading, headingCenter, formDetails, children }... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/components/SourceCode.tsx | react-playground/src/components/SourceCode.tsx | import React from "react";
const SourceCode = () => {
return (
<div className="w-full px-4 sm:px-6 lg:px-8 flex flex-col sm:flex-row items-center justify-center mb-12">
<a
href="https://github.com/Web3Auth/web3auth-examples/tree/main/react-playground"
target="_blank"
rel="noopener n... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/config/chainConfig.ts | react-playground/src/config/chainConfig.ts | import { CHAIN_NAMESPACES, CustomChainConfig } from "@web3auth/modal";
export const chains: {
[key: string]: CustomChainConfig;
} = {
ethereum: {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: "0x1",
displayName: "Ethereum Mainnet",
rpcTarget: "https://1rpc.io/eth",
blockExplorerUrl: "https:... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/react-playground/src/config/consts.ts | react-playground/src/config/consts.ts | export const tokenId = "HERE";
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/nextjs-quick-start/next-env.d.ts | quick-starts/nextjs-quick-start/next-env.d.ts | /// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/nextjs-quick-start/app/layout.tsx | quick-starts/nextjs-quick-start/app/layout.tsx | import React from "react";
// IMP START - Quick Start
import Provider from "../components/provider";
// IMP END - Quick Start
// IMP START - SSR
import { cookieToWeb3AuthState } from "@web3auth/modal";
// IMP END - SSR
import "./globals.css";
import { Inter } from "next/font/google";
// IMP START - SSR
import { header... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/nextjs-quick-start/app/page.tsx | quick-starts/nextjs-quick-start/app/page.tsx | "use client";
import React from "react";
import App from "../components/App";
export default function Home() {
return <App />;
} | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/nextjs-quick-start/components/App.tsx | quick-starts/nextjs-quick-start/components/App.tsx | import { useWeb3AuthConnect, useWeb3AuthDisconnect, useWeb3AuthUser } from "@web3auth/modal/react";
// IMP START - Blockchain Calls
import { useAccount } from "wagmi";
import { SendTransaction } from "./wagmi/sendTransaction";
import { Balance } from "./wagmi/getBalance";
import { SwitchChain } from "./wagmi/switchNe... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/nextjs-quick-start/components/provider.tsx | quick-starts/nextjs-quick-start/components/provider.tsx | "use client";
// IMP START - Setup Web3Auth Provider
import { Web3AuthProvider, type Web3AuthContextConfig } from "@web3auth/modal/react";
import { IWeb3AuthState, WEB3AUTH_NETWORK } from "@web3auth/modal";
// IMP END - Setup Web3Auth Provider
// IMP START - Setup Wagmi Provider
import { WagmiProvider } from "@web3aut... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/nextjs-quick-start/components/wagmi/sendTransaction.tsx | quick-starts/nextjs-quick-start/components/wagmi/sendTransaction.tsx | import { FormEvent } from "react";
import { useWaitForTransactionReceipt, useSendTransaction, BaseError } from "wagmi";
import { Hex, parseEther } from "viem";
export function SendTransaction() {
const { data: hash, error, isPending, sendTransaction } = useSendTransaction()
async function submit(e: FormEvent<HTML... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/nextjs-quick-start/components/wagmi/getBalance.tsx | quick-starts/nextjs-quick-start/components/wagmi/getBalance.tsx | import { useAccount, useBalance } from "wagmi";
import { formatUnits } from "viem";
export function Balance() {
const { address } = useAccount()
const { data, isLoading, error } = useBalance({ address })
return (
<div>
<h2>Balance</h2>
<div>{data?.value !== undefined && `${formatUnits(data.valu... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/nextjs-quick-start/components/wagmi/switchNetwork.tsx | quick-starts/nextjs-quick-start/components/wagmi/switchNetwork.tsx | import { useChainId, useSwitchChain } from 'wagmi'
export function SwitchChain() {
const chainId = useChainId()
const { chains, switchChain, error } = useSwitchChain()
return (
<div>
<h2>Switch Chain</h2>
<h3>Connected to {chainId}</h3>
{chains.map((chain) => (
<button
di... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/vue-quick-start/src/web3authContext.tsx | quick-starts/vue-quick-start/src/web3authContext.tsx | // IMP START - Quick Start
import { WEB3AUTH_NETWORK } from "@web3auth/modal";
import { type Web3AuthContextConfig } from "@web3auth/modal/vue";
// IMP END - Quick Start
// IMP START - Dashboard Registration
const clientId = "BHgArYmWwSeq21czpcarYh0EVq2WWOzflX-NTK-tY1-1pauPzHKRRLgpABkmYiIV_og9jAvoIxQ8L3Smrwe04Lw"; // ... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/vue-quick-start/src/shims-vue.d.ts | quick-starts/vue-quick-start/src/shims-vue.d.ts | /* eslint-disable */
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/vue-quick-start/src/main.ts | quick-starts/vue-quick-start/src/main.ts | // IMP START - Setup Wagmi Provider
import { VueQueryPlugin } from "@tanstack/vue-query";
// IMP END - Setup Wagmi Provider
import { createApp } from "vue";
import App from "./App.vue";
import "./style.css";
// IMP START - Setup Wagmi Provider
createApp(App).use(VueQueryPlugin).mount("#app");
// IMP END - Setup Wagmi ... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-quick-start/vite.config.ts | quick-starts/react-quick-start/vite.config.ts | /* eslint-disable import/no-extraneous-dependencies */
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// alias are only to be added when absolutely necessary, these modules are already present in the bro... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-quick-start/src/App.tsx | quick-starts/react-quick-start/src/App.tsx | import "./App.css";
import { useWeb3AuthConnect, useWeb3AuthDisconnect, useWeb3AuthUser } from "@web3auth/modal/react";
// IMP START - Blockchain Calls
import { useAccount } from "wagmi";
import { SendTransaction } from "./components/sendTransaction";
import { Balance } from "./components/getBalance";
import { Switch... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-quick-start/src/web3authContext.tsx | quick-starts/react-quick-start/src/web3authContext.tsx | // IMP START - Quick Start
import { WEB3AUTH_NETWORK } from "@web3auth/modal";
import { type Web3AuthContextConfig } from "@web3auth/modal/react";
// IMP END - Quick Start
// IMP START - Dashboard Registration
const clientId = "BHgArYmWwSeq21czpcarYh0EVq2WWOzflX-NTK-tY1-1pauPzHKRRLgpABkmYiIV_og9jAvoIxQ8L3Smrwe04Lw"; /... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-quick-start/src/main.tsx | quick-starts/react-quick-start/src/main.tsx | import "./index.css";
import ReactDOM from "react-dom/client";
// IMP START - Setup Web3Auth Provider
import { Web3AuthProvider } from "@web3auth/modal/react";
import web3AuthContextConfig from "./web3authContext";
// IMP END - Setup Web3Auth Provider
// IMP START - Setup Wagmi Provider
import { WagmiProvider } from ... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-quick-start/src/vite-env.d.ts | quick-starts/react-quick-start/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-quick-start/src/components/sendTransaction.tsx | quick-starts/react-quick-start/src/components/sendTransaction.tsx | import { FormEvent } from "react";
import { useWaitForTransactionReceipt, useSendTransaction, BaseError } from "wagmi";
import { Hex, parseEther } from "viem";
export function SendTransaction() {
const { data: hash, error, isPending, sendTransaction } = useSendTransaction()
async function submit(e: FormEvent<HTML... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-quick-start/src/components/getBalance.tsx | quick-starts/react-quick-start/src/components/getBalance.tsx | import { useAccount, useBalance } from "wagmi";
import { formatUnits } from "viem";
export function Balance() {
const { address } = useAccount()
const { data, isLoading, error } = useBalance({ address })
return (
<div>
<h2>Balance</h2>
<div>{data?.value !== undefined && `${formatUnits(data.valu... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-quick-start/src/components/switchNetwork.tsx | quick-starts/react-quick-start/src/components/switchNetwork.tsx | import { useChainId, useSwitchChain } from 'wagmi'
export function SwitchChain() {
const chainId = useChainId()
const { chains, switchChain, error } = useSwitchChain()
return (
<div>
<h2>Switch Chain</h2>
<h3>Connected to {chainId}</h3>
{chains.map((chain) => (
<button
di... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-solana-quick-start/vite.config.ts | quick-starts/react-solana-quick-start/vite.config.ts | /* eslint-disable import/no-extraneous-dependencies */
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// alias are only to be added when absolutely necessary, these modules are already present in the bro... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-solana-quick-start/src/App.tsx | quick-starts/react-solana-quick-start/src/App.tsx | import "./App.css";
import { useWeb3AuthConnect, useWeb3AuthDisconnect, useWeb3AuthUser} from "@web3auth/modal/react";
import { WALLET_CONNECTORS } from "@web3auth/modal";
import { useSolanaWallet } from "@web3auth/modal/react/solana";
import { SignTransaction } from "./components/signTransaction";
import { Balance } f... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-solana-quick-start/src/web3authContext.tsx | quick-starts/react-solana-quick-start/src/web3authContext.tsx | // IMP START - Quick Start
import { WEB3AUTH_NETWORK } from "@web3auth/modal";
import { type Web3AuthContextConfig } from "@web3auth/modal/react";
// IMP END - Quick Start
// IMP START - Dashboard Registration
const clientId = "BFcLTVqWlTSpBBaELDPSz4_LFgG8Nf8hEltPlf3QeUG_88GDrQSw82fSjjYj5x4F3ys3ghMq8-InU7Azx7NbFSs"; /... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-solana-quick-start/src/main.tsx | quick-starts/react-solana-quick-start/src/main.tsx | import "./index.css";
import ReactDOM from "react-dom/client";
// IMP START - Setup Web3Auth Provider
import { Web3AuthProvider } from "@web3auth/modal/react";
import web3AuthContextConfig from "./web3authContext";
// IMP END - Setup Web3Auth Provider
import App from "./App";
ReactDOM.createRoot(document.getElementB... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-solana-quick-start/src/vite-env.d.ts | quick-starts/react-solana-quick-start/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-solana-quick-start/src/components/signTransaction.tsx | quick-starts/react-solana-quick-start/src/components/signTransaction.tsx | import { FormEvent } from "react";
import { useSolanaWallet, useSignTransaction } from "@web3auth/modal/react/solana";
import { LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction } from "@solana/web3.js";
export function SignTransaction() {
const { data: signedTransaction, error, loading: isPending, signTransac... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-solana-quick-start/src/components/getBalance.tsx | quick-starts/react-solana-quick-start/src/components/getBalance.tsx | import { useSolanaWallet } from "@web3auth/modal/react/solana";
import {
LAMPORTS_PER_SOL,
PublicKey,
} from "@solana/web3.js";
import { useEffect, useState } from "react";
export function Balance() {
const { accounts, connection } = useSolanaWallet();
const [balance, setBalance] = useState<number | null>(null... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-solana-quick-start/src/components/signMessage.tsx | quick-starts/react-solana-quick-start/src/components/signMessage.tsx | import { FormEvent } from "react";
import { useSignMessage } from "@web3auth/modal/react/solana";
export function SignMessage() {
const { data: hash, error, loading: isPending, signMessage } = useSignMessage();
async function submit(e: FormEvent<HTMLFormElement>) {
e.preventDefault()
const formData = new ... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-solana-quick-start/src/components/sendVersionedTransaction.tsx | quick-starts/react-solana-quick-start/src/components/sendVersionedTransaction.tsx | import { FormEvent } from "react";
import { useSolanaWallet, useSignAndSendTransaction } from "@web3auth/modal/react/solana";
import { LAMPORTS_PER_SOL, PublicKey, SystemProgram, TransactionMessage, VersionedTransaction } from "@solana/web3.js";
export function SendVersionedTransaction() {
const { data: hash, error,... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-solana-quick-start/src/components/switchNetwork.tsx | quick-starts/react-solana-quick-start/src/components/switchNetwork.tsx | import { useSwitchChain, useWeb3Auth } from '@web3auth/modal/react'
export function SwitchChain() {
const { web3Auth } = useWeb3Auth();
const { switchChain, error } = useSwitchChain()
return (
<div>
<h2>Switch Chain</h2>
<h3>Connected to {web3Auth?.currentChain?.displayName}</h3>
{web3Aut... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-no-modal-quick-start/vite.config.ts | quick-starts/react-no-modal-quick-start/vite.config.ts | /* eslint-disable import/no-extraneous-dependencies */
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// alias are only to be added when absolutely necessary, these modules are already present in the bro... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-no-modal-quick-start/src/App.tsx | quick-starts/react-no-modal-quick-start/src/App.tsx | import "./App.css";
import { useWeb3AuthConnect, useWeb3AuthDisconnect, useWeb3AuthUser } from "@web3auth/modal/react";
// IMP START - Blockchain Calls
import { useAccount } from "wagmi";
import { SendTransaction } from "./components/sendTransaction";
import { Balance } from "./components/getBalance";
import { Switch... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-no-modal-quick-start/src/web3authContext.tsx | quick-starts/react-no-modal-quick-start/src/web3authContext.tsx | // IMP START - Quick Start
import { WEB3AUTH_NETWORK } from "@web3auth/modal";
import { type Web3AuthContextConfig } from "@web3auth/modal/react";
// IMP END - Quick Start
// IMP START - Dashboard Registration
const clientId = "BHgArYmWwSeq21czpcarYh0EVq2WWOzflX-NTK-tY1-1pauPzHKRRLgpABkmYiIV_og9jAvoIxQ8L3Smrwe04Lw"; /... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-no-modal-quick-start/src/main.tsx | quick-starts/react-no-modal-quick-start/src/main.tsx | import "./index.css";
import ReactDOM from "react-dom/client";
// IMP START - Setup Web3Auth Provider
import { Web3AuthProvider } from "@web3auth/modal/react";
import web3AuthContextConfig from "./web3authContext";
// IMP END - Setup Web3Auth Provider
// IMP START - Setup Wagmi Provider
import { WagmiProvider } from ... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-no-modal-quick-start/src/vite-env.d.ts | quick-starts/react-no-modal-quick-start/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-no-modal-quick-start/src/components/sendTransaction.tsx | quick-starts/react-no-modal-quick-start/src/components/sendTransaction.tsx | import { FormEvent } from "react";
import { useWaitForTransactionReceipt, useSendTransaction, BaseError } from "wagmi";
import { Hex, parseEther } from "viem";
export function SendTransaction() {
const { data: hash, error, isPending, sendTransaction } = useSendTransaction()
async function submit(e: FormEvent<HTML... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-no-modal-quick-start/src/components/getBalance.tsx | quick-starts/react-no-modal-quick-start/src/components/getBalance.tsx | import { useAccount, useBalance } from "wagmi";
import { formatUnits } from "viem";
export function Balance() {
const { address } = useAccount()
const { data, isLoading, error } = useBalance({ address })
return (
<div>
<h2>Balance</h2>
<div>{data?.value !== undefined && `${formatUnits(data.valu... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/react-no-modal-quick-start/src/components/switchNetwork.tsx | quick-starts/react-no-modal-quick-start/src/components/switchNetwork.tsx | import { useChainId, useSwitchChain } from 'wagmi'
export function SwitchChain() {
const chainId = useChainId()
const { chains, switchChain, error } = useSwitchChain()
return (
<div>
<h2>Switch Chain</h2>
<h3>Connected to {chainId}</h3>
{chains.map((chain) => (
<button
di... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/angular-quick-start/src/test.ts | quick-starts/angular-quick-start/src/test.ts | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
import "zone.js/testing";
import { getTestBed } from "@angular/core/testing";
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from "@angular/platform-browser-dynamic/testing";
// First, initialize ... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/angular-quick-start/src/polyfills.ts | quick-starts/angular-quick-start/src/polyfills.ts | /* eslint-disable @typescript-eslint/no-var-requires */
import "zone.js"; // Included with Angular CLI.
// IMP START - Bundler Issues
(window as any).global = window;
global.Buffer = global.Buffer || require("buffer").Buffer;
global.process = global.process || require("process");
// IMP END - Bundler Issues
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/angular-quick-start/src/main.ts | quick-starts/angular-quick-start/src/main.ts | import { enableProdMode } from "@angular/core";
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
import { AppModule } from "./app/app.module";
platformBrowserDynamic()
.bootstrapModule(AppModule)
// eslint-disable-next-line no-console
.catch((err) => console.error(err));
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/angular-quick-start/src/app/app.component.spec.ts | quick-starts/angular-quick-start/src/app/app.component.spec.ts | import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
});
it('should create the app', ()... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/angular-quick-start/src/app/app.component.ts | quick-starts/angular-quick-start/src/app/app.component.ts | import { Component, OnInit } from '@angular/core';
// IMP START - Quick Start
import { Web3Auth, WEB3AUTH_NETWORK } from "@web3auth/modal";
// IMP END - Quick Start
// IMP START - Blockchain Calls
// import RPC from "./ethersRPC";
import RPC from "./viemRPC";
// IMP END - Blockchain Calls
// IMP START - Dashboard Reg... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/angular-quick-start/src/app/app.module.ts | quick-starts/angular-quick-start/src/app/app.module.ts | import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { AppComponent } from "./app.component";
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/angular-quick-start/src/app/viemRPC.ts | quick-starts/angular-quick-start/src/app/viemRPC.ts | import { createWalletClient, createPublicClient, custom, formatEther, parseEther } from 'viem'
import { mainnet, polygonAmoy, sepolia } from 'viem/chains'
import type { IProvider } from "@web3auth/modal";
const getViewChain = (provider: IProvider) => {
switch (provider.chainId) {
case "1":
return mainnet;
... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/angular-quick-start/src/app/ethersRPC.ts | quick-starts/angular-quick-start/src/app/ethersRPC.ts | /* eslint-disable @typescript-eslint/no-explicit-any */
import type { IProvider } from "@web3auth/modal";
import { ethers } from "ethers";
const getChainId = async (provider: IProvider): Promise<any> => {
try {
const ethersProvider = new ethers.BrowserProvider(provider);
// Get the connected Chain's ID
c... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/angular-quick-start/src/environments/environment.ts | quick-starts/angular-quick-start/src/environments/environment.ts | // This file can be replaced during build by using the `fileReplacements` array.
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* For easier debugging in development mode, you ... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/angular-quick-start/src/environments/environment.prod.ts | quick-starts/angular-quick-start/src/environments/environment.prod.ts | export const environment = {
production: true
};
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/vue-solana-quick-start/src/web3authContext.tsx | quick-starts/vue-solana-quick-start/src/web3authContext.tsx | // IMP START - Quick Start
import { CHAIN_NAMESPACES, WEB3AUTH_NETWORK } from "@web3auth/modal";
import { type Web3AuthContextConfig } from "@web3auth/modal/vue";
// IMP END - Quick Start
// IMP START - Dashboard Registration
const clientId = "BFcLTVqWlTSpBBaELDPSz4_LFgG8Nf8hEltPlf3QeUG_88GDrQSw82fSjjYj5x4F3ys3ghMq8-I... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/vue-solana-quick-start/src/shims-vue.d.ts | quick-starts/vue-solana-quick-start/src/shims-vue.d.ts | /* eslint-disable */
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/quick-starts/vue-solana-quick-start/src/main.ts | quick-starts/vue-solana-quick-start/src/main.ts | import { createApp } from "vue";
import App from "./App.vue";
import "./style.css";
createApp(App).mount("#app");
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/smart-account-example/vite.config.ts | other/smart-account-example/vite.config.ts | /* eslint-disable import/no-extraneous-dependencies */
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// alias are only to be added when absolutely necessary, these modules are already present in the bro... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/smart-account-example/src/App.tsx | other/smart-account-example/src/App.tsx | import "./App.css";
import { useWeb3AuthConnect, useWeb3AuthDisconnect, useWeb3AuthUser } from "@web3auth/modal/react";
import { useAccount } from "wagmi";
import { SendUserOperation } from "./components/SendUserOperation";
import { Balance } from "./components/Balance";
function App() {
const { connect, isConnected... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/smart-account-example/src/main.tsx | other/smart-account-example/src/main.tsx | import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App'
import './index.css'
import { AppProvider } from './provider'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<AppProvider>
<App />
</AppProvider>
</StrictMode>,
) | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/smart-account-example/src/provider.tsx | other/smart-account-example/src/provider.tsx | import { WEB3AUTH_NETWORK, type Web3AuthOptions } from "@web3auth/modal";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { WagmiProvider } from "@web3auth/modal/react/wagmi";
import { type ReactNode } from "react";
import { Web3AuthProvider } from "@web3auth/modal/react";
const client... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/smart-account-example/src/vite-env.d.ts | other/smart-account-example/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/smart-account-example/src/components/Balance.tsx | other/smart-account-example/src/components/Balance.tsx | import { useAccount, useBalance } from "wagmi";
import { formatUnits } from "viem";
export function Balance() {
const { address } = useAccount()
const { data: default_ } = useBalance({ address })
return (
<div>
<h2>Balance</h2>
<div>Balance: {default_?.value !== undefined ? `${formatUnits(defa... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/smart-account-example/src/components/SendUserOperation.tsx | other/smart-account-example/src/components/SendUserOperation.tsx | import { type FormEvent } from "react";
import { useWaitForTransactionReceipt, useSendTransaction, BaseError } from "wagmi";
import { parseEther, type Hex } from "viem";
export function SendUserOperation() {
const { data: hash, error, isPending, sendTransaction } = useSendTransaction()
async function submit(e: Fo... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/bitcoin-example/vite.config.ts | other/bitcoin-example/vite.config.ts | /* eslint-disable import/no-extraneous-dependencies */
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// alias are only to be added when absolutely necessary, these modules are already present in the bro... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/bitcoin-example/src/App.tsx | other/bitcoin-example/src/App.tsx | import { useState } from "react";
import { useWeb3AuthConnect, useWeb3AuthDisconnect, useWeb3AuthUser, useWeb3Auth } from "@web3auth/modal/react";
import {
getBitcoinPrivateKey,
getBitcoinAddressAndKeys,
getBitcoinBalance,
sendTaprootTransaction
} from "./bitcoinRPC";
import "./App.css";
function App() {
con... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/bitcoin-example/src/web3authContext.tsx | other/bitcoin-example/src/web3authContext.tsx | // IMP START - Quick Start
import { WEB3AUTH_NETWORK, CHAIN_NAMESPACES } from "@web3auth/modal";
import { type Web3AuthContextConfig } from "@web3auth/modal/react";
// IMP END - Quick Start
// IMP START - Dashboard Registration
const clientId = "BHgArYmWwSeq21czpcarYh0EVq2WWOzflX-NTK-tY1-1pauPzHKRRLgpABkmYiIV_og9jAvoI... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/bitcoin-example/src/index.tsx | other/bitcoin-example/src/index.tsx | import "./index.css";
import ReactDOM from "react-dom/client";
// IMP START - Setup Web3Auth Provider
import { Web3AuthProvider } from "@web3auth/modal/react";
import web3AuthContextConfig from "./web3authContext";
// IMP END - Setup Web3Auth Provider
import App from "./App";
ReactDOM.createRoot(document.getElementB... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/bitcoin-example/src/bitcoinRPC.ts | other/bitcoin-example/src/bitcoinRPC.ts | import ecc from "@bitcoinerlab/secp256k1";
import ECPairFactory from "ecpair";
import { Psbt, networks, payments, crypto, initEccLib } from "bitcoinjs-lib";
import axios from "axios";
import type { IProvider } from "@web3auth/modal";
// Initialize ECPair and ecc library
const ECPair = ECPairFactory(ecc);
initEccLib(ec... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/bitcoin-example/src/vite-env.d.ts | other/bitcoin-example/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/polkadot-example/vite.config.ts | other/polkadot-example/vite.config.ts | /* eslint-disable import/no-extraneous-dependencies */
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
// alias are only to be added when absolutely necessary, these modules are already present in the bro... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/polkadot-example/src/App.tsx | other/polkadot-example/src/App.tsx | import "./App.css";
import {
useWeb3AuthConnect, useWeb3AuthDisconnect, useWeb3AuthUser, useWeb3Auth
} from "@web3auth/modal/react";
import { getAccounts, getBalance, signAndSendTransaction } from "./polkadotRPC";
function App() {
const { connect, isConnected, loading: connectLoading, error: connectError } = useWe... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/polkadot-example/src/web3authContext.tsx | other/polkadot-example/src/web3authContext.tsx | // IMP START - Quick Start
import { authConnector, WEB3AUTH_NETWORK, type Web3AuthOptions } from "@web3auth/modal";
// IMP END - Quick Start
// IMP START - Dashboard Registration
const clientId = "BHgArYmWwSeq21czpcarYh0EVq2WWOzflX-NTK-tY1-1pauPzHKRRLgpABkmYiIV_og9jAvoIxQ8L3Smrwe04Lw"; // get from https://dashboard.we... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/polkadot-example/src/polkadotRPC.ts | other/polkadot-example/src/polkadotRPC.ts | /* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable no-console */
import { ApiPromise, Keyring, WsProvider } from "@polkadot/api";
import { cryptoWaitReady } from "@polkadot/util-crypto";
import type { IProvider } from "@web3auth/modal";
/**
* Makes a Polkadot API client
*/
export async functio... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Web3Auth/web3auth-examples | https://github.com/Web3Auth/web3auth-examples/blob/7cf44e9b226676781496f9274d56c70bfedde4bd/other/polkadot-example/src/index.tsx | other/polkadot-example/src/index.tsx | import "./index.css";
import ReactDOM from "react-dom/client";
// IMP START - Setup Web3Auth Provider
import { Web3AuthProvider } from "@web3auth/modal/react";
import web3AuthContextConfig from "./web3authContext";
// IMP END - Setup Web3Auth Provider
import App from "./App";
ReactDOM.createRoot(document.getElementB... | typescript | MIT | 7cf44e9b226676781496f9274d56c70bfedde4bd | 2026-01-05T04:59:52.308622Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.