-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from Web3Auth/feat/next
Add nextjs example
- Loading branch information
Showing
38 changed files
with
5,812 additions
and
4,210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { FunctionComponent } from "react"; | ||
|
||
const Loader: FunctionComponent = () => { | ||
return <h1>Loading....</h1>; | ||
}; | ||
|
||
export default Loader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { CHAIN_NAMESPACES, CustomChainConfig } from "@web3auth/base"; | ||
|
||
export const CHAIN_CONFIG = { | ||
mainnet: { | ||
displayName: "Ethereum Mainnet", | ||
chainNamespace: CHAIN_NAMESPACES.EIP155, | ||
chainId: "0x1", | ||
rpcTarget: `https://mainnet.infura.io/v3/776218ac4734478c90191dde8cae483c`, | ||
blockExplorer: "https://etherscan.io/", | ||
ticker: "ETH", | ||
tickerName: "Ethereum", | ||
} as CustomChainConfig, | ||
solana: { | ||
chainNamespace: CHAIN_NAMESPACES.SOLANA, | ||
rpcTarget: "https://api.mainnet-beta.solana.com", | ||
blockExplorer: "https://explorer.solana.com/", | ||
chainId: "0x1", | ||
displayName: "Solana Mainnet", | ||
ticker: "SOL", | ||
tickerName: "Solana", | ||
} as CustomChainConfig, | ||
polygon: { | ||
chainNamespace: CHAIN_NAMESPACES.EIP155, | ||
rpcTarget: "https://polygon-rpc.com", | ||
blockExplorer: "https://polygonscan.com/", | ||
chainId: "0x89", | ||
displayName: "Polygon Mainnet", | ||
ticker: "matic", | ||
tickerName: "Matic", | ||
} as CustomChainConfig, | ||
} as const; | ||
|
||
export type CHAIN_CONFIG_TYPE = keyof typeof CHAIN_CONFIG; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export const WEB3AUTH_NETWORK = { | ||
mainnet: { | ||
displayName: "Mainnet", | ||
}, | ||
testnet: { | ||
displayName: "Testnet", | ||
}, | ||
cyan: { | ||
displayName: "Cyan", | ||
}, | ||
} as const; | ||
|
||
export type WEB3AUTH_NETWORK_TYPE = keyof typeof WEB3AUTH_NETWORK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
} | ||
experimental: { | ||
esmExternals: "loose", | ||
}, | ||
}; | ||
|
||
module.exports = nextConfig | ||
module.exports = nextConfig; |
Oops, something went wrong.