File tree Expand file tree Collapse file tree 8 files changed +32
-10
lines changed
web-modal-sdk/quick-starts
react-hooks-modal-quick-start/src
vue-composables-modal-quick-start/src
web-no-modal-sdk/quick-starts
react-hooks-no-modal-quick-start/src
vue-composables-no-modal-quick-start/src Expand file tree Collapse file tree 8 files changed +32
-10
lines changed Original file line number Diff line number Diff line change 11import "./index.css" ;
22
33import ReactDOM from "react-dom/client" ;
4+ // IMP START - Setup Web3Auth Provider
45import { Web3AuthProvider } from "@web3auth/modal-react-hooks" ;
56import web3AuthContextConfig from "./web3authContext" ;
7+ // IMP END - Setup Web3Auth Provider
68
79import App from "./App" ;
810
911ReactDOM . createRoot ( document . getElementById ( "root" ) as HTMLElement ) . render (
12+ // IMP START - Setup Web3Auth Provider
1013 < Web3AuthProvider config = { web3AuthContextConfig } >
1114 < App />
1215 </ Web3AuthProvider >
16+ // IMP END - Setup Web3Auth Provider
1317) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const chainConfig = {
2424} ;
2525// IMP END - Chain Config
2626
27- // IMP START - SDK Initialization
27+ // IMP START - Instantiate SDK
2828const privateKeyProvider = new EthereumPrivateKeyProvider ( {
2929 config : {
3030 chainConfig,
@@ -37,17 +37,19 @@ const web3AuthOptions: Web3AuthOptions = {
3737 web3AuthNetwork : WEB3AUTH_NETWORK . SAPPHIRE_MAINNET ,
3838 privateKeyProvider,
3939} ;
40- // IMP END - SDK Initialization
40+ // IMP END - Instantiate SDK
4141
4242// IMP START - Configuring External Wallets
4343const adapters = getDefaultExternalAdapters ( { options : web3AuthOptions } ) ;
4444// IMP END - Configuring External Wallets
4545
46+ // IMP START - Instantiate SDK
4647const web3AuthContextConfig = {
4748 web3AuthOptions,
4849 // IMP START - Configuring External Wallets
4950 adapters : [ ...adapters ] ,
5051 // IMP END - Configuring External Wallets
5152} ;
53+ // IMP END - Instantiate SDK
5254
5355export default web3AuthContextConfig ;
Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import Home from " ./Home.vue" ;
3+ // IMP START - Setup Web3Auth Provider
34import { Web3AuthProvider } from " @web3auth/modal-vue-composables"
45import web3AuthContextConfig from " ./web3authContext" ;
6+ // IMP END - Setup Web3Auth Provider
57 </script >
68
79<template >
810 <div class =" min-h-screen flex flex-col" >
11+ <!-- IMP START - Setup Web3Auth Provider -->
912 <Web3AuthProvider :config =" web3AuthContextConfig" >
1013 <Home />
1114 </Web3AuthProvider >
15+ <!-- IMP END - Setup Web3Auth Provider -->
1216 </div >
1317</template >
1418
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const chainConfig = {
2424} ;
2525// IMP END - Chain Config
2626
27- // IMP START - SDK Initialization
27+ // IMP START - Instantiate SDK
2828const privateKeyProvider = new EthereumPrivateKeyProvider ( {
2929 config : {
3030 chainConfig,
@@ -37,17 +37,19 @@ const web3AuthOptions: Web3AuthOptions = {
3737 web3AuthNetwork : WEB3AUTH_NETWORK . SAPPHIRE_MAINNET ,
3838 privateKeyProvider,
3939} ;
40- // IMP END - SDK Initialization
40+ // IMP END - Instantiate SDK
4141
4242// IMP START - Configuring External Wallets
4343const adapters = getDefaultExternalAdapters ( { options : web3AuthOptions } ) ;
4444// IMP END - Configuring External Wallets
4545
46+ // IMP START - Instantiate SDK
4647const web3AuthContextConfig = {
4748 web3AuthOptions,
4849 // IMP START - Configuring External Wallets
4950 adapters : [ ...adapters ] ,
5051 // IMP END - Configuring External Wallets
5152} ;
53+ // IMP END - Instantiate SDK
5254
5355export default web3AuthContextConfig ;
Original file line number Diff line number Diff line change 11import "./index.css" ;
22
33import ReactDOM from "react-dom/client" ;
4+ // IMP START - Setup Web3Auth Provider
45import { Web3AuthProvider } from "@web3auth/no-modal-react-hooks" ;
56import web3AuthContextConfig from "./web3authContext" ;
7+ // IMP END - Setup Web3Auth Provider
68
79import App from "./App" ;
810
911ReactDOM . createRoot ( document . getElementById ( "root" ) as HTMLElement ) . render (
12+ // IMP START - Setup Web3Auth Provider
1013 < Web3AuthProvider config = { web3AuthContextConfig } >
1114 < App />
1215 </ Web3AuthProvider >
16+ // IMP END - Setup Web3Auth Provider
1317) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const chainConfig = {
2424} ;
2525// IMP END - Chain Config
2626
27- // IMP START - SDK Initialization
27+ // IMP START - Instantiate SDK
2828const privateKeyProvider = new EthereumPrivateKeyProvider ( {
2929 config : {
3030 chainConfig,
@@ -39,18 +39,19 @@ const web3AuthOptions: Web3AuthNoModalOptions = {
3939} ;
4040
4141const authAdapter = new AuthAdapter ( ) ;
42- // IMP END - SDK Initialization
42+ // IMP END - Instantiate SDK
4343
4444// IMP START - Configuring External Wallets
4545const adapters = getDefaultExternalAdapters ( { options : web3AuthOptions } ) ;
4646// IMP END - Configuring External Wallets
4747
48-
48+ // IMP START - Instantiate SDK
4949const web3AuthContextConfig = {
5050 web3AuthOptions,
5151 // IMP START - Configuring External Wallets
5252 adapters : [ authAdapter , ...adapters ] ,
5353 // IMP END - Configuring External Wallets
5454} ;
55+ // IMP END - Instantiate SDK
5556
5657export default web3AuthContextConfig ;
Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import Home from " ./Home.vue" ;
3+ // IMP START - Setup Web3Auth Provider
34import { Web3AuthProvider } from " @web3auth/no-modal-vue-composables"
45import web3AuthContextConfig from " ./web3authContext" ;
6+ // IMP END - Setup Web3Auth Provider
57 </script >
68
79<template >
810 <div class =" min-h-screen flex flex-col" >
11+ <!-- IMP START - Setup Web3Auth Provider -->
912 <Web3AuthProvider :config =" web3AuthContextConfig" >
1013 <Home msg =" Welcome to Your Vue.js + TypeScript App" />
1114 </Web3AuthProvider >
15+ <!-- IMP END - Setup Web3Auth Provider -->
1216 </div >
1317</template >
1418
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const chainConfig = {
2424} ;
2525// IMP END - Chain Config
2626
27- // IMP START - SDK Initialization
27+ // IMP START - Instantiate SDK
2828const privateKeyProvider = new EthereumPrivateKeyProvider ( {
2929 config : {
3030 chainConfig,
@@ -39,18 +39,19 @@ const web3AuthOptions: Web3AuthNoModalOptions = {
3939} ;
4040
4141const authAdapter = new AuthAdapter ( ) ;
42- // IMP END - SDK Initialization
42+ // IMP END - Instantiate SDK
4343
4444// IMP START - Configuring External Wallets
4545const adapters = getDefaultExternalAdapters ( { options : web3AuthOptions } ) ;
4646// IMP END - Configuring External Wallets
4747
48-
48+ // IMP START - Instantiate SDK
4949const web3AuthContextConfig = {
5050 web3AuthOptions,
5151 // IMP START - Configuring External Wallets
5252 adapters : [ authAdapter , ...adapters ] ,
5353 // IMP END - Configuring External Wallets
5454} ;
55+ // IMP END - Instantiate SDK
5556
5657export default web3AuthContextConfig ;
You can’t perform that action at this time.
0 commit comments